Ble
Defined in: src/transports/bleTransport.ts:70
Inheritance-friendly wrapper over createBleTransport. Subclass implements writeChunk() and calls the protected deliver()/setState() from its own BLE event wiring. Bytes-only — do any base64 (e.g. react-native-ble-plx) encoding inside the subclass.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Ble(): BleTransport;Defined in: src/transports/bleTransport.ts:76
Returns
Section titled “Returns”BleTransport
Methods
Section titled “Methods”getState()
Section titled “getState()”getState(): TransportState;Defined in: src/transports/bleTransport.ts:110
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”onData()
Section titled “onData()”onData(cb): void;Defined in: src/transports/bleTransport.ts:104
Each chunk is ONE complete companion frame (a BLE notification payload).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cb | (chunk) => void |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”onStateChange()
Section titled “onStateChange()”onStateChange(cb): void;Defined in: src/transports/bleTransport.ts:107
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cb | (s) => void |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”send()
Section titled “send()”send(bytes): Promise<void>;Defined in: src/transports/bleTransport.ts:101
Write one complete companion frame to the radio.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes | Uint8Array |
Returns
Section titled “Returns”Promise<void>