Skip to content

@camera.ui/sdk / sensor / SensorLike

Interface: SensorLike

Defined in: sensor/base.ts:168

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:177


assignmentLocked

readonly assignmentLocked: boolean

Defined in: sensor/base.ts:178


capabilities

readonly capabilities: string[]

Defined in: sensor/base.ts:175


connected

readonly connected: boolean

Defined in: sensor/base.ts:176


displayName

readonly displayName: string

Defined in: sensor/base.ts:172


id

readonly id: string

Defined in: sensor/base.ts:169


name

readonly name: string

Defined in: sensor/base.ts:171


nativeId?

readonly optional nativeId?: string

Defined in: sensor/base.ts:173


onAssignmentChanged

readonly onAssignmentChanged: Observable<readonly string[]>

Defined in: sensor/base.ts:182


onCapabilitiesChanged

readonly onCapabilitiesChanged: Observable<string[]>

Defined in: sensor/base.ts:180


onConnectedChanged

readonly onConnectedChanged: Observable<boolean>

Defined in: sensor/base.ts:181


onPropertyChanged

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

Defined in: sensor/base.ts:179


pluginId?

readonly optional pluginId?: string

Defined in: sensor/base.ts:174


type

readonly type: SensorType

Defined in: sensor/base.ts:170

Methods

getValue()

getValue(property): unknown

Defined in: sensor/base.ts:185

Get the current value of a sensor property.

Parameters

property

string

Returns

unknown


getValues()

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

Defined in: sensor/base.ts:187

Get a read-only snapshot of all property values.

Returns

Readonly<Record<string, unknown>>


hasCapability()

hasCapability(capability): boolean

Defined in: sensor/base.ts:196

Whether the sensor advertises the given capability.

Parameters

capability

string

Returns

boolean


updateValue()

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

Defined in: sensor/base.ts:194

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>