LepuDeviceParams
No behavioral description is attached to this declaration. The public signature, parameter and return types, and source location below document its published contract.
Kind: Interface
Package: @ovok/native
Import
import { LepuDeviceParams } from '@ovok/native/bt-management';
TypeScript shape
interface LepuDeviceParams {
clockSyncProtocol?: "bp2" | "bp3";
decorateReading?: CustomReadingDecorator;
createFrameHandler?: CustomFrameHandlerFactory;
sessionPolicy?: CustomSessionPolicy;
id?: string;
nameMatch?: string | RegExp;
transport?: LepuTransportName;
protocol?: "v2" | "viatom-oxygen";
manufacturerDataProtocol?: "viatom-oxygen";
rejectEncryptionAtBytes?: number[];
v2?: {
minLengthBytes: number;
caseSelectorBytes?: number[];
cases: CustomCaseSpec[];
};
setClockBeforeInfo?: boolean;
writeWithoutResponse?: boolean;
fileTransfer?: "ecg" | "bp2" | "bp3";
ecgFileDecoder?: "raw-int16";
clockSync?: ClockSyncCapability;
expectedDeviceTypes?: number[];
pollCommand?: number;
pollIntervalMs?: number;
minLengthBytes: number;
caseSelectorBytes?: number[];
cases: CustomCaseSpec[];
stuckDataTimeoutMs?: number;
}
This is a type-level export; it has no call parameters.
Public members
| Member | Type | Details |
|---|---|---|
clockSyncProtocol | "bp2" | "bp3" | Optional. Clock payload format used before INFO, when clock synchronization is enabled. |
decorateReading | CustomReadingDecorator | Optional. — |
createFrameHandler | CustomFrameHandlerFactory | Optional. — |
sessionPolicy | CustomSessionPolicy | Optional. Aggregate valid live samples when the protocol describes a session. |
id | string | Optional. Reported back as deviceData.name, and must not collide with a built-in device. |
nameMatch | string | RegExp | Optional. The name the hardware advertises. |
transport | LepuTransportName | Optional. Which characteristics the product exposes. Nearly all of them are "standard". |
protocol | "v2" | "viatom-oxygen" | Optional. The protocol variant behind the shared Viatom service. |
manufacturerDataProtocol | "viatom-oxygen" | Optional. Selects the OxyII service and framing from the manufacturer's advertisement. |
rejectEncryptionAtBytes | number[] | Optional. Manufacturer-data byte indexes whose high nibble of 2 requires encryption. |
v2 | { minLengthBytes: number; caseSelectorBytes?: number[]; cases: CustomCaseSpec[]; } | Optional. Additional OxyII monitor cases, selected by manufacturer-data protocol V2. |
setClockBeforeInfo | boolean | Optional. Sends the Viatom oximeter clock command before INFO. |
writeWithoutResponse | boolean | Optional. Uses write-without-response, as the Viatom oximeter characteristic requires. |
fileTransfer | "ecg" | "bp2" | "bp3" | Optional. — |
ecgFileDecoder | "raw-int16" | Optional. Decoder used for stored ECG files. Omit this when the format is not verified. |
clockSync | ClockSyncCapability | Optional. Declares the device clock capability when the protocol has been verified. |
expectedDeviceTypes | number[] | Optional. The models this declaration was written for, as the device reports them. Required to poll, and only ever learned from hardware: declare the device without a pollCommand first, connect, and read the model it reports. |
pollCommand | number | Optional. The opcode to poll with once the device has proved it is one of those models. Leave it out and the device identifies itself and nothing more. That is the safe first connection to hardware nobody has identified, because the low opcodes in this family act - one inflates a cuff, another starts an ECG - and mean different things on different products. |
pollIntervalMs | number | Optional. Delay before each realtime poll, for devices with a fixed polling cadence. |
minLengthBytes | number | Shortest frame any declared case may be read from. The seven-byte header and the trailing checksum are part of it, so a one-byte payload is nine. |
caseSelectorBytes | number[] | Optional. Byte offsets that pick the case. The command byte at index 1 is the usual choice, and products that answer one command with several shapes add the byte that distinguishes them. |
cases | CustomCaseSpec[] | — |
stuckDataTimeoutMs | number | Optional. — |
Learn the workflow
Continue with Bluetooth for the workflow context and examples.