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.
Kind: Class
Package: @ovok/native
Import
import { LepuFileTransfer } from '@ovok/native/bt-management';
TypeScript signatures
(params: LepuFileTransferParams): LepuFileTransfer
| Parameter | Type | Details |
|---|---|---|
params | LepuFileTransferParams | — |
Returns: LepuFileTransfer.
Public members
| Member | Type | Details |
|---|---|---|
isHistoryTransfer | (): boolean | True when accepted results are records downloaded from device history. |
initialCommands | (delayBeforeWriteMs?: number): readonly DeviceCommand[] | Sent once every characteristic is subscribed. Empty starts a device that only listens. |
nextCommand | (frame: readonly string[]): readonly DeviceCommand[] | undefined | Answers one complete frame. 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. |
Learn the workflow
Continue with Bluetooth for the workflow context and examples.