use crate::profile::ProfileType;
use crate::profile::typedef::{FitBaseType, MesgNum};
pub(crate) const MAX_COMPONENT_BITS: usize = 240;
pub(crate) const TOTAL_ACCUMULATE: usize = 7;
#[derive(Debug, Clone, Copy)]
pub struct FieldReference<'a> {
pub name: Name,
pub base_type: FitBaseType,
pub profile_type: ProfileType,
pub array: bool,
pub accumulate: bool,
pub scale: f64,
pub offset: f64,
pub units: Unit,
pub components: &'a [Component],
pub sub_fields: &'a [SubField<'a>],
}
#[derive(Debug)]
pub struct Component {
pub field_num: u8,
pub accumulate: bool,
pub bits: u8,
pub scale: f64,
pub offset: f64,
}
#[derive(Debug)]
pub struct SubField<'a> {
pub name: Name,
pub base_type: FitBaseType,
pub profile_type: ProfileType,
pub scale: f64,
pub offset: f64,
pub units: Unit,
pub maps: &'a [SubFieldMap],
pub components: &'a [Component],
}
#[derive(Debug)]
pub struct SubFieldMap {
pub ref_field_num: u8,
pub ref_field_value: i64,
}
#[rustfmt::skip]
const FR_DEF: FieldReference = FieldReference { name: Name::Empty, base_type: FitBaseType(u8::MAX), profile_type: ProfileType::Invalid, array: false, accumulate: false, scale: 1.0, offset: 0.0, units: Unit::Empty, components: &[], sub_fields: &[] };
#[rustfmt::skip]
const SF_DEF: SubField = SubField { name: Name::Empty, base_type: FitBaseType(u8::MAX), profile_type: ProfileType::Invalid, scale: 1.0, offset: 0.0, units: Unit::Empty, components: &[], maps: &[] };
#[rustfmt::skip]
pub const fn field_reference<'a>(mesg_num: MesgNum, field_num: u8) -> Option<FieldReference<'a>> {
match mesg_num {
MesgNum::FILE_ID => { match field_num {
0 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::File, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Product, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::FaveroProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::FaveroProduct, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 263 },
], ..SF_DEF },
SubField { name: Name::GarminProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::GarminProduct, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 13 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 89 },
], ..SF_DEF }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::SerialNumber, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::Uint32z, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimeCreated, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Number, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
8 => Some(FieldReference { name: Name::ProductName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::FILE_CREATOR => { match field_num {
0 => Some(FieldReference { name: Name::SoftwareVersion, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HardwareVersion, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::TIMESTAMP_CORRELATION => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::FractionalTimestamp, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 32768.0, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SystemTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
2 => Some(FieldReference { name: Name::FractionalSystemTimestamp, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 32768.0, units: Unit::Second, ..FR_DEF }),
3 => Some(FieldReference { name: Name::LocalTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, units: Unit::Second, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
5 => Some(FieldReference { name: Name::SystemTimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::SOFTWARE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Version, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, ..FR_DEF }),
5 => Some(FieldReference { name: Name::PartNumber, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::SLAVE_DEVICE => { match field_num {
0 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Product, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::FaveroProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::FaveroProduct, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 263 },
], ..SF_DEF },
SubField { name: Name::GarminProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::GarminProduct, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 13 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 89 },
], ..SF_DEF }
], ..FR_DEF }),
_ => None,
}},
MesgNum::CAPABILITIES => { match field_num {
0 => Some(FieldReference { name: Name::Languages, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, array: true , ..FR_DEF }),
1 => Some(FieldReference { name: Name::Sports, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::SportBits0, array: true , ..FR_DEF }),
21 => Some(FieldReference { name: Name::WorkoutsSupported, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::WorkoutCapabilities, ..FR_DEF }),
23 => Some(FieldReference { name: Name::ConnectivitySupported, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::ConnectivityCapabilities, ..FR_DEF }),
_ => None,
}},
MesgNum::FILE_CAPABILITIES => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::File, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Flags, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::FileFlags, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Directory, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
3 => Some(FieldReference { name: Name::MaxCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::MaxSize, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Bytes, ..FR_DEF }),
_ => None,
}},
MesgNum::MESG_CAPABILITIES => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::File, base_type: FitBaseType::ENUM, profile_type: ProfileType::File, ..FR_DEF }),
1 => Some(FieldReference { name: Name::MesgNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
2 => Some(FieldReference { name: Name::CountType, base_type: FitBaseType::ENUM, profile_type: ProfileType::MesgCount, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Count, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::NumPerFile, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, maps: &[
SubFieldMap { ref_field_num: 2 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::MaxPerFile, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, maps: &[
SubFieldMap { ref_field_num: 2 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::MaxPerFileType, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, maps: &[
SubFieldMap { ref_field_num: 2 , ref_field_value: 2 },
], ..SF_DEF }
], ..FR_DEF }),
_ => None,
}},
MesgNum::FIELD_CAPABILITIES => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::File, base_type: FitBaseType::ENUM, profile_type: ProfileType::File, ..FR_DEF }),
1 => Some(FieldReference { name: Name::MesgNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
2 => Some(FieldReference { name: Name::FieldNum, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Count, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
_ => None,
}},
MesgNum::DEVICE_SETTINGS => { match field_num {
0 => Some(FieldReference { name: Name::ActiveTimeZone, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::UtcOffset, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
2 => Some(FieldReference { name: Name::TimeOffset, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , units: Unit::Second, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimeMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::TimeMode, array: true , ..FR_DEF }),
5 => Some(FieldReference { name: Name::TimeZoneOffset, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, array: true , scale: 4.0, units: Unit::Hour, ..FR_DEF }),
12 => Some(FieldReference { name: Name::BacklightMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::BacklightMode, ..FR_DEF }),
36 => Some(FieldReference { name: Name::ActivityTrackerEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
39 => Some(FieldReference { name: Name::ClockTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
40 => Some(FieldReference { name: Name::PagesEnabled, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , ..FR_DEF }),
46 => Some(FieldReference { name: Name::MoveAlertEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
47 => Some(FieldReference { name: Name::DateMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::DateMode, ..FR_DEF }),
55 => Some(FieldReference { name: Name::DisplayOrientation, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayOrientation, ..FR_DEF }),
56 => Some(FieldReference { name: Name::MountingSide, base_type: FitBaseType::ENUM, profile_type: ProfileType::Side, ..FR_DEF }),
57 => Some(FieldReference { name: Name::DefaultPage, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , ..FR_DEF }),
58 => Some(FieldReference { name: Name::AutosyncMinSteps, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Step, ..FR_DEF }),
59 => Some(FieldReference { name: Name::AutosyncMinTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Minute, ..FR_DEF }),
80 => Some(FieldReference { name: Name::LactateThresholdAutodetectEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
86 => Some(FieldReference { name: Name::BleAutoUploadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
89 => Some(FieldReference { name: Name::AutoSyncFrequency, base_type: FitBaseType::ENUM, profile_type: ProfileType::AutoSyncFrequency, ..FR_DEF }),
90 => Some(FieldReference { name: Name::AutoActivityDetect, base_type: FitBaseType::UINT32, profile_type: ProfileType::AutoActivityDetect, ..FR_DEF }),
94 => Some(FieldReference { name: Name::NumberOfScreens, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
95 => Some(FieldReference { name: Name::SmartNotificationDisplayOrientation, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayOrientation, ..FR_DEF }),
134 => Some(FieldReference { name: Name::TapInterface, base_type: FitBaseType::ENUM, profile_type: ProfileType::Switch, ..FR_DEF }),
174 => Some(FieldReference { name: Name::TapSensitivity, base_type: FitBaseType::ENUM, profile_type: ProfileType::TapSensitivity, ..FR_DEF }),
_ => None,
}},
MesgNum::USER_PROFILE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::FriendlyName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Gender, base_type: FitBaseType::ENUM, profile_type: ProfileType::Gender, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Age, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Year, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Height, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Weight, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Kilogram, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Language, base_type: FitBaseType::ENUM, profile_type: ProfileType::Language, ..FR_DEF }),
6 => Some(FieldReference { name: Name::ElevSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
7 => Some(FieldReference { name: Name::WeightSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
8 => Some(FieldReference { name: Name::RestingHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
9 => Some(FieldReference { name: Name::DefaultMaxRunningHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
10 => Some(FieldReference { name: Name::DefaultMaxBikingHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
11 => Some(FieldReference { name: Name::DefaultMaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
12 => Some(FieldReference { name: Name::HrSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayHeart, ..FR_DEF }),
13 => Some(FieldReference { name: Name::SpeedSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
14 => Some(FieldReference { name: Name::DistSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
16 => Some(FieldReference { name: Name::PowerSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayPower, ..FR_DEF }),
17 => Some(FieldReference { name: Name::ActivityClass, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityClass, ..FR_DEF }),
18 => Some(FieldReference { name: Name::PositionSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayPosition, ..FR_DEF }),
21 => Some(FieldReference { name: Name::TemperatureSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
22 => Some(FieldReference { name: Name::LocalId, base_type: FitBaseType::UINT16, profile_type: ProfileType::UserLocalId, ..FR_DEF }),
23 => Some(FieldReference { name: Name::GlobalId, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
28 => Some(FieldReference { name: Name::WakeTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocaltimeIntoDay, ..FR_DEF }),
29 => Some(FieldReference { name: Name::SleepTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocaltimeIntoDay, ..FR_DEF }),
30 => Some(FieldReference { name: Name::HeightSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
31 => Some(FieldReference { name: Name::UserRunningStepLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
32 => Some(FieldReference { name: Name::UserWalkingStepLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
47 => Some(FieldReference { name: Name::DepthSetting, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
49 => Some(FieldReference { name: Name::DiveCount, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
_ => None,
}},
MesgNum::HRM_PROFILE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HrmAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
2 => Some(FieldReference { name: Name::LogHrv, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
3 => Some(FieldReference { name: Name::HrmAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
_ => None,
}},
MesgNum::SDM_PROFILE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SdmAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
2 => Some(FieldReference { name: Name::SdmCalFactor, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Percent, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Odometer, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::SpeedSource, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
5 => Some(FieldReference { name: Name::SdmAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
7 => Some(FieldReference { name: Name::OdometerRollover, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::BIKE_PROFILE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
2 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Odometer, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::BikeSpdAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
5 => Some(FieldReference { name: Name::BikeCadAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
6 => Some(FieldReference { name: Name::BikeSpdcadAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
7 => Some(FieldReference { name: Name::BikePowerAntId, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
8 => Some(FieldReference { name: Name::CustomWheelsize, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
9 => Some(FieldReference { name: Name::AutoWheelsize, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
10 => Some(FieldReference { name: Name::BikeWeight, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Kilogram, ..FR_DEF }),
11 => Some(FieldReference { name: Name::PowerCalFactor, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Percent, ..FR_DEF }),
12 => Some(FieldReference { name: Name::AutoWheelCal, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
13 => Some(FieldReference { name: Name::AutoPowerZero, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
14 => Some(FieldReference { name: Name::Id, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
15 => Some(FieldReference { name: Name::SpdEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
16 => Some(FieldReference { name: Name::CadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
17 => Some(FieldReference { name: Name::SpdcadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
18 => Some(FieldReference { name: Name::PowerEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
19 => Some(FieldReference { name: Name::CrankLength, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, offset: -110.0,units: Unit::Millimeter, ..FR_DEF }),
20 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
21 => Some(FieldReference { name: Name::BikeSpdAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
22 => Some(FieldReference { name: Name::BikeCadAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
23 => Some(FieldReference { name: Name::BikeSpdcadAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
24 => Some(FieldReference { name: Name::BikePowerAntIdTransType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
37 => Some(FieldReference { name: Name::OdometerRollover, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
38 => Some(FieldReference { name: Name::FrontGearNum, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
39 => Some(FieldReference { name: Name::FrontGear, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, array: true , ..FR_DEF }),
40 => Some(FieldReference { name: Name::RearGearNum, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
41 => Some(FieldReference { name: Name::RearGear, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, array: true , ..FR_DEF }),
44 => Some(FieldReference { name: Name::ShimanoDi2Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
_ => None,
}},
MesgNum::CONNECTIVITY => { match field_num {
0 => Some(FieldReference { name: Name::BluetoothEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
1 => Some(FieldReference { name: Name::BluetoothLeEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AntEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
4 => Some(FieldReference { name: Name::LiveTrackingEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
5 => Some(FieldReference { name: Name::WeatherConditionsEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
6 => Some(FieldReference { name: Name::WeatherAlertsEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
7 => Some(FieldReference { name: Name::AutoActivityUploadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
8 => Some(FieldReference { name: Name::CourseDownloadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
9 => Some(FieldReference { name: Name::WorkoutDownloadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
10 => Some(FieldReference { name: Name::GpsEphemerisDownloadEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
11 => Some(FieldReference { name: Name::IncidentDetectionEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
12 => Some(FieldReference { name: Name::GrouptrackEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
_ => None,
}},
MesgNum::WATCHFACE_SETTINGS => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Mode, base_type: FitBaseType::ENUM, profile_type: ProfileType::WatchfaceMode, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Layout, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, sub_fields: &[
SubField { name: Name::DigitalLayout, base_type: FitBaseType::BYTE, profile_type: ProfileType::DigitalWatchfaceLayout, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::AnalogLayout, base_type: FitBaseType::BYTE, profile_type: ProfileType::AnalogWatchfaceLayout, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
_ => None,
}},
MesgNum::OHR_SETTINGS => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Switch, ..FR_DEF }),
_ => None,
}},
MesgNum::TIME_IN_ZONE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ReferenceMesg, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ReferenceIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
2 => Some(FieldReference { name: Name::TimeInHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
3 => Some(FieldReference { name: Name::TimeInSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimeInCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::TimeInPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
6 => Some(FieldReference { name: Name::HrZoneHighBoundary, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::BeatsPerMinute, ..FR_DEF }),
7 => Some(FieldReference { name: Name::SpeedZoneHighBoundary, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
8 => Some(FieldReference { name: Name::CadenceZoneHighBoundary, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
9 => Some(FieldReference { name: Name::PowerZoneHighBoundary, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
10 => Some(FieldReference { name: Name::HrCalcType, base_type: FitBaseType::ENUM, profile_type: ProfileType::HrZoneCalc, ..FR_DEF }),
11 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
12 => Some(FieldReference { name: Name::RestingHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
13 => Some(FieldReference { name: Name::ThresholdHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
14 => Some(FieldReference { name: Name::PwrCalcType, base_type: FitBaseType::ENUM, profile_type: ProfileType::PwrZoneCalc, ..FR_DEF }),
15 => Some(FieldReference { name: Name::FunctionalThresholdPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
_ => None,
}},
MesgNum::ZONES_TARGET => { match field_num {
1 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::ThresholdHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::FunctionalThresholdPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
5 => Some(FieldReference { name: Name::HrCalcType, base_type: FitBaseType::ENUM, profile_type: ProfileType::HrZoneCalc, ..FR_DEF }),
7 => Some(FieldReference { name: Name::PwrCalcType, base_type: FitBaseType::ENUM, profile_type: ProfileType::PwrZoneCalc, ..FR_DEF }),
_ => None,
}},
MesgNum::SPORT => { match field_num {
0 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::HR_ZONE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HighBpm, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::SPEED_ZONE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::HighValue, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::CADENCE_ZONE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::HighValue, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::POWER_ZONE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HighValue, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::MET_ZONE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HighBpm, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Calories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::KilocaloriesPerMinute, ..FR_DEF }),
3 => Some(FieldReference { name: Name::FatCalories, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, units: Unit::KilocaloriesPerMinute, ..FR_DEF }),
_ => None,
}},
MesgNum::TRAINING_SETTINGS => { match field_num {
31 => Some(FieldReference { name: Name::TargetDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
32 => Some(FieldReference { name: Name::TargetSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
33 => Some(FieldReference { name: Name::TargetTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
153 => Some(FieldReference { name: Name::PreciseTargetSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
_ => None,
}},
MesgNum::DIVE_SETTINGS => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Model, base_type: FitBaseType::ENUM, profile_type: ProfileType::TissueModelType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::GfLow, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
3 => Some(FieldReference { name: Name::GfHigh, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
4 => Some(FieldReference { name: Name::WaterType, base_type: FitBaseType::ENUM, profile_type: ProfileType::WaterType, ..FR_DEF }),
5 => Some(FieldReference { name: Name::WaterDensity, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KilogramsPerCubicMeter, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Po2Warn, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Po2Critical, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Po2Deco, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
9 => Some(FieldReference { name: Name::SafetyStopEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
10 => Some(FieldReference { name: Name::BottomDepth, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
11 => Some(FieldReference { name: Name::BottomTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
12 => Some(FieldReference { name: Name::ApneaCountdownEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
13 => Some(FieldReference { name: Name::ApneaCountdownTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
14 => Some(FieldReference { name: Name::BacklightMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::DiveBacklightMode, ..FR_DEF }),
15 => Some(FieldReference { name: Name::BacklightBrightness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
16 => Some(FieldReference { name: Name::BacklightTimeout, base_type: FitBaseType::UINT8, profile_type: ProfileType::BacklightTimeout, ..FR_DEF }),
17 => Some(FieldReference { name: Name::RepeatDiveInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
18 => Some(FieldReference { name: Name::SafetyStopTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
19 => Some(FieldReference { name: Name::HeartRateSourceType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SourceType, ..FR_DEF }),
20 => Some(FieldReference { name: Name::HeartRateSource, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, sub_fields: &[
SubField { name: Name::HeartRateAntplusDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::AntplusDeviceType, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::HeartRateLocalDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::LocalDeviceType, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 5 },
], ..SF_DEF }
], ..FR_DEF }),
21 => Some(FieldReference { name: Name::TravelGas, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
22 => Some(FieldReference { name: Name::CcrLowSetpointSwitchMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::CcrSetpointSwitchMode, ..FR_DEF }),
23 => Some(FieldReference { name: Name::CcrLowSetpoint, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
24 => Some(FieldReference { name: Name::CcrLowSetpointDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
25 => Some(FieldReference { name: Name::CcrHighSetpointSwitchMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::CcrSetpointSwitchMode, ..FR_DEF }),
26 => Some(FieldReference { name: Name::CcrHighSetpoint, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
27 => Some(FieldReference { name: Name::CcrHighSetpointDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
29 => Some(FieldReference { name: Name::GasConsumptionDisplay, base_type: FitBaseType::ENUM, profile_type: ProfileType::GasConsumptionRateType, ..FR_DEF }),
30 => Some(FieldReference { name: Name::UpKeyEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
35 => Some(FieldReference { name: Name::DiveSounds, base_type: FitBaseType::ENUM, profile_type: ProfileType::Tone, ..FR_DEF }),
36 => Some(FieldReference { name: Name::LastStopMultiple, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, ..FR_DEF }),
37 => Some(FieldReference { name: Name::NoFlyTimeMode, base_type: FitBaseType::ENUM, profile_type: ProfileType::NoFlyTimeMode, ..FR_DEF }),
_ => None,
}},
MesgNum::DIVE_ALARM => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Depth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Second, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
3 => Some(FieldReference { name: Name::AlarmType, base_type: FitBaseType::ENUM, profile_type: ProfileType::DiveAlarmType, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Sound, base_type: FitBaseType::ENUM, profile_type: ProfileType::Tone, ..FR_DEF }),
5 => Some(FieldReference { name: Name::DiveTypes, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, array: true , ..FR_DEF }),
6 => Some(FieldReference { name: Name::Id, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
7 => Some(FieldReference { name: Name::PopupEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TriggerOnDescent, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TriggerOnAscent, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Repeating, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
11 => Some(FieldReference { name: Name::Speed, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSecond, ..FR_DEF }),
_ => None,
}},
MesgNum::DIVE_APNEA_ALARM => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Depth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Second, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
3 => Some(FieldReference { name: Name::AlarmType, base_type: FitBaseType::ENUM, profile_type: ProfileType::DiveAlarmType, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Sound, base_type: FitBaseType::ENUM, profile_type: ProfileType::Tone, ..FR_DEF }),
5 => Some(FieldReference { name: Name::DiveTypes, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, array: true , ..FR_DEF }),
6 => Some(FieldReference { name: Name::Id, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
7 => Some(FieldReference { name: Name::PopupEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TriggerOnDescent, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TriggerOnAscent, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Repeating, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
11 => Some(FieldReference { name: Name::Speed, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSecond, ..FR_DEF }),
_ => None,
}},
MesgNum::DIVE_GAS => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::HeliumContent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
1 => Some(FieldReference { name: Name::OxygenContent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Status, base_type: FitBaseType::ENUM, profile_type: ProfileType::DiveGasStatus, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Mode, base_type: FitBaseType::ENUM, profile_type: ProfileType::DiveGasMode, ..FR_DEF }),
_ => None,
}},
MesgNum::GOAL => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartDate, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::EndDate, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::Goal, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Value, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Repeat, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
7 => Some(FieldReference { name: Name::TargetValue, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Recurrence, base_type: FitBaseType::ENUM, profile_type: ProfileType::GoalRecurrence, ..FR_DEF }),
9 => Some(FieldReference { name: Name::RecurrenceValue, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
11 => Some(FieldReference { name: Name::Source, base_type: FitBaseType::ENUM, profile_type: ProfileType::GoalSource, ..FR_DEF }),
_ => None,
}},
MesgNum::ACTIVITY => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::NumSessions, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::Activity, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
4 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
5 => Some(FieldReference { name: Name::LocalTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, ..FR_DEF }),
6 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::SESSION => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::StartPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
4 => Some(FieldReference { name: Name::StartPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
6 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
7 => Some(FieldReference { name: Name::TotalElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TotalDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
10 => Some(FieldReference { name: Name::TotalCycles, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Cycle, sub_fields: &[
SubField { name: Name::TotalStrides, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Stride, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 11 },
], ..SF_DEF },
SubField { name: Name::TotalStrokes, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Stroke, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 2 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 5 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 37 },
], ..SF_DEF }
], ..FR_DEF }),
11 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
13 => Some(FieldReference { name: Name::TotalFatCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
14 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 124 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
15 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 125 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
16 => Some(FieldReference { name: Name::AvgHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
17 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
18 => Some(FieldReference { name: Name::AvgCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, sub_fields: &[
SubField { name: Name::AvgRunningCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::StridesPerMinute, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
19 => Some(FieldReference { name: Name::MaxCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, sub_fields: &[
SubField { name: Name::MaxRunningCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::StridesPerMinute, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
20 => Some(FieldReference { name: Name::AvgPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
21 => Some(FieldReference { name: Name::MaxPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
22 => Some(FieldReference { name: Name::TotalAscent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
23 => Some(FieldReference { name: Name::TotalDescent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
24 => Some(FieldReference { name: Name::TotalTrainingEffect, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, ..FR_DEF }),
25 => Some(FieldReference { name: Name::FirstLapIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
26 => Some(FieldReference { name: Name::NumLaps, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
27 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
28 => Some(FieldReference { name: Name::Trigger, base_type: FitBaseType::ENUM, profile_type: ProfileType::SessionTrigger, ..FR_DEF }),
29 => Some(FieldReference { name: Name::NecLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
30 => Some(FieldReference { name: Name::NecLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
31 => Some(FieldReference { name: Name::SwcLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
32 => Some(FieldReference { name: Name::SwcLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
33 => Some(FieldReference { name: Name::NumLengths, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Length, ..FR_DEF }),
34 => Some(FieldReference { name: Name::NormalizedPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
35 => Some(FieldReference { name: Name::TrainingStressScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::TrainingStressScore, ..FR_DEF }),
36 => Some(FieldReference { name: Name::IntensityFactor, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::IntensityFactor, ..FR_DEF }),
37 => Some(FieldReference { name: Name::LeftRightBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::LeftRightBalance100, ..FR_DEF }),
38 => Some(FieldReference { name: Name::EndPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
39 => Some(FieldReference { name: Name::EndPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
41 => Some(FieldReference { name: Name::AvgStrokeCount, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 10.0, units: Unit::StrokePerLap, ..FR_DEF }),
42 => Some(FieldReference { name: Name::AvgStrokeDistance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
43 => Some(FieldReference { name: Name::SwimStroke, base_type: FitBaseType::ENUM, profile_type: ProfileType::SwimStroke, units: Unit::SwimStroke, ..FR_DEF }),
44 => Some(FieldReference { name: Name::PoolLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
45 => Some(FieldReference { name: Name::ThresholdPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
46 => Some(FieldReference { name: Name::PoolLengthUnit, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
47 => Some(FieldReference { name: Name::NumActiveLengths, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Length, ..FR_DEF }),
48 => Some(FieldReference { name: Name::TotalWork, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Joule, ..FR_DEF }),
49 => Some(FieldReference { name: Name::AvgAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 126 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
50 => Some(FieldReference { name: Name::MaxAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 128 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
51 => Some(FieldReference { name: Name::GpsAccuracy, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Meter, ..FR_DEF }),
52 => Some(FieldReference { name: Name::AvgGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
53 => Some(FieldReference { name: Name::AvgPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
54 => Some(FieldReference { name: Name::AvgNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
55 => Some(FieldReference { name: Name::MaxPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
56 => Some(FieldReference { name: Name::MaxNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
57 => Some(FieldReference { name: Name::AvgTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
58 => Some(FieldReference { name: Name::MaxTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
59 => Some(FieldReference { name: Name::TotalMovingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
60 => Some(FieldReference { name: Name::AvgPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
61 => Some(FieldReference { name: Name::AvgNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
62 => Some(FieldReference { name: Name::MaxPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
63 => Some(FieldReference { name: Name::MaxNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
64 => Some(FieldReference { name: Name::MinHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
65 => Some(FieldReference { name: Name::TimeInHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
66 => Some(FieldReference { name: Name::TimeInSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
67 => Some(FieldReference { name: Name::TimeInCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
68 => Some(FieldReference { name: Name::TimeInPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
69 => Some(FieldReference { name: Name::AvgLapTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
70 => Some(FieldReference { name: Name::BestLapIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
71 => Some(FieldReference { name: Name::MinAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 127 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
78 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
82 => Some(FieldReference { name: Name::PlayerScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
83 => Some(FieldReference { name: Name::OpponentScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
84 => Some(FieldReference { name: Name::OpponentName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
85 => Some(FieldReference { name: Name::StrokeCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
86 => Some(FieldReference { name: Name::ZoneCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
87 => Some(FieldReference { name: Name::MaxBallSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
88 => Some(FieldReference { name: Name::AvgBallSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
89 => Some(FieldReference { name: Name::AvgVerticalOscillation, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
90 => Some(FieldReference { name: Name::AvgStanceTimePercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
91 => Some(FieldReference { name: Name::AvgStanceTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millisecond, ..FR_DEF }),
92 => Some(FieldReference { name: Name::AvgFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
93 => Some(FieldReference { name: Name::MaxFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
94 => Some(FieldReference { name: Name::TotalFractionalCycles, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::Cycle, ..FR_DEF }),
95 => Some(FieldReference { name: Name::AvgTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
96 => Some(FieldReference { name: Name::MinTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
97 => Some(FieldReference { name: Name::MaxTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
98 => Some(FieldReference { name: Name::AvgSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
99 => Some(FieldReference { name: Name::MinSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
100 => Some(FieldReference { name: Name::MaxSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
101 => Some(FieldReference { name: Name::AvgLeftTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
102 => Some(FieldReference { name: Name::AvgRightTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
103 => Some(FieldReference { name: Name::AvgLeftPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
104 => Some(FieldReference { name: Name::AvgRightPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
105 => Some(FieldReference { name: Name::AvgCombinedPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
110 => Some(FieldReference { name: Name::SportProfileName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
111 => Some(FieldReference { name: Name::SportIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
112 => Some(FieldReference { name: Name::TimeStanding, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
113 => Some(FieldReference { name: Name::StandCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
114 => Some(FieldReference { name: Name::AvgLeftPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
115 => Some(FieldReference { name: Name::AvgRightPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
116 => Some(FieldReference { name: Name::AvgLeftPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
117 => Some(FieldReference { name: Name::AvgLeftPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
118 => Some(FieldReference { name: Name::AvgRightPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
119 => Some(FieldReference { name: Name::AvgRightPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
120 => Some(FieldReference { name: Name::AvgPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
121 => Some(FieldReference { name: Name::MaxPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
122 => Some(FieldReference { name: Name::AvgCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
123 => Some(FieldReference { name: Name::MaxCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
124 => Some(FieldReference { name: Name::EnhancedAvgSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
125 => Some(FieldReference { name: Name::EnhancedMaxSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
126 => Some(FieldReference { name: Name::EnhancedAvgAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
127 => Some(FieldReference { name: Name::EnhancedMinAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
128 => Some(FieldReference { name: Name::EnhancedMaxAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
129 => Some(FieldReference { name: Name::AvgLevMotorPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
130 => Some(FieldReference { name: Name::MaxLevMotorPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
131 => Some(FieldReference { name: Name::LevBatteryConsumption, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
132 => Some(FieldReference { name: Name::AvgVerticalRatio, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
133 => Some(FieldReference { name: Name::AvgStanceTimeBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
134 => Some(FieldReference { name: Name::AvgStepLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
137 => Some(FieldReference { name: Name::TotalAnaerobicTrainingEffect, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, ..FR_DEF }),
139 => Some(FieldReference { name: Name::AvgVam, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
140 => Some(FieldReference { name: Name::AvgDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
141 => Some(FieldReference { name: Name::MaxDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
142 => Some(FieldReference { name: Name::SurfaceInterval, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
143 => Some(FieldReference { name: Name::StartCns, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
144 => Some(FieldReference { name: Name::EndCns, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
145 => Some(FieldReference { name: Name::StartN2, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Percent, ..FR_DEF }),
146 => Some(FieldReference { name: Name::EndN2, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Percent, ..FR_DEF }),
147 => Some(FieldReference { name: Name::AvgRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 169 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
148 => Some(FieldReference { name: Name::MaxRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 170 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
149 => Some(FieldReference { name: Name::MinRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 180 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
150 => Some(FieldReference { name: Name::MinTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
155 => Some(FieldReference { name: Name::O2Toxicity, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::OxygenToxicityUnit, ..FR_DEF }),
156 => Some(FieldReference { name: Name::DiveNumber, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
168 => Some(FieldReference { name: Name::TrainingLoadPeak, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 65536.0, ..FR_DEF }),
169 => Some(FieldReference { name: Name::EnhancedAvgRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
170 => Some(FieldReference { name: Name::EnhancedMaxRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
180 => Some(FieldReference { name: Name::EnhancedMinRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, ..FR_DEF }),
181 => Some(FieldReference { name: Name::TotalGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
182 => Some(FieldReference { name: Name::TotalFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
183 => Some(FieldReference { name: Name::JumpCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
186 => Some(FieldReference { name: Name::AvgGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
187 => Some(FieldReference { name: Name::AvgFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
192 => Some(FieldReference { name: Name::WorkoutFeel, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
193 => Some(FieldReference { name: Name::WorkoutRpe, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
194 => Some(FieldReference { name: Name::AvgSpo2, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
195 => Some(FieldReference { name: Name::AvgStress, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
196 => Some(FieldReference { name: Name::MetabolicCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
197 => Some(FieldReference { name: Name::SdrrHrv, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Millisecond, ..FR_DEF }),
198 => Some(FieldReference { name: Name::RmssdHrv, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Millisecond, ..FR_DEF }),
199 => Some(FieldReference { name: Name::TotalFractionalAscent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
200 => Some(FieldReference { name: Name::TotalFractionalDescent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
208 => Some(FieldReference { name: Name::AvgCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
209 => Some(FieldReference { name: Name::MinCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
210 => Some(FieldReference { name: Name::MaxCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
_ => None,
}},
MesgNum::LAP => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::StartPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
4 => Some(FieldReference { name: Name::StartPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
5 => Some(FieldReference { name: Name::EndPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
6 => Some(FieldReference { name: Name::EndPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
7 => Some(FieldReference { name: Name::TotalElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TotalDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
10 => Some(FieldReference { name: Name::TotalCycles, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Cycle, sub_fields: &[
SubField { name: Name::TotalStrides, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Stride, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 25 , ref_field_value: 11 },
], ..SF_DEF },
SubField { name: Name::TotalStrokes, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Stroke, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 2 },
SubFieldMap { ref_field_num: 25 , ref_field_value: 5 },
SubFieldMap { ref_field_num: 25 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 25 , ref_field_value: 37 },
], ..SF_DEF }
], ..FR_DEF }),
11 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
12 => Some(FieldReference { name: Name::TotalFatCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
13 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 110 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
14 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 111 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
15 => Some(FieldReference { name: Name::AvgHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
16 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
17 => Some(FieldReference { name: Name::AvgCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, sub_fields: &[
SubField { name: Name::AvgRunningCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::StridesPerMinute, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
18 => Some(FieldReference { name: Name::MaxCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, sub_fields: &[
SubField { name: Name::MaxRunningCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::StridesPerMinute, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
19 => Some(FieldReference { name: Name::AvgPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
20 => Some(FieldReference { name: Name::MaxPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
21 => Some(FieldReference { name: Name::TotalAscent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
22 => Some(FieldReference { name: Name::TotalDescent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
23 => Some(FieldReference { name: Name::Intensity, base_type: FitBaseType::ENUM, profile_type: ProfileType::Intensity, ..FR_DEF }),
24 => Some(FieldReference { name: Name::LapTrigger, base_type: FitBaseType::ENUM, profile_type: ProfileType::LapTrigger, ..FR_DEF }),
25 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
26 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
32 => Some(FieldReference { name: Name::NumLengths, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Length, ..FR_DEF }),
33 => Some(FieldReference { name: Name::NormalizedPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
34 => Some(FieldReference { name: Name::LeftRightBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::LeftRightBalance100, ..FR_DEF }),
35 => Some(FieldReference { name: Name::FirstLengthIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
37 => Some(FieldReference { name: Name::AvgStrokeDistance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
38 => Some(FieldReference { name: Name::SwimStroke, base_type: FitBaseType::ENUM, profile_type: ProfileType::SwimStroke, ..FR_DEF }),
39 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
40 => Some(FieldReference { name: Name::NumActiveLengths, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Length, ..FR_DEF }),
41 => Some(FieldReference { name: Name::TotalWork, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Joule, ..FR_DEF }),
42 => Some(FieldReference { name: Name::AvgAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 112 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
43 => Some(FieldReference { name: Name::MaxAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 114 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
44 => Some(FieldReference { name: Name::GpsAccuracy, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Meter, ..FR_DEF }),
45 => Some(FieldReference { name: Name::AvgGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
46 => Some(FieldReference { name: Name::AvgPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
47 => Some(FieldReference { name: Name::AvgNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
48 => Some(FieldReference { name: Name::MaxPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
49 => Some(FieldReference { name: Name::MaxNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
50 => Some(FieldReference { name: Name::AvgTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
51 => Some(FieldReference { name: Name::MaxTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
52 => Some(FieldReference { name: Name::TotalMovingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
53 => Some(FieldReference { name: Name::AvgPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
54 => Some(FieldReference { name: Name::AvgNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
55 => Some(FieldReference { name: Name::MaxPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
56 => Some(FieldReference { name: Name::MaxNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
57 => Some(FieldReference { name: Name::TimeInHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
58 => Some(FieldReference { name: Name::TimeInSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
59 => Some(FieldReference { name: Name::TimeInCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
60 => Some(FieldReference { name: Name::TimeInPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
61 => Some(FieldReference { name: Name::RepetitionNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
62 => Some(FieldReference { name: Name::MinAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 113 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
63 => Some(FieldReference { name: Name::MinHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
70 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
71 => Some(FieldReference { name: Name::WktStepIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
74 => Some(FieldReference { name: Name::OpponentScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
75 => Some(FieldReference { name: Name::StrokeCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
76 => Some(FieldReference { name: Name::ZoneCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
77 => Some(FieldReference { name: Name::AvgVerticalOscillation, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
78 => Some(FieldReference { name: Name::AvgStanceTimePercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
79 => Some(FieldReference { name: Name::AvgStanceTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millisecond, ..FR_DEF }),
80 => Some(FieldReference { name: Name::AvgFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
81 => Some(FieldReference { name: Name::MaxFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
82 => Some(FieldReference { name: Name::TotalFractionalCycles, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::Cycle, ..FR_DEF }),
83 => Some(FieldReference { name: Name::PlayerScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
84 => Some(FieldReference { name: Name::AvgTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
85 => Some(FieldReference { name: Name::MinTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
86 => Some(FieldReference { name: Name::MaxTotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
87 => Some(FieldReference { name: Name::AvgSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
88 => Some(FieldReference { name: Name::MinSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
89 => Some(FieldReference { name: Name::MaxSaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10.0, units: Unit::Percent, ..FR_DEF }),
91 => Some(FieldReference { name: Name::AvgLeftTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
92 => Some(FieldReference { name: Name::AvgRightTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
93 => Some(FieldReference { name: Name::AvgLeftPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
94 => Some(FieldReference { name: Name::AvgRightPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
95 => Some(FieldReference { name: Name::AvgCombinedPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
98 => Some(FieldReference { name: Name::TimeStanding, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
99 => Some(FieldReference { name: Name::StandCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
100 => Some(FieldReference { name: Name::AvgLeftPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
101 => Some(FieldReference { name: Name::AvgRightPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
102 => Some(FieldReference { name: Name::AvgLeftPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
103 => Some(FieldReference { name: Name::AvgLeftPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
104 => Some(FieldReference { name: Name::AvgRightPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
105 => Some(FieldReference { name: Name::AvgRightPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
106 => Some(FieldReference { name: Name::AvgPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
107 => Some(FieldReference { name: Name::MaxPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
108 => Some(FieldReference { name: Name::AvgCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
109 => Some(FieldReference { name: Name::MaxCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
110 => Some(FieldReference { name: Name::EnhancedAvgSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
111 => Some(FieldReference { name: Name::EnhancedMaxSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
112 => Some(FieldReference { name: Name::EnhancedAvgAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
113 => Some(FieldReference { name: Name::EnhancedMinAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
114 => Some(FieldReference { name: Name::EnhancedMaxAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
115 => Some(FieldReference { name: Name::AvgLevMotorPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
116 => Some(FieldReference { name: Name::MaxLevMotorPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
117 => Some(FieldReference { name: Name::LevBatteryConsumption, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
118 => Some(FieldReference { name: Name::AvgVerticalRatio, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
119 => Some(FieldReference { name: Name::AvgStanceTimeBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
120 => Some(FieldReference { name: Name::AvgStepLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
121 => Some(FieldReference { name: Name::AvgVam, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
122 => Some(FieldReference { name: Name::AvgDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
123 => Some(FieldReference { name: Name::MaxDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
124 => Some(FieldReference { name: Name::MinTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
136 => Some(FieldReference { name: Name::EnhancedAvgRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
137 => Some(FieldReference { name: Name::EnhancedMaxRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
147 => Some(FieldReference { name: Name::AvgRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 136 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
148 => Some(FieldReference { name: Name::MaxRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 137 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
149 => Some(FieldReference { name: Name::TotalGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
150 => Some(FieldReference { name: Name::TotalFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
151 => Some(FieldReference { name: Name::JumpCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
153 => Some(FieldReference { name: Name::AvgGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
154 => Some(FieldReference { name: Name::AvgFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
156 => Some(FieldReference { name: Name::TotalFractionalAscent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
157 => Some(FieldReference { name: Name::TotalFractionalDescent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
158 => Some(FieldReference { name: Name::AvgCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
159 => Some(FieldReference { name: Name::MinCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
160 => Some(FieldReference { name: Name::MaxCoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
_ => None,
}},
MesgNum::LENGTH => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::TotalElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::TotalStrokes, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Stroke, ..FR_DEF }),
6 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
7 => Some(FieldReference { name: Name::SwimStroke, base_type: FitBaseType::ENUM, profile_type: ProfileType::SwimStroke, units: Unit::SwimStroke, ..FR_DEF }),
9 => Some(FieldReference { name: Name::AvgSwimmingCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::StrokesPerMinute, ..FR_DEF }),
10 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
11 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
12 => Some(FieldReference { name: Name::LengthType, base_type: FitBaseType::ENUM, profile_type: ProfileType::LengthType, ..FR_DEF }),
18 => Some(FieldReference { name: Name::PlayerScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
19 => Some(FieldReference { name: Name::OpponentScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
20 => Some(FieldReference { name: Name::StrokeCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
21 => Some(FieldReference { name: Name::ZoneCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
22 => Some(FieldReference { name: Name::EnhancedAvgRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
23 => Some(FieldReference { name: Name::EnhancedMaxRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
24 => Some(FieldReference { name: Name::AvgRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 22 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
25 => Some(FieldReference { name: Name::MaxRespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, components: &[
Component { field_num: 23 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
_ => None,
}},
MesgNum::RECORD => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
1 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Altitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 78 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::HeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Cadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, accumulate: true, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Speed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 73 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
7 => Some(FieldReference { name: Name::Power, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
8 => Some(FieldReference { name: Name::CompressedSpeedDistance, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , units: Unit::MetersPerSecondAndMeter, components: &[
Component { field_num: 6 , scale: 100.0, offset: 0.0, accumulate: false, bits: 12 },
Component { field_num: 5 , scale: 16.0, offset: 0.0, accumulate: true, bits: 12 }
], ..FR_DEF }),
9 => Some(FieldReference { name: Name::Grade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Resistance, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
11 => Some(FieldReference { name: Name::TimeFromCourse, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
12 => Some(FieldReference { name: Name::CycleLength, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
13 => Some(FieldReference { name: Name::Temperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
17 => Some(FieldReference { name: Name::Speed1S, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 16.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
18 => Some(FieldReference { name: Name::Cycles, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, accumulate: true, units: Unit::Cycle, components: &[
Component { field_num: 19 , scale: 1.0, offset: 0.0, accumulate: true, bits: 8 }
], ..FR_DEF }),
19 => Some(FieldReference { name: Name::TotalCycles, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, accumulate: true, units: Unit::Cycle, ..FR_DEF }),
28 => Some(FieldReference { name: Name::CompressedAccumulatedPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, accumulate: true, units: Unit::Watt, components: &[
Component { field_num: 29 , scale: 1.0, offset: 0.0, accumulate: true, bits: 16 }
], ..FR_DEF }),
29 => Some(FieldReference { name: Name::AccumulatedPower, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, accumulate: true, units: Unit::Watt, ..FR_DEF }),
30 => Some(FieldReference { name: Name::LeftRightBalance, base_type: FitBaseType::UINT8, profile_type: ProfileType::LeftRightBalance, ..FR_DEF }),
31 => Some(FieldReference { name: Name::GpsAccuracy, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Meter, ..FR_DEF }),
32 => Some(FieldReference { name: Name::VerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
33 => Some(FieldReference { name: Name::Calories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
39 => Some(FieldReference { name: Name::VerticalOscillation, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
40 => Some(FieldReference { name: Name::StanceTimePercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
41 => Some(FieldReference { name: Name::StanceTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millisecond, ..FR_DEF }),
42 => Some(FieldReference { name: Name::ActivityType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityType, ..FR_DEF }),
43 => Some(FieldReference { name: Name::LeftTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
44 => Some(FieldReference { name: Name::RightTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
45 => Some(FieldReference { name: Name::LeftPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
46 => Some(FieldReference { name: Name::RightPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
47 => Some(FieldReference { name: Name::CombinedPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
48 => Some(FieldReference { name: Name::Time128, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::Second, ..FR_DEF }),
49 => Some(FieldReference { name: Name::StrokeType, base_type: FitBaseType::ENUM, profile_type: ProfileType::StrokeType, ..FR_DEF }),
50 => Some(FieldReference { name: Name::Zone, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
51 => Some(FieldReference { name: Name::BallSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
52 => Some(FieldReference { name: Name::Cadence256, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 256.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
53 => Some(FieldReference { name: Name::FractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
54 => Some(FieldReference { name: Name::TotalHemoglobinConc, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
55 => Some(FieldReference { name: Name::TotalHemoglobinConcMin, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
56 => Some(FieldReference { name: Name::TotalHemoglobinConcMax, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::GramPerDeciliter, ..FR_DEF }),
57 => Some(FieldReference { name: Name::SaturatedHemoglobinPercent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Percent, ..FR_DEF }),
58 => Some(FieldReference { name: Name::SaturatedHemoglobinPercentMin, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Percent, ..FR_DEF }),
59 => Some(FieldReference { name: Name::SaturatedHemoglobinPercentMax, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Percent, ..FR_DEF }),
62 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
67 => Some(FieldReference { name: Name::LeftPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
68 => Some(FieldReference { name: Name::RightPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
69 => Some(FieldReference { name: Name::LeftPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
70 => Some(FieldReference { name: Name::LeftPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
71 => Some(FieldReference { name: Name::RightPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
72 => Some(FieldReference { name: Name::RightPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
73 => Some(FieldReference { name: Name::EnhancedSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
78 => Some(FieldReference { name: Name::EnhancedAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
81 => Some(FieldReference { name: Name::BatterySoc, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
82 => Some(FieldReference { name: Name::MotorPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
83 => Some(FieldReference { name: Name::VerticalRatio, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
84 => Some(FieldReference { name: Name::StanceTimeBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
85 => Some(FieldReference { name: Name::StepLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::Millimeter, ..FR_DEF }),
87 => Some(FieldReference { name: Name::CycleLength16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
91 => Some(FieldReference { name: Name::AbsolutePressure, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Pascal, ..FR_DEF }),
92 => Some(FieldReference { name: Name::Depth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
93 => Some(FieldReference { name: Name::NextStopDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
94 => Some(FieldReference { name: Name::NextStopTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
95 => Some(FieldReference { name: Name::TimeToSurface, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
96 => Some(FieldReference { name: Name::NdlTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
97 => Some(FieldReference { name: Name::CnsLoad, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
98 => Some(FieldReference { name: Name::N2Load, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Percent, ..FR_DEF }),
99 => Some(FieldReference { name: Name::RespirationRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Second, components: &[
Component { field_num: 108 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
108 => Some(FieldReference { name: Name::EnhancedRespirationRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
114 => Some(FieldReference { name: Name::Grit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
115 => Some(FieldReference { name: Name::Flow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
116 => Some(FieldReference { name: Name::CurrentStress, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, ..FR_DEF }),
117 => Some(FieldReference { name: Name::EbikeTravelRange, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilometer, ..FR_DEF }),
118 => Some(FieldReference { name: Name::EbikeBatteryLevel, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
119 => Some(FieldReference { name: Name::EbikeAssistMode, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::DependsOnSensor, ..FR_DEF }),
120 => Some(FieldReference { name: Name::EbikeAssistLevelPercent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
123 => Some(FieldReference { name: Name::AirTimeRemaining, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
124 => Some(FieldReference { name: Name::PressureSac, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BarPerMinute, ..FR_DEF }),
125 => Some(FieldReference { name: Name::VolumeSac, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::LiterPerMinute, ..FR_DEF }),
126 => Some(FieldReference { name: Name::Rmv, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::LiterPerMinute, ..FR_DEF }),
127 => Some(FieldReference { name: Name::AscentRate, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
129 => Some(FieldReference { name: Name::Po2, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
139 => Some(FieldReference { name: Name::CoreTemperature, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
_ => None,
}},
MesgNum::EVENT => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Data16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, components: &[
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::TimerTrigger, base_type: FitBaseType::UINT32, profile_type: ProfileType::TimerTrigger, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::CoursePointIndex, base_type: FitBaseType::UINT32, profile_type: ProfileType::MessageIndex, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 10 },
], ..SF_DEF },
SubField { name: Name::BatteryLevel, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::Voltage, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 11 },
], ..SF_DEF },
SubField { name: Name::VirtualPartnerSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 12 },
], ..SF_DEF },
SubField { name: Name::HrHighAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 13 },
], ..SF_DEF },
SubField { name: Name::HrLowAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 14 },
], ..SF_DEF },
SubField { name: Name::SpeedHighAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 15 },
], ..SF_DEF },
SubField { name: Name::SpeedLowAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 16 },
], ..SF_DEF },
SubField { name: Name::CadHighAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 17 },
], ..SF_DEF },
SubField { name: Name::CadLowAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 18 },
], ..SF_DEF },
SubField { name: Name::PowerHighAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, units: Unit::Watt, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 19 },
], ..SF_DEF },
SubField { name: Name::PowerLowAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, units: Unit::Watt, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 20 },
], ..SF_DEF },
SubField { name: Name::TimeDurationAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 23 },
], ..SF_DEF },
SubField { name: Name::DistanceDurationAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 24 },
], ..SF_DEF },
SubField { name: Name::CalorieDurationAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Calorie, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 25 },
], ..SF_DEF },
SubField { name: Name::FitnessEquipmentState, base_type: FitBaseType::UINT32, profile_type: ProfileType::FitnessEquipmentState, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 27 },
], ..SF_DEF },
SubField { name: Name::SportPoint, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, components: &[
Component { field_num: 7 , scale: 1.0, offset: 0.0, accumulate: false, bits: 16 },
Component { field_num: 8 , scale: 1.0, offset: 0.0, accumulate: false, bits: 16 }
], maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 33 },
], ..SF_DEF },
SubField { name: Name::GearChangeData, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, components: &[
Component { field_num: 11 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 12 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 9 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 10 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 42 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 43 },
], ..SF_DEF },
SubField { name: Name::RiderPosition, base_type: FitBaseType::UINT32, profile_type: ProfileType::RiderPositionType, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 44 },
], ..SF_DEF },
SubField { name: Name::CommTimeout, base_type: FitBaseType::UINT32, profile_type: ProfileType::CommTimeoutType, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 47 },
], ..SF_DEF },
SubField { name: Name::DiveAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::DiveAlert, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 56 },
], ..SF_DEF },
SubField { name: Name::AutoActivityDetectDuration, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint16, units: Unit::Minute, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 54 },
], ..SF_DEF },
SubField { name: Name::RadarThreatAlert, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, components: &[
Component { field_num: 21 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 22 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 23 , scale: 10.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 24 , scale: 10.0, offset: 0.0, accumulate: false, bits: 8 }
], maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 75 },
], ..SF_DEF }
], ..FR_DEF }),
4 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Score, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
8 => Some(FieldReference { name: Name::OpponentScore, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
9 => Some(FieldReference { name: Name::FrontGearNum, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
10 => Some(FieldReference { name: Name::FrontGear, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
11 => Some(FieldReference { name: Name::RearGearNum, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
12 => Some(FieldReference { name: Name::RearGear, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
13 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
14 => Some(FieldReference { name: Name::ActivityType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityType, ..FR_DEF }),
15 => Some(FieldReference { name: Name::StartTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, sub_fields: &[
SubField { name: Name::AutoActivityDetectStartTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 54 },
], ..SF_DEF }
], ..FR_DEF }),
21 => Some(FieldReference { name: Name::RadarThreatLevelMax, base_type: FitBaseType::ENUM, profile_type: ProfileType::RadarThreatLevelType, ..FR_DEF }),
22 => Some(FieldReference { name: Name::RadarThreatCount, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
23 => Some(FieldReference { name: Name::RadarThreatAvgApproachSpeed, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
24 => Some(FieldReference { name: Name::RadarThreatMaxApproachSpeed, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
_ => None,
}},
MesgNum::DEVICE_INFO => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::DeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, sub_fields: &[
SubField { name: Name::BleDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::BleDeviceType, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::AntplusDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::AntplusDeviceType, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::AntDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::LocalDeviceType, base_type: FitBaseType::UINT8, profile_type: ProfileType::LocalDeviceType, maps: &[
SubFieldMap { ref_field_num: 25 , ref_field_value: 5 },
], ..SF_DEF }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
3 => Some(FieldReference { name: Name::SerialNumber, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::Uint32z, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Product, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::FaveroProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::FaveroProduct, maps: &[
SubFieldMap { ref_field_num: 2 , ref_field_value: 263 },
], ..SF_DEF },
SubField { name: Name::GarminProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::GarminProduct, maps: &[
SubFieldMap { ref_field_num: 2 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 2 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 2 , ref_field_value: 13 },
SubFieldMap { ref_field_num: 2 , ref_field_value: 89 },
], ..SF_DEF }
], ..FR_DEF }),
5 => Some(FieldReference { name: Name::SoftwareVersion, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, ..FR_DEF }),
6 => Some(FieldReference { name: Name::HardwareVersion, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
7 => Some(FieldReference { name: Name::CumOperatingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
10 => Some(FieldReference { name: Name::BatteryVoltage, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 256.0, units: Unit::Voltage, ..FR_DEF }),
11 => Some(FieldReference { name: Name::BatteryStatus, base_type: FitBaseType::UINT8, profile_type: ProfileType::BatteryStatus, ..FR_DEF }),
18 => Some(FieldReference { name: Name::SensorPosition, base_type: FitBaseType::ENUM, profile_type: ProfileType::BodyLocation, ..FR_DEF }),
19 => Some(FieldReference { name: Name::Descriptor, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
20 => Some(FieldReference { name: Name::AntTransmissionType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
21 => Some(FieldReference { name: Name::AntDeviceNumber, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
22 => Some(FieldReference { name: Name::AntNetwork, base_type: FitBaseType::ENUM, profile_type: ProfileType::AntNetwork, ..FR_DEF }),
25 => Some(FieldReference { name: Name::SourceType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SourceType, ..FR_DEF }),
27 => Some(FieldReference { name: Name::ProductName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
32 => Some(FieldReference { name: Name::BatteryLevel, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
_ => None,
}},
MesgNum::DEVICE_AUX_BATTERY_INFO => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::BatteryVoltage, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 256.0, units: Unit::Voltage, ..FR_DEF }),
2 => Some(FieldReference { name: Name::BatteryStatus, base_type: FitBaseType::UINT8, profile_type: ProfileType::BatteryStatus, ..FR_DEF }),
3 => Some(FieldReference { name: Name::BatteryIdentifier, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::TRAINING_FILE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::File, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Product, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::FaveroProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::FaveroProduct, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 263 },
], ..SF_DEF },
SubField { name: Name::GarminProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::GarminProduct, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 13 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 89 },
], ..SF_DEF }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::SerialNumber, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::Uint32z, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimeCreated, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
_ => None,
}},
MesgNum::WEATHER_CONDITIONS => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::WeatherReport, base_type: FitBaseType::ENUM, profile_type: ProfileType::WeatherReport, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Temperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Condition, base_type: FitBaseType::ENUM, profile_type: ProfileType::WeatherStatus, ..FR_DEF }),
3 => Some(FieldReference { name: Name::WindDirection, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Degree, ..FR_DEF }),
4 => Some(FieldReference { name: Name::WindSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
5 => Some(FieldReference { name: Name::PrecipitationProbability, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
6 => Some(FieldReference { name: Name::TemperatureFeelsLike, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
7 => Some(FieldReference { name: Name::RelativeHumidity, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Location, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
9 => Some(FieldReference { name: Name::ObservedAtTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
10 => Some(FieldReference { name: Name::ObservedLocationLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
11 => Some(FieldReference { name: Name::ObservedLocationLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
12 => Some(FieldReference { name: Name::DayOfWeek, base_type: FitBaseType::ENUM, profile_type: ProfileType::DayOfWeek, ..FR_DEF }),
13 => Some(FieldReference { name: Name::HighTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
14 => Some(FieldReference { name: Name::LowTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
_ => None,
}},
MesgNum::WEATHER_ALERT => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ReportId, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::IssueTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
2 => Some(FieldReference { name: Name::ExpireTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Severity, base_type: FitBaseType::ENUM, profile_type: ProfileType::WeatherSeverity, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::WeatherSevereType, ..FR_DEF }),
_ => None,
}},
MesgNum::GPS_METADATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
2 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
3 => Some(FieldReference { name: Name::EnhancedAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::EnhancedSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Heading, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Degree, ..FR_DEF }),
6 => Some(FieldReference { name: Name::UtcTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Velocity, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 100.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
_ => None,
}},
MesgNum::CAMERA_EVENT => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::CameraEventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::CameraEventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::CameraFileUuid, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
3 => Some(FieldReference { name: Name::CameraOrientation, base_type: FitBaseType::ENUM, profile_type: ProfileType::CameraOrientationType, ..FR_DEF }),
_ => None,
}},
MesgNum::GYROSCOPE_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SampleTimeOffset, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::GyroX, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
3 => Some(FieldReference { name: Name::GyroY, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
4 => Some(FieldReference { name: Name::GyroZ, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
5 => Some(FieldReference { name: Name::CalibratedGyroX, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::DegreesPerSecond, ..FR_DEF }),
6 => Some(FieldReference { name: Name::CalibratedGyroY, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::DegreesPerSecond, ..FR_DEF }),
7 => Some(FieldReference { name: Name::CalibratedGyroZ, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::DegreesPerSecond, ..FR_DEF }),
_ => None,
}},
MesgNum::ACCELEROMETER_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SampleTimeOffset, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AccelX, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
3 => Some(FieldReference { name: Name::AccelY, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
4 => Some(FieldReference { name: Name::AccelZ, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
5 => Some(FieldReference { name: Name::CalibratedAccelX, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gee, ..FR_DEF }),
6 => Some(FieldReference { name: Name::CalibratedAccelY, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gee, ..FR_DEF }),
7 => Some(FieldReference { name: Name::CalibratedAccelZ, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gee, ..FR_DEF }),
8 => Some(FieldReference { name: Name::CompressedCalibratedAccelX, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , units: Unit::Milligee, ..FR_DEF }),
9 => Some(FieldReference { name: Name::CompressedCalibratedAccelY, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , units: Unit::Milligee, ..FR_DEF }),
10 => Some(FieldReference { name: Name::CompressedCalibratedAccelZ, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , units: Unit::Milligee, ..FR_DEF }),
_ => None,
}},
MesgNum::MAGNETOMETER_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SampleTimeOffset, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::MagX, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
3 => Some(FieldReference { name: Name::MagY, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
4 => Some(FieldReference { name: Name::MagZ, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Count, ..FR_DEF }),
5 => Some(FieldReference { name: Name::CalibratedMagX, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gauss, ..FR_DEF }),
6 => Some(FieldReference { name: Name::CalibratedMagY, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gauss, ..FR_DEF }),
7 => Some(FieldReference { name: Name::CalibratedMagZ, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, array: true , units: Unit::Gauss, ..FR_DEF }),
_ => None,
}},
MesgNum::BAROMETER_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SampleTimeOffset, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::BaroPres, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , units: Unit::Pascal, ..FR_DEF }),
_ => None,
}},
MesgNum::THREE_D_SENSOR_CALIBRATION => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SensorType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SensorType, ..FR_DEF }),
1 => Some(FieldReference { name: Name::CalibrationFactor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::AccelCalFactor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Gee, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::GyroCalFactor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::DegreesPerSecond, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 1 },
], ..SF_DEF }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::CalibrationDivisor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Count, ..FR_DEF }),
3 => Some(FieldReference { name: Name::LevelShift, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
4 => Some(FieldReference { name: Name::OffsetCal, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, array: true , ..FR_DEF }),
5 => Some(FieldReference { name: Name::OrientationMatrix, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, array: true , scale: 65535.0, ..FR_DEF }),
_ => None,
}},
MesgNum::ONE_D_SENSOR_CALIBRATION => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SensorType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SensorType, ..FR_DEF }),
1 => Some(FieldReference { name: Name::CalibrationFactor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::BaroCalFactor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Pascal, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 3 },
], ..SF_DEF }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::CalibrationDivisor, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Count, ..FR_DEF }),
3 => Some(FieldReference { name: Name::LevelShift, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
4 => Some(FieldReference { name: Name::OffsetCal, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, ..FR_DEF }),
_ => None,
}},
MesgNum::VIDEO_FRAME => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::FrameNumber, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
_ => None,
}},
MesgNum::OBDII_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::TimeOffset, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Pid, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, ..FR_DEF }),
3 => Some(FieldReference { name: Name::RawData, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
4 => Some(FieldReference { name: Name::PidDataSize, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , ..FR_DEF }),
5 => Some(FieldReference { name: Name::SystemTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , ..FR_DEF }),
6 => Some(FieldReference { name: Name::StartTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
7 => Some(FieldReference { name: Name::StartTimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::NMEA_SENTENCE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Sentence, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::AVIATION_ATTITUDE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SystemTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Pitch, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 10430.38, units: Unit::Radian, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Roll, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 10430.38, units: Unit::Radian, ..FR_DEF }),
4 => Some(FieldReference { name: Name::AccelLateral, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 100.0, units: Unit::MetersPerSecondSquared, ..FR_DEF }),
5 => Some(FieldReference { name: Name::AccelNormal, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 100.0, units: Unit::MetersPerSecondSquared, ..FR_DEF }),
6 => Some(FieldReference { name: Name::TurnRate, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 1024.0, units: Unit::RadiansPerSecond, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Stage, base_type: FitBaseType::ENUM, profile_type: ProfileType::AttitudeStage, array: true , ..FR_DEF }),
8 => Some(FieldReference { name: Name::AttitudeStageComplete, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::Percent, ..FR_DEF }),
9 => Some(FieldReference { name: Name::Track, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 10430.38, units: Unit::Radian, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Validity, base_type: FitBaseType::UINT16, profile_type: ProfileType::AttitudeValidity, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::VIDEO => { match field_num {
0 => Some(FieldReference { name: Name::Url, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::HostingProvider, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Duration, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::VIDEO_TITLE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::MessageCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Text, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::VIDEO_DESCRIPTION => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::MessageCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Text, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::VIDEO_CLIP => { match field_num {
0 => Some(FieldReference { name: Name::ClipNumber, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
1 => Some(FieldReference { name: Name::StartTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartTimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
3 => Some(FieldReference { name: Name::EndTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
4 => Some(FieldReference { name: Name::EndTimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
6 => Some(FieldReference { name: Name::ClipStart, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Millisecond, ..FR_DEF }),
7 => Some(FieldReference { name: Name::ClipEnd, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::SET => { match field_num {
254 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Duration, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Repetitions, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Weight, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 16.0, units: Unit::Kilogram, ..FR_DEF }),
5 => Some(FieldReference { name: Name::SetType, base_type: FitBaseType::UINT8, profile_type: ProfileType::SetType, ..FR_DEF }),
6 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Category, base_type: FitBaseType::UINT16, profile_type: ProfileType::ExerciseCategory, array: true , ..FR_DEF }),
8 => Some(FieldReference { name: Name::CategorySubtype, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , ..FR_DEF }),
9 => Some(FieldReference { name: Name::WeightDisplayUnit, base_type: FitBaseType::UINT16, profile_type: ProfileType::FitBaseUnit, ..FR_DEF }),
10 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
11 => Some(FieldReference { name: Name::WktStepIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
_ => None,
}},
MesgNum::JUMP => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Meter, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Height, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Meter, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Rotations, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::HangTime, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Second, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Score, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
5 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
6 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Speed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, components: &[
Component { field_num: 8 , scale: 1000.0, offset: 0.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
8 => Some(FieldReference { name: Name::EnhancedSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
_ => None,
}},
MesgNum::SPLIT => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SplitType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SplitType, ..FR_DEF }),
1 => Some(FieldReference { name: Name::TotalElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
2 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
3 => Some(FieldReference { name: Name::TotalDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
9 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
13 => Some(FieldReference { name: Name::TotalAscent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
14 => Some(FieldReference { name: Name::TotalDescent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
21 => Some(FieldReference { name: Name::StartPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
22 => Some(FieldReference { name: Name::StartPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
23 => Some(FieldReference { name: Name::EndPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
24 => Some(FieldReference { name: Name::EndPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
25 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
26 => Some(FieldReference { name: Name::AvgVertSpeed, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
27 => Some(FieldReference { name: Name::EndTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
28 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Kilocalorie, ..FR_DEF }),
74 => Some(FieldReference { name: Name::StartElevation, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
78 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
110 => Some(FieldReference { name: Name::TotalMovingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::SPLIT_SUMMARY => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SplitType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SplitType, ..FR_DEF }),
3 => Some(FieldReference { name: Name::NumSplits, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::TotalDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
6 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
7 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TotalAscent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TotalDescent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
10 => Some(FieldReference { name: Name::AvgHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
11 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
12 => Some(FieldReference { name: Name::AvgVertSpeed, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
13 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Kilocalorie, ..FR_DEF }),
65 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
77 => Some(FieldReference { name: Name::TotalMovingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::CLIMB_PRO => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
1 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
2 => Some(FieldReference { name: Name::ClimbProEvent, base_type: FitBaseType::ENUM, profile_type: ProfileType::ClimbProEvent, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ClimbNumber, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::ClimbCategory, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
5 => Some(FieldReference { name: Name::CurrentDist, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Meter, ..FR_DEF }),
_ => None,
}},
MesgNum::FIELD_DESCRIPTION => { match field_num {
0 => Some(FieldReference { name: Name::DeveloperDataIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::FieldDefinitionNumber, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::FitBaseTypeId, base_type: FitBaseType::UINT8, profile_type: ProfileType::FitBaseType, ..FR_DEF }),
3 => Some(FieldReference { name: Name::FieldName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, array: true , ..FR_DEF }),
4 => Some(FieldReference { name: Name::Array, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Components, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Scale, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
7 => Some(FieldReference { name: Name::Offset, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Units, base_type: FitBaseType::STRING, profile_type: ProfileType::String, array: true , ..FR_DEF }),
9 => Some(FieldReference { name: Name::Bits, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Accumulate, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
13 => Some(FieldReference { name: Name::FitBaseUnitId, base_type: FitBaseType::UINT16, profile_type: ProfileType::FitBaseUnit, ..FR_DEF }),
14 => Some(FieldReference { name: Name::NativeMesgNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
15 => Some(FieldReference { name: Name::NativeFieldNum, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::DEVELOPER_DATA_ID => { match field_num {
0 => Some(FieldReference { name: Name::DeveloperId, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
1 => Some(FieldReference { name: Name::ApplicationId, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
2 => Some(FieldReference { name: Name::ManufacturerId, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
3 => Some(FieldReference { name: Name::DeveloperDataIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::ApplicationVersion, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
_ => None,
}},
MesgNum::COURSE => { match field_num {
4 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Capabilities, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::CourseCapabilities, ..FR_DEF }),
7 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
_ => None,
}},
MesgNum::COURSE_POINT => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
2 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
3 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::CoursePoint, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Favorite, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
_ => None,
}},
MesgNum::SEGMENT_ID => { match field_num {
0 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Uuid, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
4 => Some(FieldReference { name: Name::UserProfilePrimaryKey, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
5 => Some(FieldReference { name: Name::DeviceId, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
6 => Some(FieldReference { name: Name::DefaultRaceLeader, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
7 => Some(FieldReference { name: Name::DeleteStatus, base_type: FitBaseType::ENUM, profile_type: ProfileType::SegmentDeleteStatus, ..FR_DEF }),
8 => Some(FieldReference { name: Name::SelectionType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SegmentSelectionType, ..FR_DEF }),
_ => None,
}},
MesgNum::SEGMENT_LEADERBOARD_ENTRY => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::SegmentLeaderboardType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::GroupPrimaryKey, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ActivityId, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
4 => Some(FieldReference { name: Name::SegmentTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::ActivityIdString, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::SEGMENT_POINT => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::PositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
2 => Some(FieldReference { name: Name::PositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Altitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 6 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
5 => Some(FieldReference { name: Name::LeaderTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
6 => Some(FieldReference { name: Name::EnhancedAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
_ => None,
}},
MesgNum::SEGMENT_LAP => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Event, base_type: FitBaseType::ENUM, profile_type: ProfileType::Event, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EventType, base_type: FitBaseType::ENUM, profile_type: ProfileType::EventType, ..FR_DEF }),
2 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
3 => Some(FieldReference { name: Name::StartPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
4 => Some(FieldReference { name: Name::StartPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
5 => Some(FieldReference { name: Name::EndPositionLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
6 => Some(FieldReference { name: Name::EndPositionLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
7 => Some(FieldReference { name: Name::TotalElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
8 => Some(FieldReference { name: Name::TotalTimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
9 => Some(FieldReference { name: Name::TotalDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
10 => Some(FieldReference { name: Name::TotalCycles, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Cycle, sub_fields: &[
SubField { name: Name::TotalStrokes, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Stroke, maps: &[
SubFieldMap { ref_field_num: 23 , ref_field_value: 2 },
], ..SF_DEF }
], ..FR_DEF }),
11 => Some(FieldReference { name: Name::TotalCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
12 => Some(FieldReference { name: Name::TotalFatCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
13 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
14 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
15 => Some(FieldReference { name: Name::AvgHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
16 => Some(FieldReference { name: Name::MaxHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
17 => Some(FieldReference { name: Name::AvgCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, ..FR_DEF }),
18 => Some(FieldReference { name: Name::MaxCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::RevolutionPerMinute, ..FR_DEF }),
19 => Some(FieldReference { name: Name::AvgPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
20 => Some(FieldReference { name: Name::MaxPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
21 => Some(FieldReference { name: Name::TotalAscent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
22 => Some(FieldReference { name: Name::TotalDescent, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Meter, ..FR_DEF }),
23 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
24 => Some(FieldReference { name: Name::EventGroup, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
25 => Some(FieldReference { name: Name::NecLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
26 => Some(FieldReference { name: Name::NecLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
27 => Some(FieldReference { name: Name::SwcLat, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
28 => Some(FieldReference { name: Name::SwcLong, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, units: Unit::Semicircle, ..FR_DEF }),
29 => Some(FieldReference { name: Name::Name, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
30 => Some(FieldReference { name: Name::NormalizedPower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Watt, ..FR_DEF }),
31 => Some(FieldReference { name: Name::LeftRightBalance, base_type: FitBaseType::UINT16, profile_type: ProfileType::LeftRightBalance100, ..FR_DEF }),
32 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
33 => Some(FieldReference { name: Name::TotalWork, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Joule, ..FR_DEF }),
34 => Some(FieldReference { name: Name::AvgAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 91 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
35 => Some(FieldReference { name: Name::MaxAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 92 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
36 => Some(FieldReference { name: Name::GpsAccuracy, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Meter, ..FR_DEF }),
37 => Some(FieldReference { name: Name::AvgGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
38 => Some(FieldReference { name: Name::AvgPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
39 => Some(FieldReference { name: Name::AvgNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
40 => Some(FieldReference { name: Name::MaxPosGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
41 => Some(FieldReference { name: Name::MaxNegGrade, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
42 => Some(FieldReference { name: Name::AvgTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
43 => Some(FieldReference { name: Name::MaxTemperature, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Celcius, ..FR_DEF }),
44 => Some(FieldReference { name: Name::TotalMovingTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
45 => Some(FieldReference { name: Name::AvgPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
46 => Some(FieldReference { name: Name::AvgNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
47 => Some(FieldReference { name: Name::MaxPosVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
48 => Some(FieldReference { name: Name::MaxNegVerticalSpeed, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
49 => Some(FieldReference { name: Name::TimeInHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
50 => Some(FieldReference { name: Name::TimeInSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
51 => Some(FieldReference { name: Name::TimeInCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
52 => Some(FieldReference { name: Name::TimeInPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
53 => Some(FieldReference { name: Name::RepetitionNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
54 => Some(FieldReference { name: Name::MinAltitude, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 5.0, offset: 500.0,units: Unit::Meter, components: &[
Component { field_num: 93 , scale: 5.0, offset: 500.0, accumulate: false, bits: 16 }
], ..FR_DEF }),
55 => Some(FieldReference { name: Name::MinHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
56 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
57 => Some(FieldReference { name: Name::WktStepIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
58 => Some(FieldReference { name: Name::SportEvent, base_type: FitBaseType::ENUM, profile_type: ProfileType::SportEvent, ..FR_DEF }),
59 => Some(FieldReference { name: Name::AvgLeftTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
60 => Some(FieldReference { name: Name::AvgRightTorqueEffectiveness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
61 => Some(FieldReference { name: Name::AvgLeftPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
62 => Some(FieldReference { name: Name::AvgRightPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
63 => Some(FieldReference { name: Name::AvgCombinedPedalSmoothness, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 2.0, units: Unit::Percent, ..FR_DEF }),
64 => Some(FieldReference { name: Name::Status, base_type: FitBaseType::ENUM, profile_type: ProfileType::SegmentLapStatus, ..FR_DEF }),
65 => Some(FieldReference { name: Name::Uuid, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
66 => Some(FieldReference { name: Name::AvgFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
67 => Some(FieldReference { name: Name::MaxFractionalCadence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::RevolutionPerMinute, ..FR_DEF }),
68 => Some(FieldReference { name: Name::TotalFractionalCycles, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 128.0, units: Unit::Cycle, ..FR_DEF }),
69 => Some(FieldReference { name: Name::FrontGearShiftCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
70 => Some(FieldReference { name: Name::RearGearShiftCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
71 => Some(FieldReference { name: Name::TimeStanding, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
72 => Some(FieldReference { name: Name::StandCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
73 => Some(FieldReference { name: Name::AvgLeftPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
74 => Some(FieldReference { name: Name::AvgRightPco, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, units: Unit::Millimeter, ..FR_DEF }),
75 => Some(FieldReference { name: Name::AvgLeftPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
76 => Some(FieldReference { name: Name::AvgLeftPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
77 => Some(FieldReference { name: Name::AvgRightPowerPhase, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
78 => Some(FieldReference { name: Name::AvgRightPowerPhasePeak, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , scale: 0.7111111, units: Unit::Degree, ..FR_DEF }),
79 => Some(FieldReference { name: Name::AvgPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
80 => Some(FieldReference { name: Name::MaxPowerPosition, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Watt, ..FR_DEF }),
81 => Some(FieldReference { name: Name::AvgCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
82 => Some(FieldReference { name: Name::MaxCadencePosition, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::RevolutionPerMinute, ..FR_DEF }),
83 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
84 => Some(FieldReference { name: Name::TotalGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
85 => Some(FieldReference { name: Name::TotalFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
86 => Some(FieldReference { name: Name::AvgGrit, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::KGrit, ..FR_DEF }),
87 => Some(FieldReference { name: Name::AvgFlow, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, units: Unit::Flow, ..FR_DEF }),
89 => Some(FieldReference { name: Name::TotalFractionalAscent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
90 => Some(FieldReference { name: Name::TotalFractionalDescent, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
91 => Some(FieldReference { name: Name::EnhancedAvgAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
92 => Some(FieldReference { name: Name::EnhancedMaxAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
93 => Some(FieldReference { name: Name::EnhancedMinAltitude, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 5.0, offset: 500.0,units: Unit::Meter, ..FR_DEF }),
_ => None,
}},
MesgNum::SEGMENT_FILE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::FileUuid, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Enabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
4 => Some(FieldReference { name: Name::UserProfilePrimaryKey, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
7 => Some(FieldReference { name: Name::LeaderType, base_type: FitBaseType::ENUM, profile_type: ProfileType::SegmentLeaderboardType, array: true , ..FR_DEF }),
8 => Some(FieldReference { name: Name::LeaderGroupPrimaryKey, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , ..FR_DEF }),
9 => Some(FieldReference { name: Name::LeaderActivityId, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , ..FR_DEF }),
10 => Some(FieldReference { name: Name::LeaderActivityIdString, base_type: FitBaseType::STRING, profile_type: ProfileType::String, array: true , ..FR_DEF }),
11 => Some(FieldReference { name: Name::DefaultRaceLeader, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::WORKOUT => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Capabilities, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::WorkoutCapabilities, ..FR_DEF }),
6 => Some(FieldReference { name: Name::NumValidSteps, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
8 => Some(FieldReference { name: Name::WktName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
11 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
14 => Some(FieldReference { name: Name::PoolLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
15 => Some(FieldReference { name: Name::PoolLengthUnit, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
17 => Some(FieldReference { name: Name::WktDescription, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
_ => None,
}},
MesgNum::WORKOUT_SESSION => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
2 => Some(FieldReference { name: Name::NumValidSteps, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
3 => Some(FieldReference { name: Name::FirstStepIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::PoolLength, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
5 => Some(FieldReference { name: Name::PoolLengthUnit, base_type: FitBaseType::ENUM, profile_type: ProfileType::DisplayMeasure, ..FR_DEF }),
_ => None,
}},
MesgNum::WORKOUT_STEP => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::WktStepName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
1 => Some(FieldReference { name: Name::DurationType, base_type: FitBaseType::ENUM, profile_type: ProfileType::WktStepDuration, ..FR_DEF }),
2 => Some(FieldReference { name: Name::DurationValue, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::DurationTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 0 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 28 },
], ..SF_DEF },
SubField { name: Name::DurationDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::DurationHr, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 2 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::DurationCalories, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Calorie, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 4 },
], ..SF_DEF },
SubField { name: Name::DurationStep, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 6 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 7 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 8 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 9 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 10 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 11 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 12 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 13 },
], ..SF_DEF },
SubField { name: Name::DurationPower, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 14 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 15 },
], ..SF_DEF },
SubField { name: Name::DurationReps, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 29 },
], ..SF_DEF }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::TargetType, base_type: FitBaseType::ENUM, profile_type: ProfileType::WktStepTarget, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TargetValue, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::TargetSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::TargetHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::TargetCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::TargetPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 4 },
], ..SF_DEF },
SubField { name: Name::RepeatSteps, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 6 },
], ..SF_DEF },
SubField { name: Name::RepeatTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 7 },
], ..SF_DEF },
SubField { name: Name::RepeatDistance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 8 },
], ..SF_DEF },
SubField { name: Name::RepeatCalories, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Calorie, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 9 },
], ..SF_DEF },
SubField { name: Name::RepeatHr, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 10 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 11 },
], ..SF_DEF },
SubField { name: Name::RepeatPower, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 1 , ref_field_value: 12 },
SubFieldMap { ref_field_num: 1 , ref_field_value: 13 },
], ..SF_DEF },
SubField { name: Name::TargetStrokeType, base_type: FitBaseType::UINT32, profile_type: ProfileType::SwimStroke, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 11 },
], ..SF_DEF }
], ..FR_DEF }),
5 => Some(FieldReference { name: Name::CustomTargetValueLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::CustomTargetSpeedLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::CustomTargetHeartRateLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::CustomTargetCadenceLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::CustomTargetPowerLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 4 },
], ..SF_DEF }
], ..FR_DEF }),
6 => Some(FieldReference { name: Name::CustomTargetValueHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::CustomTargetSpeedHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::CustomTargetHeartRateHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::CustomTargetCadenceHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::CustomTargetPowerHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 3 , ref_field_value: 4 },
], ..SF_DEF }
], ..FR_DEF }),
7 => Some(FieldReference { name: Name::Intensity, base_type: FitBaseType::ENUM, profile_type: ProfileType::Intensity, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Notes, base_type: FitBaseType::STRING, profile_type: ProfileType::String, ..FR_DEF }),
9 => Some(FieldReference { name: Name::Equipment, base_type: FitBaseType::ENUM, profile_type: ProfileType::WorkoutEquipment, ..FR_DEF }),
10 => Some(FieldReference { name: Name::ExerciseCategory, base_type: FitBaseType::UINT16, profile_type: ProfileType::ExerciseCategory, ..FR_DEF }),
11 => Some(FieldReference { name: Name::ExerciseName, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
12 => Some(FieldReference { name: Name::ExerciseWeight, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Kilogram, ..FR_DEF }),
13 => Some(FieldReference { name: Name::WeightDisplayUnit, base_type: FitBaseType::UINT16, profile_type: ProfileType::FitBaseUnit, ..FR_DEF }),
19 => Some(FieldReference { name: Name::SecondaryTargetType, base_type: FitBaseType::ENUM, profile_type: ProfileType::WktStepTarget, ..FR_DEF }),
20 => Some(FieldReference { name: Name::SecondaryTargetValue, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::SecondaryTargetSpeedZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::SecondaryTargetHrZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::SecondaryTargetCadenceZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::SecondaryTargetPowerZone, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 4 },
], ..SF_DEF },
SubField { name: Name::SecondaryTargetStrokeType, base_type: FitBaseType::UINT32, profile_type: ProfileType::SwimStroke, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 11 },
], ..SF_DEF }
], ..FR_DEF }),
21 => Some(FieldReference { name: Name::SecondaryCustomTargetValueLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::SecondaryCustomTargetSpeedLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetHeartRateLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetCadenceLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetPowerLow, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 4 },
], ..SF_DEF }
], ..FR_DEF }),
22 => Some(FieldReference { name: Name::SecondaryCustomTargetValueHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, sub_fields: &[
SubField { name: Name::SecondaryCustomTargetSpeedHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 0 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetHeartRateHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutHr, units: Unit::PercentOrBeatsPerMinute, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetCadenceHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::RevolutionPerMinute, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 3 },
], ..SF_DEF },
SubField { name: Name::SecondaryCustomTargetPowerHigh, base_type: FitBaseType::UINT32, profile_type: ProfileType::WorkoutPower, units: Unit::PercentOrWatts, maps: &[
SubFieldMap { ref_field_num: 19 , ref_field_value: 4 },
], ..SF_DEF }
], ..FR_DEF }),
_ => None,
}},
MesgNum::EXERCISE_TITLE => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ExerciseCategory, base_type: FitBaseType::UINT16, profile_type: ProfileType::ExerciseCategory, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ExerciseName, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
2 => Some(FieldReference { name: Name::WktStepName, base_type: FitBaseType::STRING, profile_type: ProfileType::String, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::SCHEDULE => { match field_num {
0 => Some(FieldReference { name: Name::Manufacturer, base_type: FitBaseType::UINT16, profile_type: ProfileType::Manufacturer, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Product, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, sub_fields: &[
SubField { name: Name::FaveroProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::FaveroProduct, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 263 },
], ..SF_DEF },
SubField { name: Name::GarminProduct, base_type: FitBaseType::UINT16, profile_type: ProfileType::GarminProduct, maps: &[
SubFieldMap { ref_field_num: 0 , ref_field_value: 1 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 15 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 13 },
SubFieldMap { ref_field_num: 0 , ref_field_value: 89 },
], ..SF_DEF }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::SerialNumber, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::Uint32z, ..FR_DEF }),
3 => Some(FieldReference { name: Name::TimeCreated, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Completed, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Type, base_type: FitBaseType::ENUM, profile_type: ProfileType::Schedule, ..FR_DEF }),
6 => Some(FieldReference { name: Name::ScheduledTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, ..FR_DEF }),
_ => None,
}},
MesgNum::TOTALS => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimerTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Meter, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Calories, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Kilocalorie, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
4 => Some(FieldReference { name: Name::ElapsedTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Sessions, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
6 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
9 => Some(FieldReference { name: Name::SportIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::WEIGHT_SCALE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Weight, base_type: FitBaseType::UINT16, profile_type: ProfileType::Weight, scale: 100.0, units: Unit::Kilogram, ..FR_DEF }),
1 => Some(FieldReference { name: Name::PercentFat, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
2 => Some(FieldReference { name: Name::PercentHydration, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Percent, ..FR_DEF }),
3 => Some(FieldReference { name: Name::VisceralFatMass, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Kilogram, ..FR_DEF }),
4 => Some(FieldReference { name: Name::BoneMass, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Kilogram, ..FR_DEF }),
5 => Some(FieldReference { name: Name::MuscleMass, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Kilogram, ..FR_DEF }),
7 => Some(FieldReference { name: Name::BasalMet, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 4.0, units: Unit::KilocaloriesPerDay, ..FR_DEF }),
8 => Some(FieldReference { name: Name::PhysiqueRating, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
9 => Some(FieldReference { name: Name::ActiveMet, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 4.0, units: Unit::KilocaloriesPerDay, ..FR_DEF }),
10 => Some(FieldReference { name: Name::MetabolicAge, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Year, ..FR_DEF }),
11 => Some(FieldReference { name: Name::VisceralFatRating, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
12 => Some(FieldReference { name: Name::UserProfileIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
13 => Some(FieldReference { name: Name::Bmi, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::KilogramsPerSquareMeter, ..FR_DEF }),
_ => None,
}},
MesgNum::BLOOD_PRESSURE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SystolicPressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
1 => Some(FieldReference { name: Name::DiastolicPressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
2 => Some(FieldReference { name: Name::MeanArterialPressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Map3SampleMean, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
4 => Some(FieldReference { name: Name::MapMorningValues, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
5 => Some(FieldReference { name: Name::MapEveningValues, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::MillimetersOfMercury, ..FR_DEF }),
6 => Some(FieldReference { name: Name::HeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
7 => Some(FieldReference { name: Name::HeartRateType, base_type: FitBaseType::ENUM, profile_type: ProfileType::HrType, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Status, base_type: FitBaseType::ENUM, profile_type: ProfileType::BpStatus, ..FR_DEF }),
9 => Some(FieldReference { name: Name::UserProfileIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
_ => None,
}},
MesgNum::MONITORING_INFO => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::LocalTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ActivityType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityType, array: true , ..FR_DEF }),
3 => Some(FieldReference { name: Name::CyclesToDistance, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 5000.0, units: Unit::MetersPerCycle, ..FR_DEF }),
4 => Some(FieldReference { name: Name::CyclesToCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 5000.0, units: Unit::KilocaloriesPerCycle, ..FR_DEF }),
5 => Some(FieldReference { name: Name::RestingMetabolicRate, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::KilocaloriesPerDay, ..FR_DEF }),
_ => None,
}},
MesgNum::MONITORING => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Calories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Distance, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Meter, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Cycles, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 2.0, units: Unit::Cycle, sub_fields: &[
SubField { name: Name::Steps, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Step, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 6 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 1 },
], ..SF_DEF },
SubField { name: Name::Strokes, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 2.0, units: Unit::Stroke, maps: &[
SubFieldMap { ref_field_num: 5 , ref_field_value: 2 },
SubFieldMap { ref_field_num: 5 , ref_field_value: 5 },
], ..SF_DEF }
], ..FR_DEF }),
4 => Some(FieldReference { name: Name::ActiveTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::ActivityType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityType, ..FR_DEF }),
6 => Some(FieldReference { name: Name::ActivitySubtype, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivitySubtype, ..FR_DEF }),
7 => Some(FieldReference { name: Name::ActivityLevel, base_type: FitBaseType::ENUM, profile_type: ProfileType::ActivityLevel, ..FR_DEF }),
8 => Some(FieldReference { name: Name::Distance16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Hectometer, ..FR_DEF }),
9 => Some(FieldReference { name: Name::Cycles16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::TwoCyclesSteps, ..FR_DEF }),
10 => Some(FieldReference { name: Name::ActiveTime16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
11 => Some(FieldReference { name: Name::LocalTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, ..FR_DEF }),
12 => Some(FieldReference { name: Name::Temperature, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
14 => Some(FieldReference { name: Name::TemperatureMin, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
15 => Some(FieldReference { name: Name::TemperatureMax, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::Celcius, ..FR_DEF }),
16 => Some(FieldReference { name: Name::ActivityTime, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Minute, ..FR_DEF }),
19 => Some(FieldReference { name: Name::ActiveCalories, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Kilocalorie, ..FR_DEF }),
24 => Some(FieldReference { name: Name::CurrentActivityTypeIntensity, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, components: &[
Component { field_num: 5 , scale: 1.0, offset: 0.0, accumulate: false, bits: 5 },
Component { field_num: 28 , scale: 1.0, offset: 0.0, accumulate: false, bits: 3 }
], ..FR_DEF }),
25 => Some(FieldReference { name: Name::TimestampMin8, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Minute, ..FR_DEF }),
26 => Some(FieldReference { name: Name::Timestamp16, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
27 => Some(FieldReference { name: Name::HeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
28 => Some(FieldReference { name: Name::Intensity, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 10.0, ..FR_DEF }),
29 => Some(FieldReference { name: Name::DurationMin, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Minute, ..FR_DEF }),
30 => Some(FieldReference { name: Name::Duration, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
31 => Some(FieldReference { name: Name::Ascent, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
32 => Some(FieldReference { name: Name::Descent, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
33 => Some(FieldReference { name: Name::ModerateActivityMinutes, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Minute, ..FR_DEF }),
34 => Some(FieldReference { name: Name::VigorousActivityMinutes, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Minute, ..FR_DEF }),
_ => None,
}},
MesgNum::MONITORING_HR_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::RestingHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
1 => Some(FieldReference { name: Name::CurrentDayRestingHeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::BeatsPerMinute, ..FR_DEF }),
_ => None,
}},
MesgNum::SPO2_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ReadingSpo2, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ReadingConfidence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Mode, base_type: FitBaseType::ENUM, profile_type: ProfileType::Spo2MeasurementType, ..FR_DEF }),
_ => None,
}},
MesgNum::HR => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::FractionalTimestamp, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 32768.0, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Time256, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, scale: 256.0, units: Unit::Second, components: &[
Component { field_num: 0 , scale: 256.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
6 => Some(FieldReference { name: Name::FilteredBpm, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::BeatsPerMinute, ..FR_DEF }),
9 => Some(FieldReference { name: Name::EventTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , accumulate: true, scale: 1024.0, units: Unit::Second, ..FR_DEF }),
10 => Some(FieldReference { name: Name::EventTimestamp12, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , accumulate: true, units: Unit::Second, components: &[
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 },
Component { field_num: 9 , scale: 1024.0, offset: 0.0, accumulate: true, bits: 12 }
], ..FR_DEF }),
_ => None,
}},
MesgNum::STRESS_LEVEL => { match field_num {
0 => Some(FieldReference { name: Name::StressLevelValue, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, ..FR_DEF }),
1 => Some(FieldReference { name: Name::StressLevelTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::MAX_MET_DATA => { match field_num {
0 => Some(FieldReference { name: Name::UpdateTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Vo2Max, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 10.0, units: Unit::MillilitersPerKilogramPerMinute, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Sport, base_type: FitBaseType::ENUM, profile_type: ProfileType::Sport, ..FR_DEF }),
6 => Some(FieldReference { name: Name::SubSport, base_type: FitBaseType::ENUM, profile_type: ProfileType::SubSport, ..FR_DEF }),
8 => Some(FieldReference { name: Name::MaxMetCategory, base_type: FitBaseType::ENUM, profile_type: ProfileType::MaxMetCategory, ..FR_DEF }),
9 => Some(FieldReference { name: Name::CalibratedData, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
12 => Some(FieldReference { name: Name::HrSource, base_type: FitBaseType::ENUM, profile_type: ProfileType::MaxMetHeartRateSource, ..FR_DEF }),
13 => Some(FieldReference { name: Name::SpeedSource, base_type: FitBaseType::ENUM, profile_type: ProfileType::MaxMetSpeedSource, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_BODY_BATTERY_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Level, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, array: true , units: Unit::Percent, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Charged, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , ..FR_DEF }),
3 => Some(FieldReference { name: Name::Uncharged, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_EVENT => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::EventId, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_ACCELEROMETER_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SamplingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AccelX, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 1.024, units: Unit::Milligee, ..FR_DEF }),
3 => Some(FieldReference { name: Name::AccelY, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 1.024, units: Unit::Milligee, ..FR_DEF }),
4 => Some(FieldReference { name: Name::AccelZ, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 1.024, units: Unit::Milligee, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Timestamp32K, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_GYROSCOPE_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::SamplingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::OnePer32768Seconds, ..FR_DEF }),
2 => Some(FieldReference { name: Name::GyroX, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 28.57143, units: Unit::DegreesPerSecond, ..FR_DEF }),
3 => Some(FieldReference { name: Name::GyroY, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 28.57143, units: Unit::DegreesPerSecond, ..FR_DEF }),
4 => Some(FieldReference { name: Name::GyroZ, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 28.57143, units: Unit::DegreesPerSecond, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Timestamp32K, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::OnePer32768Seconds, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_STEP_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Steps, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, array: true , units: Unit::Step, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_SPO2_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ReadingSpo2, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::Percent, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Confidence, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_STRESS_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::StressLevel, base_type: FitBaseType::SINT8, profile_type: ProfileType::Sint8, array: true , units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_RESPIRATION_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::RespirationRate, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, array: true , scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_HEART_RATE_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Status, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::HeartRate, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , units: Unit::BeatsPerMinute, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_CONFIGURATION_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
1 => Some(FieldReference { name: Name::DataSize, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
_ => None,
}},
MesgNum::HSA_WRIST_TEMPERATURE_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ProcessingInterval, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Value, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 1000.0, units: Unit::Celcius, ..FR_DEF }),
_ => None,
}},
MesgNum::MEMO_GLOB => { match field_num {
250 => Some(FieldReference { name: Name::PartIndex, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Memo, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
1 => Some(FieldReference { name: Name::MesgNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
2 => Some(FieldReference { name: Name::ParentIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
3 => Some(FieldReference { name: Name::FieldNum, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::SLEEP_LEVEL => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::SleepLevel, base_type: FitBaseType::ENUM, profile_type: ProfileType::SleepLevel, ..FR_DEF }),
_ => None,
}},
MesgNum::ANT_CHANNEL_ID => { match field_num {
0 => Some(FieldReference { name: Name::ChannelNumber, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::DeviceType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
2 => Some(FieldReference { name: Name::DeviceNumber, base_type: FitBaseType::UINT16Z, profile_type: ProfileType::Uint16z, ..FR_DEF }),
3 => Some(FieldReference { name: Name::TransmissionType, base_type: FitBaseType::UINT8Z, profile_type: ProfileType::Uint8z, ..FR_DEF }),
4 => Some(FieldReference { name: Name::DeviceIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::DeviceIndex, ..FR_DEF }),
_ => None,
}},
MesgNum::ANT_RX => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::FractionalTimestamp, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 32768.0, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::MesgId, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, ..FR_DEF }),
2 => Some(FieldReference { name: Name::MesgData, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , components: &[
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::ChannelNumber, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::ANT_TX => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::FractionalTimestamp, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 32768.0, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::MesgId, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, ..FR_DEF }),
2 => Some(FieldReference { name: Name::MesgData, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , components: &[
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 8 }
], ..FR_DEF }),
3 => Some(FieldReference { name: Name::ChannelNumber, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::EXD_SCREEN_CONFIGURATION => { match field_num {
0 => Some(FieldReference { name: Name::ScreenIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::FieldCount, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Layout, base_type: FitBaseType::ENUM, profile_type: ProfileType::ExdLayout, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ScreenEnabled, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
_ => None,
}},
MesgNum::EXD_DATA_FIELD_CONFIGURATION => { match field_num {
0 => Some(FieldReference { name: Name::ScreenIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ConceptField, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, components: &[
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 4 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 4 }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::FieldId, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ConceptCount, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::DisplayType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ExdDisplayType, ..FR_DEF }),
5 => Some(FieldReference { name: Name::Title, base_type: FitBaseType::STRING, profile_type: ProfileType::String, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::EXD_DATA_CONCEPT_CONFIGURATION => { match field_num {
0 => Some(FieldReference { name: Name::ScreenIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ConceptField, base_type: FitBaseType::BYTE, profile_type: ProfileType::Byte, components: &[
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 4 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 4 }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::FieldId, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ConceptIndex, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::DataPage, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
5 => Some(FieldReference { name: Name::ConceptKey, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Scaling, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
8 => Some(FieldReference { name: Name::DataUnits, base_type: FitBaseType::ENUM, profile_type: ProfileType::ExdDataUnits, ..FR_DEF }),
9 => Some(FieldReference { name: Name::Qualifier, base_type: FitBaseType::ENUM, profile_type: ProfileType::ExdQualifiers, ..FR_DEF }),
10 => Some(FieldReference { name: Name::Descriptor, base_type: FitBaseType::ENUM, profile_type: ProfileType::ExdDescriptors, ..FR_DEF }),
11 => Some(FieldReference { name: Name::IsSigned, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
_ => None,
}},
MesgNum::DIVE_SUMMARY => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ReferenceMesg, base_type: FitBaseType::UINT16, profile_type: ProfileType::MesgNum, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ReferenceIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AvgDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
3 => Some(FieldReference { name: Name::MaxDepth, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Meter, ..FR_DEF }),
4 => Some(FieldReference { name: Name::SurfaceInterval, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, units: Unit::Second, ..FR_DEF }),
5 => Some(FieldReference { name: Name::StartCns, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
6 => Some(FieldReference { name: Name::EndCns, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, units: Unit::Percent, ..FR_DEF }),
7 => Some(FieldReference { name: Name::StartN2, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Percent, ..FR_DEF }),
8 => Some(FieldReference { name: Name::EndN2, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Percent, ..FR_DEF }),
9 => Some(FieldReference { name: Name::O2Toxicity, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::OxygenToxicityUnit, ..FR_DEF }),
10 => Some(FieldReference { name: Name::DiveNumber, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
11 => Some(FieldReference { name: Name::BottomTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
12 => Some(FieldReference { name: Name::AvgPressureSac, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::BarPerMinute, ..FR_DEF }),
13 => Some(FieldReference { name: Name::AvgVolumeSac, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::LiterPerMinute, ..FR_DEF }),
14 => Some(FieldReference { name: Name::AvgRmv, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::LiterPerMinute, ..FR_DEF }),
15 => Some(FieldReference { name: Name::DescentTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
16 => Some(FieldReference { name: Name::AscentTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
17 => Some(FieldReference { name: Name::AvgAscentRate, base_type: FitBaseType::SINT32, profile_type: ProfileType::Sint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
22 => Some(FieldReference { name: Name::AvgDescentRate, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
23 => Some(FieldReference { name: Name::MaxAscentRate, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
24 => Some(FieldReference { name: Name::MaxDescentRate, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
25 => Some(FieldReference { name: Name::HangTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::AAD_ACCEL_FEATURES => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::EnergyTotal, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, ..FR_DEF }),
2 => Some(FieldReference { name: Name::ZeroCrossCnt, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Instance, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::TimeAboveThreshold, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 25.0, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::HRV => { match field_num {
0 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , scale: 1000.0, units: Unit::Second, ..FR_DEF }),
_ => None,
}},
MesgNum::BEAT_INTERVALS => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::HRV_STATUS_SUMMARY => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::WeeklyAverage, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::LastNightAverage, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
2 => Some(FieldReference { name: Name::LastNight5MinHigh, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
3 => Some(FieldReference { name: Name::BaselineLowUpper, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
4 => Some(FieldReference { name: Name::BaselineBalancedLower, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
5 => Some(FieldReference { name: Name::BaselineBalancedUpper, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Status, base_type: FitBaseType::ENUM, profile_type: ProfileType::HrvStatus, ..FR_DEF }),
_ => None,
}},
MesgNum::HRV_VALUE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Value, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 128.0, units: Unit::Millisecond, ..FR_DEF }),
_ => None,
}},
MesgNum::RAW_BBI => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::TimestampMs, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, units: Unit::Millisecond, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Data, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , components: &[
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 2 , scale: 1.0, offset: 0.0, accumulate: false, bits: 14 },
Component { field_num: 3 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 },
Component { field_num: 4 , scale: 1.0, offset: 0.0, accumulate: false, bits: 1 }
], ..FR_DEF }),
2 => Some(FieldReference { name: Name::Time, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, array: true , units: Unit::Millisecond, ..FR_DEF }),
3 => Some(FieldReference { name: Name::Quality, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , ..FR_DEF }),
4 => Some(FieldReference { name: Name::Gap, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, array: true , ..FR_DEF }),
_ => None,
}},
MesgNum::RESPIRATION_RATE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::RespirationRate, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, scale: 100.0, units: Unit::BreathsPerMinute, ..FR_DEF }),
_ => None,
}},
MesgNum::CHRONO_SHOT_SESSION => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::MinSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
1 => Some(FieldReference { name: Name::MaxSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AvgSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
3 => Some(FieldReference { name: Name::ShotCount, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
4 => Some(FieldReference { name: Name::ProjectileType, base_type: FitBaseType::ENUM, profile_type: ProfileType::ProjectileType, ..FR_DEF }),
5 => Some(FieldReference { name: Name::GrainWeight, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 10.0, units: Unit::Gram, ..FR_DEF }),
6 => Some(FieldReference { name: Name::StandardDeviation, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
_ => None,
}},
MesgNum::CHRONO_SHOT_DATA => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::ShotSpeed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 1000.0, units: Unit::MetersPerSeconds, ..FR_DEF }),
1 => Some(FieldReference { name: Name::ShotNum, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, ..FR_DEF }),
_ => None,
}},
MesgNum::TANK_UPDATE => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Sensor, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::AntChannelId, ..FR_DEF }),
1 => Some(FieldReference { name: Name::Pressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Bar, ..FR_DEF }),
_ => None,
}},
MesgNum::TANK_SUMMARY => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Sensor, base_type: FitBaseType::UINT32Z, profile_type: ProfileType::AntChannelId, ..FR_DEF }),
1 => Some(FieldReference { name: Name::StartPressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Bar, ..FR_DEF }),
2 => Some(FieldReference { name: Name::EndPressure, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, units: Unit::Bar, ..FR_DEF }),
3 => Some(FieldReference { name: Name::VolumeUsed, base_type: FitBaseType::UINT32, profile_type: ProfileType::Uint32, scale: 100.0, units: Unit::Liter, ..FR_DEF }),
_ => None,
}},
MesgNum::SLEEP_ASSESSMENT => { match field_num {
0 => Some(FieldReference { name: Name::CombinedAwakeScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
1 => Some(FieldReference { name: Name::AwakeTimeScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
2 => Some(FieldReference { name: Name::AwakeningsCountScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
3 => Some(FieldReference { name: Name::DeepSleepScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
4 => Some(FieldReference { name: Name::SleepDurationScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
5 => Some(FieldReference { name: Name::LightSleepScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
6 => Some(FieldReference { name: Name::OverallSleepScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
7 => Some(FieldReference { name: Name::SleepQualityScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
8 => Some(FieldReference { name: Name::SleepRecoveryScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
9 => Some(FieldReference { name: Name::RemSleepScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
10 => Some(FieldReference { name: Name::SleepRestlessnessScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
11 => Some(FieldReference { name: Name::AwakeningsCount, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
14 => Some(FieldReference { name: Name::InterruptionsScore, base_type: FitBaseType::UINT8, profile_type: ProfileType::Uint8, ..FR_DEF }),
15 => Some(FieldReference { name: Name::AverageStressDuringSleep, base_type: FitBaseType::UINT16, profile_type: ProfileType::Uint16, scale: 100.0, ..FR_DEF }),
_ => None,
}},
MesgNum::SLEEP_DISRUPTION_SEVERITY_PERIOD => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Severity, base_type: FitBaseType::ENUM, profile_type: ProfileType::SleepDisruptionSeverity, ..FR_DEF }),
_ => None,
}},
MesgNum::SLEEP_DISRUPTION_OVERNIGHT_SEVERITY => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::Severity, base_type: FitBaseType::ENUM, profile_type: ProfileType::SleepDisruptionSeverity, ..FR_DEF }),
_ => None,
}},
MesgNum::NAP_EVENT => { match field_num {
254 => Some(FieldReference { name: Name::MessageIndex, base_type: FitBaseType::UINT16, profile_type: ProfileType::MessageIndex, ..FR_DEF }),
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::StartTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
1 => Some(FieldReference { name: Name::StartTimezoneOffset, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, units: Unit::Minute, ..FR_DEF }),
2 => Some(FieldReference { name: Name::EndTime, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, units: Unit::Second, ..FR_DEF }),
3 => Some(FieldReference { name: Name::EndTimezoneOffset, base_type: FitBaseType::SINT16, profile_type: ProfileType::Sint16, units: Unit::Minute, ..FR_DEF }),
4 => Some(FieldReference { name: Name::Feedback, base_type: FitBaseType::ENUM, profile_type: ProfileType::NapPeriodFeedback, ..FR_DEF }),
5 => Some(FieldReference { name: Name::IsDeleted, base_type: FitBaseType::ENUM, profile_type: ProfileType::Bool, ..FR_DEF }),
6 => Some(FieldReference { name: Name::Source, base_type: FitBaseType::ENUM, profile_type: ProfileType::NapSource, ..FR_DEF }),
7 => Some(FieldReference { name: Name::UpdateTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
_ => None,
}},
MesgNum::SKIN_TEMP_OVERNIGHT => { match field_num {
253 => Some(FieldReference { name: Name::Timestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::DateTime, ..FR_DEF }),
0 => Some(FieldReference { name: Name::LocalTimestamp, base_type: FitBaseType::UINT32, profile_type: ProfileType::LocalDateTime, ..FR_DEF }),
1 => Some(FieldReference { name: Name::AverageDeviation, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
2 => Some(FieldReference { name: Name::Average7DayDeviation, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
4 => Some(FieldReference { name: Name::NightlyValue, base_type: FitBaseType::FLOAT32, profile_type: ProfileType::Float32, ..FR_DEF }),
_ => None,
}},
_ => None
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Name {
AbsolutePressure,
AccelCalFactor,
AccelLateral,
AccelNormal,
AccelX,
AccelY,
AccelZ,
Accumulate,
AccumulatedPower,
ActiveCalories,
ActiveMet,
ActiveTime,
ActiveTime16,
ActiveTimeZone,
ActivityClass,
ActivityId,
ActivityIdString,
ActivityLevel,
ActivitySubtype,
ActivityTime,
ActivityTrackerEnabled,
ActivityType,
Age,
AirTimeRemaining,
AlarmType,
Altitude,
AnalogLayout,
AntDeviceNumber,
AntDeviceType,
AntEnabled,
AntNetwork,
AntTransmissionType,
AntplusDeviceType,
ApneaCountdownEnabled,
ApneaCountdownTime,
ApplicationId,
ApplicationVersion,
Array,
Ascent,
AscentRate,
AscentTime,
AttitudeStageComplete,
AutoActivityDetect,
AutoActivityDetectDuration,
AutoActivityDetectStartTimestamp,
AutoActivityUploadEnabled,
AutoPowerZero,
AutoSyncFrequency,
AutoWheelCal,
AutoWheelsize,
AutosyncMinSteps,
AutosyncMinTime,
Average7DayDeviation,
AverageDeviation,
AverageStressDuringSleep,
AvgAltitude,
AvgAscentRate,
AvgBallSpeed,
AvgCadence,
AvgCadencePosition,
AvgCombinedPedalSmoothness,
AvgCoreTemperature,
AvgDepth,
AvgDescentRate,
AvgFlow,
AvgFractionalCadence,
AvgGrade,
AvgGrit,
AvgHeartRate,
AvgLapTime,
AvgLeftPco,
AvgLeftPedalSmoothness,
AvgLeftPowerPhase,
AvgLeftPowerPhasePeak,
AvgLeftTorqueEffectiveness,
AvgLevMotorPower,
AvgNegGrade,
AvgNegVerticalSpeed,
AvgPosGrade,
AvgPosVerticalSpeed,
AvgPower,
AvgPowerPosition,
AvgPressureSac,
AvgRespirationRate,
AvgRightPco,
AvgRightPedalSmoothness,
AvgRightPowerPhase,
AvgRightPowerPhasePeak,
AvgRightTorqueEffectiveness,
AvgRmv,
AvgRunningCadence,
AvgSaturatedHemoglobinPercent,
AvgSpeed,
AvgSpo2,
AvgStanceTime,
AvgStanceTimeBalance,
AvgStanceTimePercent,
AvgStepLength,
AvgStress,
AvgStrokeCount,
AvgStrokeDistance,
AvgSwimmingCadence,
AvgTemperature,
AvgTotalHemoglobinConc,
AvgVam,
AvgVertSpeed,
AvgVerticalOscillation,
AvgVerticalRatio,
AvgVolumeSac,
AwakeTimeScore,
AwakeningsCount,
AwakeningsCountScore,
BacklightBrightness,
BacklightMode,
BacklightTimeout,
BallSpeed,
BaroCalFactor,
BaroPres,
BasalMet,
BaselineBalancedLower,
BaselineBalancedUpper,
BaselineLowUpper,
BatteryIdentifier,
BatteryLevel,
BatterySoc,
BatteryStatus,
BatteryVoltage,
BestLapIndex,
BikeCadAntId,
BikeCadAntIdTransType,
BikePowerAntId,
BikePowerAntIdTransType,
BikeSpdAntId,
BikeSpdAntIdTransType,
BikeSpdcadAntId,
BikeSpdcadAntIdTransType,
BikeWeight,
Bits,
BleAutoUploadEnabled,
BleDeviceType,
BluetoothEnabled,
BluetoothLeEnabled,
Bmi,
BoneMass,
BottomDepth,
BottomTime,
CadEnabled,
CadHighAlert,
CadLowAlert,
Cadence,
Cadence256,
CadenceZoneHighBoundary,
CalibratedAccelX,
CalibratedAccelY,
CalibratedAccelZ,
CalibratedData,
CalibratedGyroX,
CalibratedGyroY,
CalibratedGyroZ,
CalibratedMagX,
CalibratedMagY,
CalibratedMagZ,
CalibrationDivisor,
CalibrationFactor,
CalorieDurationAlert,
Calories,
CameraEventType,
CameraFileUuid,
CameraOrientation,
Capabilities,
Category,
CategorySubtype,
CcrHighSetpoint,
CcrHighSetpointDepth,
CcrHighSetpointSwitchMode,
CcrLowSetpoint,
CcrLowSetpointDepth,
CcrLowSetpointSwitchMode,
ChannelNumber,
Charged,
ClimbCategory,
ClimbNumber,
ClimbProEvent,
ClipEnd,
ClipNumber,
ClipStart,
ClockTime,
CnsLoad,
CombinedAwakeScore,
CombinedPedalSmoothness,
CommTimeout,
Completed,
Components,
CompressedAccumulatedPower,
CompressedCalibratedAccelX,
CompressedCalibratedAccelY,
CompressedCalibratedAccelZ,
CompressedSpeedDistance,
ConceptCount,
ConceptField,
ConceptIndex,
ConceptKey,
Condition,
Confidence,
ConnectivitySupported,
CoreTemperature,
Count,
CountType,
CourseDownloadEnabled,
CoursePointIndex,
CrankLength,
CumOperatingTime,
CurrentActivityTypeIntensity,
CurrentDayRestingHeartRate,
CurrentDist,
CurrentStress,
CustomTargetCadenceHigh,
CustomTargetCadenceLow,
CustomTargetHeartRateHigh,
CustomTargetHeartRateLow,
CustomTargetPowerHigh,
CustomTargetPowerLow,
CustomTargetSpeedHigh,
CustomTargetSpeedLow,
CustomTargetValueHigh,
CustomTargetValueLow,
CustomWheelsize,
CycleLength,
CycleLength16,
Cycles,
Cycles16,
CyclesToCalories,
CyclesToDistance,
Data,
Data16,
DataPage,
DataSize,
DataUnits,
DateMode,
DayOfWeek,
DeepSleepScore,
DefaultMaxBikingHeartRate,
DefaultMaxHeartRate,
DefaultMaxRunningHeartRate,
DefaultPage,
DefaultRaceLeader,
DeleteStatus,
Depth,
DepthSetting,
Descent,
DescentTime,
Descriptor,
DeveloperDataIndex,
DeveloperId,
DeviceId,
DeviceIndex,
DeviceNumber,
DeviceType,
DiastolicPressure,
DigitalLayout,
Directory,
DisplayOrientation,
DisplayType,
DistSetting,
Distance,
Distance16,
DistanceDurationAlert,
DiveAlert,
DiveCount,
DiveNumber,
DiveSounds,
DiveTypes,
Duration,
DurationCalories,
DurationDistance,
DurationHr,
DurationMin,
DurationPower,
DurationReps,
DurationStep,
DurationTime,
DurationType,
DurationValue,
EbikeAssistLevelPercent,
EbikeAssistMode,
EbikeBatteryLevel,
EbikeTravelRange,
ElapsedTime,
ElevSetting,
Empty,
Enabled,
EndCns,
EndDate,
EndN2,
EndPositionLat,
EndPositionLong,
EndPressure,
EndTime,
EndTimestamp,
EndTimestampMs,
EndTimezoneOffset,
EnergyTotal,
EnhancedAltitude,
EnhancedAvgAltitude,
EnhancedAvgRespirationRate,
EnhancedAvgSpeed,
EnhancedMaxAltitude,
EnhancedMaxRespirationRate,
EnhancedMaxSpeed,
EnhancedMinAltitude,
EnhancedMinRespirationRate,
EnhancedRespirationRate,
EnhancedSpeed,
Equipment,
Event,
EventGroup,
EventId,
EventTimestamp,
EventTimestamp12,
EventType,
ExerciseCategory,
ExerciseName,
ExerciseWeight,
ExpireTime,
FatCalories,
FaveroProduct,
Favorite,
Feedback,
FieldCount,
FieldDefinitionNumber,
FieldId,
FieldName,
FieldNum,
File,
FileUuid,
FilteredBpm,
FirstLapIndex,
FirstLengthIndex,
FirstStepIndex,
FitBaseTypeId,
FitBaseUnitId,
FitnessEquipmentState,
Flags,
Flow,
FractionalCadence,
FractionalSystemTimestamp,
FractionalTimestamp,
FrameNumber,
FriendlyName,
FrontGear,
FrontGearNum,
FrontGearShiftCount,
FunctionalThresholdPower,
Gap,
GarminProduct,
GasConsumptionDisplay,
GearChangeData,
Gender,
GfHigh,
GfLow,
GlobalId,
GpsAccuracy,
GpsEphemerisDownloadEnabled,
Grade,
GrainWeight,
Grit,
GroupPrimaryKey,
GrouptrackEnabled,
GyroCalFactor,
GyroX,
GyroY,
GyroZ,
HangTime,
HardwareVersion,
Heading,
HeartRate,
HeartRateAntplusDeviceType,
HeartRateLocalDeviceType,
HeartRateSource,
HeartRateSourceType,
HeartRateType,
Height,
HeightSetting,
HeliumContent,
HighBpm,
HighTemperature,
HighValue,
HostingProvider,
HrCalcType,
HrHighAlert,
HrLowAlert,
HrSetting,
HrSource,
HrZoneHighBoundary,
HrmAntId,
HrmAntIdTransType,
Id,
IncidentDetectionEnabled,
Instance,
Intensity,
IntensityFactor,
InterruptionsScore,
IsDeleted,
IsSigned,
IssueTime,
JumpCount,
LactateThresholdAutodetectEnabled,
Language,
Languages,
LapTrigger,
LastNight5MinHigh,
LastNightAverage,
LastStopMultiple,
Layout,
LeaderActivityId,
LeaderActivityIdString,
LeaderGroupPrimaryKey,
LeaderTime,
LeaderType,
LeftPco,
LeftPedalSmoothness,
LeftPowerPhase,
LeftPowerPhasePeak,
LeftRightBalance,
LeftTorqueEffectiveness,
LengthType,
LevBatteryConsumption,
Level,
LevelShift,
LightSleepScore,
LiveTrackingEnabled,
LocalDeviceType,
LocalId,
LocalTimestamp,
Location,
LogHrv,
LowTemperature,
MagX,
MagY,
MagZ,
Manufacturer,
ManufacturerId,
Map3SampleMean,
MapEveningValues,
MapMorningValues,
MaxAltitude,
MaxAscentRate,
MaxBallSpeed,
MaxCadence,
MaxCadencePosition,
MaxCoreTemperature,
MaxCount,
MaxDepth,
MaxDescentRate,
MaxFractionalCadence,
MaxHeartRate,
MaxLevMotorPower,
MaxMetCategory,
MaxNegGrade,
MaxNegVerticalSpeed,
MaxPerFile,
MaxPerFileType,
MaxPosGrade,
MaxPosVerticalSpeed,
MaxPower,
MaxPowerPosition,
MaxRespirationRate,
MaxRunningCadence,
MaxSaturatedHemoglobinPercent,
MaxSize,
MaxSpeed,
MaxTemperature,
MaxTotalHemoglobinConc,
MeanArterialPressure,
Memo,
MesgData,
MesgId,
MesgNum,
MessageCount,
MessageIndex,
MetabolicAge,
MetabolicCalories,
MinAltitude,
MinCoreTemperature,
MinHeartRate,
MinRespirationRate,
MinSaturatedHemoglobinPercent,
MinSpeed,
MinTemperature,
MinTotalHemoglobinConc,
Mode,
Model,
ModerateActivityMinutes,
MotorPower,
MountingSide,
MoveAlertEnabled,
MuscleMass,
N2Load,
Name,
NativeFieldNum,
NativeMesgNum,
NdlTime,
NecLat,
NecLong,
NextStopDepth,
NextStopTime,
NightlyValue,
NoFlyTimeMode,
NormalizedPower,
Notes,
NumActiveLengths,
NumLaps,
NumLengths,
NumPerFile,
NumSessions,
NumSplits,
NumValidSteps,
Number,
NumberOfScreens,
O2Toxicity,
ObservedAtTime,
ObservedLocationLat,
ObservedLocationLong,
Odometer,
OdometerRollover,
Offset,
OffsetCal,
OpponentName,
OpponentScore,
OrientationMatrix,
OverallSleepScore,
OxygenContent,
PagesEnabled,
ParentIndex,
PartIndex,
PartNumber,
PercentFat,
PercentHydration,
PhysiqueRating,
Pid,
PidDataSize,
Pitch,
PlayerScore,
Po2,
Po2Critical,
Po2Deco,
Po2Warn,
PoolLength,
PoolLengthUnit,
PopupEnabled,
PositionLat,
PositionLong,
PositionSetting,
Power,
PowerCalFactor,
PowerEnabled,
PowerHighAlert,
PowerLowAlert,
PowerSetting,
PowerZoneHighBoundary,
PrecipitationProbability,
PreciseTargetSpeed,
Pressure,
PressureSac,
ProcessingInterval,
Product,
ProductName,
ProjectileType,
PwrCalcType,
Qualifier,
Quality,
RadarThreatAlert,
RadarThreatAvgApproachSpeed,
RadarThreatCount,
RadarThreatLevelMax,
RadarThreatMaxApproachSpeed,
RawData,
ReadingConfidence,
ReadingSpo2,
RearGear,
RearGearNum,
RearGearShiftCount,
Recurrence,
RecurrenceValue,
ReferenceIndex,
ReferenceMesg,
RelativeHumidity,
RemSleepScore,
Repeat,
RepeatCalories,
RepeatDistance,
RepeatDiveInterval,
RepeatHr,
RepeatPower,
RepeatSteps,
RepeatTime,
Repeating,
RepetitionNum,
Repetitions,
ReportId,
Resistance,
RespirationRate,
RestingHeartRate,
RestingMetabolicRate,
RiderPosition,
RightPco,
RightPedalSmoothness,
RightPowerPhase,
RightPowerPhasePeak,
RightTorqueEffectiveness,
RmssdHrv,
Rmv,
Roll,
Rotations,
SafetyStopEnabled,
SafetyStopTime,
SampleTimeOffset,
SamplingInterval,
SaturatedHemoglobinPercent,
SaturatedHemoglobinPercentMax,
SaturatedHemoglobinPercentMin,
Scale,
Scaling,
ScheduledTime,
Score,
ScreenEnabled,
ScreenIndex,
SdmAntId,
SdmAntIdTransType,
SdmCalFactor,
SdrrHrv,
SecondaryCustomTargetCadenceHigh,
SecondaryCustomTargetCadenceLow,
SecondaryCustomTargetHeartRateHigh,
SecondaryCustomTargetHeartRateLow,
SecondaryCustomTargetPowerHigh,
SecondaryCustomTargetPowerLow,
SecondaryCustomTargetSpeedHigh,
SecondaryCustomTargetSpeedLow,
SecondaryCustomTargetValueHigh,
SecondaryCustomTargetValueLow,
SecondaryTargetCadenceZone,
SecondaryTargetHrZone,
SecondaryTargetPowerZone,
SecondaryTargetSpeedZone,
SecondaryTargetStrokeType,
SecondaryTargetType,
SecondaryTargetValue,
SegmentTime,
SelectionType,
Sensor,
SensorPosition,
SensorType,
Sentence,
SerialNumber,
Sessions,
SetType,
Severity,
ShimanoDi2Enabled,
ShotCount,
ShotNum,
ShotSpeed,
SleepDurationScore,
SleepLevel,
SleepQualityScore,
SleepRecoveryScore,
SleepRestlessnessScore,
SleepTime,
SmartNotificationDisplayOrientation,
SoftwareVersion,
Sound,
Source,
SourceType,
SpdEnabled,
SpdcadEnabled,
Speed,
Speed1S,
SpeedHighAlert,
SpeedLowAlert,
SpeedSetting,
SpeedSource,
SpeedZoneHighBoundary,
SplitType,
Sport,
SportEvent,
SportIndex,
SportPoint,
SportProfileName,
Sports,
Stage,
StanceTime,
StanceTimeBalance,
StanceTimePercent,
StandCount,
StandardDeviation,
StartCns,
StartDate,
StartElevation,
StartN2,
StartPositionLat,
StartPositionLong,
StartPressure,
StartTime,
StartTimestamp,
StartTimestampMs,
StartTimezoneOffset,
Status,
StepLength,
Steps,
StressLevel,
StressLevelTime,
StressLevelValue,
StrokeCount,
StrokeType,
Strokes,
SubSport,
SurfaceInterval,
SwcLat,
SwcLong,
SwimStroke,
SystemTime,
SystemTimestamp,
SystemTimestampMs,
SystolicPressure,
TapInterface,
TapSensitivity,
TargetCadenceZone,
TargetDistance,
TargetHrZone,
TargetPowerZone,
TargetSpeed,
TargetSpeedZone,
TargetStrokeType,
TargetTime,
TargetType,
TargetValue,
Temperature,
TemperatureFeelsLike,
TemperatureMax,
TemperatureMin,
TemperatureSetting,
Text,
ThresholdHeartRate,
ThresholdPower,
Time,
Time128,
Time256,
TimeAboveThreshold,
TimeCreated,
TimeDurationAlert,
TimeFromCourse,
TimeInCadenceZone,
TimeInHrZone,
TimeInPowerZone,
TimeInSpeedZone,
TimeMode,
TimeOffset,
TimeStanding,
TimeToSurface,
TimeZoneOffset,
TimerTime,
TimerTrigger,
Timestamp,
Timestamp16,
Timestamp32K,
TimestampMin8,
TimestampMs,
Title,
TotalAnaerobicTrainingEffect,
TotalAscent,
TotalCalories,
TotalCycles,
TotalDescent,
TotalDistance,
TotalElapsedTime,
TotalFatCalories,
TotalFlow,
TotalFractionalAscent,
TotalFractionalCycles,
TotalFractionalDescent,
TotalGrit,
TotalHemoglobinConc,
TotalHemoglobinConcMax,
TotalHemoglobinConcMin,
TotalMovingTime,
TotalStrides,
TotalStrokes,
TotalTimerTime,
TotalTrainingEffect,
TotalWork,
Track,
TrainingLoadPeak,
TrainingStressScore,
TransmissionType,
TravelGas,
Trigger,
TriggerOnAscent,
TriggerOnDescent,
TurnRate,
Type,
Uncharged,
Units,
UpKeyEnabled,
UpdateTime,
UpdateTimestamp,
Url,
UserProfileIndex,
UserProfilePrimaryKey,
UserRunningStepLength,
UserWalkingStepLength,
UtcOffset,
UtcTimestamp,
Uuid,
Validity,
Value,
Velocity,
Version,
VerticalOscillation,
VerticalRatio,
VerticalSpeed,
VigorousActivityMinutes,
VirtualPartnerSpeed,
VisceralFatMass,
VisceralFatRating,
Vo2Max,
VolumeSac,
VolumeUsed,
WakeTime,
WaterDensity,
WaterType,
WeatherAlertsEnabled,
WeatherConditionsEnabled,
WeatherReport,
WeeklyAverage,
Weight,
WeightDisplayUnit,
WeightSetting,
WindDirection,
WindSpeed,
WktDescription,
WktName,
WktStepIndex,
WktStepName,
WorkoutDownloadEnabled,
WorkoutFeel,
WorkoutRpe,
WorkoutsSupported,
ZeroCrossCnt,
Zone,
ZoneCount,
}
impl Name {
pub fn as_str(self) -> &'static str {
match self {
Self::AbsolutePressure => "absolute_pressure",
Self::AccelCalFactor => "accel_cal_factor",
Self::AccelLateral => "accel_lateral",
Self::AccelNormal => "accel_normal",
Self::AccelX => "accel_x",
Self::AccelY => "accel_y",
Self::AccelZ => "accel_z",
Self::Accumulate => "accumulate",
Self::AccumulatedPower => "accumulated_power",
Self::ActiveCalories => "active_calories",
Self::ActiveMet => "active_met",
Self::ActiveTime => "active_time",
Self::ActiveTime16 => "active_time_16",
Self::ActiveTimeZone => "active_time_zone",
Self::ActivityClass => "activity_class",
Self::ActivityId => "activity_id",
Self::ActivityIdString => "activity_id_string",
Self::ActivityLevel => "activity_level",
Self::ActivitySubtype => "activity_subtype",
Self::ActivityTime => "activity_time",
Self::ActivityTrackerEnabled => "activity_tracker_enabled",
Self::ActivityType => "activity_type",
Self::Age => "age",
Self::AirTimeRemaining => "air_time_remaining",
Self::AlarmType => "alarm_type",
Self::Altitude => "altitude",
Self::AnalogLayout => "analog_layout",
Self::AntDeviceNumber => "ant_device_number",
Self::AntDeviceType => "ant_device_type",
Self::AntEnabled => "ant_enabled",
Self::AntNetwork => "ant_network",
Self::AntTransmissionType => "ant_transmission_type",
Self::AntplusDeviceType => "antplus_device_type",
Self::ApneaCountdownEnabled => "apnea_countdown_enabled",
Self::ApneaCountdownTime => "apnea_countdown_time",
Self::ApplicationId => "application_id",
Self::ApplicationVersion => "application_version",
Self::Array => "array",
Self::Ascent => "ascent",
Self::AscentRate => "ascent_rate",
Self::AscentTime => "ascent_time",
Self::AttitudeStageComplete => "attitude_stage_complete",
Self::AutoActivityDetect => "auto_activity_detect",
Self::AutoActivityDetectDuration => "auto_activity_detect_duration",
Self::AutoActivityDetectStartTimestamp => "auto_activity_detect_start_timestamp",
Self::AutoActivityUploadEnabled => "auto_activity_upload_enabled",
Self::AutoPowerZero => "auto_power_zero",
Self::AutoSyncFrequency => "auto_sync_frequency",
Self::AutoWheelCal => "auto_wheel_cal",
Self::AutoWheelsize => "auto_wheelsize",
Self::AutosyncMinSteps => "autosync_min_steps",
Self::AutosyncMinTime => "autosync_min_time",
Self::Average7DayDeviation => "average_7_day_deviation",
Self::AverageDeviation => "average_deviation",
Self::AverageStressDuringSleep => "average_stress_during_sleep",
Self::AvgAltitude => "avg_altitude",
Self::AvgAscentRate => "avg_ascent_rate",
Self::AvgBallSpeed => "avg_ball_speed",
Self::AvgCadence => "avg_cadence",
Self::AvgCadencePosition => "avg_cadence_position",
Self::AvgCombinedPedalSmoothness => "avg_combined_pedal_smoothness",
Self::AvgCoreTemperature => "avg_core_temperature",
Self::AvgDepth => "avg_depth",
Self::AvgDescentRate => "avg_descent_rate",
Self::AvgFlow => "avg_flow",
Self::AvgFractionalCadence => "avg_fractional_cadence",
Self::AvgGrade => "avg_grade",
Self::AvgGrit => "avg_grit",
Self::AvgHeartRate => "avg_heart_rate",
Self::AvgLapTime => "avg_lap_time",
Self::AvgLeftPco => "avg_left_pco",
Self::AvgLeftPedalSmoothness => "avg_left_pedal_smoothness",
Self::AvgLeftPowerPhase => "avg_left_power_phase",
Self::AvgLeftPowerPhasePeak => "avg_left_power_phase_peak",
Self::AvgLeftTorqueEffectiveness => "avg_left_torque_effectiveness",
Self::AvgLevMotorPower => "avg_lev_motor_power",
Self::AvgNegGrade => "avg_neg_grade",
Self::AvgNegVerticalSpeed => "avg_neg_vertical_speed",
Self::AvgPosGrade => "avg_pos_grade",
Self::AvgPosVerticalSpeed => "avg_pos_vertical_speed",
Self::AvgPower => "avg_power",
Self::AvgPowerPosition => "avg_power_position",
Self::AvgPressureSac => "avg_pressure_sac",
Self::AvgRespirationRate => "avg_respiration_rate",
Self::AvgRightPco => "avg_right_pco",
Self::AvgRightPedalSmoothness => "avg_right_pedal_smoothness",
Self::AvgRightPowerPhase => "avg_right_power_phase",
Self::AvgRightPowerPhasePeak => "avg_right_power_phase_peak",
Self::AvgRightTorqueEffectiveness => "avg_right_torque_effectiveness",
Self::AvgRmv => "avg_rmv",
Self::AvgRunningCadence => "avg_running_cadence",
Self::AvgSaturatedHemoglobinPercent => "avg_saturated_hemoglobin_percent",
Self::AvgSpeed => "avg_speed",
Self::AvgSpo2 => "avg_spo2",
Self::AvgStanceTime => "avg_stance_time",
Self::AvgStanceTimeBalance => "avg_stance_time_balance",
Self::AvgStanceTimePercent => "avg_stance_time_percent",
Self::AvgStepLength => "avg_step_length",
Self::AvgStress => "avg_stress",
Self::AvgStrokeCount => "avg_stroke_count",
Self::AvgStrokeDistance => "avg_stroke_distance",
Self::AvgSwimmingCadence => "avg_swimming_cadence",
Self::AvgTemperature => "avg_temperature",
Self::AvgTotalHemoglobinConc => "avg_total_hemoglobin_conc",
Self::AvgVam => "avg_vam",
Self::AvgVertSpeed => "avg_vert_speed",
Self::AvgVerticalOscillation => "avg_vertical_oscillation",
Self::AvgVerticalRatio => "avg_vertical_ratio",
Self::AvgVolumeSac => "avg_volume_sac",
Self::AwakeTimeScore => "awake_time_score",
Self::AwakeningsCount => "awakenings_count",
Self::AwakeningsCountScore => "awakenings_count_score",
Self::BacklightBrightness => "backlight_brightness",
Self::BacklightMode => "backlight_mode",
Self::BacklightTimeout => "backlight_timeout",
Self::BallSpeed => "ball_speed",
Self::BaroCalFactor => "baro_cal_factor",
Self::BaroPres => "baro_pres",
Self::BasalMet => "basal_met",
Self::BaselineBalancedLower => "baseline_balanced_lower",
Self::BaselineBalancedUpper => "baseline_balanced_upper",
Self::BaselineLowUpper => "baseline_low_upper",
Self::BatteryIdentifier => "battery_identifier",
Self::BatteryLevel => "battery_level",
Self::BatterySoc => "battery_soc",
Self::BatteryStatus => "battery_status",
Self::BatteryVoltage => "battery_voltage",
Self::BestLapIndex => "best_lap_index",
Self::BikeCadAntId => "bike_cad_ant_id",
Self::BikeCadAntIdTransType => "bike_cad_ant_id_trans_type",
Self::BikePowerAntId => "bike_power_ant_id",
Self::BikePowerAntIdTransType => "bike_power_ant_id_trans_type",
Self::BikeSpdAntId => "bike_spd_ant_id",
Self::BikeSpdAntIdTransType => "bike_spd_ant_id_trans_type",
Self::BikeSpdcadAntId => "bike_spdcad_ant_id",
Self::BikeSpdcadAntIdTransType => "bike_spdcad_ant_id_trans_type",
Self::BikeWeight => "bike_weight",
Self::Bits => "bits",
Self::BleAutoUploadEnabled => "ble_auto_upload_enabled",
Self::BleDeviceType => "ble_device_type",
Self::BluetoothEnabled => "bluetooth_enabled",
Self::BluetoothLeEnabled => "bluetooth_le_enabled",
Self::Bmi => "bmi",
Self::BoneMass => "bone_mass",
Self::BottomDepth => "bottom_depth",
Self::BottomTime => "bottom_time",
Self::CadEnabled => "cad_enabled",
Self::CadHighAlert => "cad_high_alert",
Self::CadLowAlert => "cad_low_alert",
Self::Cadence => "cadence",
Self::Cadence256 => "cadence256",
Self::CadenceZoneHighBoundary => "cadence_zone_high_boundary",
Self::CalibratedAccelX => "calibrated_accel_x",
Self::CalibratedAccelY => "calibrated_accel_y",
Self::CalibratedAccelZ => "calibrated_accel_z",
Self::CalibratedData => "calibrated_data",
Self::CalibratedGyroX => "calibrated_gyro_x",
Self::CalibratedGyroY => "calibrated_gyro_y",
Self::CalibratedGyroZ => "calibrated_gyro_z",
Self::CalibratedMagX => "calibrated_mag_x",
Self::CalibratedMagY => "calibrated_mag_y",
Self::CalibratedMagZ => "calibrated_mag_z",
Self::CalibrationDivisor => "calibration_divisor",
Self::CalibrationFactor => "calibration_factor",
Self::CalorieDurationAlert => "calorie_duration_alert",
Self::Calories => "calories",
Self::CameraEventType => "camera_event_type",
Self::CameraFileUuid => "camera_file_uuid",
Self::CameraOrientation => "camera_orientation",
Self::Capabilities => "capabilities",
Self::Category => "category",
Self::CategorySubtype => "category_subtype",
Self::CcrHighSetpoint => "ccr_high_setpoint",
Self::CcrHighSetpointDepth => "ccr_high_setpoint_depth",
Self::CcrHighSetpointSwitchMode => "ccr_high_setpoint_switch_mode",
Self::CcrLowSetpoint => "ccr_low_setpoint",
Self::CcrLowSetpointDepth => "ccr_low_setpoint_depth",
Self::CcrLowSetpointSwitchMode => "ccr_low_setpoint_switch_mode",
Self::ChannelNumber => "channel_number",
Self::Charged => "charged",
Self::ClimbCategory => "climb_category",
Self::ClimbNumber => "climb_number",
Self::ClimbProEvent => "climb_pro_event",
Self::ClipEnd => "clip_end",
Self::ClipNumber => "clip_number",
Self::ClipStart => "clip_start",
Self::ClockTime => "clock_time",
Self::CnsLoad => "cns_load",
Self::CombinedAwakeScore => "combined_awake_score",
Self::CombinedPedalSmoothness => "combined_pedal_smoothness",
Self::CommTimeout => "comm_timeout",
Self::Completed => "completed",
Self::Components => "components",
Self::CompressedAccumulatedPower => "compressed_accumulated_power",
Self::CompressedCalibratedAccelX => "compressed_calibrated_accel_x",
Self::CompressedCalibratedAccelY => "compressed_calibrated_accel_y",
Self::CompressedCalibratedAccelZ => "compressed_calibrated_accel_z",
Self::CompressedSpeedDistance => "compressed_speed_distance",
Self::ConceptCount => "concept_count",
Self::ConceptField => "concept_field",
Self::ConceptIndex => "concept_index",
Self::ConceptKey => "concept_key",
Self::Condition => "condition",
Self::Confidence => "confidence",
Self::ConnectivitySupported => "connectivity_supported",
Self::CoreTemperature => "core_temperature",
Self::Count => "count",
Self::CountType => "count_type",
Self::CourseDownloadEnabled => "course_download_enabled",
Self::CoursePointIndex => "course_point_index",
Self::CrankLength => "crank_length",
Self::CumOperatingTime => "cum_operating_time",
Self::CurrentActivityTypeIntensity => "current_activity_type_intensity",
Self::CurrentDayRestingHeartRate => "current_day_resting_heart_rate",
Self::CurrentDist => "current_dist",
Self::CurrentStress => "current_stress",
Self::CustomTargetCadenceHigh => "custom_target_cadence_high",
Self::CustomTargetCadenceLow => "custom_target_cadence_low",
Self::CustomTargetHeartRateHigh => "custom_target_heart_rate_high",
Self::CustomTargetHeartRateLow => "custom_target_heart_rate_low",
Self::CustomTargetPowerHigh => "custom_target_power_high",
Self::CustomTargetPowerLow => "custom_target_power_low",
Self::CustomTargetSpeedHigh => "custom_target_speed_high",
Self::CustomTargetSpeedLow => "custom_target_speed_low",
Self::CustomTargetValueHigh => "custom_target_value_high",
Self::CustomTargetValueLow => "custom_target_value_low",
Self::CustomWheelsize => "custom_wheelsize",
Self::CycleLength => "cycle_length",
Self::CycleLength16 => "cycle_length16",
Self::Cycles => "cycles",
Self::Cycles16 => "cycles_16",
Self::CyclesToCalories => "cycles_to_calories",
Self::CyclesToDistance => "cycles_to_distance",
Self::Data => "data",
Self::Data16 => "data16",
Self::DataPage => "data_page",
Self::DataSize => "data_size",
Self::DataUnits => "data_units",
Self::DateMode => "date_mode",
Self::DayOfWeek => "day_of_week",
Self::DeepSleepScore => "deep_sleep_score",
Self::DefaultMaxBikingHeartRate => "default_max_biking_heart_rate",
Self::DefaultMaxHeartRate => "default_max_heart_rate",
Self::DefaultMaxRunningHeartRate => "default_max_running_heart_rate",
Self::DefaultPage => "default_page",
Self::DefaultRaceLeader => "default_race_leader",
Self::DeleteStatus => "delete_status",
Self::Depth => "depth",
Self::DepthSetting => "depth_setting",
Self::Descent => "descent",
Self::DescentTime => "descent_time",
Self::Descriptor => "descriptor",
Self::DeveloperDataIndex => "developer_data_index",
Self::DeveloperId => "developer_id",
Self::DeviceId => "device_id",
Self::DeviceIndex => "device_index",
Self::DeviceNumber => "device_number",
Self::DeviceType => "device_type",
Self::DiastolicPressure => "diastolic_pressure",
Self::DigitalLayout => "digital_layout",
Self::Directory => "directory",
Self::DisplayOrientation => "display_orientation",
Self::DisplayType => "display_type",
Self::DistSetting => "dist_setting",
Self::Distance => "distance",
Self::Distance16 => "distance_16",
Self::DistanceDurationAlert => "distance_duration_alert",
Self::DiveAlert => "dive_alert",
Self::DiveCount => "dive_count",
Self::DiveNumber => "dive_number",
Self::DiveSounds => "dive_sounds",
Self::DiveTypes => "dive_types",
Self::Duration => "duration",
Self::DurationCalories => "duration_calories",
Self::DurationDistance => "duration_distance",
Self::DurationHr => "duration_hr",
Self::DurationMin => "duration_min",
Self::DurationPower => "duration_power",
Self::DurationReps => "duration_reps",
Self::DurationStep => "duration_step",
Self::DurationTime => "duration_time",
Self::DurationType => "duration_type",
Self::DurationValue => "duration_value",
Self::EbikeAssistLevelPercent => "ebike_assist_level_percent",
Self::EbikeAssistMode => "ebike_assist_mode",
Self::EbikeBatteryLevel => "ebike_battery_level",
Self::EbikeTravelRange => "ebike_travel_range",
Self::ElapsedTime => "elapsed_time",
Self::ElevSetting => "elev_setting",
Self::Empty => "",
Self::Enabled => "enabled",
Self::EndCns => "end_cns",
Self::EndDate => "end_date",
Self::EndN2 => "end_n2",
Self::EndPositionLat => "end_position_lat",
Self::EndPositionLong => "end_position_long",
Self::EndPressure => "end_pressure",
Self::EndTime => "end_time",
Self::EndTimestamp => "end_timestamp",
Self::EndTimestampMs => "end_timestamp_ms",
Self::EndTimezoneOffset => "end_timezone_offset",
Self::EnergyTotal => "energy_total",
Self::EnhancedAltitude => "enhanced_altitude",
Self::EnhancedAvgAltitude => "enhanced_avg_altitude",
Self::EnhancedAvgRespirationRate => "enhanced_avg_respiration_rate",
Self::EnhancedAvgSpeed => "enhanced_avg_speed",
Self::EnhancedMaxAltitude => "enhanced_max_altitude",
Self::EnhancedMaxRespirationRate => "enhanced_max_respiration_rate",
Self::EnhancedMaxSpeed => "enhanced_max_speed",
Self::EnhancedMinAltitude => "enhanced_min_altitude",
Self::EnhancedMinRespirationRate => "enhanced_min_respiration_rate",
Self::EnhancedRespirationRate => "enhanced_respiration_rate",
Self::EnhancedSpeed => "enhanced_speed",
Self::Equipment => "equipment",
Self::Event => "event",
Self::EventGroup => "event_group",
Self::EventId => "event_id",
Self::EventTimestamp => "event_timestamp",
Self::EventTimestamp12 => "event_timestamp_12",
Self::EventType => "event_type",
Self::ExerciseCategory => "exercise_category",
Self::ExerciseName => "exercise_name",
Self::ExerciseWeight => "exercise_weight",
Self::ExpireTime => "expire_time",
Self::FatCalories => "fat_calories",
Self::FaveroProduct => "favero_product",
Self::Favorite => "favorite",
Self::Feedback => "feedback",
Self::FieldCount => "field_count",
Self::FieldDefinitionNumber => "field_definition_number",
Self::FieldId => "field_id",
Self::FieldName => "field_name",
Self::FieldNum => "field_num",
Self::File => "file",
Self::FileUuid => "file_uuid",
Self::FilteredBpm => "filtered_bpm",
Self::FirstLapIndex => "first_lap_index",
Self::FirstLengthIndex => "first_length_index",
Self::FirstStepIndex => "first_step_index",
Self::FitBaseTypeId => "fit_base_type_id",
Self::FitBaseUnitId => "fit_base_unit_id",
Self::FitnessEquipmentState => "fitness_equipment_state",
Self::Flags => "flags",
Self::Flow => "flow",
Self::FractionalCadence => "fractional_cadence",
Self::FractionalSystemTimestamp => "fractional_system_timestamp",
Self::FractionalTimestamp => "fractional_timestamp",
Self::FrameNumber => "frame_number",
Self::FriendlyName => "friendly_name",
Self::FrontGear => "front_gear",
Self::FrontGearNum => "front_gear_num",
Self::FrontGearShiftCount => "front_gear_shift_count",
Self::FunctionalThresholdPower => "functional_threshold_power",
Self::Gap => "gap",
Self::GarminProduct => "garmin_product",
Self::GasConsumptionDisplay => "gas_consumption_display",
Self::GearChangeData => "gear_change_data",
Self::Gender => "gender",
Self::GfHigh => "gf_high",
Self::GfLow => "gf_low",
Self::GlobalId => "global_id",
Self::GpsAccuracy => "gps_accuracy",
Self::GpsEphemerisDownloadEnabled => "gps_ephemeris_download_enabled",
Self::Grade => "grade",
Self::GrainWeight => "grain_weight",
Self::Grit => "grit",
Self::GroupPrimaryKey => "group_primary_key",
Self::GrouptrackEnabled => "grouptrack_enabled",
Self::GyroCalFactor => "gyro_cal_factor",
Self::GyroX => "gyro_x",
Self::GyroY => "gyro_y",
Self::GyroZ => "gyro_z",
Self::HangTime => "hang_time",
Self::HardwareVersion => "hardware_version",
Self::Heading => "heading",
Self::HeartRate => "heart_rate",
Self::HeartRateAntplusDeviceType => "heart_rate_antplus_device_type",
Self::HeartRateLocalDeviceType => "heart_rate_local_device_type",
Self::HeartRateSource => "heart_rate_source",
Self::HeartRateSourceType => "heart_rate_source_type",
Self::HeartRateType => "heart_rate_type",
Self::Height => "height",
Self::HeightSetting => "height_setting",
Self::HeliumContent => "helium_content",
Self::HighBpm => "high_bpm",
Self::HighTemperature => "high_temperature",
Self::HighValue => "high_value",
Self::HostingProvider => "hosting_provider",
Self::HrCalcType => "hr_calc_type",
Self::HrHighAlert => "hr_high_alert",
Self::HrLowAlert => "hr_low_alert",
Self::HrSetting => "hr_setting",
Self::HrSource => "hr_source",
Self::HrZoneHighBoundary => "hr_zone_high_boundary",
Self::HrmAntId => "hrm_ant_id",
Self::HrmAntIdTransType => "hrm_ant_id_trans_type",
Self::Id => "id",
Self::IncidentDetectionEnabled => "incident_detection_enabled",
Self::Instance => "instance",
Self::Intensity => "intensity",
Self::IntensityFactor => "intensity_factor",
Self::InterruptionsScore => "interruptions_score",
Self::IsDeleted => "is_deleted",
Self::IsSigned => "is_signed",
Self::IssueTime => "issue_time",
Self::JumpCount => "jump_count",
Self::LactateThresholdAutodetectEnabled => "lactate_threshold_autodetect_enabled",
Self::Language => "language",
Self::Languages => "languages",
Self::LapTrigger => "lap_trigger",
Self::LastNight5MinHigh => "last_night_5_min_high",
Self::LastNightAverage => "last_night_average",
Self::LastStopMultiple => "last_stop_multiple",
Self::Layout => "layout",
Self::LeaderActivityId => "leader_activity_id",
Self::LeaderActivityIdString => "leader_activity_id_string",
Self::LeaderGroupPrimaryKey => "leader_group_primary_key",
Self::LeaderTime => "leader_time",
Self::LeaderType => "leader_type",
Self::LeftPco => "left_pco",
Self::LeftPedalSmoothness => "left_pedal_smoothness",
Self::LeftPowerPhase => "left_power_phase",
Self::LeftPowerPhasePeak => "left_power_phase_peak",
Self::LeftRightBalance => "left_right_balance",
Self::LeftTorqueEffectiveness => "left_torque_effectiveness",
Self::LengthType => "length_type",
Self::LevBatteryConsumption => "lev_battery_consumption",
Self::Level => "level",
Self::LevelShift => "level_shift",
Self::LightSleepScore => "light_sleep_score",
Self::LiveTrackingEnabled => "live_tracking_enabled",
Self::LocalDeviceType => "local_device_type",
Self::LocalId => "local_id",
Self::LocalTimestamp => "local_timestamp",
Self::Location => "location",
Self::LogHrv => "log_hrv",
Self::LowTemperature => "low_temperature",
Self::MagX => "mag_x",
Self::MagY => "mag_y",
Self::MagZ => "mag_z",
Self::Manufacturer => "manufacturer",
Self::ManufacturerId => "manufacturer_id",
Self::Map3SampleMean => "map_3_sample_mean",
Self::MapEveningValues => "map_evening_values",
Self::MapMorningValues => "map_morning_values",
Self::MaxAltitude => "max_altitude",
Self::MaxAscentRate => "max_ascent_rate",
Self::MaxBallSpeed => "max_ball_speed",
Self::MaxCadence => "max_cadence",
Self::MaxCadencePosition => "max_cadence_position",
Self::MaxCoreTemperature => "max_core_temperature",
Self::MaxCount => "max_count",
Self::MaxDepth => "max_depth",
Self::MaxDescentRate => "max_descent_rate",
Self::MaxFractionalCadence => "max_fractional_cadence",
Self::MaxHeartRate => "max_heart_rate",
Self::MaxLevMotorPower => "max_lev_motor_power",
Self::MaxMetCategory => "max_met_category",
Self::MaxNegGrade => "max_neg_grade",
Self::MaxNegVerticalSpeed => "max_neg_vertical_speed",
Self::MaxPerFile => "max_per_file",
Self::MaxPerFileType => "max_per_file_type",
Self::MaxPosGrade => "max_pos_grade",
Self::MaxPosVerticalSpeed => "max_pos_vertical_speed",
Self::MaxPower => "max_power",
Self::MaxPowerPosition => "max_power_position",
Self::MaxRespirationRate => "max_respiration_rate",
Self::MaxRunningCadence => "max_running_cadence",
Self::MaxSaturatedHemoglobinPercent => "max_saturated_hemoglobin_percent",
Self::MaxSize => "max_size",
Self::MaxSpeed => "max_speed",
Self::MaxTemperature => "max_temperature",
Self::MaxTotalHemoglobinConc => "max_total_hemoglobin_conc",
Self::MeanArterialPressure => "mean_arterial_pressure",
Self::Memo => "memo",
Self::MesgData => "mesg_data",
Self::MesgId => "mesg_id",
Self::MesgNum => "mesg_num",
Self::MessageCount => "message_count",
Self::MessageIndex => "message_index",
Self::MetabolicAge => "metabolic_age",
Self::MetabolicCalories => "metabolic_calories",
Self::MinAltitude => "min_altitude",
Self::MinCoreTemperature => "min_core_temperature",
Self::MinHeartRate => "min_heart_rate",
Self::MinRespirationRate => "min_respiration_rate",
Self::MinSaturatedHemoglobinPercent => "min_saturated_hemoglobin_percent",
Self::MinSpeed => "min_speed",
Self::MinTemperature => "min_temperature",
Self::MinTotalHemoglobinConc => "min_total_hemoglobin_conc",
Self::Mode => "mode",
Self::Model => "model",
Self::ModerateActivityMinutes => "moderate_activity_minutes",
Self::MotorPower => "motor_power",
Self::MountingSide => "mounting_side",
Self::MoveAlertEnabled => "move_alert_enabled",
Self::MuscleMass => "muscle_mass",
Self::N2Load => "n2_load",
Self::Name => "name",
Self::NativeFieldNum => "native_field_num",
Self::NativeMesgNum => "native_mesg_num",
Self::NdlTime => "ndl_time",
Self::NecLat => "nec_lat",
Self::NecLong => "nec_long",
Self::NextStopDepth => "next_stop_depth",
Self::NextStopTime => "next_stop_time",
Self::NightlyValue => "nightly_value",
Self::NoFlyTimeMode => "no_fly_time_mode",
Self::NormalizedPower => "normalized_power",
Self::Notes => "notes",
Self::NumActiveLengths => "num_active_lengths",
Self::NumLaps => "num_laps",
Self::NumLengths => "num_lengths",
Self::NumPerFile => "num_per_file",
Self::NumSessions => "num_sessions",
Self::NumSplits => "num_splits",
Self::NumValidSteps => "num_valid_steps",
Self::Number => "number",
Self::NumberOfScreens => "number_of_screens",
Self::O2Toxicity => "o2_toxicity",
Self::ObservedAtTime => "observed_at_time",
Self::ObservedLocationLat => "observed_location_lat",
Self::ObservedLocationLong => "observed_location_long",
Self::Odometer => "odometer",
Self::OdometerRollover => "odometer_rollover",
Self::Offset => "offset",
Self::OffsetCal => "offset_cal",
Self::OpponentName => "opponent_name",
Self::OpponentScore => "opponent_score",
Self::OrientationMatrix => "orientation_matrix",
Self::OverallSleepScore => "overall_sleep_score",
Self::OxygenContent => "oxygen_content",
Self::PagesEnabled => "pages_enabled",
Self::ParentIndex => "parent_index",
Self::PartIndex => "part_index",
Self::PartNumber => "part_number",
Self::PercentFat => "percent_fat",
Self::PercentHydration => "percent_hydration",
Self::PhysiqueRating => "physique_rating",
Self::Pid => "pid",
Self::PidDataSize => "pid_data_size",
Self::Pitch => "pitch",
Self::PlayerScore => "player_score",
Self::Po2 => "po2",
Self::Po2Critical => "po2_critical",
Self::Po2Deco => "po2_deco",
Self::Po2Warn => "po2_warn",
Self::PoolLength => "pool_length",
Self::PoolLengthUnit => "pool_length_unit",
Self::PopupEnabled => "popup_enabled",
Self::PositionLat => "position_lat",
Self::PositionLong => "position_long",
Self::PositionSetting => "position_setting",
Self::Power => "power",
Self::PowerCalFactor => "power_cal_factor",
Self::PowerEnabled => "power_enabled",
Self::PowerHighAlert => "power_high_alert",
Self::PowerLowAlert => "power_low_alert",
Self::PowerSetting => "power_setting",
Self::PowerZoneHighBoundary => "power_zone_high_boundary",
Self::PrecipitationProbability => "precipitation_probability",
Self::PreciseTargetSpeed => "precise_target_speed",
Self::Pressure => "pressure",
Self::PressureSac => "pressure_sac",
Self::ProcessingInterval => "processing_interval",
Self::Product => "product",
Self::ProductName => "product_name",
Self::ProjectileType => "projectile_type",
Self::PwrCalcType => "pwr_calc_type",
Self::Qualifier => "qualifier",
Self::Quality => "quality",
Self::RadarThreatAlert => "radar_threat_alert",
Self::RadarThreatAvgApproachSpeed => "radar_threat_avg_approach_speed",
Self::RadarThreatCount => "radar_threat_count",
Self::RadarThreatLevelMax => "radar_threat_level_max",
Self::RadarThreatMaxApproachSpeed => "radar_threat_max_approach_speed",
Self::RawData => "raw_data",
Self::ReadingConfidence => "reading_confidence",
Self::ReadingSpo2 => "reading_spo2",
Self::RearGear => "rear_gear",
Self::RearGearNum => "rear_gear_num",
Self::RearGearShiftCount => "rear_gear_shift_count",
Self::Recurrence => "recurrence",
Self::RecurrenceValue => "recurrence_value",
Self::ReferenceIndex => "reference_index",
Self::ReferenceMesg => "reference_mesg",
Self::RelativeHumidity => "relative_humidity",
Self::RemSleepScore => "rem_sleep_score",
Self::Repeat => "repeat",
Self::RepeatCalories => "repeat_calories",
Self::RepeatDistance => "repeat_distance",
Self::RepeatDiveInterval => "repeat_dive_interval",
Self::RepeatHr => "repeat_hr",
Self::RepeatPower => "repeat_power",
Self::RepeatSteps => "repeat_steps",
Self::RepeatTime => "repeat_time",
Self::Repeating => "repeating",
Self::RepetitionNum => "repetition_num",
Self::Repetitions => "repetitions",
Self::ReportId => "report_id",
Self::Resistance => "resistance",
Self::RespirationRate => "respiration_rate",
Self::RestingHeartRate => "resting_heart_rate",
Self::RestingMetabolicRate => "resting_metabolic_rate",
Self::RiderPosition => "rider_position",
Self::RightPco => "right_pco",
Self::RightPedalSmoothness => "right_pedal_smoothness",
Self::RightPowerPhase => "right_power_phase",
Self::RightPowerPhasePeak => "right_power_phase_peak",
Self::RightTorqueEffectiveness => "right_torque_effectiveness",
Self::RmssdHrv => "rmssd_hrv",
Self::Rmv => "rmv",
Self::Roll => "roll",
Self::Rotations => "rotations",
Self::SafetyStopEnabled => "safety_stop_enabled",
Self::SafetyStopTime => "safety_stop_time",
Self::SampleTimeOffset => "sample_time_offset",
Self::SamplingInterval => "sampling_interval",
Self::SaturatedHemoglobinPercent => "saturated_hemoglobin_percent",
Self::SaturatedHemoglobinPercentMax => "saturated_hemoglobin_percent_max",
Self::SaturatedHemoglobinPercentMin => "saturated_hemoglobin_percent_min",
Self::Scale => "scale",
Self::Scaling => "scaling",
Self::ScheduledTime => "scheduled_time",
Self::Score => "score",
Self::ScreenEnabled => "screen_enabled",
Self::ScreenIndex => "screen_index",
Self::SdmAntId => "sdm_ant_id",
Self::SdmAntIdTransType => "sdm_ant_id_trans_type",
Self::SdmCalFactor => "sdm_cal_factor",
Self::SdrrHrv => "sdrr_hrv",
Self::SecondaryCustomTargetCadenceHigh => "secondary_custom_target_cadence_high",
Self::SecondaryCustomTargetCadenceLow => "secondary_custom_target_cadence_low",
Self::SecondaryCustomTargetHeartRateHigh => "secondary_custom_target_heart_rate_high",
Self::SecondaryCustomTargetHeartRateLow => "secondary_custom_target_heart_rate_low",
Self::SecondaryCustomTargetPowerHigh => "secondary_custom_target_power_high",
Self::SecondaryCustomTargetPowerLow => "secondary_custom_target_power_low",
Self::SecondaryCustomTargetSpeedHigh => "secondary_custom_target_speed_high",
Self::SecondaryCustomTargetSpeedLow => "secondary_custom_target_speed_low",
Self::SecondaryCustomTargetValueHigh => "secondary_custom_target_value_high",
Self::SecondaryCustomTargetValueLow => "secondary_custom_target_value_low",
Self::SecondaryTargetCadenceZone => "secondary_target_cadence_zone",
Self::SecondaryTargetHrZone => "secondary_target_hr_zone",
Self::SecondaryTargetPowerZone => "secondary_target_power_zone",
Self::SecondaryTargetSpeedZone => "secondary_target_speed_zone",
Self::SecondaryTargetStrokeType => "secondary_target_stroke_type",
Self::SecondaryTargetType => "secondary_target_type",
Self::SecondaryTargetValue => "secondary_target_value",
Self::SegmentTime => "segment_time",
Self::SelectionType => "selection_type",
Self::Sensor => "sensor",
Self::SensorPosition => "sensor_position",
Self::SensorType => "sensor_type",
Self::Sentence => "sentence",
Self::SerialNumber => "serial_number",
Self::Sessions => "sessions",
Self::SetType => "set_type",
Self::Severity => "severity",
Self::ShimanoDi2Enabled => "shimano_di2_enabled",
Self::ShotCount => "shot_count",
Self::ShotNum => "shot_num",
Self::ShotSpeed => "shot_speed",
Self::SleepDurationScore => "sleep_duration_score",
Self::SleepLevel => "sleep_level",
Self::SleepQualityScore => "sleep_quality_score",
Self::SleepRecoveryScore => "sleep_recovery_score",
Self::SleepRestlessnessScore => "sleep_restlessness_score",
Self::SleepTime => "sleep_time",
Self::SmartNotificationDisplayOrientation => "smart_notification_display_orientation",
Self::SoftwareVersion => "software_version",
Self::Sound => "sound",
Self::Source => "source",
Self::SourceType => "source_type",
Self::SpdEnabled => "spd_enabled",
Self::SpdcadEnabled => "spdcad_enabled",
Self::Speed => "speed",
Self::Speed1S => "speed_1s",
Self::SpeedHighAlert => "speed_high_alert",
Self::SpeedLowAlert => "speed_low_alert",
Self::SpeedSetting => "speed_setting",
Self::SpeedSource => "speed_source",
Self::SpeedZoneHighBoundary => "speed_zone_high_boundary",
Self::SplitType => "split_type",
Self::Sport => "sport",
Self::SportEvent => "sport_event",
Self::SportIndex => "sport_index",
Self::SportPoint => "sport_point",
Self::SportProfileName => "sport_profile_name",
Self::Sports => "sports",
Self::Stage => "stage",
Self::StanceTime => "stance_time",
Self::StanceTimeBalance => "stance_time_balance",
Self::StanceTimePercent => "stance_time_percent",
Self::StandCount => "stand_count",
Self::StandardDeviation => "standard_deviation",
Self::StartCns => "start_cns",
Self::StartDate => "start_date",
Self::StartElevation => "start_elevation",
Self::StartN2 => "start_n2",
Self::StartPositionLat => "start_position_lat",
Self::StartPositionLong => "start_position_long",
Self::StartPressure => "start_pressure",
Self::StartTime => "start_time",
Self::StartTimestamp => "start_timestamp",
Self::StartTimestampMs => "start_timestamp_ms",
Self::StartTimezoneOffset => "start_timezone_offset",
Self::Status => "status",
Self::StepLength => "step_length",
Self::Steps => "steps",
Self::StressLevel => "stress_level",
Self::StressLevelTime => "stress_level_time",
Self::StressLevelValue => "stress_level_value",
Self::StrokeCount => "stroke_count",
Self::StrokeType => "stroke_type",
Self::Strokes => "strokes",
Self::SubSport => "sub_sport",
Self::SurfaceInterval => "surface_interval",
Self::SwcLat => "swc_lat",
Self::SwcLong => "swc_long",
Self::SwimStroke => "swim_stroke",
Self::SystemTime => "system_time",
Self::SystemTimestamp => "system_timestamp",
Self::SystemTimestampMs => "system_timestamp_ms",
Self::SystolicPressure => "systolic_pressure",
Self::TapInterface => "tap_interface",
Self::TapSensitivity => "tap_sensitivity",
Self::TargetCadenceZone => "target_cadence_zone",
Self::TargetDistance => "target_distance",
Self::TargetHrZone => "target_hr_zone",
Self::TargetPowerZone => "target_power_zone",
Self::TargetSpeed => "target_speed",
Self::TargetSpeedZone => "target_speed_zone",
Self::TargetStrokeType => "target_stroke_type",
Self::TargetTime => "target_time",
Self::TargetType => "target_type",
Self::TargetValue => "target_value",
Self::Temperature => "temperature",
Self::TemperatureFeelsLike => "temperature_feels_like",
Self::TemperatureMax => "temperature_max",
Self::TemperatureMin => "temperature_min",
Self::TemperatureSetting => "temperature_setting",
Self::Text => "text",
Self::ThresholdHeartRate => "threshold_heart_rate",
Self::ThresholdPower => "threshold_power",
Self::Time => "time",
Self::Time128 => "time128",
Self::Time256 => "time256",
Self::TimeAboveThreshold => "time_above_threshold",
Self::TimeCreated => "time_created",
Self::TimeDurationAlert => "time_duration_alert",
Self::TimeFromCourse => "time_from_course",
Self::TimeInCadenceZone => "time_in_cadence_zone",
Self::TimeInHrZone => "time_in_hr_zone",
Self::TimeInPowerZone => "time_in_power_zone",
Self::TimeInSpeedZone => "time_in_speed_zone",
Self::TimeMode => "time_mode",
Self::TimeOffset => "time_offset",
Self::TimeStanding => "time_standing",
Self::TimeToSurface => "time_to_surface",
Self::TimeZoneOffset => "time_zone_offset",
Self::TimerTime => "timer_time",
Self::TimerTrigger => "timer_trigger",
Self::Timestamp => "timestamp",
Self::Timestamp16 => "timestamp_16",
Self::Timestamp32K => "timestamp_32k",
Self::TimestampMin8 => "timestamp_min_8",
Self::TimestampMs => "timestamp_ms",
Self::Title => "title",
Self::TotalAnaerobicTrainingEffect => "total_anaerobic_training_effect",
Self::TotalAscent => "total_ascent",
Self::TotalCalories => "total_calories",
Self::TotalCycles => "total_cycles",
Self::TotalDescent => "total_descent",
Self::TotalDistance => "total_distance",
Self::TotalElapsedTime => "total_elapsed_time",
Self::TotalFatCalories => "total_fat_calories",
Self::TotalFlow => "total_flow",
Self::TotalFractionalAscent => "total_fractional_ascent",
Self::TotalFractionalCycles => "total_fractional_cycles",
Self::TotalFractionalDescent => "total_fractional_descent",
Self::TotalGrit => "total_grit",
Self::TotalHemoglobinConc => "total_hemoglobin_conc",
Self::TotalHemoglobinConcMax => "total_hemoglobin_conc_max",
Self::TotalHemoglobinConcMin => "total_hemoglobin_conc_min",
Self::TotalMovingTime => "total_moving_time",
Self::TotalStrides => "total_strides",
Self::TotalStrokes => "total_strokes",
Self::TotalTimerTime => "total_timer_time",
Self::TotalTrainingEffect => "total_training_effect",
Self::TotalWork => "total_work",
Self::Track => "track",
Self::TrainingLoadPeak => "training_load_peak",
Self::TrainingStressScore => "training_stress_score",
Self::TransmissionType => "transmission_type",
Self::TravelGas => "travel_gas",
Self::Trigger => "trigger",
Self::TriggerOnAscent => "trigger_on_ascent",
Self::TriggerOnDescent => "trigger_on_descent",
Self::TurnRate => "turn_rate",
Self::Type => "type",
Self::Uncharged => "uncharged",
Self::Units => "units",
Self::UpKeyEnabled => "up_key_enabled",
Self::UpdateTime => "update_time",
Self::UpdateTimestamp => "update_timestamp",
Self::Url => "url",
Self::UserProfileIndex => "user_profile_index",
Self::UserProfilePrimaryKey => "user_profile_primary_key",
Self::UserRunningStepLength => "user_running_step_length",
Self::UserWalkingStepLength => "user_walking_step_length",
Self::UtcOffset => "utc_offset",
Self::UtcTimestamp => "utc_timestamp",
Self::Uuid => "uuid",
Self::Validity => "validity",
Self::Value => "value",
Self::Velocity => "velocity",
Self::Version => "version",
Self::VerticalOscillation => "vertical_oscillation",
Self::VerticalRatio => "vertical_ratio",
Self::VerticalSpeed => "vertical_speed",
Self::VigorousActivityMinutes => "vigorous_activity_minutes",
Self::VirtualPartnerSpeed => "virtual_partner_speed",
Self::VisceralFatMass => "visceral_fat_mass",
Self::VisceralFatRating => "visceral_fat_rating",
Self::Vo2Max => "vo2_max",
Self::VolumeSac => "volume_sac",
Self::VolumeUsed => "volume_used",
Self::WakeTime => "wake_time",
Self::WaterDensity => "water_density",
Self::WaterType => "water_type",
Self::WeatherAlertsEnabled => "weather_alerts_enabled",
Self::WeatherConditionsEnabled => "weather_conditions_enabled",
Self::WeatherReport => "weather_report",
Self::WeeklyAverage => "weekly_average",
Self::Weight => "weight",
Self::WeightDisplayUnit => "weight_display_unit",
Self::WeightSetting => "weight_setting",
Self::WindDirection => "wind_direction",
Self::WindSpeed => "wind_speed",
Self::WktDescription => "wkt_description",
Self::WktName => "wkt_name",
Self::WktStepIndex => "wkt_step_index",
Self::WktStepName => "wkt_step_name",
Self::WorkoutDownloadEnabled => "workout_download_enabled",
Self::WorkoutFeel => "workout_feel",
Self::WorkoutRpe => "workout_rpe",
Self::WorkoutsSupported => "workouts_supported",
Self::ZeroCrossCnt => "zero_cross_cnt",
Self::Zone => "zone",
Self::ZoneCount => "zone_count",
}
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Unit {
Bar,
BarPerMinute,
BeatsPerMinute,
BreathsPerMinute,
Bytes,
Calorie,
Celcius,
Count,
Cycle,
Degree,
DegreesPerSecond,
DependsOnSensor,
Empty,
Flow,
Gauss,
Gee,
Gram,
GramPerDeciliter,
Hectometer,
Hour,
IntensityFactor,
Joule,
KGrit,
Kilocalorie,
KilocaloriesPerCycle,
KilocaloriesPerDay,
KilocaloriesPerMinute,
Kilogram,
KilogramsPerCubicMeter,
KilogramsPerSquareMeter,
Kilometer,
Length,
Liter,
LiterPerMinute,
Meter,
MetersPerCycle,
MetersPerSecond,
MetersPerSecondAndMeter,
MetersPerSecondSquared,
MetersPerSeconds,
Milligee,
MillilitersPerKilogramPerMinute,
Millimeter,
MillimetersOfMercury,
Millisecond,
Minute,
OnePer32768Seconds,
OxygenToxicityUnit,
Pascal,
Percent,
PercentOrBeatsPerMinute,
PercentOrWatts,
Radian,
RadiansPerSecond,
RevolutionPerMinute,
Second,
Semicircle,
Step,
Stride,
StridesPerMinute,
Stroke,
StrokePerLap,
StrokesPerMinute,
SwimStroke,
TrainingStressScore,
TwoCyclesSteps,
Voltage,
Watt,
Year,
}
impl Unit {
pub fn as_str(self) -> &'static str {
match self {
Self::Bar => "bar",
Self::BarPerMinute => "bar/min",
Self::BeatsPerMinute => "bpm",
Self::BreathsPerMinute => "Breaths/min",
Self::Bytes => "bytes",
Self::Calorie => "calories",
Self::Celcius => "C",
Self::Count => "counts",
Self::Cycle => "cycles",
Self::Degree => "degrees",
Self::DegreesPerSecond => "deg/s",
Self::DependsOnSensor => "depends on sensor",
Self::Empty => "",
Self::Flow => "Flow",
Self::Gauss => "G",
Self::Gee => "g",
Self::Gram => "gr",
Self::GramPerDeciliter => "g/dL",
Self::Hectometer => "100 * m",
Self::Hour => "hr",
Self::IntensityFactor => "if",
Self::Joule => "J",
Self::KGrit => "kGrit",
Self::Kilocalorie => "kcal",
Self::KilocaloriesPerCycle => "kcal/cycle",
Self::KilocaloriesPerDay => "kcal/day",
Self::KilocaloriesPerMinute => "kcal/min",
Self::Kilogram => "kg",
Self::KilogramsPerCubicMeter => "kg/m^3",
Self::KilogramsPerSquareMeter => "kg/m^2",
Self::Kilometer => "km",
Self::Length => "lengths",
Self::Liter => "L",
Self::LiterPerMinute => "L/min",
Self::Meter => "m",
Self::MetersPerCycle => "m/cycle",
Self::MetersPerSecond => "mps",
Self::MetersPerSecondAndMeter => "m/s,m",
Self::MetersPerSecondSquared => "m/s^2",
Self::MetersPerSeconds => "m/s",
Self::Milligee => "mG",
Self::MillilitersPerKilogramPerMinute => "mL/kg/min",
Self::Millimeter => "mm",
Self::MillimetersOfMercury => "mmHg",
Self::Millisecond => "ms",
Self::Minute => "minutes",
Self::OnePer32768Seconds => "1/32768 s",
Self::OxygenToxicityUnit => "OTUs",
Self::Pascal => "Pa",
Self::Percent => "%",
Self::PercentOrBeatsPerMinute => "% or bpm",
Self::PercentOrWatts => "% or watts",
Self::Radian => "radians",
Self::RadiansPerSecond => "radians/second",
Self::RevolutionPerMinute => "rpm",
Self::Second => "s",
Self::Semicircle => "semicircles",
Self::Step => "steps",
Self::Stride => "strides",
Self::StridesPerMinute => "strides/min",
Self::Stroke => "strokes",
Self::StrokePerLap => "strokes/lap",
Self::StrokesPerMinute => "strokes/min",
Self::SwimStroke => "swim_stroke",
Self::TrainingStressScore => "tss",
Self::TwoCyclesSteps => "2 * cycles (steps)",
Self::Voltage => "V",
Self::Watt => "watts",
Self::Year => "years",
}
}
}