Returns a new FIT byte array containing the current messages, header and CRCs.
Writes a definition when needed, then one message using the supplied raw values. The encoder does not derive fields from decoded objects or apply profile scales.
FIT global message number (0–65535).
Native field definitions and already-scaled values.
Local definition slot (0–15); defaults to zero.
This encoder, for chaining.
StaticcalculateComputes the FIT CRC-16 for the supplied byte values.
StaticstringEncodes UTF-8 with a terminating NUL byte. Use the returned byteLength as the field size.
StatictoConverts a Date to whole native FIT seconds; rejects invalid dates and values outside the uint32 range.
A generic FIT binary encoder. Callers supply profile-specific field definitions and already-scaled field values. Numeric arrays, strings, and variable-length field values are supplied as raw
Uint8Arrayvalues.