Skip to content

@camera.ui/sdk / sensor / SensorLike

Interface: SensorLike ​

Defined in: sensor/base.ts:183

Read-only view of a sensor, as other plugins and the backend see it. Use this type when consuming sensors, not when creating them.

All state-modifying methods (setOn, reportDetections, etc.) live on the concrete sensor classes, not on SensorLike. Code that holds a SensorLike reference can only read state and observe changes.

Extended by ​

Properties ​

assignedCameraIds ​

readonly assignedCameraIds: readonly string[]

Defined in: sensor/base.ts:192


assignmentLocked ​

readonly assignmentLocked: boolean

Defined in: sensor/base.ts:193


capabilities ​

readonly capabilities: string[]

Defined in: sensor/base.ts:190


connected ​

readonly connected: boolean

Defined in: sensor/base.ts:191


displayName ​

readonly displayName: string

Defined in: sensor/base.ts:187


id ​

readonly id: string

Defined in: sensor/base.ts:184


name ​

readonly name: string

Defined in: sensor/base.ts:186


nativeId? ​

readonly optional nativeId?: string

Defined in: sensor/base.ts:188


onAssignmentChanged ​

readonly onAssignmentChanged: Observable<readonly string[]>

Defined in: sensor/base.ts:197


onCapabilitiesChanged ​

readonly onCapabilitiesChanged: Observable<string[]>

Defined in: sensor/base.ts:195


onConnectedChanged ​

readonly onConnectedChanged: Observable<boolean>

Defined in: sensor/base.ts:196


onPropertyChanged ​

readonly onPropertyChanged: Observable<{ property: string; timestamp: number; value: unknown; }>

Defined in: sensor/base.ts:194


pluginId? ​

readonly optional pluginId?: string

Defined in: sensor/base.ts:189


type ​

readonly type: SensorType

Defined in: sensor/base.ts:185

Methods ​

getValue() ​

getValue(property): unknown

Defined in: sensor/base.ts:200

Get the current value of a sensor property.

Parameters ​

property ​

string

Returns ​

unknown


getValues() ​

getValues(): Readonly<Record<string, unknown>>

Defined in: sensor/base.ts:202

Get a read-only snapshot of all property values.

Returns ​

Readonly<Record<string, unknown>>


hasCapability() ​

hasCapability(capability): boolean

Defined in: sensor/base.ts:211

Whether the sensor advertises the given capability.

Parameters ​

capability ​

string

Returns ​

boolean


updateValue() ​

updateValue(property, value): void | Promise<void>

Defined in: sensor/base.ts:209

Generic property write used by cross-process bridges. The owning sensor dispatches it to the matching semantic method, so plugin-side hardware overrides still run. Plugin authors call the semantic methods instead.

Parameters ​

property ​

string

value ​

unknown

Returns ​

void | Promise<void>