/** * Tauri-backed sensor client (paw-prints / civet-edging). Mirrors DG-Agent's * `WebBluetoothSensorClient` * (`packages/device-webbluetooth/src/sensor-client.ts`) — a single generic * client wraps either of `@dg-kit/protocol`'s sensor adapters * (`PawPrintsSensorAdapter`, `CivetPressureSensorAdapter`), since they share * the exact same `WebBluetoothSensorAdapter` shape and only their * LED-setting method name differs. Only the connection mechanism differs * from the Web Bluetooth version: `connectTauriAuxDevice()` instead of * `navigator.bluetooth.requestDevice()`. */ import type { SensorState } from '@dg-kit/core'; import { type BluetoothDeviceLike, type BluetoothRemoteGATTServerLike, type CivetPressureReading, type PawPrintsReading, type WebBluetoothSensorAdapter } from '@dg-kit/protocol'; import type { GattReadyRetryOptions } from './gatt-ready.js'; import type { DeviceSelectionController } from './scan.js'; export interface TauriBlecSensorClientOptions extends GattReadyRetryOptions { adapter: WebBluetoothSensorAdapter; selectDevice: (controller: DeviceSelectionController) => Promise; namePrefixes: string[]; scanDurationMs?: number; setIndicatorColor: (color: number) => Promise; } export declare class TauriBlecSensorClient { private readonly options; private readonly listeners; private device; constructor(options: TauriBlecSensorClientOptions); /** The BLE address of the currently-connected device, or `null` if disconnected. */ get address(): string | null; connect(): Promise; /** * Attach to an already-obtained `(device, server)` pair instead of * running this client's own scan + picker — see `aux-connect.ts`'s * `attachTauriAuxDevice()` doc comment. Lets a unified cross-kind picker * (`requestDgLabDeviceTauri()`) hand a picked+connected sensor straight to * this client once `detectDeviceKind()` identifies it. */ connectDevice(device: BluetoothDeviceLike, server: BluetoothRemoteGATTServerLike): Promise; disconnect(): Promise; getState(): Promise; subscribe(listener: (reading: TReading) => void): () => void; onStateChanged(listener: (state: SensorState) => void): () => void; setIndicatorColor(color: number): Promise; private readonly handleGattDisconnected; private emit; } export interface TauriBlecAuxSensorClientOptions extends GattReadyRetryOptions { selectDevice: (controller: DeviceSelectionController) => Promise; /** Overrides the default kind-scoped scan filter — mainly for tests. */ namePrefixes?: string[]; scanDurationMs?: number; } export declare class TauriBlecPawPrintsClient extends TauriBlecSensorClient { constructor(options: TauriBlecAuxSensorClientOptions); } export declare class TauriBlecCivetEdgingClient extends TauriBlecSensorClient { constructor(options: TauriBlecAuxSensorClientOptions); } //# sourceMappingURL=sensor-client.d.ts.map