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.
Kind: Interface
Package: @ovok/native
Import
import { CustomFrameSpec } from '@ovok/native/bt-management';
TypeScript shape
interface CustomFrameSpec {
header?: string[];
minLengthBytes: number;
length?: {
index: number;
widthBytes: 1 | 2;
byteOrder: CustomByteOrder;
overheadBytes: number;
};
checksum?: CustomChecksumSpec;
}
This is a type-level export; it has no call parameters.
Public members
| Member | Type | Details |
|---|---|---|
header | string[] | Optional. Required leading bytes as hex, e.g. ["aa", "55"]. |
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. |
length | { index: number; widthBytes: 1 | 2; byteOrder: CustomByteOrder; overheadBytes: number; } | Optional. An in-frame length field, when the device has one. |
checksum | CustomChecksumSpec | Optional. 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. |
Learn the workflow
Continue with Bluetooth for the workflow context and examples.