use paste::paste;
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum FieldType {
Activity,
ActivityClass,
ActivityLevel,
ActivitySubtype,
ActivityType,
AntNetwork,
AttitudeStage,
AttitudeValidity,
AutoActivityDetect,
AutoSyncFrequency,
BacklightMode,
BacklightTimeout,
BatteryStatus,
BodyLocation,
Bool,
BpStatus,
Byte,
CameraEventType,
CameraOrientationType,
ClimbProEvent,
ConnectivityCapabilities,
CourseCapabilities,
CoursePoint,
DateMode,
DateTime,
DayOfWeek,
DeviceIndex,
DisplayHeart,
DisplayMeasure,
DisplayOrientation,
DisplayPosition,
DisplayPower,
DiveAlarmType,
DiveBacklightMode,
DiveGasStatus,
Event,
EventType,
ExdDataUnits,
ExdDescriptors,
ExdDisplayType,
ExdLayout,
ExdQualifiers,
ExerciseCategory,
File,
FileFlags,
FitBaseType,
FitBaseUnit,
Float32,
Gender,
Goal,
GoalRecurrence,
GoalSource,
HrType,
HrZoneCalc,
Intensity,
Language,
LapTrigger,
LeftRightBalance,
LeftRightBalance100,
LengthType,
LocalDateTime,
LocaltimeIntoDay,
Manufacturer,
MesgCount,
MesgNum,
MessageIndex,
PwrZoneCalc,
RadarThreatLevelType,
Schedule,
SegmentDeleteStatus,
SegmentLapStatus,
SegmentLeaderboardType,
SegmentSelectionType,
SensorType,
SessionTrigger,
SetType,
Side,
Sint16,
Sint32,
Sint8,
SourceType,
Sport,
SportBits0,
SportEvent,
String,
StrokeType,
SubSport,
SwimStroke,
Switch,
TapSensitivity,
TimeMode,
TissueModelType,
Tone,
Uint16,
Uint16Z,
Uint32,
Uint32Z,
Uint8,
Uint8Z,
UserLocalId,
WatchfaceMode,
WaterType,
WeatherReport,
WeatherSevereType,
WeatherSeverity,
WeatherStatus,
Weight,
WktStepDuration,
WktStepTarget,
WorkoutCapabilities,
WorkoutEquipment,
Coordinates,
Timestamp,
None,
}
macro_rules! define_field_mappings {
($(($type:ident, { $($key:expr => $value:expr),* $(,)* }) ),* $(,)*) => {
$(
paste! {
pub fn [<$type:lower _stringify_field_value>](k: usize) -> Option<&'static str> {
match k {
$(
$key => Some($value),
)*
_ => None,
}
}
pub fn [<$type:lower _parse_field_value>](value: &str) -> Option<usize> {
match value {
$(
$value => Some($key),
)*
_ => None,
}
}
}
)*
}
}
define_field_mappings! {
(Activity, {
0 => "manual",
1 => "auto_multi_sport",
}),
(ActivityClass, {
127 => "level",
100 => "level_max",
128 => "athlete",
}),
(ActivityLevel, {
0 => "low",
1 => "medium",
2 => "high",
}),
(ActivitySubtype, {
0 => "generic",
1 => "treadmill",
2 => "street",
3 => "trail",
4 => "track",
5 => "spin",
6 => "indoor_cycling",
7 => "road",
8 => "mountain",
9 => "downhill",
10 => "recumbent",
11 => "cyclocross",
12 => "hand_cycling",
13 => "track_cycling",
14 => "indoor_rowing",
15 => "elliptical",
16 => "stair_climbing",
17 => "lap_swimming",
18 => "open_water",
254 => "all",
}),
(ActivityType, {
0 => "generic",
1 => "running",
2 => "cycling",
3 => "transition",
4 => "fitness_equipment",
5 => "swimming",
6 => "walking",
8 => "sedentary",
254 => "all",
}),
(AntNetwork, {
0 => "public",
1 => "antplus",
2 => "antfs",
3 => "private",
}),
(AttitudeStage, {
0 => "failed",
1 => "aligning",
2 => "degraded",
3 => "valid",
}),
(AttitudeValidity, {
1 => "track_angle_heading_valid",
2 => "pitch_valid",
4 => "roll_valid",
8 => "lateral_body_accel_valid",
16 => "normal_body_accel_valid",
32 => "turn_rate_valid",
64 => "hw_fail",
128 => "mag_invalid",
256 => "no_gps",
512 => "gps_invalid",
1024 => "solution_coasting",
2048 => "true_track_angle",
4096 => "magnetic_heading",
}),
(AutoActivityDetect, {
0 => "none",
1 => "running",
2 => "cycling",
4 => "swimming",
8 => "walking",
32 => "elliptical",
1024 => "sedentary",
}),
(AutoSyncFrequency, {
0 => "never",
1 => "occasionally",
2 => "frequent",
3 => "once_a_day",
4 => "remote",
}),
(BacklightMode, {
0 => "off",
1 => "manual",
2 => "key_and_messages",
3 => "auto_brightness",
4 => "smart_notifications",
5 => "key_and_messages_night",
6 => "key_and_messages_and_smart_notifications",
}),
(BacklightTimeout, {
0 => "infinite",
}),
(BatteryStatus, {
1 => "new",
2 => "good",
3 => "ok",
4 => "low",
5 => "critical",
6 => "charging",
7 => "unknown",
}),
(BodyLocation, {
0 => "left_leg",
1 => "left_calf",
2 => "left_shin",
3 => "left_hamstring",
4 => "left_quad",
5 => "left_glute",
6 => "right_leg",
7 => "right_calf",
8 => "right_shin",
9 => "right_hamstring",
10 => "right_quad",
11 => "right_glute",
12 => "torso_back",
13 => "left_lower_back",
14 => "left_upper_back",
15 => "right_lower_back",
16 => "right_upper_back",
17 => "torso_front",
18 => "left_abdomen",
19 => "left_chest",
20 => "right_abdomen",
21 => "right_chest",
22 => "left_arm",
23 => "left_shoulder",
24 => "left_bicep",
25 => "left_tricep",
26 => "left_brachioradialis",
27 => "left_forearm_extensors",
28 => "right_arm",
29 => "right_shoulder",
30 => "right_bicep",
31 => "right_tricep",
32 => "right_brachioradialis",
33 => "right_forearm_extensors",
34 => "neck",
35 => "throat",
36 => "waist_mid_back",
37 => "waist_front",
38 => "waist_left",
39 => "waist_right",
}),
(BpStatus, {
0 => "no_error",
1 => "error_incomplete_data",
2 => "error_no_measurement",
3 => "error_data_out_of_range",
4 => "error_irregular_heart_rate",
}),
(CameraEventType, {
0 => "video_start",
1 => "video_split",
2 => "video_end",
3 => "photo_taken",
4 => "video_second_stream_start",
5 => "video_second_stream_split",
6 => "video_second_stream_end",
7 => "video_split_start",
8 => "video_second_stream_split_start",
11 => "video_pause",
12 => "video_second_stream_pause",
13 => "video_resume",
14 => "video_second_stream_resume",
}),
(CameraOrientationType, {
0 => "camera_orientation_0",
1 => "camera_orientation_90",
2 => "camera_orientation_180",
3 => "camera_orientation_270",
}),
(ClimbProEvent, {
0 => "approach",
1 => "start",
2 => "complete",
}),
(ConnectivityCapabilities, {
1 => "bluetooth",
2 => "bluetooth_le",
4 => "ant",
8 => "activity_upload",
16 => "course_download",
32 => "workout_download",
64 => "live_track",
128 => "weather_conditions",
256 => "weather_alerts",
512 => "gps_ephemeris_download",
1024 => "explicit_archive",
2048 => "setup_incomplete",
4096 => "continue_sync_after_software_update",
8192 => "connect_iq_app_download",
16384 => "golf_course_download",
32768 => "device_initiates_sync",
65536 => "connect_iq_watch_app_download",
131072 => "connect_iq_widget_download",
262144 => "connect_iq_watch_face_download",
524288 => "connect_iq_data_field_download",
1048576 => "connect_iq_app_managment",
2097152 => "swing_sensor",
4194304 => "swing_sensor_remote",
8388608 => "incident_detection",
16777216 => "audio_prompts",
33554432 => "wifi_verification",
67108864 => "true_up",
134217728 => "find_my_watch",
268435456 => "remote_manual_sync",
536870912 => "live_track_auto_start",
1073741824 => "live_track_messaging",
2147483648 => "instant_input",
}),
(CourseCapabilities, {
1 => "processed",
2 => "valid",
4 => "time",
8 => "distance",
16 => "position",
32 => "heart_rate",
64 => "power",
128 => "cadence",
256 => "training",
512 => "navigation",
1024 => "bikeway",
}),
(CoursePoint, {
0 => "generic",
1 => "summit",
2 => "valley",
3 => "water",
4 => "food",
5 => "danger",
6 => "left",
7 => "right",
8 => "straight",
9 => "first_aid",
10 => "fourth_category",
11 => "third_category",
12 => "second_category",
13 => "first_category",
14 => "hors_category",
15 => "sprint",
16 => "left_fork",
17 => "right_fork",
18 => "middle_fork",
19 => "slight_left",
20 => "sharp_left",
21 => "slight_right",
22 => "sharp_right",
23 => "u_turn",
24 => "segment_start",
25 => "segment_end",
27 => "campsite",
28 => "aid_station",
29 => "rest_area",
30 => "general_distance",
31 => "service",
32 => "energy_gel",
33 => "sports_drink",
34 => "mile_marker",
35 => "checkpoint",
36 => "shelter",
37 => "meeting_spot",
38 => "overlook",
39 => "toilet",
40 => "shower",
41 => "gear",
42 => "sharp_curve",
43 => "steep_incline",
44 => "tunnel",
45 => "bridge",
46 => "obstacle",
47 => "crossing",
48 => "store",
49 => "transition",
50 => "navaid",
51 => "transport",
52 => "alert",
53 => "info",
}),
(DateMode, {
0 => "day_month",
1 => "month_day",
}),
(DateTime, {
268435456 => "min",
}),
(DayOfWeek, {
0 => "sunday",
1 => "monday",
2 => "tuesday",
3 => "wednesday",
4 => "thursday",
5 => "friday",
6 => "saturday",
}),
(DeviceIndex, {
0 => "creator",
}),
(DisplayHeart, {
0 => "bpm",
1 => "max",
2 => "reserve",
}),
(DisplayMeasure, {
0 => "metric",
1 => "statute",
2 => "nautical",
}),
(DisplayOrientation, {
0 => "auto",
1 => "portrait",
2 => "landscape",
3 => "portrait_flipped",
4 => "landscape_flipped",
}),
(DisplayPosition, {
0 => "degree",
1 => "degree_minute",
2 => "degree_minute_second",
3 => "austrian_grid",
4 => "british_grid",
5 => "dutch_grid",
6 => "hungarian_grid",
7 => "finnish_grid",
8 => "german_grid",
9 => "icelandic_grid",
10 => "indonesian_equatorial",
11 => "indonesian_irian",
12 => "indonesian_southern",
13 => "india_zone_0",
14 => "india_zone_IA",
15 => "india_zone_IB",
16 => "india_zone_IIA",
17 => "india_zone_IIB",
18 => "india_zone_IIIA",
19 => "india_zone_IIIB",
20 => "india_zone_IVA",
21 => "india_zone_IVB",
22 => "irish_transverse",
23 => "irish_grid",
24 => "loran",
25 => "maidenhead_grid",
26 => "mgrs_grid",
27 => "new_zealand_grid",
28 => "new_zealand_transverse",
29 => "qatar_grid",
30 => "modified_swedish_grid",
31 => "swedish_grid",
32 => "south_african_grid",
33 => "swiss_grid",
34 => "taiwan_grid",
35 => "united_states_grid",
36 => "utm_ups_grid",
37 => "west_malayan",
38 => "borneo_rso",
39 => "estonian_grid",
40 => "latvian_grid",
41 => "swedish_ref_99_grid",
}),
(DisplayPower, {
0 => "watts",
1 => "percent_ftp",
}),
(DiveAlarmType, {
0 => "depth",
1 => "time",
}),
(DiveBacklightMode, {
0 => "at_depth",
1 => "always_on",
}),
(DiveGasStatus, {
0 => "disabled",
1 => "enabled",
2 => "backup_only",
}),
(Event, {
0 => "timer",
3 => "workout",
4 => "workout_step",
5 => "power_down",
6 => "power_up",
7 => "off_course",
8 => "session",
9 => "lap",
10 => "course_point",
11 => "battery",
12 => "virtual_partner_pace",
13 => "hr_high_alert",
14 => "hr_low_alert",
15 => "speed_high_alert",
16 => "speed_low_alert",
17 => "cad_high_alert",
18 => "cad_low_alert",
19 => "power_high_alert",
20 => "power_low_alert",
21 => "recovery_hr",
22 => "battery_low",
23 => "time_duration_alert",
24 => "distance_duration_alert",
25 => "calorie_duration_alert",
26 => "activity",
27 => "fitness_equipment",
28 => "length",
32 => "user_marker",
33 => "sport_point",
36 => "calibration",
42 => "front_gear_change",
43 => "rear_gear_change",
44 => "rider_position_change",
45 => "elev_high_alert",
46 => "elev_low_alert",
47 => "comm_timeout",
75 => "radar_threat_alert",
}),
(EventType, {
0 => "start",
1 => "stop",
2 => "consecutive_depreciated",
3 => "marker",
4 => "stop_all",
5 => "begin_depreciated",
6 => "end_depreciated",
7 => "end_all_depreciated",
8 => "stop_disable",
9 => "stop_disable_all",
}),
(ExdDataUnits, {
0 => "no_units",
1 => "laps",
2 => "miles_per_hour",
3 => "kilometers_per_hour",
4 => "feet_per_hour",
5 => "meters_per_hour",
6 => "degrees_celsius",
7 => "degrees_farenheit",
8 => "zone",
9 => "gear",
10 => "rpm",
11 => "bpm",
12 => "degrees",
13 => "millimeters",
14 => "meters",
15 => "kilometers",
16 => "feet",
17 => "yards",
18 => "kilofeet",
19 => "miles",
20 => "time",
21 => "enum_turn_type",
22 => "percent",
23 => "watts",
24 => "watts_per_kilogram",
25 => "enum_battery_status",
26 => "enum_bike_light_beam_angle_mode",
27 => "enum_bike_light_battery_status",
28 => "enum_bike_light_network_config_type",
29 => "lights",
30 => "seconds",
31 => "minutes",
32 => "hours",
33 => "calories",
34 => "kilojoules",
35 => "milliseconds",
36 => "second_per_mile",
37 => "second_per_kilometer",
38 => "centimeter",
39 => "enum_course_point",
40 => "bradians",
41 => "enum_sport",
42 => "inches_hg",
43 => "mm_hg",
44 => "mbars",
45 => "hecto_pascals",
46 => "feet_per_min",
47 => "meters_per_min",
48 => "meters_per_sec",
49 => "eight_cardinal",
}),
(ExdDescriptors, {
0 => "bike_light_battery_status",
1 => "beam_angle_status",
2 => "batery_level",
3 => "light_network_mode",
4 => "number_lights_connected",
5 => "cadence",
6 => "distance",
7 => "estimated_time_of_arrival",
8 => "heading",
9 => "time",
10 => "battery_level",
11 => "trainer_resistance",
12 => "trainer_target_power",
13 => "time_seated",
14 => "time_standing",
15 => "elevation",
16 => "grade",
17 => "ascent",
18 => "descent",
19 => "vertical_speed",
20 => "di2_battery_level",
21 => "front_gear",
22 => "rear_gear",
23 => "gear_ratio",
24 => "heart_rate",
25 => "heart_rate_zone",
26 => "time_in_heart_rate_zone",
27 => "heart_rate_reserve",
28 => "calories",
29 => "gps_accuracy",
30 => "gps_signal_strength",
31 => "temperature",
32 => "time_of_day",
33 => "balance",
34 => "pedal_smoothness",
35 => "power",
36 => "functional_threshold_power",
37 => "intensity_factor",
38 => "work",
39 => "power_ratio",
40 => "normalized_power",
41 => "training_stress_Score",
42 => "time_on_zone",
43 => "speed",
44 => "laps",
45 => "reps",
46 => "workout_step",
47 => "course_distance",
48 => "navigation_distance",
49 => "course_estimated_time_of_arrival",
50 => "navigation_estimated_time_of_arrival",
51 => "course_time",
52 => "navigation_time",
53 => "course_heading",
54 => "navigation_heading",
55 => "power_zone",
56 => "torque_effectiveness",
57 => "timer_time",
58 => "power_weight_ratio",
59 => "left_platform_center_offset",
60 => "right_platform_center_offset",
61 => "left_power_phase_start_angle",
62 => "right_power_phase_start_angle",
63 => "left_power_phase_finish_angle",
64 => "right_power_phase_finish_angle",
65 => "gears",
66 => "pace",
67 => "training_effect",
68 => "vertical_oscillation",
69 => "vertical_ratio",
70 => "ground_contact_time",
71 => "left_ground_contact_time_balance",
72 => "right_ground_contact_time_balance",
73 => "stride_length",
74 => "running_cadence",
75 => "performance_condition",
76 => "course_type",
77 => "time_in_power_zone",
78 => "navigation_turn",
79 => "course_location",
80 => "navigation_location",
81 => "compass",
82 => "gear_combo",
83 => "muscle_oxygen",
84 => "icon",
85 => "compass_heading",
86 => "gps_heading",
87 => "gps_elevation",
88 => "anaerobic_training_effect",
89 => "course",
90 => "off_course",
91 => "glide_ratio",
92 => "vertical_distance",
93 => "vmg",
94 => "ambient_pressure",
95 => "pressure",
96 => "vam",
}),
(ExdDisplayType, {
0 => "numerical",
1 => "simple",
2 => "graph",
3 => "bar",
4 => "circle_graph",
5 => "virtual_partner",
6 => "balance",
7 => "string_list",
8 => "string",
9 => "simple_dynamic_icon",
10 => "gauge",
}),
(ExdLayout, {
0 => "full_screen",
1 => "half_vertical",
2 => "half_horizontal",
3 => "half_vertical_right_split",
4 => "half_horizontal_bottom_split",
5 => "full_quarter_split",
6 => "half_vertical_left_split",
7 => "half_horizontal_top_split",
8 => "dynamic",
}),
(ExdQualifiers, {
0 => "no_qualifier",
1 => "instantaneous",
2 => "average",
3 => "lap",
4 => "maximum",
5 => "maximum_average",
6 => "maximum_lap",
7 => "last_lap",
8 => "average_lap",
9 => "to_destination",
10 => "to_go",
11 => "to_next",
12 => "next_course_point",
13 => "total",
14 => "three_second_average",
15 => "ten_second_average",
16 => "thirty_second_average",
17 => "percent_maximum",
18 => "percent_maximum_average",
19 => "lap_percent_maximum",
20 => "elapsed",
21 => "sunrise",
22 => "sunset",
23 => "compared_to_virtual_partner",
24 => "maximum_24h",
25 => "minimum_24h",
26 => "minimum",
27 => "first",
28 => "second",
29 => "third",
30 => "shifter",
31 => "last_sport",
32 => "moving",
33 => "stopped",
34 => "estimated_total",
242 => "zone_9",
243 => "zone_8",
244 => "zone_7",
245 => "zone_6",
246 => "zone_5",
247 => "zone_4",
248 => "zone_3",
249 => "zone_2",
250 => "zone_1",
}),
(ExerciseCategory, {
0 => "bench_press",
1 => "calf_raise",
2 => "cardio",
3 => "carry",
4 => "chop",
5 => "core",
6 => "crunch",
7 => "curl",
8 => "deadlift",
9 => "flye",
10 => "hip_raise",
11 => "hip_stability",
12 => "hip_swing",
13 => "hyperextension",
14 => "lateral_raise",
15 => "leg_curl",
16 => "leg_raise",
17 => "lunge",
18 => "olympic_lift",
19 => "plank",
20 => "plyo",
21 => "pull_up",
22 => "push_up",
23 => "row",
24 => "shoulder_press",
25 => "shoulder_stability",
26 => "shrug",
27 => "sit_up",
28 => "squat",
29 => "total_body",
30 => "triceps_extension",
31 => "warm_up",
32 => "run",
65534 => "unknown",
}),
(File, {
1 => "device",
2 => "settings",
3 => "sport",
4 => "activity",
5 => "workout",
6 => "course",
7 => "schedules",
9 => "weight",
10 => "totals",
11 => "goals",
14 => "blood_pressure",
15 => "monitoring_a",
20 => "activity_summary",
28 => "monitoring_daily",
32 => "monitoring_b",
34 => "segment",
35 => "segment_list",
40 => "exd_configuration",
247 => "mfg_range_min",
254 => "mfg_range_max",
}),
(FileFlags, {
2 => "read",
4 => "write",
8 => "erase",
}),
(FitBaseType, {
0 => "enum",
1 => "sint8",
2 => "uint8",
131 => "sint16",
132 => "uint16",
133 => "sint32",
134 => "uint32",
7 => "string",
136 => "float32",
137 => "float64",
10 => "uint8z",
139 => "uint16z",
140 => "uint32z",
13 => "byte",
142 => "sint64",
143 => "uint64",
144 => "uint64z",
}),
(FitBaseUnit, {
0 => "other",
1 => "kilogram",
2 => "pound",
}),
(Gender, {
0 => "female",
1 => "male",
2 => "unspecified",
}),
(Goal, {
0 => "time",
1 => "distance",
2 => "calories",
3 => "frequency",
4 => "steps",
5 => "ascent",
6 => "active_minutes",
}),
(GoalRecurrence, {
0 => "off",
1 => "daily",
2 => "weekly",
3 => "monthly",
4 => "yearly",
5 => "custom",
}),
(GoalSource, {
0 => "auto",
1 => "community",
2 => "user",
}),
(HrType, {
0 => "normal",
1 => "irregular",
}),
(HrZoneCalc, {
0 => "custom",
1 => "percent_max_hr",
2 => "percent_hrr",
}),
(Intensity, {
0 => "active",
1 => "rest",
2 => "warmup",
3 => "cooldown",
4 => "recovery",
5 => "interval",
6 => "other",
}),
(Language, {
0 => "english",
1 => "french",
2 => "italian",
3 => "german",
4 => "spanish",
5 => "croatian",
6 => "czech",
7 => "danish",
8 => "dutch",
9 => "finnish",
10 => "greek",
11 => "hungarian",
12 => "norwegian",
13 => "polish",
14 => "portuguese",
15 => "slovakian",
16 => "slovenian",
17 => "swedish",
18 => "russian",
19 => "turkish",
20 => "latvian",
21 => "ukrainian",
22 => "arabic",
23 => "farsi",
24 => "bulgarian",
25 => "romanian",
26 => "chinese",
27 => "japanese",
28 => "korean",
29 => "taiwanese",
30 => "thai",
31 => "hebrew",
32 => "brazilian_portuguese",
33 => "indonesian",
34 => "malaysian",
35 => "vietnamese",
36 => "burmese",
37 => "mongolian",
254 => "custom",
}),
(LapTrigger, {
0 => "manual",
1 => "time",
2 => "distance",
3 => "position_start",
4 => "position_lap",
5 => "position_waypoint",
6 => "position_marked",
7 => "session_end",
8 => "fitness_equipment",
}),
(LeftRightBalance, {
127 => "mask",
128 => "right",
}),
(LeftRightBalance100, {
16383 => "mask",
32768 => "right",
}),
(LengthType, {
0 => "idle",
1 => "active",
}),
(LocalDateTime, {
268435456 => "min",
}),
(LocaltimeIntoDay, {
}),
(Manufacturer, {
1 => "garmin",
2 => "garmin_fr405_antfs",
3 => "zephyr",
4 => "dayton",
5 => "idt",
6 => "srm",
7 => "quarq",
8 => "ibike",
9 => "saris",
10 => "spark_hk",
11 => "tanita",
12 => "echowell",
13 => "dynastream_oem",
14 => "nautilus",
15 => "dynastream",
16 => "timex",
17 => "metrigear",
18 => "xelic",
19 => "beurer",
20 => "cardiosport",
21 => "a_and_d",
22 => "hmm",
23 => "suunto",
24 => "thita_elektronik",
25 => "gpulse",
26 => "clean_mobile",
27 => "pedal_brain",
28 => "peaksware",
29 => "saxonar",
30 => "lemond_fitness",
31 => "dexcom",
32 => "wahoo_fitness",
33 => "octane_fitness",
34 => "archinoetics",
35 => "the_hurt_box",
36 => "citizen_systems",
37 => "magellan",
38 => "osynce",
39 => "holux",
40 => "concept2",
41 => "shimano",
42 => "one_giant_leap",
43 => "ace_sensor",
44 => "brim_brothers",
45 => "xplova",
46 => "perception_digital",
47 => "bf1systems",
48 => "pioneer",
49 => "spantec",
50 => "metalogics",
51 => "4iiiis",
52 => "seiko_epson",
53 => "seiko_epson_oem",
54 => "ifor_powell",
55 => "maxwell_guider",
56 => "star_trac",
57 => "breakaway",
58 => "alatech_technology_ltd",
59 => "mio_technology_europe",
60 => "rotor",
61 => "geonaute",
62 => "id_bike",
63 => "specialized",
64 => "wtek",
65 => "physical_enterprises",
66 => "north_pole_engineering",
67 => "bkool",
68 => "cateye",
69 => "stages_cycling",
70 => "sigmasport",
71 => "tomtom",
72 => "peripedal",
73 => "wattbike",
76 => "moxy",
77 => "ciclosport",
78 => "powerbahn",
79 => "acorn_projects_aps",
80 => "lifebeam",
81 => "bontrager",
82 => "wellgo",
83 => "scosche",
84 => "magura",
85 => "woodway",
86 => "elite",
87 => "nielsen_kellerman",
88 => "dk_city",
89 => "tacx",
90 => "direction_technology",
91 => "magtonic",
92 => "1partcarbon",
93 => "inside_ride_technologies",
94 => "sound_of_motion",
95 => "stryd",
96 => "icg",
97 => "MiPulse",
98 => "bsx_athletics",
99 => "look",
100 => "campagnolo_srl",
101 => "body_bike_smart",
102 => "praxisworks",
103 => "limits_technology",
104 => "topaction_technology",
105 => "cosinuss",
106 => "fitcare",
107 => "magene",
108 => "giant_manufacturing_co",
109 => "tigrasport",
110 => "salutron",
111 => "technogym",
112 => "bryton_sensors",
113 => "latitude_limited",
114 => "soaring_technology",
115 => "igpsport",
116 => "thinkrider",
117 => "gopher_sport",
118 => "waterrower",
119 => "orangetheory",
120 => "inpeak",
121 => "kinetic",
122 => "johnson_health_tech",
123 => "polar_electro",
124 => "seesense",
125 => "nci_technology",
126 => "iqsquare",
127 => "leomo",
128 => "ifit_com",
129 => "coros_byte",
130 => "versa_design",
131 => "chileaf",
132 => "cycplus",
133 => "gravaa_byte",
134 => "sigeyi",
135 => "coospo",
136 => "geoid",
137 => "bosch",
138 => "kyto",
139 => "kinetic_sports",
140 => "decathlon_byte",
141 => "tq_systems",
142 => "tag_heuer",
255 => "development",
257 => "healthandlife",
258 => "lezyne",
259 => "scribe_labs",
260 => "zwift",
261 => "watteam",
262 => "recon",
263 => "favero_electronics",
264 => "dynovelo",
265 => "strava",
266 => "precor",
267 => "bryton",
268 => "sram",
269 => "navman",
270 => "cobi",
271 => "spivi",
272 => "mio_magellan",
273 => "evesports",
274 => "sensitivus_gauge",
275 => "podoon",
276 => "life_time_fitness",
277 => "falco_e_motors",
278 => "minoura",
279 => "cycliq",
280 => "luxottica",
281 => "trainer_road",
282 => "the_sufferfest",
283 => "fullspeedahead",
284 => "virtualtraining",
285 => "feedbacksports",
286 => "omata",
287 => "vdo",
288 => "magneticdays",
289 => "hammerhead",
290 => "kinetic_by_kurt",
291 => "shapelog",
292 => "dabuziduo",
293 => "jetblack",
294 => "coros",
295 => "virtugo",
296 => "velosense",
297 => "cycligentinc",
298 => "trailforks",
299 => "mahle_ebikemotion",
300 => "nurvv",
301 => "microprogram",
302 => "zone5cloud",
303 => "greenteg",
304 => "yamaha_motors",
305 => "whoop",
306 => "gravaa",
307 => "onelap",
308 => "monark_exercise",
309 => "form",
310 => "decathlon",
311 => "syncros",
312 => "heatup",
313 => "cannondale",
314 => "true_fitness",
315 => "RGT_cycling",
316 => "vasa",
317 => "race_republic",
318 => "fazua",
5759 => "actigraphcorp",
}),
(MesgCount, {
0 => "num_per_file",
1 => "max_per_file",
2 => "max_per_file_type",
}),
(MesgNum, {
0 => "file_id",
1 => "capabilities",
2 => "device_settings",
3 => "user_profile",
4 => "hrm_profile",
5 => "sdm_profile",
6 => "bike_profile",
7 => "zones_target",
8 => "hr_zone",
9 => "power_zone",
10 => "met_zone",
12 => "sport",
15 => "goal",
18 => "session",
19 => "lap",
20 => "record",
21 => "event",
23 => "device_info",
26 => "workout",
27 => "workout_step",
28 => "schedule",
30 => "weight_scale",
31 => "course",
32 => "course_point",
33 => "totals",
34 => "activity",
35 => "software",
37 => "file_capabilities",
38 => "mesg_capabilities",
39 => "field_capabilities",
49 => "file_creator",
51 => "blood_pressure",
53 => "speed_zone",
55 => "monitoring",
72 => "training_file",
78 => "hrv",
80 => "ant_rx",
81 => "ant_tx",
82 => "ant_channel_id",
101 => "length",
103 => "monitoring_info",
105 => "pad",
106 => "slave_device",
127 => "connectivity",
128 => "weather_conditions",
129 => "weather_alert",
131 => "cadence_zone",
132 => "hr",
142 => "segment_lap",
145 => "memo_glob",
148 => "segment_id",
149 => "segment_leaderboard_entry",
150 => "segment_point",
151 => "segment_file",
158 => "workout_session",
159 => "watchface_settings",
160 => "gps_metadata",
161 => "camera_event",
162 => "timestamp_correlation",
164 => "gyroscope_data",
165 => "accelerometer_data",
167 => "three_d_sensor_calibration",
169 => "video_frame",
174 => "obdii_data",
177 => "nmea_sentence",
178 => "aviation_attitude",
184 => "video",
185 => "video_title",
186 => "video_description",
187 => "video_clip",
188 => "ohr_settings",
200 => "exd_screen_configuration",
201 => "exd_data_field_configuration",
202 => "exd_data_concept_configuration",
206 => "field_description",
207 => "developer_data_id",
208 => "magnetometer_data",
209 => "barometer_data",
210 => "one_d_sensor_calibration",
225 => "set",
227 => "stress_level",
258 => "dive_settings",
259 => "dive_gas",
262 => "dive_alarm",
264 => "exercise_title",
268 => "dive_summary",
285 => "jump",
317 => "climb_pro",
375 => "device_aux_battery_info",
65280 => "mfg_range_min",
65534 => "mfg_range_max",
}),
(MessageIndex, {
32768 => "selected",
28672 => "reserved",
4095 => "mask",
}),
(PwrZoneCalc, {
0 => "custom",
1 => "percent_ftp",
}),
(RadarThreatLevelType, {
0 => "threat_unknown",
1 => "threat_none",
2 => "threat_approaching",
3 => "threat_approaching_fast",
}),
(Schedule, {
0 => "workout",
1 => "course",
}),
(SegmentDeleteStatus, {
0 => "do_not_delete",
1 => "delete_one",
2 => "delete_all",
}),
(SegmentLapStatus, {
0 => "end",
1 => "fail",
}),
(SegmentLeaderboardType, {
0 => "overall",
1 => "personal_best",
2 => "connections",
3 => "group",
4 => "challenger",
5 => "kom",
6 => "qom",
7 => "pr",
8 => "goal",
9 => "rival",
10 => "club_leader",
}),
(SegmentSelectionType, {
0 => "starred",
1 => "suggested",
}),
(SensorType, {
0 => "accelerometer",
1 => "gyroscope",
2 => "compass",
3 => "barometer",
}),
(SessionTrigger, {
0 => "activity_end",
1 => "manual",
2 => "auto_multi_sport",
3 => "fitness_equipment",
}),
(SetType, {
0 => "rest",
1 => "active",
}),
(Side, {
0 => "right",
1 => "left",
}),
(SourceType, {
0 => "ant",
1 => "antplus",
2 => "bluetooth",
3 => "bluetooth_low_energy",
4 => "wifi",
5 => "local",
}),
(Sport, {
0 => "generic",
1 => "running",
2 => "cycling",
3 => "transition",
4 => "fitness_equipment",
5 => "swimming",
6 => "basketball",
7 => "soccer",
8 => "tennis",
9 => "american_football",
10 => "training",
11 => "walking",
12 => "cross_country_skiing",
13 => "alpine_skiing",
14 => "snowboarding",
15 => "rowing",
16 => "mountaineering",
17 => "hiking",
18 => "multisport",
19 => "paddling",
20 => "flying",
21 => "e_biking",
22 => "motorcycling",
23 => "boating",
24 => "driving",
25 => "golf",
26 => "hang_gliding",
27 => "horseback_riding",
28 => "hunting",
29 => "fishing",
30 => "inline_skating",
31 => "rock_climbing",
32 => "sailing",
33 => "ice_skating",
34 => "sky_diving",
35 => "snowshoeing",
36 => "snowmobiling",
37 => "stand_up_paddleboarding",
38 => "surfing",
39 => "wakeboarding",
40 => "water_skiing",
41 => "kayaking",
42 => "rafting",
43 => "windsurfing",
44 => "kitesurfing",
45 => "tactical",
46 => "jumpmaster",
47 => "boxing",
48 => "floor_climbing",
53 => "diving",
254 => "all",
}),
(SportBits0, {
1 => "generic",
2 => "running",
4 => "cycling",
8 => "transition",
16 => "fitness_equipment",
32 => "swimming",
64 => "basketball",
128 => "soccer",
}),
(SportEvent, {
0 => "uncategorized",
1 => "geocaching",
2 => "fitness",
3 => "recreation",
4 => "race",
5 => "special_event",
6 => "training",
7 => "transportation",
8 => "touring",
}),
(StrokeType, {
0 => "no_event",
1 => "other",
2 => "serve",
3 => "forehand",
4 => "backhand",
5 => "smash",
}),
(SubSport, {
0 => "generic",
1 => "treadmill",
2 => "street",
3 => "trail",
4 => "track",
5 => "spin",
6 => "indoor_cycling",
7 => "road",
8 => "mountain",
9 => "downhill",
10 => "recumbent",
11 => "cyclocross",
12 => "hand_cycling",
13 => "track_cycling",
14 => "indoor_rowing",
15 => "elliptical",
16 => "stair_climbing",
17 => "lap_swimming",
18 => "open_water",
19 => "flexibility_training",
20 => "strength_training",
21 => "warm_up",
22 => "match",
23 => "exercise",
24 => "challenge",
25 => "indoor_skiing",
26 => "cardio_training",
27 => "indoor_walking",
28 => "e_bike_fitness",
29 => "bmx",
30 => "casual_walking",
31 => "speed_walking",
32 => "bike_to_run_transition",
33 => "run_to_bike_transition",
34 => "swim_to_bike_transition",
35 => "atv",
36 => "motocross",
37 => "backcountry",
38 => "resort",
39 => "rc_drone",
40 => "wingsuit",
41 => "whitewater",
42 => "skate_skiing",
43 => "yoga",
44 => "pilates",
45 => "indoor_running",
46 => "gravel_cycling",
47 => "e_bike_mountain",
48 => "commuting",
49 => "mixed_surface",
50 => "navigate",
51 => "track_me",
52 => "map",
53 => "single_gas_diving",
54 => "multi_gas_diving",
55 => "gauge_diving",
56 => "apnea_diving",
57 => "apnea_hunting",
58 => "virtual_activity",
59 => "obstacle",
62 => "breathing",
65 => "sail_race",
67 => "ultra",
68 => "indoor_climbing",
69 => "bouldering",
254 => "all",
}),
(SwimStroke, {
0 => "freestyle",
1 => "backstroke",
2 => "breaststroke",
3 => "butterfly",
4 => "drill",
5 => "mixed",
6 => "im",
}),
(Switch, {
0 => "off",
1 => "on",
2 => "auto",
}),
(TapSensitivity, {
0 => "high",
1 => "medium",
2 => "low",
}),
(TimeMode, {
0 => "hour12",
1 => "hour24",
2 => "military",
3 => "hour_12_with_seconds",
4 => "hour_24_with_seconds",
5 => "utc",
}),
(TissueModelType, {
0 => "zhl_16c",
}),
(Tone, {
0 => "off",
1 => "tone",
2 => "vibrate",
3 => "tone_and_vibrate",
}),
(UserLocalId, {
0 => "local_min",
15 => "local_max",
16 => "stationary_min",
255 => "stationary_max",
256 => "portable_min",
65534 => "portable_max",
}),
(WatchfaceMode, {
0 => "digital",
1 => "analog",
2 => "connect_iq",
3 => "disabled",
}),
(WaterType, {
0 => "fresh",
1 => "salt",
2 => "en13319",
3 => "custom",
}),
(WeatherReport, {
0 => "current",
1 => "hourly_forecast",
2 => "daily_forecast",
}),
(WeatherSevereType, {
0 => "unspecified",
1 => "tornado",
2 => "tsunami",
3 => "hurricane",
4 => "extreme_wind",
5 => "typhoon",
6 => "inland_hurricane",
7 => "hurricane_force_wind",
8 => "waterspout",
9 => "severe_thunderstorm",
10 => "wreckhouse_winds",
11 => "les_suetes_wind",
12 => "avalanche",
13 => "flash_flood",
14 => "tropical_storm",
15 => "inland_tropical_storm",
16 => "blizzard",
17 => "ice_storm",
18 => "freezing_rain",
19 => "debris_flow",
20 => "flash_freeze",
21 => "dust_storm",
22 => "high_wind",
23 => "winter_storm",
24 => "heavy_freezing_spray",
25 => "extreme_cold",
26 => "wind_chill",
27 => "cold_wave",
28 => "heavy_snow_alert",
29 => "lake_effect_blowing_snow",
30 => "snow_squall",
31 => "lake_effect_snow",
32 => "winter_weather",
33 => "sleet",
34 => "snowfall",
35 => "snow_and_blowing_snow",
36 => "blowing_snow",
37 => "snow_alert",
38 => "arctic_outflow",
39 => "freezing_drizzle",
40 => "storm",
41 => "storm_surge",
42 => "rainfall",
43 => "areal_flood",
44 => "coastal_flood",
45 => "lakeshore_flood",
46 => "excessive_heat",
47 => "heat",
48 => "weather",
49 => "high_heat_and_humidity",
50 => "humidex_and_health",
51 => "humidex",
52 => "gale",
53 => "freezing_spray",
54 => "special_marine",
55 => "squall",
56 => "strong_wind",
57 => "lake_wind",
58 => "marine_weather",
59 => "wind",
60 => "small_craft_hazardous_seas",
61 => "hazardous_seas",
62 => "small_craft",
63 => "small_craft_winds",
64 => "small_craft_rough_bar",
65 => "high_water_level",
66 => "ashfall",
67 => "freezing_fog",
68 => "dense_fog",
69 => "dense_smoke",
70 => "blowing_dust",
71 => "hard_freeze",
72 => "freeze",
73 => "frost",
74 => "fire_weather",
75 => "flood",
76 => "rip_tide",
77 => "high_surf",
78 => "smog",
79 => "air_quality",
80 => "brisk_wind",
81 => "air_stagnation",
82 => "low_water",
83 => "hydrological",
84 => "special_weather",
}),
(WeatherSeverity, {
0 => "unknown",
1 => "warning",
2 => "watch",
3 => "advisory",
4 => "statement",
}),
(WeatherStatus, {
0 => "clear",
1 => "partly_cloudy",
2 => "mostly_cloudy",
3 => "rain",
4 => "snow",
5 => "windy",
6 => "thunderstorms",
7 => "wintry_mix",
8 => "fog",
11 => "hazy",
12 => "hail",
13 => "scattered_showers",
14 => "scattered_thunderstorms",
15 => "unknown_precipitation",
16 => "light_rain",
17 => "heavy_rain",
18 => "light_snow",
19 => "heavy_snow",
20 => "light_rain_snow",
21 => "heavy_rain_snow",
22 => "cloudy",
}),
(Weight, {
65534 => "calculating",
}),
(WktStepDuration, {
0 => "time",
1 => "distance",
2 => "hr_less_than",
3 => "hr_greater_than",
4 => "calories",
5 => "open",
6 => "repeat_until_steps_cmplt",
7 => "repeat_until_time",
8 => "repeat_until_distance",
9 => "repeat_until_calories",
10 => "repeat_until_hr_less_than",
11 => "repeat_until_hr_greater_than",
12 => "repeat_until_power_less_than",
13 => "repeat_until_power_greater_than",
14 => "power_less_than",
15 => "power_greater_than",
16 => "training_peaks_tss",
17 => "repeat_until_power_last_lap_less_than",
18 => "repeat_until_max_power_last_lap_less_than",
19 => "power_3s_less_than",
20 => "power_10s_less_than",
21 => "power_30s_less_than",
22 => "power_3s_greater_than",
23 => "power_10s_greater_than",
24 => "power_30s_greater_than",
25 => "power_lap_less_than",
26 => "power_lap_greater_than",
27 => "repeat_until_training_peaks_tss",
28 => "repetition_time",
29 => "reps",
31 => "time_only",
}),
(WktStepTarget, {
0 => "speed",
1 => "heart_rate",
2 => "open",
3 => "cadence",
4 => "power",
5 => "grade",
6 => "resistance",
7 => "power_3s",
8 => "power_10s",
9 => "power_30s",
10 => "power_lap",
11 => "swim_stroke",
12 => "speed_lap",
13 => "heart_rate_lap",
}),
(WorkoutCapabilities, {
1 => "interval",
2 => "custom",
4 => "fitness_equipment",
8 => "firstbeat",
16 => "new_leaf",
32 => "tcx",
128 => "speed",
256 => "heart_rate",
512 => "distance",
1024 => "cadence",
2048 => "power",
4096 => "grade",
8192 => "resistance",
16384 => "protected",
}),
(WorkoutEquipment, {
0 => "none",
1 => "swim_fins",
2 => "swim_kickboard",
3 => "swim_paddles",
4 => "swim_pull_buoy",
5 => "swim_snorkel",
}),
}
pub fn get_field_string_value(f: FieldType, k: usize) -> Option<&'static str> {
match f {
FieldType::Activity => activity_stringify_field_value(k),
FieldType::ActivityClass => activityclass_stringify_field_value(k),
FieldType::ActivityLevel => activitylevel_stringify_field_value(k),
FieldType::ActivitySubtype => activitysubtype_stringify_field_value(k),
FieldType::ActivityType => activitytype_stringify_field_value(k),
FieldType::AntNetwork => antnetwork_stringify_field_value(k),
FieldType::AttitudeStage => attitudestage_stringify_field_value(k),
FieldType::AttitudeValidity => attitudevalidity_stringify_field_value(k),
FieldType::AutoActivityDetect => autoactivitydetect_stringify_field_value(k),
FieldType::AutoSyncFrequency => autosyncfrequency_stringify_field_value(k),
FieldType::BacklightMode => backlightmode_stringify_field_value(k),
FieldType::BacklightTimeout => backlighttimeout_stringify_field_value(k),
FieldType::BatteryStatus => batterystatus_stringify_field_value(k),
FieldType::BodyLocation => bodylocation_stringify_field_value(k),
FieldType::BpStatus => bpstatus_stringify_field_value(k),
FieldType::CameraEventType => cameraeventtype_stringify_field_value(k),
FieldType::CameraOrientationType => cameraorientationtype_stringify_field_value(k),
FieldType::ClimbProEvent => climbproevent_stringify_field_value(k),
FieldType::ConnectivityCapabilities => connectivitycapabilities_stringify_field_value(k),
FieldType::CourseCapabilities => coursecapabilities_stringify_field_value(k),
FieldType::CoursePoint => coursepoint_stringify_field_value(k),
FieldType::DateMode => datemode_stringify_field_value(k),
FieldType::DateTime => datetime_stringify_field_value(k),
FieldType::DayOfWeek => dayofweek_stringify_field_value(k),
FieldType::DeviceIndex => deviceindex_stringify_field_value(k),
FieldType::DisplayHeart => displayheart_stringify_field_value(k),
FieldType::DisplayMeasure => displaymeasure_stringify_field_value(k),
FieldType::DisplayOrientation => displayorientation_stringify_field_value(k),
FieldType::DisplayPosition => displayposition_stringify_field_value(k),
FieldType::DisplayPower => displaypower_stringify_field_value(k),
FieldType::DiveAlarmType => divealarmtype_stringify_field_value(k),
FieldType::DiveBacklightMode => divebacklightmode_stringify_field_value(k),
FieldType::DiveGasStatus => divegasstatus_stringify_field_value(k),
FieldType::Event => event_stringify_field_value(k),
FieldType::EventType => eventtype_stringify_field_value(k),
FieldType::ExdDataUnits => exddataunits_stringify_field_value(k),
FieldType::ExdDescriptors => exddescriptors_stringify_field_value(k),
FieldType::ExdDisplayType => exddisplaytype_stringify_field_value(k),
FieldType::ExdLayout => exdlayout_stringify_field_value(k),
FieldType::ExdQualifiers => exdqualifiers_stringify_field_value(k),
FieldType::ExerciseCategory => exercisecategory_stringify_field_value(k),
FieldType::File => file_stringify_field_value(k),
FieldType::FileFlags => fileflags_stringify_field_value(k),
FieldType::FitBaseType => fitbasetype_stringify_field_value(k),
FieldType::FitBaseUnit => fitbaseunit_stringify_field_value(k),
FieldType::Gender => gender_stringify_field_value(k),
FieldType::Goal => goal_stringify_field_value(k),
FieldType::GoalRecurrence => goalrecurrence_stringify_field_value(k),
FieldType::GoalSource => goalsource_stringify_field_value(k),
FieldType::HrType => hrtype_stringify_field_value(k),
FieldType::HrZoneCalc => hrzonecalc_stringify_field_value(k),
FieldType::Intensity => intensity_stringify_field_value(k),
FieldType::Language => language_stringify_field_value(k),
FieldType::LapTrigger => laptrigger_stringify_field_value(k),
FieldType::LeftRightBalance => leftrightbalance_stringify_field_value(k),
FieldType::LeftRightBalance100 => leftrightbalance100_stringify_field_value(k),
FieldType::LengthType => lengthtype_stringify_field_value(k),
FieldType::LocalDateTime => localdatetime_stringify_field_value(k),
FieldType::LocaltimeIntoDay => localtimeintoday_stringify_field_value(k),
FieldType::Manufacturer => manufacturer_stringify_field_value(k),
FieldType::MesgCount => mesgcount_stringify_field_value(k),
FieldType::MesgNum => mesgnum_stringify_field_value(k),
FieldType::MessageIndex => messageindex_stringify_field_value(k),
FieldType::PwrZoneCalc => pwrzonecalc_stringify_field_value(k),
FieldType::RadarThreatLevelType => radarthreatleveltype_stringify_field_value(k),
FieldType::Schedule => schedule_stringify_field_value(k),
FieldType::SegmentDeleteStatus => segmentdeletestatus_stringify_field_value(k),
FieldType::SegmentLapStatus => segmentlapstatus_stringify_field_value(k),
FieldType::SegmentLeaderboardType => segmentleaderboardtype_stringify_field_value(k),
FieldType::SegmentSelectionType => segmentselectiontype_stringify_field_value(k),
FieldType::SensorType => sensortype_stringify_field_value(k),
FieldType::SessionTrigger => sessiontrigger_stringify_field_value(k),
FieldType::SetType => settype_stringify_field_value(k),
FieldType::Side => side_stringify_field_value(k),
FieldType::SourceType => sourcetype_stringify_field_value(k),
FieldType::Sport => sport_stringify_field_value(k),
FieldType::SportBits0 => sportbits0_stringify_field_value(k),
FieldType::SportEvent => sportevent_stringify_field_value(k),
FieldType::StrokeType => stroketype_stringify_field_value(k),
FieldType::SubSport => subsport_stringify_field_value(k),
FieldType::SwimStroke => swimstroke_stringify_field_value(k),
FieldType::Switch => switch_stringify_field_value(k),
FieldType::TapSensitivity => tapsensitivity_stringify_field_value(k),
FieldType::TimeMode => timemode_stringify_field_value(k),
FieldType::TissueModelType => tissuemodeltype_stringify_field_value(k),
FieldType::Tone => tone_stringify_field_value(k),
FieldType::UserLocalId => userlocalid_stringify_field_value(k),
FieldType::WatchfaceMode => watchfacemode_stringify_field_value(k),
FieldType::WaterType => watertype_stringify_field_value(k),
FieldType::WeatherReport => weatherreport_stringify_field_value(k),
FieldType::WeatherSevereType => weatherseveretype_stringify_field_value(k),
FieldType::WeatherSeverity => weatherseverity_stringify_field_value(k),
FieldType::WeatherStatus => weatherstatus_stringify_field_value(k),
FieldType::Weight => weight_stringify_field_value(k),
FieldType::WktStepDuration => wktstepduration_stringify_field_value(k),
FieldType::WktStepTarget => wktsteptarget_stringify_field_value(k),
FieldType::WorkoutCapabilities => workoutcapabilities_stringify_field_value(k),
FieldType::WorkoutEquipment => workoutequipment_stringify_field_value(k),
FieldType::None => None,
_ => None,
}
}
pub fn get_field_key_from_string(f: FieldType, value: &str) -> Option<usize> {
match f {
FieldType::Activity => activity_parse_field_value(value),
FieldType::ActivityClass => activityclass_parse_field_value(value),
FieldType::ActivityLevel => activitylevel_parse_field_value(value),
FieldType::ActivitySubtype => activitysubtype_parse_field_value(value),
FieldType::ActivityType => activitytype_parse_field_value(value),
FieldType::AntNetwork => antnetwork_parse_field_value(value),
FieldType::AttitudeStage => attitudestage_parse_field_value(value),
FieldType::AttitudeValidity => attitudevalidity_parse_field_value(value),
FieldType::AutoActivityDetect => autoactivitydetect_parse_field_value(value),
FieldType::AutoSyncFrequency => autosyncfrequency_parse_field_value(value),
FieldType::BacklightMode => backlightmode_parse_field_value(value),
FieldType::BacklightTimeout => backlighttimeout_parse_field_value(value),
FieldType::BatteryStatus => batterystatus_parse_field_value(value),
FieldType::BodyLocation => bodylocation_parse_field_value(value),
FieldType::BpStatus => bpstatus_parse_field_value(value),
FieldType::CameraEventType => cameraeventtype_parse_field_value(value),
FieldType::CameraOrientationType => cameraorientationtype_parse_field_value(value),
FieldType::ClimbProEvent => climbproevent_parse_field_value(value),
FieldType::ConnectivityCapabilities => connectivitycapabilities_parse_field_value(value),
FieldType::CourseCapabilities => coursecapabilities_parse_field_value(value),
FieldType::CoursePoint => coursepoint_parse_field_value(value),
FieldType::DateMode => datemode_parse_field_value(value),
FieldType::DateTime => datetime_parse_field_value(value),
FieldType::DayOfWeek => dayofweek_parse_field_value(value),
FieldType::DeviceIndex => deviceindex_parse_field_value(value),
FieldType::DisplayHeart => displayheart_parse_field_value(value),
FieldType::DisplayMeasure => displaymeasure_parse_field_value(value),
FieldType::DisplayOrientation => displayorientation_parse_field_value(value),
FieldType::DisplayPosition => displayposition_parse_field_value(value),
FieldType::DisplayPower => displaypower_parse_field_value(value),
FieldType::DiveAlarmType => divealarmtype_parse_field_value(value),
FieldType::DiveBacklightMode => divebacklightmode_parse_field_value(value),
FieldType::DiveGasStatus => divegasstatus_parse_field_value(value),
FieldType::Event => event_parse_field_value(value),
FieldType::EventType => eventtype_parse_field_value(value),
FieldType::ExdDataUnits => exddataunits_parse_field_value(value),
FieldType::ExdDescriptors => exddescriptors_parse_field_value(value),
FieldType::ExdDisplayType => exddisplaytype_parse_field_value(value),
FieldType::ExdLayout => exdlayout_parse_field_value(value),
FieldType::ExdQualifiers => exdqualifiers_parse_field_value(value),
FieldType::ExerciseCategory => exercisecategory_parse_field_value(value),
FieldType::File => file_parse_field_value(value),
FieldType::FileFlags => fileflags_parse_field_value(value),
FieldType::FitBaseType => fitbasetype_parse_field_value(value),
FieldType::FitBaseUnit => fitbaseunit_parse_field_value(value),
FieldType::Gender => gender_parse_field_value(value),
FieldType::Goal => goal_parse_field_value(value),
FieldType::GoalRecurrence => goalrecurrence_parse_field_value(value),
FieldType::GoalSource => goalsource_parse_field_value(value),
FieldType::HrType => hrtype_parse_field_value(value),
FieldType::HrZoneCalc => hrzonecalc_parse_field_value(value),
FieldType::Intensity => intensity_parse_field_value(value),
FieldType::Language => language_parse_field_value(value),
FieldType::LapTrigger => laptrigger_parse_field_value(value),
FieldType::LeftRightBalance => leftrightbalance_parse_field_value(value),
FieldType::LeftRightBalance100 => leftrightbalance100_parse_field_value(value),
FieldType::LengthType => lengthtype_parse_field_value(value),
FieldType::LocalDateTime => localdatetime_parse_field_value(value),
FieldType::LocaltimeIntoDay => localtimeintoday_parse_field_value(value),
FieldType::Manufacturer => manufacturer_parse_field_value(value),
FieldType::MesgCount => mesgcount_parse_field_value(value),
FieldType::MesgNum => mesgnum_parse_field_value(value),
FieldType::MessageIndex => messageindex_parse_field_value(value),
FieldType::PwrZoneCalc => pwrzonecalc_parse_field_value(value),
FieldType::RadarThreatLevelType => radarthreatleveltype_parse_field_value(value),
FieldType::Schedule => schedule_parse_field_value(value),
FieldType::SegmentDeleteStatus => segmentdeletestatus_parse_field_value(value),
FieldType::SegmentLapStatus => segmentlapstatus_parse_field_value(value),
FieldType::SegmentLeaderboardType => segmentleaderboardtype_parse_field_value(value),
FieldType::SegmentSelectionType => segmentselectiontype_parse_field_value(value),
FieldType::SensorType => sensortype_parse_field_value(value),
FieldType::SessionTrigger => sessiontrigger_parse_field_value(value),
FieldType::SetType => settype_parse_field_value(value),
FieldType::Side => side_parse_field_value(value),
FieldType::SourceType => sourcetype_parse_field_value(value),
FieldType::Sport => sport_parse_field_value(value),
FieldType::SportBits0 => sportbits0_parse_field_value(value),
FieldType::SportEvent => sportevent_parse_field_value(value),
FieldType::StrokeType => stroketype_parse_field_value(value),
FieldType::SubSport => subsport_parse_field_value(value),
FieldType::SwimStroke => swimstroke_parse_field_value(value),
FieldType::Switch => switch_parse_field_value(value),
FieldType::TapSensitivity => tapsensitivity_parse_field_value(value),
FieldType::TimeMode => timemode_parse_field_value(value),
FieldType::TissueModelType => tissuemodeltype_parse_field_value(value),
FieldType::Tone => tone_parse_field_value(value),
FieldType::UserLocalId => userlocalid_parse_field_value(value),
FieldType::WatchfaceMode => watchfacemode_parse_field_value(value),
FieldType::WaterType => watertype_parse_field_value(value),
FieldType::WeatherReport => weatherreport_parse_field_value(value),
FieldType::WeatherSevereType => weatherseveretype_parse_field_value(value),
FieldType::WeatherSeverity => weatherseverity_parse_field_value(value),
FieldType::WeatherStatus => weatherstatus_parse_field_value(value),
FieldType::Weight => weight_parse_field_value(value),
FieldType::WktStepDuration => wktstepduration_parse_field_value(value),
FieldType::WktStepTarget => wktsteptarget_parse_field_value(value),
FieldType::WorkoutCapabilities => workoutcapabilities_parse_field_value(value),
FieldType::WorkoutEquipment => workoutequipment_parse_field_value(value),
FieldType::None => None,
_ => None,
}
}