pub struct FieldInfo {
pub field_def_num: u8,
pub name: &'static str,
pub type_name: &'static str,
pub array: Option<&'static str>,
pub scale: Option<f64>,
pub offset: Option<f64>,
pub units: Option<&'static str>,
pub components: &'static [Component],
pub sub_fields: &'static [SubField],
pub accumulate: bool,
}Expand description
Static metadata for a single field of a single message.
Fields§
§field_def_num: u8Field definition number used on the wire (0..=255).
name: &'static strSnake-case canonical name from Profile.xlsx.
type_name: &'static strType reference: either a base type (“uint16”) or a Types-sheet name (“sport”). Resolution to a runtime base type happens in M3.
array: Option<&'static str>Raw array spec (e.g. "[5]", "[N]", "[5x10]") or None for scalars.
scale: Option<f64>Scale factor (physical = raw / scale - offset). First element only when
scale is per-component; component-specific scales live on Component.
offset: Option<f64>Offset.
units: Option<&'static str>Display unit (e.g. "m/s", "bpm").
components: &'static [Component]Components — non-empty when the wire field unpacks LSB-first into multiple sub-values (see protocol §“Components”).
sub_fields: &'static [SubField]SubFields — alternative semantic interpretations selected at runtime based on the value of another field in the same message.
accumulate: boolWhether this field accumulates across messages (for rollover compensation).