Skip to main content

fit/transforms/
mod.rs

1//! Transform pipeline that converts a `RawMessage` into a typed `Message`.
2//!
3//! The pieces here are deliberately decoupled and individually testable so
4//! the M5 typed decoder ([`crate::TypedDecoder`]) can compose them in the
5//! protocol-mandated order:
6//!
7//! ```text
8//!   1. SubField selection           (subfields)
9//!   2. Components unpacking         (components + bit_stream)
10//!   3. Accumulator running totals   (accumulator)
11//!   4. Scale / Offset application   (scale_offset)
12//!   5. Enum int → string            (enum_strings)
13//!   6. DateTime conversion          (`crate::datetime`)
14//! ```
15//!
16//! Reference: `guide/fit_binary_learning_notes.md` §"解码处理顺序(关键!)".
17
18pub mod accumulator;
19pub mod bit_stream;
20pub mod components;
21pub mod enum_strings;
22#[cfg(feature = "chrono")]
23pub mod hr_merge;
24pub mod memo_glob;
25pub mod scale_offset;
26pub mod subfields;
27
28pub use accumulator::Accumulator;
29pub use bit_stream::BitStream;
30#[cfg(feature = "chrono")]
31pub use hr_merge::merge_heart_rates;
32pub use memo_glob::decode_memo_glob;