CustomFieldEncoding
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.
Kind: Type alias
Package: @ovok/native
Import
import { CustomFieldEncoding } from '@ovok/native/bt-management';
TypeScript shape
type CustomFieldEncoding = "uint" | "int" | "sfloat" | "float" | "ascii" | "decimal-pair";
This is a type-level export; it has no call parameters.
Learn the workflow
Continue with Bluetooth for the workflow context and examples.