# InputSensorBinding

`import { InputSensorBinding } from "destack:input/binding";`

Sensor binding family.

```ds title="InputSensorBinding"
export interface InputSensorBinding {
    listSensors(device: InputDeviceHandle): Result<Sensor[], HostError>;
    setSensorStream(device: InputDeviceHandle, kind: SensorKind, stream: &'a readonly SensorStream): Result<SensorStreamState, HostError>;
    readSensor(device: InputDeviceHandle, kind: SensorKind, timeoutNs?: uint64 | undefined): Result<SensorSample, HostError>;
}
```

[language/library/src/input/binding/sensor.ds:92:127](https://github.com/destack-sh/destack/blob/main/language/library/src/input/binding/sensor.ds#L92-L127)

## Members

### `listSensors(device: InputDeviceHandle): Result<Sensor[], HostError>`

List supported sensors for one input device.

### `setSensorStream(device: InputDeviceHandle, kind: SensorKind, stream: &'a readonly SensorStream): Result<SensorStreamState, HostError>`

Set one sensor stream state.

### `readSensor(device: InputDeviceHandle, kind: SensorKind, timeoutNs?: uint64 | undefined): Result<SensorSample, HostError>`

Read one sensor sample.
