Skip to main content

Module transforms

Module transforms 

Source
Expand description

Transform pipeline that converts a RawMessage into a typed Message.

The pieces here are deliberately decoupled and individually testable so the M5 typed decoder (crate::TypedDecoder) can compose them in the protocol-mandated order:

  1. SubField selection           (subfields)
  2. Components unpacking         (components + bit_stream)
  3. Accumulator running totals   (accumulator)
  4. Scale / Offset application   (scale_offset)
  5. Enum int → string            (enum_strings)
  6. DateTime conversion          (`crate::datetime`)

Reference: guide/fit_binary_learning_notes.md §“解码处理顺序(关键!)”.

Re-exports§

pub use accumulator::Accumulator;
pub use bit_stream::BitStream;
pub use hr_merge::merge_heart_rates;
pub use memo_glob::decode_memo_glob;

Modules§

accumulator
Accumulator — wraparound compensation for FIT counter fields.
bit_stream
LSB-first bit reader for the Components transform.
components
Components — split a packed integer field into multiple LSB-first lanes.
enum_strings
Resolve a numeric raw value to its canonical snake_case enum name.
hr_merge
Heart-rate merge — interpolate HR samples onto record messages.
memo_glob
MemoGlob reassembly — stitch multi-part text onto target messages.
scale_offset
Profile-level Scale/Offset transformation.
subfields
SubField selection — pick the correct semantic interpretation of a field based on the value of another field in the same message.