@ovok/native/bt-management
Bluetooth Low Energy device management: scanning, pairing, connecting, reading measurements and syncing them.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Bluetooth Low Energy device management: scanning, pairing, connecting, reading measurements and syncing them.
Import from @ovok/native/bt-management.
Components
BluetoothDevicePicker()
function BluetoothDevicePicker(__namedParameters): Element;A theme-aware picker for BTManager's multi-device auto-connect callback.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | BluetoothDevicePickerProps |
Returns
Element
BluetoothRuntimeProvider()
function BluetoothRuntimeProvider(__namedParameters): Element;Provides a BluetoothRuntime to the Bluetooth hooks below it.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | PropsWithChildren<{ runtime: BluetoothRuntime; }> |
Returns
Element
BTProvider()
function BTProvider<T>(__namedParameters):
| string
| number
| bigint
| boolean
| Iterable<ReactNode, any, any>
| Promise<AwaitedReactNode>
| Element
| null
| undefined;Provides Bluetooth management to its children, optionally requesting permission on mount and gating the children behind it.
Type Parameters
| Type Parameter |
|---|
T extends readonly AcceptedDevice[] |
Parameters
| Parameter | Type |
|---|---|
__namedParameters | PropsWithChildren<BTProviderProps<T>> |
Returns
| string
| number
| bigint
| boolean
| Iterable<ReactNode, any, any>
| Promise<AwaitedReactNode>
| Element
| null
| undefined
DefaultPermissionFallback()
function DefaultPermissionFallback(__namedParameters): Element;Default screen shown when Bluetooth permission is denied or blocked, with a button to request access or open settings.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | BTProviderPermissionFallbackProps |
Returns
Element
Hooks
useBackgroundSync()
function useBackgroundSync(__namedParameters?): object;Turns background Bluetooth sync on or off and reports its status.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | UseBackgroundSyncOptions |
Returns
| Name | Type | Description |
|---|---|---|
enabled | boolean | Whether background sync is on. |
error? | Error | Error from the last attempt to change the state. |
flush() | () => Promise<void> | Delivers queued background results now. |
reason? | string | Why sync is restricted, when it is. |
setEnabled() | (enabled) => Promise<void> | Turns background sync on or off. |
status | BackgroundSyncStatus | Current sync status. |
useBluetoothPermission()
function useBluetoothPermission(__namedParameters?): object;Tracks Bluetooth permission and requests it, again when the app resumes from settings.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | UseBluetoothPermissionOptions |
Returns
| Name | Type | Default value | Description |
|---|---|---|---|
accessPermission | boolean | undefined | - | Whether permission is granted; undefined until known. |
openSettings() | () => void | - | Opens the system settings for the app. |
request() | () => Promise<boolean> | - | Asks the user for Bluetooth permission. |
requestPermission() | () => Promise<boolean> | request | Alias of request. |
status | BluetoothPermissionStatus | - | Current permission status. |
useBluetoothRuntime()
function useBluetoothRuntime(): BluetoothRuntime;Returns the runtime of the enclosing BTProvider.
Returns
Throws
If rendered outside BTProvider.
useBluetoothSelector()
function useBluetoothSelector<Selection>(selector, isEqual?): Selection;Subscribes to a slice of the runtime state, re-rendering only when it changes by isEqual.
Type Parameters
Parameters
| Parameter | Type | Default value |
|---|---|---|
selector | (snapshot) => Selection | undefined |
isEqual? | (previous, next) => boolean | Object.is |
Returns
Selection
useBluetoothState()
function useBluetoothState(__namedParameters?): object;Reports whether Bluetooth is usable, folding permission status into the adapter state.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | UseBluetoothStateOptions |
Returns
| Name | Type | Description |
|---|---|---|
openSettings() | () => void | Opens the system settings for the app. |
permissionStatus | BluetoothPermissionStatus | Current permission status. |
requestPermission() | () => Promise<boolean> | Asks the user for Bluetooth permission. |
state | BluetoothState | Adapter state; unauthorized when permission is denied or blocked. |
useBTDevice()
function useBTDevice<Filter>(filter, __namedParameters?): object;Follows and controls one device matched by a model key or filter.
Type Parameters
| Type Parameter |
|---|
Filter extends BTDeviceFilter |
Parameters
| Parameter | Type |
|---|---|
filter | Filter |
__namedParameters? | UseBTDeviceOptions |
Returns
| Name | Type | Default value | Description |
|---|---|---|---|
connect() | () => Promise<void> | - | Connects to the selected device. |
device | RuntimeDevice | undefined | selected | The selected device, if any. |
devices | readonly RuntimeDevice[] | matches | Every device matching the filter. |
disconnect() | () => Promise<void> | - | Disconnects from the selected device. |
events | readonly DeviceConnectionEvent[] | - | Recent connection events of the selected device. |
latestResult | RuntimeResult | undefined | selected.latestResult | Most recent result of the selected device. |
model | Filter extends DeviceKey ? Filter : undefined | - | Model key asked for; undefined for a filter. |
raw | RawBluetoothAccess | undefined | - | Raw GATT access, when allowRawAccess is set. |
requiresSelection | boolean | - | True when several devices match and none is selected. |
results | readonly RuntimeResult[] | - | Recent results of the selected device. |
select() | (deviceId) => boolean | - | Selects a device by ID. |
status | DeviceStatus | undefined | selected.status | Status of the selected device. |
useBTDevices()
function useBTDevices(filter): readonly RuntimeDevice[];Every connected or nearby device filter asks for, in the order Bluetooth found them.
Parameters
| Parameter | Type |
|---|---|
filter | BTDeviceFilter |
Returns
readonly RuntimeDevice[]
useDeviceConnection()
function useDeviceConnection(id?): object;Follows the status and connection events of one device.
Parameters
| Parameter | Type |
|---|---|
id? | string |
Returns
| Name | Type | Description |
|---|---|---|
events | readonly DeviceConnectionEvent[] | Recent connection events, oldest first. |
status? | DeviceStatus | Latest status of the device. |
useHealthImport()
function useHealthImport<TType>(__namedParameters): object;Manages the health data import switch and the access status of the given types.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { adapter: HealthImportAdapter<TType>; background?: boolean; types: readonly TType[]; } |
__namedParameters.adapter | HealthImportAdapter<TType> |
__namedParameters.background? | boolean |
__namedParameters.types | readonly TType[] |
Returns
| Name | Type | Description |
|---|---|---|
enabled | boolean | Whether import is switched on. |
error? | Error | Error of the last status check or request. |
notShared | readonly TType[] | Types the user has not shared. |
setEnabled() | (enabled) => Promise<void> | Switches import on, requesting access first, or off. |
statusByType | Partial<Record<TType, Awaited<ReturnType<HealthImportAdapter<TType>["getStatus"]>>>> | Access status per type. |
useMeasurements()
function useMeasurements(onResult?, __namedParameters?): object;Collects results from every device, filtered by a result policy.
Parameters
| Parameter | Type |
|---|---|
onResult? | (result) => void |
__namedParameters? | UseMeasurementsOptions |
Returns
| Name | Type | Description |
|---|---|---|
clear() | () => void | Clears the collected results. |
measurements | readonly RuntimeResult[] | Kept results, oldest first. |
useNearbyDeviceOffer()
function useNearbyDeviceOffer(__namedParameters): object;Offers a newly found, not yet paired nearby device to the user to accept, decline or postpone.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | UseNearbyDeviceOfferOptions |
Returns
| Name | Type | Description |
|---|---|---|
accept() | () => Promise<void> | Pairs the offered device and remembers it. |
decline() | (deviceId?) => Promise<void> | Remembers a device as declined so it is not offered again. |
device? | RuntimeDevice | Device currently offered. |
error? | BluetoothError | Error from the last pairing attempt. |
later() | () => void | Hides the current offer until the app restarts. |
status | NearbyDeviceOfferStatus | Offer status. |
undecline() | (deviceId) => Promise<void> | Forgets a declined device so it can be offered again. |
useNearbyDevices()
function useNearbyDevices(): object;Lists devices found by scanning and connects to one on request.
Returns
| Name | Type | Description |
|---|---|---|
devices | readonly RuntimeDevice[] | Devices currently found. |
pair() | (id) => Promise<RuntimeDevice | undefined> | Connects to the device with the given ID; resolves to it, or undefined if unknown. |
useOpenSeries()
function useOpenSeries(manager): readonly OpenSeries[];The series a BTManager is recording, updated as each value arrives: the live values to show while a device
streams (latest), before the series is stored.
Parameters
| Parameter | Type |
|---|---|
manager | SeriesSource | undefined |
Returns
readonly OpenSeries[]
usePairedDevices()
function usePairedDevices(__namedParameters): object;Keeps a persisted list of paired device IDs, optionally connecting to them automatically.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | UsePairedDevicesOptions |
Returns
| Name | Type | Description |
|---|---|---|
forget() | (id) => Promise<void> | Disconnects a device and removes it from the paired list. |
pair() | (device) => Promise<void> | Adds a device to the paired list. |
paired | readonly string[] | IDs of the paired devices. |
useQueuedResults()
function useQueuedResults<T>(coordinator): readonly BackgroundSyncResult<T>[];The results a BackgroundSyncCoordinator still holds for the current account: readings not saved yet.
Type Parameters
| Type Parameter |
|---|
T extends DeviceKey |
Parameters
| Parameter | Type |
|---|---|
coordinator | QueueSource<T> | undefined |
Returns
readonly BackgroundSyncResult<T>[]
useRequestPermissions()
function useRequestPermissions(__namedParameters): object;Requests Bluetooth permission for BTProvider, optionally on mount.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | Pick<BTProviderProps<IntegratedDevices[]>, "onAccessPermissionChanged" | "requestPermissionOnMount"> |
Returns
| Name | Type | Default value | Description |
|---|---|---|---|
accessPermission | boolean | undefined | - | Whether permission is granted; undefined until known. |
openBleSetting() | () => void | openSettings | Opens the system settings for the app. |
requestPermission() | () => Promise<boolean> | - | Asks the user for Bluetooth permission. |
status | BluetoothPermissionStatus | - | Current permission status. |
useRuntimeEvent()
function useRuntimeEvent<K>(event, callback): void;Listens for a runtime event for as long as the component is mounted.
Type Parameters
| Type Parameter |
|---|
K extends keyof RuntimeEventMap |
Parameters
| Parameter | Type |
|---|---|
event | K |
callback | (value) => void |
Returns
void
useScanControl()
function useScanControl(): object;Exposes scan pause/resume to apps using BTProvider.
Returns
| Name | Type | Description |
|---|---|---|
canControl | boolean | Whether a manager is available to control scanning. |
pauseScan() | () => void | Pauses scanning. |
resumeScan() | () => void | Resumes scanning. |
Classes
A606CommandSequencer
Decides what to send a device, and when.
These protocols are self-clocking: the device answers a request, and the answer is what says which request comes next. A file read walks its offsets that way, and an identity check gates everything after it on the reply to the first command. Neither can be expressed by re-sending one fixed frame, which is all the SDK could do before.
At most one command is outstanding at a time. The transport serialises writes, so an implementation may assume the frame it is answering is the reply to the command it last returned.
Implements
Constructors
Constructor
new A606CommandSequencer(clockSync?): A606CommandSequencer;Parameters
| Parameter | Type |
|---|---|
clockSync? | ClockSyncOptions |
Returns
Methods
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
isHistoryTransfer()
isHistoryTransfer(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
Implementation of
CommandSequencer.isHistoryTransfer
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
A606Device
Viatom/Lepu ZH-SG-A606 meter, which uploads stored records after connection.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new A606Device(device, params): A606Device;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<ZH_SG_A606> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
A606FrameReader
Reads the & C/D ... checksum frames used by Viatom's ZH-SG glucose protocol.
Implements
FrameReader
Constructors
Constructor
new A606FrameReader(): A606FrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Extracts the next complete frame from the notification buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
Aoj20aDevice
AOJ-20A driver with clock sync, offline history and named device errors.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new Aoj20aDevice(device, params): Aoj20aDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<AOJ20A> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
AojCommandSequencer
Walks AOJ's clock, metadata, history and optional clear exchange.
Implements
Constructors
Constructor
new AojCommandSequencer(params): AojCommandSequencer;Parameters
| Parameter | Type |
|---|---|
params | AojCommandSequencerParams |
Returns
Methods
commandProgress()
commandProgress(frame): "ignored" | "partial" | "complete";Describes whether a frame is ignored, partial, or completes the outstanding command.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
"ignored" | "partial" | "complete"
Implementation of
CommandSequencer.commandProgress
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
isHistoryTransfer()
isHistoryTransfer(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
Implementation of
CommandSequencer.isHistoryTransfer
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
AojFrameReader
Reads AOJ's aa 01 command length payload xor notifications.
Implements
FrameReader
Constructors
Constructor
new AojFrameReader(): AojFrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Extracts the next complete frame from the notification buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
BackgroundSyncCoordinator
Queues results for the signed-in account and delivers them, retrying failed deliveries.
Type Parameters
| Type Parameter |
|---|
T extends DeviceKey |
Constructors
Constructor
new BackgroundSyncCoordinator<T>(options): BackgroundSyncCoordinator<T>;Parameters
| Parameter | Type |
|---|---|
options | CoordinatorOptions<T> |
Returns
Methods
enqueue()
enqueue(result): Promise<void>;Queues a result for the current account and tries to deliver the queue.
Parameters
| Parameter | Type |
|---|---|
result | ResultCallback<T> |
Returns
Promise<void>
flush()
flush(options?): Promise<void>;Tries to deliver the queued results; resolves once the attempt is done.
Parameters
| Parameter | Type |
|---|---|
options? | BackgroundSyncFlushOptions |
Returns
Promise<void>
getQueued()
getQueued(): readonly BackgroundSyncResult<T>[];The current account's results still waiting to be accepted, oldest first: readings to show as not saved yet.
Kept up to date by every enqueue and flush; subscribe reads the stored queue in first.
Returns
readonly BackgroundSyncResult<T>[]
subscribe()
subscribe(listener): () => void;Calls listener whenever the waiting results change; the first subscriber reads the stored queue in.
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
updateOptions()
updateOptions(options): void;Replaces the coordinator options.
Parameters
| Parameter | Type |
|---|---|
options | CoordinatorOptions<T> |
Returns
void
BloodGlucoseDevice
Decodes the legacy TaiDoc, GlucoCheck Gold and TeleBGM glucose protocols.
Extends
BTManagedDevice<GlucoseDevice>
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new BloodGlucoseDevice(device, params): BloodGlucoseDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<GlucoseDevice> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
BluetoothError
Error carrying a stable code and an optional translation key.
Extends
Error
Constructors
Constructor
new BluetoothError(
code,
message,
translationKey?,
originalError?
): BluetoothError;Parameters
| Parameter | Type | Description |
|---|---|---|
code | BluetoothErrorCode | Stable machine-readable failure code. |
message | string | - |
translationKey? | string | Translation key, when the message is one. |
originalError? | unknown | Underlying error this one was created from. |
Returns
Overrides
Error.constructor
Properties
| Property | Modifier | Type | Default value | Description | Overrides |
|---|---|---|---|---|---|
code | public readonly | BluetoothErrorCode | undefined | Stable machine-readable failure code. | - |
name | public readonly | "BluetoothError" | "BluetoothError" | Always "BluetoothError". | Error.name |
originalError? | public readonly | unknown | undefined | Underlying error this one was created from. | - |
translationKey? | public readonly | string | undefined | Translation key, when the message is one. | - |
abstract BTManagedDevice
Base class for a Bluetooth device managed by the SDK: connects, subscribes, parses frames and reports results, status changes and connection events through its callbacks.
Extended by
BloodGlucoseDeviceCustomDeviceVerovalEcgDeviceVerovalActivityDeviceTrasenseS9DeviceCheckmePodDeviceAoj20aDeviceGenialT31DeviceA606DeviceCheckmeProDevice
Type Parameters
Implements
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Constructors
Constructor
new BTManagedDevice<T>(device, __namedParameters): BTManagedDevice<T>;Parameters
| Parameter | Type | Description |
|---|---|---|
device | Device | The underlying BLE device. |
__namedParameters | CreateDeviceParams<T> | - |
Returns
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Implementation of
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Implementation of
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
device | public readonly | Device | The underlying BLE device. |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. |
id | public | string | Platform identifier of the underlying BLE device. |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. |
BTManager
Scans for, connects to and reports readings from the accepted Bluetooth devices.
Type Parameters
| Type Parameter |
|---|
T extends readonly AcceptedDevice[] |
Constructors
Constructor
new BTManager<T>(
bleManager,
acceptedDevices,
options?
): BTManager<T>;Parameters
| Parameter | Type |
|---|---|
bleManager | BleManager |
acceptedDevices | T |
options? | BTManagerOptions |
Returns
BTManager<T>
Methods
destroy()
destroy(): void;Stops scanning, disconnects devices and releases the manager.
Returns
void
disconnectDevice()
disconnectDevice(deviceId): Promise<void>;Disconnects one device so it can be rediscovered by a later advertisement.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<void>
forget()
forget(deviceId): Promise<void>;Disconnects one device and ignores later advertisements for this manager's lifetime.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<void>
getOpenSeries()
getOpenSeries(): readonly OpenSeries[];The series being recorded, each with its latest values: what to show while a device streams.
Returns
readonly OpenSeries[]
keepConnecting()
keepConnecting(deviceIds): void;On iOS, keeps a connection request pending for each device, so the system reconnects it when it advertises and the app can read it in the background without the advertisement carrying a service UUID. Use it for the devices the user has paired. Does nothing on other platforms.
A device that connects is handled like one the scan found, and its request is made again if it drops the link. Explicitly disconnecting, forgetting or stopping the scan ends the request.
Parameters
| Parameter | Type |
|---|---|
deviceIds | readonly string[] |
Returns
void
onConnectionEvent()
onConnectionEvent(callback?): void;Sets the callback called for device connection events.
Parameters
| Parameter | Type |
|---|---|
callback? | (data) => void |
Returns
void
onDeviceFound()
onDeviceFound(callback?): void;Sets the callback called with each newly discovered device.
Parameters
| Parameter | Type |
|---|---|
callback? | (device, manager) => Promise<void> |
Returns
void
onDeviceStatusChanged()
onDeviceStatusChanged(callback?): void;Sets the callback called when a device's connection status changes.
Parameters
| Parameter | Type |
|---|---|
callback? | (data) => void |
Returns
void
onError()
onError(callback?): void;Sets the callback called with Bluetooth errors.
Parameters
| Parameter | Type |
|---|---|
callback? | (data) => void |
Returns
void
onResult()
onResult(callback?): void;Sets the callback called with each result; series that closed while nobody listened are delivered first. It may
return a promise that resolves once the result is queued or saved: with recordCursorStorage set, the stored file
the result came from (a Viatom ER1's or BP2's) is then not read again. A file whose promise rejects, or whose
callback returns nothing, is read again on the next history sync.
Parameters
| Parameter | Type |
|---|---|
callback? | (data) => void | Promise<unknown> |
Returns
void
onWaveform()
onWaveform(callback?): void;Sets the callback called with the live ECG samples of recording devices; for display, never saved.
Parameters
| Parameter | Type |
|---|---|
callback? | (waveform) => void |
Returns
void
pauseScan()
pauseScan(): void;Pauses discovery without tearing down devices or their callbacks.
Use this when an app temporarily stops scanning, for example while it is in the background but an already-connected device may still deliver a measurement.
Returns
void
restoreDevices()
restoreDevices(devices): void;Treats already-known BLE devices as freshly discovered and clears their forgotten state.
Parameters
| Parameter | Type |
|---|---|
devices | readonly Device[] |
Returns
void
resumeScan()
resumeScan(): void;Resumes discovery without clearing devices or callbacks.
Restarting unconditionally also recovers when an app stopped the underlying BLE scan directly while BTManager still believed it was active.
Returns
void
setAutoConnect()
setAutoConnect(
enabledOrOptions,
delayMs?,
onDeviceSelectionRequired?
): void;Enables or disables automatic connection, either with positional arguments or an options object.
Parameters
| Parameter | Type |
|---|---|
enabledOrOptions | | boolean | { delayMs?: number; enabled: boolean; onDeviceSelectionRequired?: (selection) => void; } |
delayMs? | number |
onDeviceSelectionRequired? | (selection) => void |
Returns
void
setBackgroundScanEnabled()
setBackgroundScanEnabled(enabled): void;Switches only the scan policy; the app can keep a foreground scan broad.
Parameters
| Parameter | Type |
|---|---|
enabled | boolean |
Returns
void
startScan()
startScan(): void;Starts scanning once the Bluetooth adapter is powered on; does nothing while a scan is running.
Returns
void
stopRecording()
stopRecording(deviceId): Promise<void>;Stops the recording a connected recorder holds open, for instance once the user confirms it
after a recording event with leadOff. Rejects when the device is not connected or holds
no recording.
Parameters
| Parameter | Type |
|---|---|
deviceId | string |
Returns
Promise<void>
stopScan()
stopScan(): void;Stops scanning, disconnects the devices and clears the callbacks.
Returns
void
subscribeOpenSeries()
subscribeOpenSeries(listener): () => void;Calls listener whenever a series gets a value or closes; returns the unsubscribe.
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
CheckmeFrameReader
Handles split notifications, concatenated notifications, and both vendor envelopes.
Implements
FrameReader
Constructors
Constructor
new CheckmeFrameReader(): CheckmeFrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Extracts the next complete frame from the notification buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
CheckmePodDevice
Checkme Pod and Checkme Pod-WPS's realtime protocol from ViHealth.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new CheckmePodDevice(device, params): CheckmePodDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<CHECKME_POD> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
CheckmePodFrameReader
Reads split and concatenated Checkme Pod notifications with CRC validation.
Implements
FrameReader
Constructors
Constructor
new CheckmePodFrameReader(): CheckmePodFrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Extracts the next CRC-valid frame from the notification buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
CheckmePodSequencer
Drives the info -> clock sync -> realtime exchange used by Checkme Pod.
Implements
Constructors
Constructor
new CheckmePodSequencer(params): CheckmePodSequencer;Parameters
| Parameter | Type |
|---|---|
params | CheckmePodSequencerParams |
Returns
Methods
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
CheckmeProDevice
Viatom Checkme Pro history transfer, matching the CheckmeBleInterface in ViHealth.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new CheckmeProDevice(device, params): CheckmeProDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<CHECKME> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
CheckmeProSequencer
Downloads Checkme Pro history using the command exchange in ViHealth's CheckmeBleInterface. The device returns list records first; the daily list and ECG list then point to waveform files, which are read with the same offset-based transfer.
Implements
Constructors
Constructor
new CheckmeProSequencer(params): CheckmeProSequencer;Parameters
| Parameter | Type |
|---|---|
params | CheckmeTransferParams |
Returns
Methods
commandTimeoutMs()
commandTimeoutMs(): number | undefined;The response timeout for the currently outstanding command, when a protocol needs one.
Returns
number | undefined
Implementation of
CommandSequencer.commandTimeoutMs
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
isHistoryTransfer()
isHistoryTransfer(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
Implementation of
CommandSequencer.isHistoryTransfer
isNormalDisconnect()
isNormalDisconnect(): boolean;True when a timeout-style disconnect is the device's normal completion signal.
Returns
boolean
Implementation of
CommandSequencer.isNormalDisconnect
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
onCommandTimeout()
onCommandTimeout(): CommandTimeoutResult;Re-sends the current command or ends the exchange after a response timeout.
Returns
Implementation of
CommandSequencer.onCommandTimeout
CustomDevice
Runs a device registered with defineCustomDevice.
Everything specific to the device is data: the services and characteristics it exposes, how a complete frame is recognised, which frame carries which reading, and how each byte range becomes a number. What is left here is the safety net - a reading is reported only when every property the declaration named decoded to a finite number inside the range the catalog accepts. Anything else is reported through onError and no measurement is emitted.
Extends
Extended by
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;A Lepu device that polls live keeps its stored files until asked; without polling it reads them on connect.
Returns
boolean
Overrides
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new CustomDevice(
device,
params,
definition
): CustomDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<CustomDeviceId> |
definition | CustomDeviceDefinition |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops the open recording; the device stores it when it is long enough, and the files are then read.
Returns
Promise<void>
Overrides
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
DeviceSelectionRequiredError
Thrown when several devices match and none was selected.
Extends
Error
Constructors
Constructor
new DeviceSelectionRequiredError(model, ids): DeviceSelectionRequiredError;Parameters
| Parameter | Type |
|---|---|
model | string |
ids | readonly string[] |
Returns
Overrides
Error.constructor
GenialT31CommandSequencer
Answers Genial's handshake, clock request, temperature and error frames.
Implements
Constructors
Constructor
new GenialT31CommandSequencer(now?): GenialT31CommandSequencer;Parameters
| Parameter | Type |
|---|---|
now? | () => Date |
Returns
Methods
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
GenialT31Device
Genial T31 Bluetooth thermometer, as used by the ViHealth app.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new GenialT31Device(device, params): GenialT31Device;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<GENIAL_T31> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
GenialT31FrameReader
Reads the A6 ... checksum 6A frames used by Genial T31 thermometers.
Implements
FrameReader
Constructors
Constructor
new GenialT31FrameReader(): GenialT31FrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Extracts the next complete frame from the notification buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
LepuFileTransfer
Downloads the records a Lepu device has stored.
Every opcode this uses is generic and inert - list, open, read, close - so unlike a realtime poll it is safe on hardware whose model is not known. That is what makes it the one thing the whole family can be asked for without identifying it first.
The exchange is self-clocking and has no windowing: each reply decides the next request, and the device chooses how much to send, so the offset advances by what actually arrived rather than by an assumed chunk size. There is no retry in the protocol either - a single dropped reply stalls the transfer with nothing to resume it - which is what the data processor's stuck-data timeout is the watchdog for.
A short read is an error, not a truncated success: the device is asked to close the file and the reading is discarded, because half an ECG that looks like a whole one is worse than none.
Implements
Constructors
Constructor
new LepuFileTransfer(params): LepuFileTransfer;Parameters
| Parameter | Type |
|---|---|
params | LepuFileTransferParams |
Returns
Methods
initialCommands()
initialCommands(delayBeforeWriteMs?): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Parameters
| Parameter | Type |
|---|---|
delayBeforeWriteMs? | number |
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
isHistoryTransfer()
isHistoryTransfer(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
Implementation of
CommandSequencer.isHistoryTransfer
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
S9CommandSequencer
Runs only the SH09 commands verified on firmware image 1.
Implements
Constructors
Constructor
new S9CommandSequencer(params): S9CommandSequencer;Parameters
| Parameter | Type |
|---|---|
params | S9CommandSequencerParams |
Returns
Methods
commandProgress()
commandProgress(frame): "ignored" | "partial" | "complete";Describes whether a frame is ignored, partial, or completes the outstanding command.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
"ignored" | "partial" | "complete"
Implementation of
CommandSequencer.commandProgress
commandTimeoutMs()
commandTimeoutMs(): number;The response timeout for the currently outstanding command, when a protocol needs one.
Returns
number
Implementation of
CommandSequencer.commandTimeoutMs
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
isHistoryTransfer()
isHistoryTransfer(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
Implementation of
CommandSequencer.isHistoryTransfer
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
onCommandTimeout()
onCommandTimeout(): CommandTimeoutResult;Re-sends the current command or ends the exchange after a response timeout.
Returns
Implementation of
CommandSequencer.onCommandTimeout
S9FrameReader
SH09 notifications are fixed-width, zero-padded 20-byte replies.
Implements
FrameReader
Constructors
Constructor
new S9FrameReader(): S9FrameReader;Returns
Methods
readFrame()
readFrame(buffer): FrameReadResult;Returns the next fixed-width frame in the buffer.
Parameters
| Parameter | Type |
|---|---|
buffer | readonly string[] |
Returns
FrameReadResult
Implementation of
FrameReader.readFrame
TrasenseS9Device
Trasense SH09. Its address and advertisement data are sensitive and never logged.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new TrasenseS9Device(device, params): TrasenseS9Device;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<TRASENSE_S9> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
VerovalActivityDevice
HARTMANN's Veroval Activity wristband, including stored step and heart-rate history.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new VerovalActivityDevice(device, params): VerovalActivityDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<VEROVAL_ACTIVITY> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
VerovalActivitySequencer
Drives the private history protocol used by the Veroval Activity wristband.
Implements
Constructors
Constructor
new VerovalActivitySequencer(params): VerovalActivitySequencer;Parameters
| Parameter | Type |
|---|---|
params | VerovalActivitySequencerParams |
Returns
Methods
initialCommands()
initialCommands(): readonly DeviceCommand[];Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
readonly DeviceCommand[]
Implementation of
CommandSequencer.initialCommands
nextCommand()
nextCommand(frame): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
readonly DeviceCommand[] | undefined
Implementation of
VerovalDuoControlDevice
The Veroval duo control.
A device class rather than a declaration, because reading it is a conversation: the two user memories are asked in turn, and the device answers with bare control bytes as often as with payload. The decoding is still declared - the class supplies the framing and the walk, and nothing else.
Readings are stored measurements, not live ones. The device hands over its history when asked, so what arrives was taken before the connection and may be days old.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;A Lepu device that polls live keeps its stored files until asked; without polling it reads them on connect.
Returns
boolean
Inherited from
CustomDevice.readsHistoryOnRequest
Constructors
Constructor
new VerovalDuoControlDevice(device, params): VerovalDuoControlDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<CustomDeviceId> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops the open recording; the device stores it when it is long enough, and the files are then read.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | CustomDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | CustomDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | CustomDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | CustomDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | CustomDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | CustomDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | CustomDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | CustomDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | CustomDevice.onWaveform |
VerovalEcgDevice
The Veroval ECG.
Reading it is a download rather than a decode, so the whole recording is assembled before anything is reported: thirty-four seconds of samples at 128 Hz, two bytes each, converted to millivolts with the device's own calibration.
The vendor's app plots a thirty-second window of this with a baseline-wander filter applied. That is a display transform, not calibration, so it is deliberately not reproduced here - what is reported is what the device recorded.
Extends
Accessors
readsHistoryOnRequest
Get Signature
get readsHistoryOnRequest(): boolean;Whether the records the device stored are read only on syncHistory. Such a device goes live
as soon as it connects; any other reads its stored records each time it connects.
Returns
boolean
Inherited from
BTManagedDevice.readsHistoryOnRequest
Constructors
Constructor
new VerovalEcgDevice(device, params): VerovalEcgDevice;Parameters
| Parameter | Type |
|---|---|
device | Device |
params | CreateDeviceParams<VEROVAL_ECG> |
Returns
Overrides
Methods
connect()
connect(): Promise<void>;Connects to the device and starts reading.
Resolves immediately if already connected and shares the pending promise while connecting.
Returns
Promise<void>
Throws
If the device has been destroyed.
Inherited from
destroy()
destroy(): void;Stops the connection and data processing and clears the callbacks.
Returns
void
Inherited from
disconnect()
disconnect(): Promise<void>;Stops this device's subscriptions and closes its BLE connection.
Returns
Promise<void>
Inherited from
stopRecording()
stopRecording(): Promise<void>;Stops a recording the device holds open; only recorders that report one support it.
Returns
Promise<void>
Inherited from
syncHistory()
syncHistory(): Promise<void>;Reads the records the device stored: over the open connection, or once it next connects.
Returns
Promise<void>
Inherited from
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
device | public readonly | Device | The underlying BLE device. | BTManagedDevice.device |
deviceData | public | DeviceData | Identity and capabilities of this device, updated as device information is read. | BTManagedDevice.deviceData |
id | public | string | Platform identifier of the underlying BLE device. | BTManagedDevice.id |
onConnectionEvent? | public | (data) => void | Called for connection lifecycle events such as connected, bonded or history download. | BTManagedDevice.onConnectionEvent |
onDeviceDisconnected? | public | () => void | Called when the device disconnects. | BTManagedDevice.onDeviceDisconnected |
onDeviceStatusChanged? | public | (status, measurementTypeKey?) => void | Called when the connection status changes. | BTManagedDevice.onDeviceStatusChanged |
onError? | public | (error) => void | Called with a normalised error; cleared by destroy. | BTManagedDevice.onError |
onResult? | public | (data, delivered?) => void | Called with each measurement that passes the result policy; cleared by destroy. delivered is called once the app took it: the promise its result callback returned resolved. | BTManagedDevice.onResult |
onWaveform? | public | (waveform) => void | Called with the ECG samples of each realtime answer while a recorder records; for display only. | BTManagedDevice.onWaveform |
Functions
aoj20aThermometer()
function aoj20aThermometer(params): CustomDeviceDefinition;The AOJ-20A infrared thermometer.
Declared without a write characteristic, because the device sends its reading rather than waiting to be asked: the vendor app has a request for it, calls it from nowhere, and still displays temperatures - so the reply arrives when someone takes a measurement. Not writing also means not polling, which for a spot-check device would otherwise re-report the same reading for as long as the link stayed up.
Only the realtime reply is declared. The stored-history reply shares the header and would need its own case; nothing reads history yet, and a case that decoded it into the same measurement would post old readings as though they had just been taken.
Parameters
| Parameter | Type |
|---|---|
params | AojDeviceParams |
Returns
aojCommandByte()
function aojCommandByte(frame): number;Reads the command byte of a frame.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
number
bluetoothErrorCodeFor()
function bluetoothErrorCodeFor(error): BluetoothErrorCode;Classifies any thrown value into a BluetoothErrorCode.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
bosoMedicusMonitor()
function bosoMedicusMonitor(params): CustomDeviceDefinition;Declares a boso medicus system monitor.
The monitor stores readings and sends them through the standard 0x1810/0x2A35 profile after pairing. The shared profile declaration handles mmHg, optional timestamps, pulse rate and the profile's user/status bytes without inventing a boso-specific wire format.
Parameters
| Parameter | Type |
|---|---|
params | BosoMedicusParams |
Returns
bp2aMonitor()
function bp2aMonitor(params): CustomDeviceDefinition;BP2A, the arm-cuff monitor of the series.
Parameters
| Parameter | Type |
|---|---|
params | ViatomBpParams |
Returns
bp2tMonitor()
function bp2tMonitor(params): CustomDeviceDefinition;BP2T, documented by the vendor alongside BP2 and BP2A as the same protocol.
Parameters
| Parameter | Type |
|---|---|
params | ViatomBpParams |
Returns
bp2vMonitor()
function bp2vMonitor(params): CustomDeviceDefinition;BP2V, the WiFi variant that uses the BP2 realtime layout without ECG frames.
Parameters
| Parameter | Type |
|---|---|
params | ViatomBpParams |
Returns
bp2wMonitor()
function bp2wMonitor(params): CustomDeviceDefinition;BP2W. Documented in its own section, but decoding the same realtime struct.
Parameters
| Parameter | Type |
|---|---|
params | ViatomBpParams |
Returns
bpu26Monitor()
function bpu26Monitor(params): CustomDeviceDefinition;BPU 26, the Veroval compact+ upper-arm monitor.
Parameters
| Parameter | Type |
|---|---|
params | VerovalBpParams |
Returns
bpw26Monitor()
function bpw26Monitor(params): CustomDeviceDefinition;BPW 26, the Veroval compact+ wrist monitor.
Parameters
| Parameter | Type |
|---|---|
params | VerovalBpParams |
Returns
btDeviceMatches()
function btDeviceMatches(device, filter): boolean;Whether a runtime device is one filter asks for.
Parameters
| Parameter | Type |
|---|---|
device | RuntimeDevice |
filter | BTDeviceFilter |
Returns
boolean
buildA606ConnectedCommand()
function buildA606ConnectedCommand(): string[];The vendor's post-connect command for the ZH-SG family.
Returns
string[]
buildA606TimeCommand()
function buildA606TimeCommand(now): string[];Writes the local clock in the six-byte YY MM DD hh mm ss payload.
Parameters
| Parameter | Type |
|---|---|
now | Date |
Returns
string[]
buildA606UploadCommand()
function buildA606UploadCommand(ack?): string[];Requests the next stored record after the current one was accepted.
Parameters
| Parameter | Type | Default value |
|---|---|---|
ack? | boolean | false |
Returns
string[]
buildAojFrame()
function buildAojFrame(command, payload?): string[];Builds an AOJ frame for a command and payload, with its XOR checksum.
Parameters
| Parameter | Type | Default value |
|---|---|---|
command | number | undefined |
payload? | readonly number[] | [] |
Returns
string[]
buildGenialT31TimeCommand()
function buildGenialT31TimeCommand(now?): string[];Builds the vendor's A6 05 37 weekday hour minute second checksum 6A clock frame.
Parameters
| Parameter | Type |
|---|---|
now? | Date |
Returns
string[]
checkmeCommand()
function checkmeCommand(command, payload?): string[];Builds the frame for a command with an optional hex payload.
Parameters
| Parameter | Type | Default value |
|---|---|---|
command | number | undefined |
payload? | readonly string[] | [] |
Returns
string[]
checkmePodCommand()
function checkmePodCommand(
command,
payload?,
sequence?
): string[];Builds the AA command envelope used by Checkme Pod and Checkme Pod-WPS.
Parameters
| Parameter | Type | Default value |
|---|---|---|
command | number | undefined |
payload? | readonly string[] | [] |
sequence? | number | 0 |
Returns
string[]
checkmePodSyncTime()
function checkmePodSyncTime(now?): string[];Builds the frame that sets the device clock to the given time.
Parameters
| Parameter | Type |
|---|---|
now? | Date |
Returns
string[]
checkmeReadContent()
function checkmeReadContent(sequence): string[];Builds the frame that requests the chunk with the given sequence number.
Parameters
| Parameter | Type |
|---|---|
sequence | number |
Returns
string[]
checkmeReadEnd()
function checkmeReadEnd(): string[];Builds the frame that closes the open file.
Returns
string[]
checkmeReadFileStart()
function checkmeReadFileStart(name): string[];Builds the frame that opens the named file for reading.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
string[]
clockSyncCapabilityForDevice()
function clockSyncCapabilityForDevice(deviceName): ClockSyncCapability;Built-in capability declarations; custom declarations provide their own value.
Parameters
| Parameter | Type |
|---|---|
deviceName | string |
Returns
createBackgroundBleManager()
function createBackgroundBleManager(__namedParameters?): BleManager;Creates a BLE manager configured for iOS CoreBluetooth state restoration. The returned manager must be created once at module scope, not inside a React render.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | BackgroundBleManagerOptions |
Returns
BleManager
createBluetoothRuntime()
function createBluetoothRuntime(bleManager?, initialBackgroundScanEnabled?): BluetoothRuntime;Creates the store that backs the Bluetooth hooks.
Parameters
| Parameter | Type |
|---|---|
bleManager? | BleManager |
initialBackgroundScanEnabled? | boolean |
Returns
createFakeBleDevice()
function createFakeBleDevice(__namedParameters): FakeBleDevice;Creates a GATT-capable fake device for connection and notification tests.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | FakeBleDeviceOptions |
Returns
createFakeBleManager()
function createFakeBleManager(__namedParameters?): FakeBleManager;Creates a fake BLE manager with a controllable adapter state and scan results.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | FakeBleManagerOptions |
Returns
createFileQueueStorage()
function createFileQueueStorage(prefix?): BackgroundSyncStorage;Stores each queue key in its own document file, so ECGs are not limited by KV entry sizes.
Parameters
| Parameter | Type | Default value |
|---|---|---|
prefix? | string | "ovok-native-background-sync" |
Returns
createLegacyResultId()
function createLegacyResultId(deviceData, data): string;The id SDKs before 1.16.1 gave the same reading, to find what they saved.
Parameters
| Parameter | Type |
|---|---|
deviceData | DeviceData |
data | Measurement |
Returns
string
createStableResultId()
function createStableResultId(
deviceData,
data,
receivedAt?
): string;Creates an identity that is stable when a device sends its stored history again, in any time zone. A reading without a time of its own is a new measurement each time, so it is told apart by when it arrived.
Parameters
| Parameter | Type |
|---|---|
deviceData | DeviceData |
data | Measurement |
receivedAt? | Date |
Returns
string
decodeAojError()
function decodeAojError(code): string | undefined;Describes a temperature error code in words, or undefined for an unknown code.
Parameters
| Parameter | Type |
|---|---|
code | number |
Returns
string | undefined
decodeCheckmeEcgFile()
function decodeCheckmeEcgFile(bytes): CheckmeEcgFile | undefined;Decodes Checkme's 21-byte ECG header and little-endian signed waveform.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
CheckmeEcgFile | undefined
decodeCheckmePodResponse()
function decodeCheckmePodResponse(frame): CheckmePodResponse | undefined;Decodes a complete response frame, or returns undefined if its header or length is invalid.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
CheckmePodResponse | undefined
decodeCheckmeResponse()
function decodeCheckmeResponse(bytes): CheckmeResponse | undefined;Decodes the two response envelopes used by Checkme Pro's vendor library.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
CheckmeResponse | undefined
decodePulsebitEcgFile()
function decodePulsebitEcgFile(bytes): CheckmeEcgFile | undefined;Decodes the 44-byte Pulsebit ECG header and its signed waveform.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
CheckmeEcgFile | undefined
decodeVerovalEcgSamples()
function decodeVerovalEcgSamples(bytes, calibration?): number[];Turns the bytes of a recording into millivolts.
A trailing odd byte is ignored: half a sample is not a sample. The conversion is the device's own, applied as it states it rather than reduced to a single factor, so a header that reports a different range still decodes correctly.
Parameters
| Parameter | Type | Default value |
|---|---|---|
bytes | readonly string[] | undefined |
calibration? | EcgCalibration | DEFAULT_CALIBRATION |
Returns
number[]
decodeViatomEcgRecording()
function decodeViatomEcgRecording(bytes): ViatomEcgRecording;Decodes an ER1/ER2 recording. A file whose waveform does not last as long as its tail records is returned empty, because that file is in a format this decoder does not read.
Parameters
| Parameter | Type |
|---|---|
bytes | Uint8Array |
Returns
defineCustomDevice()
function defineCustomDevice(spec, options?): CustomDeviceDefinition;Validates a declaration and compiles it into a runnable device.
Every rule the declarative decoder relies on is checked here, at registration, because the alternative is a plausible wrong number at read time. Registration fails loudly - it throws, naming the exact position in the declaration - and a device that fails to compile is never scanned for.
Parameters
| Parameter | Type |
|---|---|
spec | CustomDeviceSpec |
options? | { createCommandSequencer?: CustomSequencerFactory; createFrameHandler?: CustomFrameHandlerFactory; decorateReading?: CustomReadingDecorator; frameReader?: FrameReader; } |
options.createCommandSequencer? | CustomSequencerFactory |
options.createFrameHandler? | CustomFrameHandlerFactory |
options.decorateReading? | CustomReadingDecorator |
options.frameReader? | FrameReader |
Returns
defineRecordedDeviceFrames()
function defineRecordedDeviceFrames<T>(fixtures): Readonly<Record<T, readonly RecordedBleFrame[]>>;A registry helper lets an app keep fixtures for every device it supports.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
fixtures | Record<T, readonly RecordedBleFrame[]> |
Returns
Readonly<Record<T, readonly RecordedBleFrame[]>>
describeLepuResponseType()
function describeLepuResponseType(frame): string;Why a device refused, in words, for an error a person will read.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
string
deviceTitle()
function deviceTitle(deviceData): string;Returns the most useful human-readable name for a connected device. A product sharing a parser with other brands is named by its variant. Known integrated and catalog devices keep their product name even when the peripheral reports a radio-module manufacturer and model. Unknown devices fall back to their reported identity and then their advertised name.
Parameters
| Parameter | Type |
|---|---|
deviceData | DeviceData |
Returns
string
er1Recorder()
function er1Recorder(advertisedName, params): CustomDeviceDefinition;The ER1, and the handheld recorders sold under other names on the same protocol.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomEcgParams |
Returns
er2Recorder()
function er2Recorder(advertisedName, params): CustomDeviceDefinition;The ER2, which reads the same block but over a link that grants nothing beyond the minimum. Asking it for the MTU the rest of the family grants is what the vendor's own SDK declines to do, and a command longer than the link carries is truncated rather than refused.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomEcgParams |
Returns
er3Recorder()
function er3Recorder(advertisedName, params): CustomDeviceDefinition;The ER3, which reads the same parameter block from a different opcode.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomEcgParams |
Returns
findDeviceVariant()
function findDeviceVariant(device, advertisedName): DeviceVariant | undefined;The brand and model behind an advertised name, for a parser listed in DEVICE_VARIANTS.
Parameters
| Parameter | Type |
|---|---|
device | string |
advertisedName | string |
Returns
DeviceVariant | undefined
getBackgroundServiceUUIDs()
function getBackgroundServiceUUIDs(acceptedDevices, additionalServiceUUIDs?): string[];The services a background scan asks for: those of every accepted device whose services are known, and
additionalServiceUUIDs. In the background iOS (and Android with the screen off) reports only devices advertising a
listed service, so an accepted device whose services aren't known is found by a foreground scan only. One such
device must not empty the list: iOS can't scan in the background without one.
Parameters
| Parameter | Type | Default value |
|---|---|---|
acceptedDevices | readonly AcceptedDevice[] | undefined |
additionalServiceUUIDs? | readonly string[] | [] |
Returns
string[]
getClockParts()
function getClockParts(date, timezone?): object;Splits a date into calendar and clock parts in the given timezone.
Parameters
| Parameter | Type | Default value |
|---|---|---|
date | Date | undefined |
timezone? | ClockSyncTimezone | "local" |
Returns
| Name | Type | Description |
|---|---|---|
day | number | Day of the month. |
hours | number | Hours, 0-23. |
milliseconds | number | Milliseconds, 0-999. |
minutes | number | Minutes, 0-59. |
month | number | Month, 1-12. |
seconds | number | Seconds, 0-59. |
year | number | Full year. |
getRestoredBleState()
function getRestoredBleState(restoreStateIdentifier?): BleRestoredState | null | undefined;Returns the state restored for an identifier, or undefined if restoration has not run yet.
Parameters
| Parameter | Type | Default value |
|---|---|---|
restoreStateIdentifier? | string | DEFAULT_RESTORE_STATE_IDENTIFIER |
Returns
BleRestoredState | null | undefined
isClockSyncEnabled()
function isClockSyncEnabled(options?): boolean;True unless clock synchronisation is explicitly disabled.
Parameters
| Parameter | Type |
|---|---|
options? | ClockSyncOptions |
Returns
boolean
isLepuSuccess()
function isLepuSuccess(frame): boolean;Whether the frame reports success.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
boolean
isTrasenseS9Advertisement()
function isTrasenseS9Advertisement(advertisedName, manufacturerData?): boolean;The SH09 reuses company ID 0x0A0A and advertises only as "S9". Require both fields and the exact manufacturer payload length; the name alone is ambiguous. react-native-ble-plx exposes the manufacturer-specific bytes as base64, including the two company-ID bytes at the start of the AD structure.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
manufacturerData? | string |
Returns
boolean
lepodMonitor()
function lepodMonitor(advertisedName, params): CustomDeviceDefinition;Declares a Lepod, reporting every reading its realtime frame carries.
An instrument that is not attached reports a value outside the physiological range for what it measures, so that reading is discarded and reported while the others in the same frame are still delivered. The device also marks those conditions in bits of a lead-off byte, which a declaration cannot select on - reading them quietly needs a device class.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | LepodParams |
Returns
lepuDevice()
function lepuDevice(params): CustomDeviceDefinition;Builds a custom device definition for a Lepu/Viatom family product from its params.
Parameters
| Parameter | Type |
|---|---|
params | LepuDeviceParams |
Returns
lepuNameMatch()
function lepuNameMatch(name, vocabulary?): RegExp;Builds a matcher for one advertised name that cannot also match a longer one.
The vendor tests these names with a substring check in a hand-ordered cascade, so BP2
only fails to match a BP2W because BP2W happens to be checked first. Order is a fragile
place to keep a safety property: it lives in whoever wrote the list, is invisible at the
point of use, and an insertion in the wrong place silently binds the wrong driver.
Here the exclusions are derived instead. Every name in the vocabulary that extends this one becomes a negative lookahead, so the matcher is correct wherever it is used and in whatever order it is tried.
The match is deliberately open at the end, because these devices advertise a serial after
the model - BP2 1234 - and the serial's shape varies across the family.
Parameters
| Parameter | Type | Default value |
|---|---|---|
name | string | undefined |
vocabulary? | readonly string[] | LEPU_DEVICE_NAMES |
Returns
RegExp
lepuResponseType()
function lepuResponseType(frame): number;Reads the response type byte of a frame.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
number
lpBp2wMonitor()
function lpBp2wMonitor(params): CustomDeviceDefinition;LP-BP2W, the Lepu-branded WiFi variant of the BP2 family.
Parameters
| Parameter | Type |
|---|---|
params | ViatomBpParams |
Returns
parseA606Record()
function parseA606Record(frame): A606Record | undefined;Decodes the 12-byte glucose payload inside a verified 16-byte ZH-SG record.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
A606Record | undefined
parseCheckmeBloodPressureRecords()
function parseCheckmeBloodPressureRecords(bytes): CheckmeBloodPressureRecord[];Parses a blood pressure list file into records, skipping entries with an invalid date.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseCheckmeDailyRecords()
function parseCheckmeDailyRecords(bytes): CheckmeDailyRecord[];Parses a daily list file into records, skipping entries with an invalid date.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseCheckmeEcgRecords()
function parseCheckmeEcgRecords(bytes): CheckmeEcgRecord[];Parses an ECG list file into records, skipping entries with an invalid date.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseCheckmeOxygenRecords()
function parseCheckmeOxygenRecords(bytes): CheckmeOxygenRecord[];Parses an oxygen list file into records, skipping entries with an invalid date.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseCheckmePodRealtimeReading()
function parseCheckmePodRealtimeReading(content): CheckmePodRealtimeReading | undefined;Decodes the 20-byte RtParam prefix used by the vendor's realtime response.
Parameters
| Parameter | Type |
|---|---|
content | readonly string[] |
Returns
CheckmePodRealtimeReading | undefined
parseCheckmeTemperatureRecords()
function parseCheckmeTemperatureRecords(bytes): CheckmeTemperatureRecord[];Parses a temperature list file into records, skipping entries with an invalid date.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseLepuDeviceInfo()
function parseLepuDeviceInfo(frame): LepuDeviceInfo | undefined;Reads the reply to GET_INFO, or nothing if the frame is not one.
The command byte is checked rather than assumed, because this is the answer a driver decides its identity on: parsing some other frame as device info would produce a model number out of whatever bytes happened to sit at offset 20, and the gate would then pass on a coincidence.
A frame too short to hold the layout is refused for the same reason, as is one whose response type is anything but success: an error reply carries a reason where the device information would be, and reading it as a model number would identify the hardware from an error code. The vendor's own struct is at least 56 bytes; anything shorter than the serial length field cannot be read without inventing the parts that are missing.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
LepuDeviceInfo | undefined
parsePulsebitEcgRecords()
function parsePulsebitEcgRecords(bytes): PulsebitEcgRecord[];Decodes the 17-byte ECG index used by Pulsebit and Checkme EX.
Parameters
| Parameter | Type |
|---|---|
bytes | readonly string[] |
Returns
parseRecordedAt()
function parseRecordedAt(frame): Date | undefined;Reads the recording time from a history frame, or undefined if it is not a valid date.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
Date | undefined
parseVerovalDuoControlRecordMetadata()
function parseVerovalDuoControlRecordMetadata(frame, recordOffset):
| Pick<VerovalDuoControlMeasurement, "recordedAt" | "irregularHeartbeat">
| undefined;Reads the timestamp and irregular heartbeat flag of a stored record, or undefined if invalid.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
recordOffset | number |
Returns
| Pick<VerovalDuoControlMeasurement, "recordedAt" | "irregularHeartbeat">
| undefined
recordedAtFromT31Frame()
function recordedAtFromT31Frame(frame, now): Date | undefined;Reconstructs when a reading was taken from the weekday and time in a frame, or undefined if invalid.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
now | Date |
Returns
Date | undefined
recordedAtFromViatomFileName()
function recordedAtFromViatomFileName(name): Date | undefined;Reads the recording time encoded in the ER file name, when present.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Date | undefined
replayRecordedFrames()
function replayRecordedFrames(frames, sink): Promise<void>;Replays captured characteristic frames through an app-provided test sink.
Parameters
| Parameter | Type |
|---|---|
frames | readonly RecordedBleFrame[] |
sink | RecordedFrameSink |
Returns
Promise<void>
requestBluetoothPermission()
function requestBluetoothPermission(): Promise<boolean>;Asks the OS for the Bluetooth permissions the platform needs; resolves to whether all were granted.
Returns
Promise<boolean>
reviveResultDates()
function reviveResultDates<T>(value): T;Converts the ISO date strings of recordedAt, start and end fields back to Dates, recursively.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
value | T |
Returns
T
setDeviceSecretStorage()
function setDeviceSecretStorage(next): void;Sets the durable storage used for device secrets; pass undefined to keep them in memory only.
Parameters
| Parameter | Type |
|---|---|
next | DeviceSecretStorage | undefined |
Returns
void
standardBloodPressureDevice()
function standardBloodPressureDevice(params): CustomDeviceDefinition;Declares a Bluetooth SIG blood pressure profile device.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
standardGlucoseDevice()
function standardGlucoseDevice(params): CustomDeviceDefinition;Declares a Bluetooth SIG glucose profile device.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
standardHeartRateDevice()
function standardHeartRateDevice(params): CustomDeviceDefinition;Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
Both heart-rate layouts are declared. A contact-not-detected frame is idle, so it cannot
become a false reading while the strap is off the body. RR intervals, a list of any
length, are read from the frame by the decorator and reported as rrIntervals.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
standardPulseOximeterDevice()
function standardPulseOximeterDevice(params): CustomDeviceDefinition;Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
Saturation and pulse rate are both required by the catalog, which matches the specification: a spot-check measurement always carries both, at bytes 1-4 whatever the flags say, so every flags value selects the same fields. The optional ones follow them.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
standardThermometerDevice()
function standardThermometerDevice(params): CustomDeviceDefinition;Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
standardWeightScaleDevice()
function standardWeightScaleDevice(params): CustomDeviceDefinition;Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
The reading is a scaled integer rather than a float, so the resolution is applied here. A weight of 0xFFFF means the measurement failed, so it yields no reading.
Parameters
| Parameter | Type |
|---|---|
params | StandardDeviceParams |
Returns
tmbBpMonitor()
function tmbBpMonitor(advertisedName, params): CustomDeviceDefinition;Declares a Viatom TMB monitor, whose history protocol is separate from the BP3 Lepu flow.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomBpParams |
Returns
toBluetoothError()
function toBluetoothError(error): BluetoothError;Wraps any thrown value in a BluetoothError, keeping an existing one as is.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
verovalCompactMonitor()
function verovalCompactMonitor(advertisedName, params): CustomDeviceDefinition;Declares a compact Veroval blood pressure monitor by its advertised name.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | VerovalBpParams |
Returns
verovalFusionMonitor()
function verovalFusionMonitor(params?): CustomDeviceDefinition;Declares the Veroval fusion wireless blood-pressure monitor.
Parameters
| Parameter | Type |
|---|---|
params? | VerovalFusionParams |
Returns
viatomBpMonitor()
function viatomBpMonitor(advertisedName, params): CustomDeviceDefinition;Declares one monitor of the BP2 series.
advertisedName is the name the vendor's SDK matches - BP2A, BP2T - and the matcher
derived from it excludes every longer name in the family, so a declaration for BP2
cannot pick up a BP2W.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomBpParams |
Returns
viatomOximeter()
function viatomOximeter(advertisedName, params): CustomDeviceDefinition;Declares one oximeter of the range.
The ViHealth wire protocol uses a distinct AA request / 55 response envelope. Replies
carry a status byte rather than echoing the opcode, and the sensor state at byte 18 tells
us whether the reading is usable. No-finger and acquiring frames are deliberately idle:
they are normal states while the user puts the ring on, not decoding failures.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params | ViatomOximeterParams |
Returns
viatomOxyIiMonitor()
function viatomOxyIiMonitor(advertisedName, params?): CustomDeviceDefinition;Declares one model on the dedicated OxyII service and A5 frame.
Parameters
| Parameter | Type |
|---|---|
advertisedName | string |
params? | ViatomOxyIiParams |
Returns
visomatComfortSoftBtMonitor()
function visomatComfortSoftBtMonitor(params): CustomDeviceDefinition;Declares the visomat comfort soft BT upper-arm monitor.
The monitor uses the Bluetooth SIG Blood Pressure Service and Measurement characteristic, so the shared profile handles the 0x2A35 measurement without a vendor-specific command or pairing flow.
Parameters
| Parameter | Type |
|---|---|
params | VisomatComfortSoftBtParams |
Returns
Interfaces
A606Record
A stored glucose record.
Properties
| Property | Type | Description |
|---|---|---|
bloodGlucose | number | Blood glucose value as reported by the device. |
dataPosition | number | Position of the record in the device history. |
recordedAt | Date | When the reading was taken. |
BackgroundBleManagerOptions
Options for createBackgroundBleManager.
Extends
Pick<BleManagerOptions,"restoreStateIdentifier">
Properties
| Property | Type | Description |
|---|---|---|
onRestoreState? | (state) => void | Called with the restored CoreBluetooth state, or null when there is none. |
BackgroundSyncFlushOptions
Options for a flush of the background sync queue.
Properties
BackgroundSyncOptions
Options for delivering results while the app is in the background.
Type Parameters
Properties
| Property | Type | Description |
|---|---|---|
android? | object | Optional Android foreground-service configuration. When present, the service keeps the JS BLE scan process alive while the app is backgrounded. |
android.foregroundService? | AndroidBluetoothForegroundServiceOptions | Android foreground-service configuration. |
enabled? | boolean | Background delivery is opt-in. |
getOwnerKey? | () => string | undefined | Returns the stable, opaque key for the account currently able to accept a result. Required at runtime before queueing or delivering account-owned data. |
maxRetries? | number | Number of delivery attempts before an item is retained as exhausted. |
notifications? | object | Optional local notification after a queued reading is accepted by onResult. |
notifications.body? | string | ((result) => string) | Notification body, fixed or built from the result. |
notifications.data? | | Record<string, string | number | boolean | null> | ((result) => | Record<string, string | number | boolean | null> | undefined) | Payload attached to the notification, fixed or built from the result. |
notifications.enabled? | boolean | Whether local notifications are shown. |
notifications.shouldNotify? | (result) => boolean | Return false to suppress the notification for this accepted result. |
notifications.title? | string | Notification title. |
onError? | (error) => void | Called when a corrupt stored queue is moved aside and reset. |
onResult | (result) => Promise<void> | Called after a result is persisted. Resolve only after the result is accepted. |
onResults? | (results) => Promise<void> | Takes every result that is due at once, so a device emptying its memory is saved in a few requests rather than one a reading. Resolve only after all of them are accepted. When it rejects, each is delivered by onResult on its own, so one that can't be saved doesn't hold back the rest; delivering a result twice must be harmless. |
restoreStateIdentifier? | string | iOS restoration identifier. Keep this stable for the lifetime of the app. |
retryBackoffMs? | number | Base delay for retries. Delays grow exponentially up to the third attempt. |
serviceUUIDs? | readonly string[] | Additional service UUIDs to scan, useful for custom/native device declarations. |
storage | BackgroundSyncStorage | A durable store that can hold hundreds of KB; createFileQueueStorage is provided for Expo. |
storageKey? | string | Storage key used by the queue. |
BackgroundSyncResult
A queued result being delivered, with its delivery bookkeeping.
Extends
Type Parameters
Properties
| Property | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|
attempt | number | Number of delivery attempts so far. | - | - |
data | OmitCaseType<MeasurementTypeForDevices<[T]>> | The measurement. | - | ResultCallback.data |
deviceData | DeviceData | Device that produced the result. | - | ResultCallback.deviceData |
id | string | Stable reading identity for idempotent delivery by the application backend. | ResultCallback.id | - |
legacyId? | string | The id SDKs before 1.16.1 gave this reading, to recognise one they already saved. | - | ResultCallback.legacyId |
ownerKey | string | Stable owner that queued this reading; use it instead of the active account when routing. | - | - |
queuedAt | string | ISO timestamp of when the result was queued. | - | - |
queueId? | string | Queue entry identity; unlike id, this changes when a reading is enqueued again. | - | - |
recordedFor? | string | The account a series was recorded for. It closes later, perhaps after someone else signs in, and is queued for this account, not for whoever is signed in then. | - | ResultCallback.recordedFor |
series? | MeasurementSeries | Every value of a series, for a result that closes one (a streaming device's values over up to an hour). data then holds each property's mean, from the series' start. | - | ResultCallback.series |
BackgroundSyncStorage
Key-value storage the background queue persists to.
Properties
| Property | Type | Description |
|---|---|---|
getItem | (key) => Promise<string | null> | Reads the value stored under a key, or null. |
setItem | (key, value) => Promise<void> | Stores a value under a key. |
BluetoothDevicePickerProps
Props of BluetoothDevicePicker.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
devices | readonly BTDeviceSelection[] | Devices to choose from. | - |
dismissLabel? | string | Dismiss button label; defaults to "Not now". | - |
getDeviceImage? | (device) => string | undefined | Returns an image URI for a device, shown in its default row. | - |
labelForDevice? | (device) => string | Returns the display name of a device; defaults to its derived device title. | - |
onDismiss? | () => void | Called when the user dismisses the picker; the dismiss button only renders when provided. | - |
onSelect | (device) => void | Called with the device the user picks. | - |
renderRow? | (device, actions) => ReactNode | Renders a custom row; return undefined to fall back to the default row. | - |
slots? | Partial<OvokUiSlots> | Replace individual primitives without forking an SDK component. | OvokUiProps.slots |
testID? | string | Test identifier of the modal; the backdrop gets the -backdrop suffix. | - |
theme? | OvokThemeOverride | A partial theme is merged with the active react-native-paper theme. | OvokUiProps.theme |
title? | string | Heading text; defaults to "Choose a device". | - |
visible | boolean | Whether the picker is shown. | - |
BluetoothRuntime
Shared store and event bus behind the Bluetooth hooks.
Properties
| Property | Type | Description |
|---|---|---|
bleManager? | BleManager | BLE manager the runtime was created with. |
clearResults | () => void | Clears the results of every device. |
devices | readonly RuntimeDevice[] | Known devices. |
emit | <K>(event, value) => void | Delivers an event to its listeners. |
flushBackgroundSync | () => Promise<void> | Delivers queued background results; rejects when background sync is not configured. |
getBackgroundScanEnabled | () => boolean | Whether background scanning is on. |
getPairedDeviceIds | (storageKey) => readonly string[] | undefined | Returns the cached paired device IDs for a storage key, if loaded. |
getResultConnectionId | (result) => number | Returns the connection counter value a result was received under. |
getSnapshot | () => BluetoothRuntimeSnapshot | Returns the current state snapshot. |
hasListeners | (event) => boolean | Whether anything listens for the event. |
initializeBackgroundScanEnabled | (enabled) => void | Sets the initial background scan state; ignored once initialised. |
loadPairedDeviceIds | (storageKey, load) => Promise<readonly string[]> | Loads the paired device IDs once per storage key and caches them. |
manager? | BluetoothRuntimeManager | Manager controlling scanning and connections, once set. |
removeDevice | (deviceId) => void | Removes a device. |
setAutoConnect | (enabled, delayMs?, onDeviceSelectionRequired?) => void | Configures automatic connection on the manager. |
setBackgroundScanEnabled | (enabled) => void | Turns background scanning on or off. |
setBackgroundSyncFlush | (flush?) => void | Registers the function that delivers queued background results. |
setBluetoothPermissionStatus | (status) => void | Records the Bluetooth permission status. |
setBluetoothState | (state) => void | Records the Bluetooth adapter state. |
setDeviceConnectionEvent | (event) => void | Records a connection event on its device. |
setDeviceResult | (result) => void | Records a result on its device, ignoring one already recorded. |
setDeviceStatus | (value) => void | Records a device status. |
setManager | (manager?) => void | Sets or clears the Bluetooth manager. |
setPairedDeviceIds | (storageKey, ids) => void | Replaces the cached paired device IDs and notifies listeners. |
subscribe | <K>(event, callback) => () => void | Listens for an event; returns an unsubscribe function. |
subscribeState | (callback) => () => void | Subscribes to state changes; returns an unsubscribe function. |
upsertDevice | (device) => void | Adds a device or replaces its handle, keeping its status and results. |
BluetoothRuntimeSnapshot
Immutable view of the runtime state that hooks subscribe to.
Properties
| Property | Type | Description |
|---|---|---|
backgroundScanEnabled | boolean | Whether background scanning is on. |
bluetoothPermissionStatus | BluetoothPermissionStatus | Bluetooth permission status. |
bluetoothState | RuntimeBluetoothState | Bluetooth adapter state. |
devices | readonly RuntimeDevice[] | Known devices. |
managerReady | boolean | Whether the Bluetooth manager has been set. |
BosoMedicusParams
Params for declaring a Boso Medicus.
Properties
BTManagerOptions
Options for BTManager.
Properties
| Property | Type | Description |
|---|---|---|
autoConnect? | boolean | Connect one newly discovered device automatically after the scan settles. |
autoConnectDelayMs? | number | Settle time in milliseconds before auto-connecting; defaults to 500. |
backgroundEnabled? | boolean | Whether scanning runs with the background service filter. |
clearDeviceHistory? | boolean | Clear device-held history after it has been downloaded, when supported. |
clockSync? | ClockSyncOptions | Clock synchronisation settings. |
deliveredEcgFileNames? | readonly string[] | Names of ECG files already delivered, so they are not downloaded again. |
deliveredFileNames? | readonly string[] | Names of stored files already delivered, so they are not downloaded again. |
getOwnerKey? | () => string | undefined | The signed-in account, which each series is recorded for. |
onDeviceSelectionRequired? | (selection) => void | Called when more than one supported device is discovered in the settle window. |
oneReadingPerConnection? | boolean | Report only the first reading of each connection. |
recordCursorStorage? | BackgroundSyncStorage | Where a device that hands over its stored records remembers which it already handed over, so the next connection asks only for the others: the newest record a Bluetooth SIG glucose meter sent, and the stored files of a Viatom monitor (ER1, BP2) whose readings onResult queued or saved. Use the store your results queue uses. Without it every connection asks for all records. |
resultPolicies? | Partial<Record<string, DeviceResultPolicy>> | Result policy per device name. |
seriesStorage? | BackgroundSyncStorage | Where series being recorded (a "series" result policy) wait, so one survives the app closing; use the store your results queue in. Without it they live in memory, and a closed app loses the series it was recording. |
serviceUUIDs? | readonly string[] | null | The services a background scan asks for (see getBackgroundServiceUUIDs). A foreground scan stays unfiltered, so every accepted device can be found on screen. |
BTProviderChildWrapperProps
Props the Bluetooth provider passes down to its inner wrapper.
Extended by
Type Parameters
| Type Parameter |
|---|
T extends readonly AcceptedDevice[] |
Properties
| Property | Type | Description |
|---|---|---|
acceptedDevices | T | Devices the provider scans for and accepts. |
autoConnect? | boolean | Connect to a found device automatically. |
autoConnectDelayMs? | number | Delay in milliseconds before an automatic connection starts. |
backgroundSync? | BackgroundSyncOptions<KeyOfAccepted<T[number]>> | Options for syncing devices in the background. |
bleManager | BleManager | BLE manager used for scanning and connecting. |
clearDeviceHistory? | boolean | Clear supported device history after it has been downloaded. |
clockSync? | ClockSyncOptions | Options for synchronising device clocks. |
deliveredEcgFileNames? | readonly string[] | Names of ECG files already delivered, so they are not downloaded again. |
deliveredFileNames? | readonly string[] | Names of stored files already delivered, so they are not downloaded again. |
onConnectionEvent? | (data) => void | Called for connection lifecycle events such as pairing or battery. |
onDeviceFound? | (device, manager) => Promise<void> | Called when an accepted device is found. |
onDeviceSelectionRequired? | (selection) => void | Called when several devices match and the user must pick one. |
onDeviceStatusChanged? | (data) => void | Called when a device status changes. |
oneReadingPerConnection? | boolean | Report one result per connection, then stay quiet until the next. |
onError? | (data) => void | Called when a Bluetooth or device error occurs. |
onResult? | (data) => void | Called when a device produces a result. |
permissionStatus? | BluetoothPermissionStatus | Current Bluetooth permission status. |
resultPolicies? | Partial<Record<string, DeviceResultPolicy>> | Result policy per device name. |
BTProviderPermissionFallbackProps
Props handed to the permission fallback renderer.
Properties
BTProviderProps
Props the Bluetooth provider passes down to its inner wrapper.
Extends
Type Parameters
| Type Parameter |
|---|
T extends readonly AcceptedDevice[] |
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
acceptedDevices | T | Devices the provider scans for and accepts. | BTProviderChildWrapperProps.acceptedDevices |
autoConnect? | boolean | Connect to a found device automatically. | BTProviderChildWrapperProps.autoConnect |
autoConnectDelayMs? | number | Delay in milliseconds before an automatic connection starts. | BTProviderChildWrapperProps.autoConnectDelayMs |
backgroundSync? | BackgroundSyncOptions<KeyOfAccepted<T[number]>> | Options for syncing devices in the background. | BTProviderChildWrapperProps.backgroundSync |
bleManager | BleManager | BLE manager used for scanning and connecting. | BTProviderChildWrapperProps.bleManager |
clearDeviceHistory? | boolean | Clear supported device history after it has been downloaded. | BTProviderChildWrapperProps.clearDeviceHistory |
clockSync? | ClockSyncOptions | Options for synchronising device clocks. | BTProviderChildWrapperProps.clockSync |
deliveredEcgFileNames? | readonly string[] | Names of ECG files already delivered, so they are not downloaded again. | BTProviderChildWrapperProps.deliveredEcgFileNames |
deliveredFileNames? | readonly string[] | Names of stored files already delivered, so they are not downloaded again. | BTProviderChildWrapperProps.deliveredFileNames |
gateOnPermission? | boolean | Gate children on the automatic permission request. Defaults to false. | - |
onAccessPermissionChanged? | (accessPermission) => void | Called when Bluetooth access permission is granted or lost. | - |
onConnectionEvent? | (data) => void | Called for connection lifecycle events such as pairing or battery. | BTProviderChildWrapperProps.onConnectionEvent |
onDeviceFound? | (device, manager) => Promise<void> | Called when an accepted device is found. | BTProviderChildWrapperProps.onDeviceFound |
onDeviceSelectionRequired? | (selection) => void | Called when several devices match and the user must pick one. | BTProviderChildWrapperProps.onDeviceSelectionRequired |
onDeviceStatusChanged? | (data) => void | Called when a device status changes. | BTProviderChildWrapperProps.onDeviceStatusChanged |
oneReadingPerConnection? | boolean | Report one result per connection, then stay quiet until the next. | BTProviderChildWrapperProps.oneReadingPerConnection |
onError? | (data) => void | Called when a Bluetooth or device error occurs. | BTProviderChildWrapperProps.onError |
onResult? | (data) => void | Called when a device produces a result. | BTProviderChildWrapperProps.onResult |
permissionFallback? | (permission) => ReactNode | Callback to be called when the access permission is not granted and the user is asked to open the settings | - |
permissionStatus? | BluetoothPermissionStatus | Current Bluetooth permission status. | BTProviderChildWrapperProps.permissionStatus |
requestPermissionOnMount? | boolean | Request permission on mount (default: true). Set false to defer permission and scanning to an app-triggered request. | - |
resultPolicies? | Partial<Record<string, DeviceResultPolicy>> | Result policy per device name. | BTProviderChildWrapperProps.resultPolicies |
CatalogField
The measurement types a declaration may produce, the properties each one accepts, the canonical unit of every property, and the physiological envelope outside which a decoded value is treated as a decoding fault rather than a reading.
A measurement type absent from this catalog cannot be declared. ECG's waveform is still assembled by a device frame handler, but its scalar heart rate can be declared alongside another reading in a combined frame.
The property names mirror the measurement types in @ovok/core. A typo would otherwise produce an object the backend silently drops, so it is rejected at registration instead.
required marks the properties without which the reading is not that measurement. Every
property in @ovok/core is optional, so a declaration that named only systolic would
otherwise compile and then post a blood pressure with no diastolic - a plausible clinical
record of something that was never measured. A "result" case must declare all of them.
Properties
CheckmeBloodPressureRecord
A blood pressure record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
diastolic | number | Diastolic pressure. | - |
heartRate | number | Heart rate in beats per minute. | - |
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
systolic | number | Systolic pressure. | - |
CheckmeDailyRecord
A daily check record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
bloodOxygen | number | Blood oxygen saturation in percent. | - |
diastolic? | number | Diastolic pressure, when a blood pressure value was recorded. | - |
heartRate | number | Heart rate in beats per minute. | - |
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
systolic? | number | Systolic pressure, when a blood pressure value was recorded. | - |
CheckmeEcgFile
A decoded ECG recording.
Properties
CheckmeEcgRecord
An ECG index record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
result | number | Device-reported ECG result code. | - |
CheckmeOxygenRecord
A blood oxygen record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
bloodOxygen | number | Blood oxygen saturation in percent. | - |
heartRate | number | Heart rate in beats per minute. | - |
perfusionIndex | number | Perfusion index. | - |
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
CheckmePodRealtimeReading
A realtime reading from a Checkme Pod.
Properties
CheckmePodResponse
A decoded Checkme Pod response.
Properties
| Property | Type | Description |
|---|---|---|
content | string[] | Payload bytes as hex strings. |
sequence | number | Sequence number of the response. |
state | boolean | Whether the device reported success. |
CheckmePodSequencerParams
Params of CheckmePodSequencer.
Properties
| Property | Type | Description |
|---|---|---|
now? | () => Date | Clock used to timestamp readings and sync the device; defaults to the system clock. |
onResult | (result) => void | Called with each decoded measurement. |
write | Omit<DeviceCommand, "frame"> | Where commands are written. |
CheckmeResponse
A decoded Checkme response.
Properties
CheckmeTemperatureRecord
A body temperature record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
temperature | number | Temperature in degrees Celsius. | - |
CheckmeTimestampedRecord
Fields shared by every timestamped Checkme record.
Extended by
CheckmeBloodPressureRecordCheckmeDailyRecordCheckmeOxygenRecordCheckmeTemperatureRecordCheckmeEcgRecordPulsebitEcgRecord
Properties
| Property | Type | Description |
|---|---|---|
recordedAt | Date | When the record was taken. |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. |
CheckmeTransferParams
Params of the Checkme file transfer sequencer.
Properties
| Property | Type | Description |
|---|---|---|
onResult | (result) => void | Called with each decoded measurement. |
write | Omit<DeviceCommand, "frame"> | Where commands are written. |
ClockSyncOptions
Options controlling device clock synchronisation.
Properties
| Property | Type | Description |
|---|---|---|
enabled? | boolean | Optional clock writes are enabled by default for verified protocols. |
now? | () => Date | Supplies the time sent to a device. Defaults to the current time. |
timezone? | ClockSyncTimezone | Interprets the supplied Date explicitly; defaults to the local timezone. |
CommandSequencer
Decides what to send a device, and when.
These protocols are self-clocking: the device answers a request, and the answer is what says which request comes next. A file read walks its offsets that way, and an identity check gates everything after it on the reply to the first command. Neither can be expressed by re-sending one fixed frame, which is all the SDK could do before.
At most one command is outstanding at a time. The transport serialises writes, so an implementation may assume the frame it is answering is the reply to the command it last returned.
Methods
commandProgress()?
commandProgress?(frame): "ignored" | "partial" | "complete";Describes whether a frame is ignored, partial, or completes the outstanding command.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
Returns
"ignored" | "partial" | "complete"
commandTimeoutMs()?
commandTimeoutMs?(): number | undefined;The response timeout for the currently outstanding command, when a protocol needs one.
Returns
number | undefined
initialCommands()
initialCommands():
| readonly DeviceCommand[]
| Promise<readonly DeviceCommand[]>;Sent once every characteristic is subscribed. Empty starts a device that only listens.
May resolve later, for a first command that depends on state read from storage.
Returns
| readonly DeviceCommand[]
| Promise<readonly DeviceCommand[]>
isHistoryTransfer()?
isHistoryTransfer?(): boolean;True when accepted results are records downloaded from device history.
Returns
boolean
isNormalDisconnect()?
isNormalDisconnect?(): boolean;True when a timeout-style disconnect is the device's normal completion signal.
Returns
boolean
nextCommand()
nextCommand(frame, characteristicUuid?): readonly DeviceCommand[] | undefined;Answers one complete frame, with the characteristic it arrived on.
Returning undefined sends nothing, which is how a sequencer waits: an unidentified
device is left alone rather than addressed with an opcode that may mean something else
on the hardware actually present.
Parameters
| Parameter | Type |
|---|---|
frame | readonly string[] |
characteristicUuid? | string |
Returns
readonly DeviceCommand[] | undefined
onCommandTimeout()?
onCommandTimeout?(): CommandTimeoutResult;Re-sends the current command or ends the exchange after a response timeout.
Returns
onServicesDiscovered()?
onServicesDiscovered?(serviceUuids): void;The declared services discovery found, before initialCommands; lets a protocol pick its generation.
Parameters
| Parameter | Type |
|---|---|
serviceUuids | readonly string[] |
Returns
void
CommandTimeoutResult
What to do after a command received no response.
Properties
| Property | Type | Description |
|---|---|---|
commands? | readonly DeviceCommand[] | Commands to send in place of the timed-out one. |
terminal? | boolean | True when the exchange is over and nothing more is sent. |
CompiledCustomField
A validated field spec with every default resolved.
Properties
| Property | Type | Description |
|---|---|---|
byteIndexes | number[] | Already reordered for the declared byte order. |
decimals? | number | Decimal places the value is rounded to, when set. |
encoding | CustomFieldEncoding | How the bytes are decoded into a number. |
max | number | Highest accepted decoded value. |
min | number | Hard accepted range. A decoded value outside it is an error, never a reading. |
name | string | Property name the decoded value is reported under. |
offset | number | Value added after scaling. |
scale | number | Multiplier applied to the raw value. |
unit | string | Unit the value is reported in. |
CustomCaseSpec
One frame shape the device emits, selected by the monitor's caseSelectorBytes.
Properties
| Property | Type | Description |
|---|---|---|
additionalMeasurements? | CustomMeasurementSpec[] | Further readings the same frame carries. A multi-parameter monitor sends one frame holding a heart rate, an oxygen saturation and a temperature at once. Those are three measurements, not one with nine properties, so each is declared with its own type and its own fields and each is reported separately. Property names must still be unique across the whole frame, because the decoded object is flat. Only meaningful on a "result" case. |
description? | string | Free-text note describing the frame shape. |
fields? | CustomFieldSpec[] | Required and non-empty for a "result" case, forbidden otherwise. |
kind | CustomCaseKind | What this frame shape represents. |
measurementTypeKey? | MeasurementTypeKey | Required for a "result" case. Must be a type the declarative decoder supports. |
minLengthBytes? | number | Shortest frame of this shape, when it is longer than the characteristic's minimum. A selector byte often decides how long the frame is: the Bluetooth blood-pressure profile puts a timestamp and a pulse rate behind flag bits, so one shape is seven bytes and another is sixteen. Without this, every case is bounded by the shortest of them and the later fields cannot be declared at all - which is how a pulse rate gets dropped from a device that reports one. Must be at least the characteristic's frame.minLengthBytes. A frame that arrives shorter than the case it selected decodes nothing and is reported, not guessed at. |
repeatedRecords? | object | The frame is a run of fixed-width records, each decoded the same way. A device that hands over its stored history answers one request with every record it holds, back to back. Those are separate readings taken at separate times, so each is reported on its own rather than merged. Byte indexes are relative to a record, not to the frame, and are bounds-checked against recordBytes. A trailing part-record is ignored: a whole number of records is what the device sends, and half of one is not a reading. |
repeatedRecords.from? | number | Byte the first record starts at. Defaults to 0. |
repeatedRecords.recordBytes | number | Width of one record. |
requiresStream? | boolean | Only accept this result after a stream case started the same measurement session. |
selector | string | Concatenated hex of the selector bytes that identifies this frame, e.g. "aa0f0801". Empty string when the characteristic declares no selector and has a single case. |
CustomDeviceDefinition
A validated, ready-to-run custom device. Only defineCustomDevice produces one.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
[CUSTOM_DEVICE_BRAND] | readonly | true | Brand proving the definition came from defineCustomDevice. |
clockSync | readonly | ClockSyncCapability | Whether the device clock can be synchronised. |
createCommandSequencer? | readonly | CustomSequencerFactory | Replaces the declared write with a command sequence the protocol computes at connect time. |
createFrameHandler? | readonly | CustomFrameHandlerFactory | Creates per-device state for frames that need a protocol-specific decoder. |
decorateReading? | readonly | CustomReadingDecorator | Adds protocol metadata that is not a numeric measurement field. |
fields | readonly | ReadonlyMap<string, CompiledCustomField> | Keyed by ${measurementTypeKey}:${fieldName}, used to bounds-check every reading. |
frameReader? | readonly | FrameReader | Optional protocol frame reader for declarations whose notifications may be batched. |
frames | readonly | ReadonlyMap<string, CustomFrameSpec> | Frame declaration of every monitor characteristic, keyed by its 128-bit UUID. |
id | readonly | CustomDeviceId | Identifier of the device. |
lepu? | readonly | CustomLepuSpec | Validated Lepu protocol declaration, with its UUIDs normalised. |
mainServices | readonly | IService[] | Services of the device, in the form the Bluetooth layer consumes. |
matchByService | readonly | boolean | Whether a peripheral without a name is matched by the declared service UUIDs. |
nameMatch | readonly | RegExp | Matches the advertised BLE name. |
oneReadingPerConnection | readonly | boolean | Whether only one result is reported per connection. |
preferredMtu? | readonly | number | MTU to request once connected, when the declaration asked for one. |
reportsBondedEvent? | readonly | boolean | Emit the bonded connection event after a successful connection. |
sessionPolicy? | readonly | CustomSessionPolicy | How live samples are aggregated when the session ends. |
spec | readonly | CustomDeviceSpec | The declaration this definition was built from. |
stuckDataTimeout | readonly | number | Milliseconds without a usable frame before the read is abandoned. |
tmb? | readonly | CustomTmbSpec | Validated TMB protocol declaration, with its UUIDs normalised. |
CustomDeviceSpec
Plain, JSON-shaped declaration of a Bluetooth device the SDK has no class for.
Properties
| Property | Type | Description |
|---|---|---|
clockSync? | ClockSyncCapability | Declares the clock capability when a custom protocol has been verified. |
id? | string | Reported back as deviceData.name. Built-in names are reserved. |
lepu? | CustomLepuSpec | Declares the Lepu/Viatom framed protocol, which brings its own frame reader and its own command sequence. A declaration with this needs no services[].write: commands are built rather than written down, and are addressed through lepu.write. |
matchByService? | boolean | Match by one of this declaration's service UUIDs when the peripheral has no name. |
nameMatch? | string | RegExp | Advertised BLE name. Omit for a service-matched declaration. |
oneReadingPerConnection? | boolean | Report one result, then stay quiet until the next connection. |
preferredMtu? | number | MTU to ask for once connected. A larger one carries a frame in fewer notifications and a command in fewer writes. Omit it to keep whatever the platform negotiates. |
services | CustomServiceSpec[] | Services the device exposes and the frames its characteristics emit. |
sessionPolicy? | CustomSessionPolicy | Aggregate valid live samples into one result when the session ends. |
stuckDataTimeoutMs | number | Milliseconds without a usable frame before the read is abandoned. 1000-6000000. |
tmb? | CustomTmbSpec | Declares the TMB blood-pressure history protocol used by Viatom BP families. |
CustomFieldSpec
One measurement property read out of a frame at fixed byte offsets.
The property name and unit are checked at registration against the measurement
catalog for the case's measurementTypeKey. A name the SDK does not know, or a unit
that is not the canonical one, is rejected - it would otherwise produce a measurement
the backend silently drops, or a number in the wrong unit.
Properties
| Property | Type | Description |
|---|---|---|
byteIndexes | number[] | Byte offsets into the frame, in the order the device puts them on the wire. |
byteOrder? | CustomByteOrder | Defaults to "big". Use "little" when the least significant byte comes first. |
decimals? | number | Round the result to this many decimals. 0-6. |
encoding? | CustomFieldEncoding | Defaults to "uint". |
max? | number | Narrower accepted range than the catalog default. Must sit inside it. |
min? | number | Narrower accepted range than the catalog default. Must sit inside it. |
name | string | Property on the emitted measurement, e.g. "systolic". Must exist for the case's type. |
offset? | number | Added after scale. Defaults to 0. |
scale? | number | Multiplied onto the raw value. Defaults to 1. Use it for unit and resolution conversion. |
unit | string | Canonical unit for name. Declaring any other unit fails registration. |
CustomFrameSpec
How a notification buffer is recognised as a complete frame.
A declared frame must be header aligned: the SDK never scans forward for the header, because the field offsets are absolute. A buffer that does not start with the header is never parsed - it fails the stuck-data timeout instead of producing a shifted reading.
Properties
| Property | Type | Description |
|---|---|---|
checksum? | CustomChecksumSpec | How the frame proves it arrived intact. Optional because some devices genuinely send none, but a declaration without one accepts whatever the radio delivered. Declare it wherever the device has one. |
header? | string[] | Required leading bytes as hex, e.g. ["aa", "55"]. |
length? | object | An in-frame length field, when the device has one. |
length.byteOrder | CustomByteOrder | Byte order of the length field. |
length.index | number | Byte offset of the length field. |
length.overheadBytes | number | Bytes in the frame the length field does not count (header, checksum, ...). |
length.widthBytes | 1 | 2 | Width of the length field in bytes. |
minLengthBytes | number | Shortest buffer that may be parsed. Every byte index the declaration reads - case selectors and fields alike - must be inside this length, which is checked at registration. |
CustomLepuSpec
Declares that a device speaks the Lepu/Viatom framed protocol.
The whole family shares one frame - start | cmd | ~cmd | type | seq | len | payload | crc8 - one checksum, and one generic opcode space. What it does not share is the meaning
of the low opcodes: 0x08 polls realtime data on a BP2, starts a blood-pressure
measurement on an AirBp and starts an ECG on a Lepod. A frame built for the wrong one is
still well formed, so nothing in the protocol catches a driver bound to the wrong
hardware.
That is why pollCommand may not be declared without expectedDeviceTypes. Registration
refuses it, because a poll with nobody to check it against is exactly the mis-binding the
gate exists to prevent.
Properties
CustomMonitorSpec
A notify/indicate characteristic and the frames it emits.
Properties
| Property | Type | Description |
|---|---|---|
cases | CustomCaseSpec[] | Frame shapes the characteristic can emit. |
caseSelectorBytes? | number[] | Byte offsets whose concatenated hex picks the case. Omit only when the characteristic has exactly one case whose selector is the empty string. |
frame | CustomFrameSpec | How a complete frame is recognised on this characteristic. |
uuid | string | UUID of the notify or indicate characteristic. |
CustomSequencerContext
What a declaration's command sequencer is told about the device it is about to drive.
Properties
| Property | Type | Description |
|---|---|---|
deviceId | string | Platform identifier of the BLE device. |
recordCursorStorage? | BackgroundSyncStorage | Where the manager keeps what must outlive a connection, when it was given a store. |
CustomServiceSpec
A GATT service of a custom device and its monitored characteristics.
Properties
| Property | Type | Description |
|---|---|---|
monitor | CustomMonitorSpec[] | Notify or indicate characteristics to subscribe to. |
uuid | string | UUID of the service. |
write? | object | A single static command written after connect and after every processed frame. A device that needs a handshake, a challenge response or a command sequence cannot be declared and still needs a device class. |
write.commandHex | string | Command bytes as hex. |
write.uuid | string | UUID of the characteristic the command is written to. |
write.when? | "every-frame" | "connect" | "every-frame" (the default) polls: the command goes out after connect and after every processed frame. "connect" sends it once after connect, for a request that is answered by a stream of frames - re-sending it after each one would restart the stream. |
DeviceCommand
One write to a device.
The frame is the whole command, in hex bytes, and is addressed to a characteristic rather than left to be inferred from the service that happens to declare a write. A device with more than one writable characteristic - a control point and a data channel, say - cannot be driven at all when the target is implied.
Bytes rather than a hex string, because the transport splits a command that exceeds the negotiated MTU. Splitting a string is a byte boundary the caller has to remember to double; splitting an array cannot land inside a byte.
Properties
DeviceConnectionEvent
Connection lifecycle event of a device.
Properties
| Property | Type | Description |
|---|---|---|
batteryLevel? | number | Battery percentage when the device exposes the standard Battery Service. |
clockAt? | Date | Local time written to a device clock, when the protocol reports an acknowledgement. |
deviceData | DeviceData | Device the event relates to. |
kind | DeviceConnectionEventKind | What happened. |
pairingCodeRequired? | boolean | True when the platform is waiting for the user to confirm or enter a pairing code. |
phoneUtcOffsetMinutes? | number | Phone's UTC offset in minutes east of UTC at the clock write. |
progress? | object | Progress for a history transfer when the protocol exposes record counts. |
progress.current | number | Records transferred so far. |
progress.total? | number | Total records, when known. |
recording? | object | A recorder's open recording, on a recording event; absent once the recording has ended. Sent when it starts, when the electrodes lose or regain contact, and when it becomes long enough to be stored. |
recording.leadOffSince? | Date | When the electrodes lost contact, while they have none; the recording stays open until it is stopped. An app can offer to stop it once this is old enough, as the vendor app does. |
recording.seconds | number | Seconds recorded so far. |
recording.storesOnStop | boolean | Stopping now stores the recording; a shorter one is discarded by the device. |
DeviceMeasurementMap
Maps each integrated device to the measurement shapes it reports.
Properties
DeviceResultPolicy
Result policy of one device.
Properties
| Property | Type | Description |
|---|---|---|
acceptedMemorySlots? | readonly number[] | The device users whose readings are reported, by memory slot (a multi-user device reports its user as memorySlot, starting at 1). Readings of other users are dropped; a reading that names no device user is kept. Without it every user's readings are reported. |
byMeasurement? | Partial<Record<MeasurementTypeKey, ResultPolicy>> | Policy overrides per measurement type. |
default? | ResultPolicy | Policy for measurement types without their own entry. |
DeviceSecretStorage
Per-device secrets a protocol receives once, at pairing, and needs on every later connection - a Transtek monitor's 32-bit password is one.
Secrets are kept in memory for the app session. Give the SDK somewhere durable with
setDeviceSecretStorage (a SecureStore-backed adapter is a good fit), or a device paired
in one app session has to be paired again after the app restarts.
Properties
| Property | Type | Description |
|---|---|---|
getItem | (key) => Promise<string | null> | Reads the stored value for a key, or null if absent. |
setItem | (key, value) => Promise<void> | Stores a value under a key. |
DeviceStatusChangeCallback
Payload delivered when a device status changes.
Properties
| Property | Type | Description |
|---|---|---|
deviceData | DeviceData | Device whose status changed. |
measurementTypeKey? | MeasurementTypeKey | Measurement type the status relates to, when known. |
status | DeviceStatus | New status. |
DeviceWaveform
The ECG samples a recorder sent in one realtime answer, for drawing a live trace; never saved.
Properties
| Property | Type | Description |
|---|---|---|
at | Date | When the answer carrying them arrived. |
deviceData | DeviceData | Device the samples came from. |
millivoltsPerCount | number | Millivolts per sample count. |
sampleRateHz | number | Samples per second. |
samples | readonly number[] | Raw sample counts, oldest first. |
EcgCalibration
Maps digital ECG samples to physical microvolts.
Properties
ErrorCallback
Payload delivered to the error handler.
Properties
| Property | Type | Description |
|---|---|---|
code? | BluetoothErrorCode | Stable machine-readable code for every normalized native/SDK failure. |
deviceData? | DeviceData | Device the error relates to, when known. |
error | string | Error | BluetoothError | Measurement translation keys remain compatible with existing consumers. |
FakeBleDevice
A fake GATT device and the handles that drive it.
Properties
FakeBleDeviceOptions
Options for createFakeBleDevice.
Properties
FakeBleManager
A deterministic BLE manager for hook and scan integration tests. No hardware is used.
Properties
| Property | Type | Description |
|---|---|---|
createDevice | (options) => FakeBleDevice | Creates a fake GATT device. |
emitDevice | (device) => void | Reports a device to the active scan. |
emitError | (error) => void | Reports a scan error to the active scan. |
getScannedServiceUUIDs | () => readonly string[] | null | Service UUID filter of the last scan, or null if unfiltered or none started. |
manager | BleManager | The fake manager to hand to code under test. |
setState | (state) => void | Changes the adapter state and notifies state listeners. |
stopDeviceScan | () => void | Stops the active scan. |
FakeBleManagerOptions
Options for createFakeBleManager.
Properties
| Property | Type | Description |
|---|---|---|
devices? | readonly Device[] | Devices reported immediately when a scan starts. |
state? | State | Initial Bluetooth adapter state; defaults to powered on. |
GlucoseRecordDetails
What a Bluetooth SIG glucose meter says about a record, added to the reading beside
bloodGlucose, which is always in mg/dL.
Properties the frame does not carry are absent.
Properties
| Property | Type | Description |
|---|---|---|
outOfRange? | "low" | "high" | The meter says the result lies beyond what it can measure. bloodGlucose is then the edge of its range, not a measurement; do not store or chart it as a value. |
reportedUnit? | GlucoseReportedUnit | The unit the meter reported; bloodGlucose keeps its precision when converted back. |
sampleLocation? | GlucoseSampleLocation | Where the sample was taken. |
sensorStatus? | readonly GlucoseSensorWarning[] | Conditions the meter flagged that leave the value usable. |
sequenceNumber? | number | The meter's own number for the record. It counts up, so it tells records apart. |
specimen? | GlucoseSpecimenType | What the sample was taken from. |
HealthImportAdapter
Deprecated
Import HealthImportAdapter from @ovok/native/data-sync instead.
Type Parameters
Properties
IBTManagedDevice
Minimal contract of a device the Bluetooth manager can connect and disconnect.
Properties
| Property | Type | Description |
|---|---|---|
connect | () => Promise<void> | Opens the connection to the device. |
disconnect | () => Promise<void> | Closes the connection to the device. |
id | string | Identifier of the managed device. |
IMedicalDevice
Declares which GATT services an integrated device uses.
Properties
| Property | Type | Description |
|---|---|---|
deviceName | IntegratedDevices | The integrated device being described. |
mainService | IService[] | Services used to talk to the device. |
IService
A GATT service of an integrated device and its characteristics.
Properties
LepuDeviceInfo
What a Lepu device says it is, in answer to GET_INFO.
Properties
LepuDeviceParams
Describes one Lepu/Viatom family product for lepuDevice.
Properties
| Property | Type | Description |
|---|---|---|
cases | CustomCaseSpec[] | Frame cases that decode the product's payloads. |
caseSelectorBytes? | number[] | 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. |
clockSync? | ClockSyncCapability | Declares the device clock capability when the protocol has been verified. |
clockSyncProtocol? | "bp2" | "bp3" | Clock payload format used before INFO, when clock synchronization is enabled. |
createFrameHandler? | CustomFrameHandlerFactory | Replaces the default frame handler with a custom one. |
decorateReading? | CustomReadingDecorator | Adjusts each decoded reading before it is reported. |
ecgFileDecoder? | "viatom-compressed" | "raw-int16" | Decoder used for stored ECG files. Omit this when the format is not verified. |
expectedDeviceTypes? | number[] | 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. |
fileTransfer? | "ecg" | "bp2" | "bp3" | Stored-file transfer protocol the product uses. |
id? | string | Reported back as deviceData.name, and must not collide with a built-in device. |
manufacturerDataProtocol? | "viatom-oxygen" | Selects the OxyII service and framing from the manufacturer's advertisement. |
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. |
nameMatch? | string | RegExp | The name the hardware advertises. |
pollCommand? | number | 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 | Delay before each realtime poll, for devices with a fixed polling cadence. |
protocol? | "v2" | "viatom-oxygen" | The protocol variant behind the shared Viatom service. |
pulseWave? | boolean | Polls a legacy oximeter's pulse wave in place of its realtime parameters, when it serves one. |
recordingStatus? | object | How a recorder reports its open recording; see CustomLepuSpec. |
recordingStatus.byteIndex | number | The run-status byte's index in the poll answer, header included; its low nibble is the state. |
recordingStatus.leadOffState | number | Low-nibble state while the electrodes have no contact and the recording stays open. |
recordingStatus.minimumStoredSeconds | number | The shortest recording the device stores when it is stopped. |
recordingStatus.recordingState | number | Low-nibble state while recording. |
recordingStatus.savedState | number | Low-nibble state once the recording has been stored. |
recordingStatus.secondsByteIndex | number | Where the seconds recorded so far sit in the poll answer, u32 little-endian. |
recordingStatus.stopCommand | number | The opcode that stops the recording, storing it when it is long enough. |
recordingStatus.waveform? | object | Where a poll answer carries the ECG samples taken since the last one, for live display and chunks. |
recordingStatus.waveform.countByteIndex | number | Index of the u16 little-endian sample count, header included; int16 samples follow it. |
recordingStatus.waveform.millivoltsPerCount | number | Millivolts per sample count. |
recordingStatus.waveform.noSignalCount? | number | The count that means no signal, stored as 0 mV. |
recordingStatus.waveform.sampleRateHz | number | Samples per second. |
rejectEncryptionAtBytes? | number[] | Manufacturer-data byte indexes whose high nibble of 2 requires encryption. |
sessionPolicy? | CustomSessionPolicy | Aggregate valid live samples when the protocol describes a session. |
setClockBeforeInfo? | boolean | Sends the Viatom oximeter clock command before INFO. |
stuckDataTimeoutMs? | number | Time in milliseconds without data before the connection is treated as stuck; defaults to 60 seconds. |
transport? | "standard" | "standardSmallMtu" | "aw1" | "ding" | "aiTele" | Which characteristics the product exposes. Nearly all of them are "standard". |
v2? | object | Additional OxyII monitor cases, selected by manufacturer-data protocol V2. |
v2.cases | CustomCaseSpec[] | Frame cases for the additional OxyII monitor. |
v2.caseSelectorBytes? | number[] | Byte offsets that pick the case. |
v2.minLengthBytes | number | Shortest frame the additional cases may be read from. |
writeWithoutResponse? | boolean | Uses write-without-response, as the Viatom oximeter characteristic requires. |
LepuFile
A file read from a Lepu device.
Properties
LepuFileTransferParams
Params of a Lepu file transfer.
Properties
| Property | Type | Description |
|---|---|---|
acceptFile? | (name) => boolean | Files this transfer knows how to decode; rejected names are never opened. |
afterTransfer? | () => readonly DeviceCommand[] | Commands to start after history has been exhausted, such as live polling. |
builder | LepuCommandBuilder | Builds this connection's frames. One per connection: it carries a sequence number. |
maxFileBytes? | number | Largest file accepted, in bytes; larger transfers are refused. |
onError | (reason) => void | Called with why a transfer stopped. Required, so a failed read cannot pass unseen. |
onFile | (file) => void | Called once per file, and only after its length was confirmed exactly. |
onFileList? | (names) => void | Called with every name the device lists, before any is opened. |
onProgress? | (progress) => void | Called as each chunk lands, for a long file with a person waiting on it. |
skipFiles? | ReadonlySet<string> | Files the app has already persisted and does not want again. |
write | Omit<DeviceCommand, "frame"> | The characteristic commands are written to. |
MeasurementSeries
One kind of measurement a streaming device sent at a fixed interval: one value per slot for each measured
property, null for a slot nothing arrived in. It has the shape of @ovok/core's MeasurementSeries, which
seriesObservations saves as sampled data.
Extended by
Properties
OpenSeries
A series still being recorded: what a screen shows while a device streams.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
deviceData | DeviceData | Device that is streaming the series. | - |
latest | Partial<Record<string, number>> | The last value of each property. | - |
measurementTypeKey | MeasurementTypeKey | Measurement type the series holds. | MeasurementSeries.measurementTypeKey |
periodMs | number | Milliseconds from one slot to the next. | MeasurementSeries.periodMs |
start | Date | When the first slot starts. | MeasurementSeries.start |
updatedAt | Date | When the last value arrived. | - |
values | Partial<Record<string, ReadonlyArray<number | null>>> | By measured property, one value per slot. | MeasurementSeries.values |
PairedDeviceStorage
Key-value storage the paired device list persists to.
Properties
| Property | Type | Description |
|---|---|---|
getItem | (key) => Promise<string | null> | Reads the value stored under a key, or null. |
setItem | (key, value) => Promise<void> | Stores a value under a key. |
PulsebitEcgRecord
A Pulsebit or Checkme EX ECG index record.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
heartRate | number | Heart rate in beats per minute. | - |
recordedAt | Date | When the record was taken. | CheckmeTimestampedRecord.recordedAt |
recordName | string | Device file name of the record, formatted YYYYMMDDHHmmss. | CheckmeTimestampedRecord.recordName |
RawBluetoothAccess
Direct GATT access to a connected device.
Properties
RecordedBleFrame
One captured notification frame.
Properties
| Property | Type | Description |
|---|---|---|
characteristicUUID | string | UUID of the characteristic the frame arrived on. |
delayMs? | number | Optional delay used by replay tests; defaults to zero. |
value | string | Frame payload. |
ResultCallback
Payload delivered to the result handler.
Extended by
Type Parameters
| Type Parameter |
|---|
T extends DeviceKey |
Properties
| Property | Type | Description |
|---|---|---|
data | OmitCaseType<MeasurementTypeForDevices<[T]>> | The measurement. |
deviceData | DeviceData | Device that produced the result. |
id | string | Stable identity derived from the peripheral and recorded reading. |
legacyId? | string | The id SDKs before 1.16.1 gave this reading, to recognise one they already saved. |
recordedFor? | string | The account a series was recorded for. It closes later, perhaps after someone else signs in, and is queued for this account, not for whoever is signed in then. |
series? | MeasurementSeries | Every value of a series, for a result that closes one (a streaming device's values over up to an hour). data then holds each property's mean, from the series' start. |
RuntimeDevice
A discovered device with its latest status, results and events.
Properties
| Property | Type | Description |
|---|---|---|
device | object | Handle used to connect to or disconnect from the device. |
device.connect | () => Promise<void> | Opens the connection to the device. |
device.deviceData | DeviceData | Identity of the device. |
device.disconnect | () => Promise<void> | Closes the connection to the device. |
device.id | string | Identifier of the device. |
deviceData | DeviceData | Identity of the device. |
events? | readonly DeviceConnectionEvent[] | Recent connection events, oldest first. |
id | string | Identifier of the device. |
latestResult? | RuntimeResult | Most recent result. |
results? | readonly RuntimeResult[] | Recent results, oldest first. |
status? | DeviceStatus | Latest reported status. |
RuntimeEventMap
Event names the runtime emits, with their payloads.
Properties
| Property | Type | Description |
|---|---|---|
connection | DeviceConnectionEvent | A connection lifecycle event occurred. |
deviceFound | RuntimeDevice | An accepted device was found. |
error | ErrorCallback | A Bluetooth or device error occurred. |
pairedDevices | object | The paired device list stored under storageKey changed. |
pairedDevices.storageKey | string | Storage key of the changed list. |
result | RuntimeResult | A device produced a result. |
status | DeviceStatusChangeCallback | A device status changed. |
waveform | DeviceWaveform | A recording device sent live ECG samples; for display, never stored. |
UseBackgroundSyncOptions
Options for useBackgroundSync.
Extended by
Properties
UseBluetoothPermissionOptions
Options for useBluetoothPermission.
Properties
UseBluetoothStateOptions
Options for useBluetoothState.
Properties
UseBTDeviceOptions
Options for useBTDevice.
Properties
UseMeasurementsOptions
Options for useMeasurements.
Properties
| Property | Type | Description |
|---|---|---|
maxResults? | number | Most recent results to keep; defaults to 100. |
policy? | ResultPolicy | Which results to keep; defaults to "all". |
UseNearbyDeviceOfferOptions
Options for useNearbyDeviceOffer.
Properties
| Property | Type | Description |
|---|---|---|
declinedStorageKey? | string | Storage key of the declined device list. |
enabled? | boolean | Whether devices are offered; defaults to true. |
onError? | (error, device?) => void | Called when pairing fails. |
onPaired? | (device) => void | Called after the user accepts and the device is paired. |
shouldOffer? | (device) => boolean | Filters which devices may be offered. |
storage | PairedDeviceStorage | Where the paired device IDs are persisted. |
storageKey? | string | Storage key of the paired device list. |
UsePairedDevicesOptions
Options for usePairedDevices.
Properties
| Property | Type | Description |
|---|---|---|
autoPair? | boolean | Connect to paired devices automatically when they are found. |
storage | PairedDeviceStorage | Where the paired device IDs are persisted. |
storageKey? | string | Storage key; defaults to DEFAULT_PAIRED_DEVICE_STORAGE_KEY. |
VerovalFusionParams
Params for declaring a Veroval Fusion.
Properties
ViatomEcgRecording
A decoded ER1/ER2 recording.
Properties
| Property | Type | Description |
|---|---|---|
duration | number | Recording duration in seconds. |
samples | number[] | Waveform samples in millivolts. |
VisomatComfortSoftBtParams
Params for declaring a Visomat Comfort Soft BT.
Properties
Type Aliases
AcceptedDevice
type AcceptedDevice =
| IntegratedDevices
| CustomDeviceDefinition;An entry of BTProvider's acceptedDevices: a built-in device, or a declared one.
BackgroundSyncStatus
type BackgroundSyncStatus = "on" | "off" | "restricted" | "blocked";Background sync state: on, off, restricted by the system, or blocked by an error.
BluetoothPermissionStatus
type BluetoothPermissionStatus = "unknown" | "granted" | "denied" | "blocked";Bluetooth permission state: unknown, granted, denied, or blocked (denied permanently).
BluetoothRuntimeManager
type BluetoothRuntimeManager = Pick<BTManager<readonly never[]>,
| "setBackgroundScanEnabled"
| "pauseScan"
| "resumeScan"
| "forget"
| "disconnectDevice"
| "stopRecording"
| "keepConnecting"
| "setAutoConnect">;The subset of BTManager the runtime controls.
BluetoothState
type BluetoothState = "on" | "off" | "unauthorized" | "unsupported";Bluetooth adapter state as seen by the app.
BTDeviceFilter
type BTDeviceFilter =
| DeviceKey
| Omit<DeviceFilter, "where"> & object;Which connected or nearby devices to follow: a model key (deviceData.name or .model), or a
filter over what the device is (any DeviceFilter field, matched against its catalog product)
and its state. { kind: "weight-scale" }, { manufacturer: "HARTMANN", status: DeviceStatus.CONNECTED }.
A device whose parser serves several products counts as the one its advertised name identifies,
else as its parser's product.
BTDeviceSelection
type BTDeviceSelection = Pick<BTManagedDevice, "id" | "device" | "deviceData" | "connect">;A discovered device offered for selection: its id, BLE device, data and connect.
CheckmeMeasurement
type CheckmeMeasurement =
| BloodPressureMeasurement
| EcgMeasurement
| PulseOximeterMeasurement
| BodyTemperatureMeasurement
| {
heartRate?: number;
measurementTypeKey: MeasurementTypeKey.heartRate;
recordedAt?: Date;
};A measurement reported by a Checkme device.
Union Members
BloodPressureMeasurement
EcgMeasurement
PulseOximeterMeasurement
BodyTemperatureMeasurement
Type Literal
{
heartRate?: number;
measurementTypeKey: MeasurementTypeKey.heartRate;
recordedAt?: Date;
}| Name | Type | Description |
|---|---|---|
heartRate? | number | Heart rate in beats per minute. |
measurementTypeKey | MeasurementTypeKey.heartRate | Measurement type of the reading. |
recordedAt? | Date | When the reading was taken. |
CheckmePodMeasurement
type CheckmePodMeasurement =
| PulseOximeterMeasurement
| {
bodyTemp: number;
measurementTypeKey: MeasurementTypeKey.temperature;
recordedAt: Date;
};A measurement reported by a Checkme Pod: pulse oximetry or body temperature.
Union Members
PulseOximeterMeasurement
Type Literal
{
bodyTemp: number;
measurementTypeKey: MeasurementTypeKey.temperature;
recordedAt: Date;
}| Name | Type | Description |
|---|---|---|
bodyTemp | number | Body temperature in degrees Celsius. |
measurementTypeKey | MeasurementTypeKey.temperature | Measurement type of the reading. |
recordedAt | Date | When the reading was taken. |
CheckmePodResult
type CheckmePodResult = MeasurementWithCaseType<MeasurementTypeForDevices<[CHECKME_POD]>> & object;A Checkme Pod measurement tagged with its case type.
Type Declaration
| Name | Type | Description |
|---|---|---|
caseType | CaseType | Frame case that produced the measurement. |
ClockSyncCapability
type ClockSyncCapability = "supported" | "unsupported" | "unknown";Whether a device clock can be synchronised.
ClockSyncTimezone
type ClockSyncTimezone = "local" | "utc";Timezone used to interpret the time sent to a device.
CustomByteOrder
type CustomByteOrder = "big" | "little";Order in which the declared byte indexes are assembled into a single value. "big" keeps the declared order, "little" reverses it.
CustomCaseKind
type CustomCaseKind = "result" | "stream" | "idle" | "event";The three frame roles a declared device may use.
- "result" a completed reading; its fields are decoded, bounds-checked and reported
- "stream" the device is mid-measurement; moves the device into MEASURING
- "idle" anything else the device emits (heartbeats, menu state); moves it back to CONNECTED
- "event" a stateful frame handled by the device declaration; it carries no declarative reading
The stateful roles the built-in device classes use (dependent, sn, error) are deliberately not available to declarations - they require a device class.
CustomDeviceId
type CustomDeviceId = string & object;Identifier of a device registered through defineCustomDevice. Branded so it never silently collapses into the IntegratedDevices union.
Type Declaration
| Name | Type | Description |
|---|---|---|
[customDeviceIdBrand] | true | Type-level brand; never present at runtime. |
CustomFieldEncoding
type CustomFieldEncoding = "uint" | "int" | "sfloat" | "float" | "ascii" | "decimal-pair";How the assembled bytes of a custom field are turned into a number.
- "uint" unsigned integer, 1-6 bytes
- "int" two's complement signed integer, 1-6 bytes
- "sfloat" IEEE-11073 16-bit SFLOAT, exactly 2 bytes (standard GATT vitals)
- "float" IEEE-11073 32-bit FLOAT, exactly 4 bytes (standard GATT thermometer)
- "ascii" decimal digits written as text, one digit per byte
- "decimal-pair" whole degrees followed by hundredths, e.g. 0x24 0x2f = 36.47
"ascii" is not a numeric encoding at all: the bytes are characters, so "120" arrives as
0x31 0x32 0x30. Serial-derived devices report whole records this way. Digits read
left to right, so the field may not be declared little-endian - reversing them would
turn 120 into 21.
CustomFrameHandler
type CustomFrameHandler = (params) => void;Handles one decoded frame of a device that needs a protocol-specific decoder.
Parameters
| Parameter | Type |
|---|---|
params | CustomFrameHandlerParams |
Returns
void
CustomFrameHandlerFactory
type CustomFrameHandlerFactory = () => CustomFrameHandler;Creates the per-device CustomFrameHandler.
Returns
CustomMeasurement
type CustomMeasurement =
| BloodPressureMeasurement
| BodyWeightMeasurement
| BodyTemperatureMeasurement
| BloodGlucoseMeasurement
| PulseOximeterMeasurement
| HeartRateMeasurement
| EcgMeasurement
| RespiratoryRateMeasurement
| UrineAnalyzeMeasurement;The measurement shapes a custom-device declaration may report. Its decoder fields are checked against the measurement catalog at registration, so this union can preserve the same measurementTypeKey discrimination as results from built-in devices.
CustomReadingDecorator
type CustomReadingDecorator = (reading, frame?, recordOffset?) => MeasurementWithCaseType<Measurement> | null;Adds metadata to a validated reading; null withholds it, for a frame that is not a patient reading.
Parameters
| Parameter | Type |
|---|---|
reading | MeasurementWithCaseType<Measurement> |
frame? | readonly string[] |
recordOffset? | number |
Returns
MeasurementWithCaseType<Measurement> | null
CustomSequencerFactory
type CustomSequencerFactory = (context) => CommandSequencer;Creates the command sequencer of one connection, for a declaration whose commands depend on the device or on stored state.
Parameters
| Parameter | Type |
|---|---|
context | CustomSequencerContext |
Returns
DeviceConnectionEventKind
type DeviceConnectionEventKind =
| "pairing"
| "connected"
| "bonded"
| "history-download"
| "battery"
| "device-identified"
| "clock-synchronized"
| "recording";Kind of connection lifecycle event.
DeviceData
type DeviceData = object;Identity and capabilities of a discovered or connected device.
Properties
clockSync?
clockSync?: ClockSyncCapability;Whether the device clock can be synchronised.
hardwareAddress?
hardwareAddress?: string;Device-reported address (available after identity); bind per patient and never log.
id
id: string;Platform identifier of the peripheral.
localName
localName: string;Name the peripheral advertises.
manufacturerData
manufacturerData: string;Advertised manufacturer data.
manufacturerName?
manufacturerName?: string;Manufacturer name reported by the device.
measurementTypes
measurementTypes: MeasurementTypeKey[];What the connected parser measures, set when the connection starts.
model?
model?: string;Model reported by the device.
name
name: DeviceKey;Integrated or custom device the peripheral was matched to.
sn
sn: string;Serial number reported by the device.
variant?
variant?: object;The brand and model the advertised name identified, when a parser serves several products.
manufacturer
manufacturer: string;Brand the advertised name identified.
model
model: string;Model the advertised name identified.
DeviceKey
type DeviceKey =
| IntegratedDevices
| CustomDeviceId;Anything the SDK can report as deviceData.name: a built-in device, or a declared one.
DeviceKeyOf
type DeviceKeyOf<T> = KeyOfAccepted<T[number]>;The device keys an acceptedDevices list can report.
Type Parameters
| Type Parameter |
|---|
T extends readonly AcceptedDevice[] |
DeviceVariant
type DeviceVariant = object;One brand and model that a built-in parser or a Bluetooth SIG profile decodes.
A built-in parser finds the product by nameMatch, so it is required there. A SIG profile
finds it by service, and nameMatch only names it; a row without one is listed in the
catalog but never labels a connected device.
Properties
device
device:
| IntegratedDevices
| StandardProfileId;The built-in parser or SIG profile that decodes the product.
manufacturer
manufacturer: string;Manufacturer of the product.
model
model: string;The product name; also the name of its SUPPORTED_DEVICES entry.
nameMatch?
nameMatch?: RegExp;Matches the advertised name of the product.
GlucoseReportedUnit
type GlucoseReportedUnit = "mg/dL" | "mmol/L";The unit the meter displayed the concentration in.
GlucoseSampleLocation
type GlucoseSampleLocation = "finger" | "alternateSite" | "earlobe";Where on the body the sample was taken.
GlucoseSensorWarning
type GlucoseSensorWarning = "batteryLow" | "temperatureTooHigh" | "temperatureTooLow" | "timeFault";A condition the meter flagged on a record that does not make its value unusable.
GlucoseSpecimenType
type GlucoseSpecimenType =
| "capillaryWholeBlood"
| "capillaryPlasma"
| "venousWholeBlood"
| "venousPlasma"
| "arterialWholeBlood"
| "arterialPlasma"
| "undeterminedWholeBlood"
| "undeterminedPlasma"
| "interstitialFluid";What a glucose sample was taken from. Control-solution tests are never reported.
LepuCommandValue
type LepuCommandValue = typeof LepuCommand[keyof typeof LepuCommand];Any Lepu command code.
LepuTransportName
type LepuTransportName = keyof typeof lepuTransports;Name of a transport group in lepuTransports.
MeasurementFeedbackKey
type MeasurementFeedbackKey = typeof MeasurementFeedbackKey[keyof typeof MeasurementFeedbackKey];The translation keys a failed measurement reports, as BluetoothError.translationKey (and its
message): compare against these rather than the strings, and translate them in the app.
MeasurementForDevice
type MeasurementForDevice<K> = K extends IntegratedDevices ? DeviceMeasurementMap[K] : CustomMeasurement;A built-in device has a measurement type the SDK knows statically. A device registered through defineCustomDevice reports the catalog-checked properties its declaration named.
Type Parameters
| Type Parameter |
|---|
K extends DeviceKey |
MeasurementTypeForDevices
type MeasurementTypeForDevices<T> = MeasurementForDevice<T[number]> & object;Measurement shape reported by any of the given devices, tagged with its case type.
Type Parameters
| Type Parameter |
|---|
T extends readonly DeviceKey[] |
Type Declaration
| Name | Type | Description |
|---|---|---|
caseType | CaseType | Frame case the measurement was decoded from. |
NearbyDevice
type NearbyDevice = DeviceData;Identity of a nearby device.
NearbyDeviceOfferStatus
type NearbyDeviceOfferStatus = "idle" | "offered" | "pairing" | "paired" | "error";Where a nearby device offer is in its lifecycle.
RecordedFrameSink
type RecordedFrameSink = (frame) => void | Promise<void>;Receives each frame as it is replayed.
Parameters
| Parameter | Type |
|---|---|
frame | RecordedBleFrame |
Returns
void | Promise<void>
ResultCallbackData
type ResultCallbackData<T> = OmitCaseType<MeasurementTypeForDevices<[T]>>;Measurement payload for the given device, without its case type.
Type Parameters
| Type Parameter |
|---|
T extends DeviceKey |
ResultPolicy
type ResultPolicy =
| "all"
| "daily-totals-only"
| "first-reading-per-kind-per-connection"
| "series";Rule deciding which readings of a device are reported.
ResultPolicyByMeasurement
type ResultPolicyByMeasurement = Partial<Record<MeasurementTypeKey, ResultPolicy>>;Result policy per measurement type.
RuntimeBluetoothState
type RuntimeBluetoothState = "unknown" | "on" | "off" | "unauthorized" | "unsupported";Bluetooth adapter state; unknown until first reported.
RuntimeConnectionEvent
type RuntimeConnectionEvent = DeviceConnectionEvent;Connection lifecycle event reported by the Bluetooth runtime.
RuntimeError
type RuntimeError = ErrorCallback;Error reported by the Bluetooth runtime.
RuntimeEvent
type RuntimeEvent = keyof RuntimeEventMap;Name of an event the runtime emits.
RuntimeResult
type RuntimeResult = ResultCallback<DeviceKey>;Typed union exposed when a host listens to every accepted device.
StandardProfileId
type StandardProfileId =
| "standard-blood-pressure"
| "standard-blood-glucose"
| "standard-body-temperature"
| "standard-heart-rate"
| "standard-body-weight"
| "standard-blood-oxygen-pulse-rate";The id of a Bluetooth SIG profile declaration, standard-<measurement type>.
VerovalBloodPressureReading
type VerovalBloodPressureReading = MeasurementWithCaseType<Measurement> & object;A blood pressure reading with the flags a Veroval monitor reports.
Type Declaration
| Name | Type | Description |
|---|---|---|
atrialFibrillation? | boolean | The device flagged atrial fibrillation during the reading. |
restingMeasurement? | boolean | The device flagged the reading as taken in its resting mode. |
tripleMeasurement? | boolean | The device flagged the reading as part of a triple measurement. |
VerovalDuoControlMeasurement
type VerovalDuoControlMeasurement = BloodPressureMeasurement & object;A blood pressure reading from a Duo Control monitor.
Type Declaration
| Name | Type | Description |
|---|---|---|
irregularHeartbeat? | boolean | Whether the monitor marked the reading as an irregular heartbeat. |
memorySlot | 1 | 2 | Memory slot (user) the monitor stored the reading in. |
recordedAt | Date | The timestamp stored in the monitor, rather than the download time. |
Enumerations
BluetoothErrorCode
Stable machine-readable codes for Bluetooth failures.
Enumeration Members
DeviceStatus
Connection and measurement state of a device.
Enumeration Members
IntegratedDevices
Bluetooth devices the SDK ships support for; each value is the device name.
Enumeration Members
Variables
A606_NOTIFY
const A606_NOTIFY: "0000ff02-0000-1000-8000-00805f9b34fb" = "0000ff02-0000-1000-8000-00805f9b34fb";Characteristic UUID that replies are notified on.
A606_SERVICE
const A606_SERVICE: "0000ff00-0000-1000-8000-00805f9b34fb" = "0000ff00-0000-1000-8000-00805f9b34fb";GATT service UUID of the A606.
A606_WRITE
const A606_WRITE: "0000ff01-0000-1000-8000-00805f9b34fb" = "0000ff01-0000-1000-8000-00805f9b34fb";Characteristic UUID that commands are written to.
a606MainServices
const a606MainServices: IService[];ZH-SG's fixed GATT profile and its 16-byte stored glucose record.
AOJ_COMMAND
const AOJ_COMMAND: object;Command opcodes sent to AOJ devices.
Type Declaration
AOJ_RESPONSE
const AOJ_RESPONSE: object;Response opcodes sent by AOJ devices.
Type Declaration
aojMainServices
const aojMainServices: IService[];The GATT service AOJ devices are monitored and written through.
BOSO_MEDICUS_NAME_MATCH
const BOSO_MEDICUS_NAME_MATCH: RegExp;The boso medicus system uses the Bluetooth SIG Blood Pressure Service and Measurement
characteristic. Its vendor-specific identity is the advertised name, which carries a
six-character hexadecimal suffix, for example boso medicus 312B5D.
BP3_MODEL_NAMES
const BP3_MODEL_NAMES: readonly string[];The names the BP3 range advertises.
Seventeen products differing in cuff, casing, or display rather than in protocol, so declaring the range is one line per name:
const bp3Devices = BP3_MODEL_NAMES.map((name) =>
viatomBpMonitor(name, { id: `viatom-${name.toLowerCase()}` }),
);CHECKME_NOTIFY
const CHECKME_NOTIFY: "0734594a-a8e7-4b1a-a6b1-cd5243059a57" = "0734594a-a8e7-4b1a-a6b1-cd5243059a57";Characteristic UUID that responses are notified on.
CHECKME_SERVICE
const CHECKME_SERVICE: "14839ac4-7d7e-415c-9a42-167340cf2339" = "14839ac4-7d7e-415c-9a42-167340cf2339";GATT service UUID of Checkme devices.
CHECKME_WRITE
const CHECKME_WRITE: "8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3" = "8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3";Characteristic UUID that commands are written to.
CheckmeCommand
const CheckmeCommand: object;Command codes of the Checkme protocol.
Type Declaration
CheckmeListType
const CheckmeListType: object;File list identifiers that can be read from a Checkme device.
Type Declaration
checkmeMainServices
const checkmeMainServices: IService[];The GATT service Checkme devices are monitored through.
CheckmePodCommand
const CheckmePodCommand: object;Command codes of the Checkme Pod protocol.
Type Declaration
| Name | Type | Default value | Description |
|---|---|---|---|
info | 20 | 0x14 | Requests device information. |
realtimeData | 32 | 0x20 | Requests the realtime reading. |
syncParameters | 22 | 0x16 | Synchronises device parameters such as the clock. |
checkmePodMainServices
const checkmePodMainServices: IService[];The GATT service Checkme Pod devices are monitored and written through.
DEFAULT_CALIBRATION
const DEFAULT_CALIBRATION: object;The calibration the recording is read with.
This is the EDF convention - a linear map from counts onto a physical range - and the device states its own in the header it sends before the curve. These are the values the vendor's app falls back to, and are what the SDK uses until a header supplies otherwise: the full signed sixteen-bit range spans plus or minus 27.68 mV.
Type Declaration
DEFAULT_PAIRED_DEVICE_STORAGE_KEY
const DEFAULT_PAIRED_DEVICE_STORAGE_KEY: "@ovok/native/paired-devices" = "@ovok/native/paired-devices";Storage key used when none is given.
DEFAULT_QUEUE_KEY
const DEFAULT_QUEUE_KEY: "@ovok/native/background-sync/results" = "@ovok/native/background-sync/results";Default storage key of the queue.
DEFAULT_RESTORE_STATE_IDENTIFIER
const DEFAULT_RESTORE_STATE_IDENTIFIER: "com.ovok.native.background-sync" = "com.ovok.native.background-sync";Default CoreBluetooth state restoration identifier.
DEVICE_VARIANTS
const DEVICE_VARIANTS: readonly DeviceVariant[];Every known brand and model variant, in lookup order.
ER1_MODEL_NAMES
const ER1_MODEL_NAMES: readonly string[];The names the ER1 recorders advertise.
ER2_MODEL_NAMES
const ER2_MODEL_NAMES: readonly string[];The names the ER2 recorders advertise, all of them on the small-MTU link.
ER3_MODEL_NAMES
const ER3_MODEL_NAMES: readonly string[];The ER3 family is identified separately from the ER1/ER2 opcode family.
GENIAL_T31_CID_ACK
const GENIAL_T31_CID_ACK: string[];Frame that acknowledges the device's identification.
GENIAL_T31_CONNECT
const GENIAL_T31_CONNECT: string[];Frame that opens the session.
GENIAL_T31_NOTIFY
const GENIAL_T31_NOTIFY: "0000fff1-0000-1000-8000-00805f9b34fb" = "0000fff1-0000-1000-8000-00805f9b34fb";Characteristic UUID that readings are notified on.
GENIAL_T31_SERVICE
const GENIAL_T31_SERVICE: "00001809-0000-1000-8000-00805f9b34fb" = "00001809-0000-1000-8000-00805f9b34fb";GATT service UUID of the Genial T31.
GENIAL_T31_WRITE
const GENIAL_T31_WRITE: "0000fff2-0000-1000-8000-00805f9b34fb" = "0000fff2-0000-1000-8000-00805f9b34fb";Characteristic UUID that commands are written to.
genialT31MainServices
const genialT31MainServices: IService[];The GATT service the Genial T31 is monitored and written through.
LEPOD_MODEL_NAMES
const LEPOD_MODEL_NAMES: readonly string[];The names the Lepod range advertises.
LEPU_CATALOG_EXCLUDED_DEVICE_NAMES
const LEPU_CATALOG_EXCLUDED_DEVICE_NAMES: readonly string[];Fetal-doppler and massager names from the vendor vocabulary, kept out of the SDK catalog.
LEPU_CATALOG_HIDDEN_DEVICE_NAMES
const LEPU_CATALOG_HIDDEN_DEVICE_NAMES: readonly string[];Advertisement aliases that identify a product but are not customer-facing model names.
LEPU_DEVICE_NAMES
const LEPU_DEVICE_NAMES: readonly string[];The names the Lepu/Viatom family advertises, as its own SDK matches them.
Taken from the vendor's getDeviceModel, a 732-line cascade of substring checks that is
the whole of how that SDK decides which product it is talking to. The order there matters,
because 27 of these names are a prefix of another - BP2 of BP2A, BP2T, BP2W and
three more - so a check that ran in the wrong order would bind a BP2W as a BP2 and poll it
with an opcode written for different hardware.
It is that function's vocabulary, not a catalogue of everything the vendor sells: a few
products - the ER3 and the M12 among them - are identified elsewhere in that app and never
reach this list. The first-word names below are compared against the complete first token of
the advertisement, not as an open-ended prefix: O2 must not claim O2Ring, and BabyO2
must not claim BabyO2N.
They are held here as a flat vocabulary rather than an ordered cascade, because
lepuNameMatch derives the exclusions from the list itself. Adding a name automatically
narrows every name it extends, which an ordered list would leave to whoever inserted it.
LEPU_FIRST_WORD_DEVICE_NAMES
const LEPU_FIRST_WORD_DEVICE_NAMES: readonly string[];Names the vendor matches by the complete first word of the advertisement.
LepuCommand
const LepuCommand: object;The commands every Lepu device understands.
These are the generic opcodes, shared across the whole family. Device-specific opcodes live below 0x40 and belong with their driver, because the same number means different things on different hardware - 0x08 polls realtime data on a BP2 and starts a measurement on others. That collision is why this module holds only the opcodes that are genuinely common, and why a driver must never assume a low opcode is safe to send to an unidentified device.
Type Declaration
LepuResponseType
const LepuResponseType: object;What a Lepu device says about the request it just answered.
Only SUCCESS means the payload holds what was asked for. Every other value is an error
whose payload is not the requested data, so a reply has to be checked before it is
decoded - otherwise a refusal is read as a reading, out of whatever bytes happen to
follow the header.
Type Declaration
lepuTransports
const lepuTransports: object;The characteristics each group of products exposes, read from the vendor's own managers.
standard and aw1 match the vendor's published SDK reference exactly, and standard
also matches the SDK's existing BP2 driver, which has run against hardware on precisely
these UUIDs. ding and aiTele were read from an OEM build and the vendor documents no
product on them, so they are the two entries here that nothing independent confirms.
Type Declaration
MeasurementFeedbackKey
const MeasurementFeedbackKey: object;The translation keys a failed measurement reports, as BluetoothError.translationKey (and its
message): compare against these rather than the strings, and translate them in the app.
Type Declaration
measurementFieldCatalog
const measurementFieldCatalog: Readonly<Partial<Record<MeasurementTypeKey, Readonly<Record<string, CatalogField>>>>>;The catalog of declarable properties per measurement type.
TMB_MODEL_NAMES
const TMB_MODEL_NAMES: readonly string[];Advertised names of the TMB blood pressure monitors.
TRASENSE_S9_NOTIFY
const TRASENSE_S9_NOTIFY: "0000fff2-0000-1000-8000-00805f9b34fb" = "0000fff2-0000-1000-8000-00805f9b34fb";Characteristic UUID that replies are notified on.
TRASENSE_S9_SERVICE
const TRASENSE_S9_SERVICE: "0000fff0-0000-1000-8000-00805f9b34fb" = "0000fff0-0000-1000-8000-00805f9b34fb";GATT service UUID of the Trasense S9.
TRASENSE_S9_WRITE
const TRASENSE_S9_WRITE: "0000fff1-0000-1000-8000-00805f9b34fb" = "0000fff1-0000-1000-8000-00805f9b34fb";Characteristic UUID that commands are written to.
VEROVAL_ACTIVITY_BOND_WRITE
const VEROVAL_ACTIVITY_BOND_WRITE: "2610fc01-494d-494c-4544-55544954414c" = "2610fc01-494d-494c-4544-55544954414c";Characteristic UUID written to when bonding.
VEROVAL_ACTIVITY_NOTIFY
const VEROVAL_ACTIVITY_NOTIFY: "2610fc03-494d-494c-4544-55544954414c" = "2610fc03-494d-494c-4544-55544954414c";Characteristic UUID that replies are notified on.
VEROVAL_ACTIVITY_SECONDARY_NOTIFY
const VEROVAL_ACTIVITY_SECONDARY_NOTIFY: "2610fc04-494d-494c-4544-55544954414c" = "2610fc04-494d-494c-4544-55544954414c";Second characteristic UUID that replies are notified on.
VEROVAL_ACTIVITY_SERVICE
const VEROVAL_ACTIVITY_SERVICE: "2610fc00-494d-494c-4544-55544954414c" = "2610fc00-494d-494c-4544-55544954414c";GATT service UUID of the Veroval activity tracker.
VEROVAL_ACTIVITY_WRITE
const VEROVAL_ACTIVITY_WRITE: "2610fc02-494d-494c-4544-55544954414c" = "2610fc02-494d-494c-4544-55544954414c";Characteristic UUID that commands are written to.
VEROVAL_BP_MODEL_NAMES
const VEROVAL_BP_MODEL_NAMES: readonly string[];The names these monitors advertise.
VEROVAL_ECG_SAMPLE_RATE_HZ
const VEROVAL_ECG_SAMPLE_RATE_HZ: 128 = 128;How fast the device samples.
Not taken on trust: the vendor's own plotting step works out to two two-hundred-and-fifty sixths of a second, and its transfer is thirty-four segments of sixteen packets of sixteen bytes - which is 256 bytes, 128 samples, one second per segment. Both say 128 Hz.
VEROVAL_FUSION_NAME_MATCH
const VEROVAL_FUSION_NAME_MATCH: RegExp;The exact advertised name used by the Veroval fusion monitor.
VIATOM_ECG_MILLIVOLTS_PER_COUNT
const VIATOM_ECG_MILLIVOLTS_PER_COUNT: 0.002467 = 0.002467;Millivolts represented by one sample count.
VIATOM_ECG_SAMPLE_RATE_HZ
const VIATOM_ECG_SAMPLE_RATE_HZ: 125 = 125;ECG sample rate in hertz.
VIATOM_OXIMETER_NAMES
const VIATOM_OXIMETER_NAMES: readonly string[];The names the oximeter range advertises.
const oximeters = VIATOM_OXIMETER_NAMES.map((name) =>
viatomOximeter(name, { id: `viatom-${name.toLowerCase()}` }),
);VIATOM_OXYII_NAMES
const VIATOM_OXYII_NAMES: readonly string[];ViHealth models handled by its dedicated OxyII/AW1 transport.
These are selected by the vendor's model-to-interface switch rather than by the legacy O2 interface used by the rest of this file.
VISOMAT_COMFORT_SOFT_BT_NAME_MATCH
const VISOMAT_COMFORT_SOFT_BT_NAME_MATCH: RegExp;The product name used by the visomat comfort soft BT monitor while advertising.
References
CHECKME_POD_NOTIFY
Renames and re-exports CHECKME_NOTIFY
CHECKME_POD_SERVICE
Renames and re-exports CHECKME_SERVICE
CHECKME_POD_WRITE
Renames and re-exports CHECKME_WRITE
Last updated on