mappers

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FieldDefMap = map[uint64]fieldDefMap{}/* 103 elements not displayed */
View Source
var SubFieldDefMap = map[uint64]map[uint64]map[string]map[string]FieldDef{
	0: {
		2: {
			"manufacturer": {
				"garmin":         {Name: "garmin_product", Type: "garmin_product"},
				"dynastream":     {Name: "garmin_product", Type: "garmin_product"},
				"dynastream_oem": {Name: "garmin_product", Type: "garmin_product"},
				"tacx":           {Name: "garmin_product", Type: "garmin_product"},
			},
		},
	},
	18: {
		10: {
			"sport": {
				"cycling":                 {Name: "total_strokes", Unit: "strokes"},
				"swimming":                {Name: "total_strokes", Unit: "strokes"},
				"rowing":                  {Name: "total_strokes", Unit: "strokes"},
				"stand_up_paddleboarding": {Name: "total_strokes", Unit: "strokes"},
			},
		},
		18: {
			"sport": {
				"running": {Name: "avg_running_cadence", Unit: "strides/min"},
			},
		},
		19: {
			"sport": {
				"running": {Name: "max_running_cadence", Unit: "strides/min"},
			},
		},
	},
	19: {
		10: {
			"sport": {
				"cycling":                 {Name: "total_strokes", Unit: "strokes"},
				"swimming":                {Name: "total_strokes", Unit: "strokes"},
				"rowing":                  {Name: "total_strokes", Unit: "strokes"},
				"stand_up_paddleboarding": {Name: "total_strokes", Unit: "strokes"},
			},
		},
		17: {
			"sport": {
				"running": {Name: "avg_running_cadence", Unit: "strides/min"},
			},
		},
		18: {
			"sport": {
				"running": {Name: "max_running_cadence", Unit: "strides/min"},
			},
		},
	},
	21: {
		3: {
			"event": {
				"radar_threat_alert": {Name: "radar_threat_alert"},
			},
		},
		15: {
			"event": {
				"auto_activity_detect": {Name: "auto_activity_detect_start_timestamp", Type: "date_time", Unit: "s"},
			},
		},
	},
	23: {
		1: {
			"source_type": {
				"local": {Name: "local_device_type", Type: "local_device_type"},
			},
		},
		4: {
			"manufacturer": {
				"garmin":         {Name: "garmin_product", Type: "garmin_product"},
				"dynastream":     {Name: "garmin_product", Type: "garmin_product"},
				"dynastream_oem": {Name: "garmin_product", Type: "garmin_product"},
				"tacx":           {Name: "garmin_product", Type: "garmin_product"},
			},
		},
	},
	27: {
		2: {
			"duration_type": {
				"reps": {Name: "duration_reps"},
			},
		},
		4: {
			"target_type": {
				"swim_stroke": {Name: "target_stroke_type", Type: "swim_stroke"},
			},
		},
		5: {
			"target_type": {
				"power": {Name: "custom_target_power_low", Type: "workout_power", Unit: "% or watts"},
			},
		},
		6: {
			"target_type": {
				"power": {Name: "custom_target_power_high", Type: "workout_power", Unit: "% or watts"},
			},
		},
		20: {
			"secondary_target_type": {
				"swim_stroke": {Name: "secondary_target_stroke_type", Type: "swim_stroke"},
			},
		},
		21: {
			"secondary_target_type": {
				"power": {Name: "secondary_custom_target_power_low", Type: "workout_power", Unit: "% or watts"},
			},
		},
		22: {
			"secondary_target_type": {
				"power": {Name: "secondary_custom_target_power_high", Type: "workout_power", Unit: "% or watts"},
			},
		},
	},
	28: {
		1: {
			"manufacturer": {
				"garmin":         {Name: "garmin_product", Type: "garmin_product"},
				"dynastream":     {Name: "garmin_product", Type: "garmin_product"},
				"dynastream_oem": {Name: "garmin_product", Type: "garmin_product"},
				"tacx":           {Name: "garmin_product", Type: "garmin_product"},
			},
		},
	},
	38: {
		3: {
			"count_type": {
				"max_per_file_type": {Name: "max_per_file_type"},
			},
		},
	},
	55: {
		3: {
			"activity_type": {
				"cycling":  {Name: "strokes", Unit: "strokes", Scale: 2},
				"swimming": {Name: "strokes", Unit: "strokes", Scale: 2},
			},
		},
	},
	72: {
		2: {
			"manufacturer": {
				"garmin":         {Name: "garmin_product", Type: "garmin_product"},
				"dynastream":     {Name: "garmin_product", Type: "garmin_product"},
				"dynastream_oem": {Name: "garmin_product", Type: "garmin_product"},
				"tacx":           {Name: "garmin_product", Type: "garmin_product"},
			},
		},
	},
	106: {
		1: {
			"manufacturer": {
				"garmin":         {Name: "garmin_product", Type: "garmin_product"},
				"dynastream":     {Name: "garmin_product", Type: "garmin_product"},
				"dynastream_oem": {Name: "garmin_product", Type: "garmin_product"},
				"tacx":           {Name: "garmin_product", Type: "garmin_product"},
			},
		},
	},
	142: {
		10: {
			"sport": {
				"cycling": {Name: "total_strokes", Unit: "strokes"},
			},
		},
	},
	159: {
		1: {
			"mode": {
				"analog": {Name: "analog_layout", Type: "analog_watchface_layout"},
			},
		},
	},
	167: {
		1: {
			"sensor_type": {
				"gyroscope": {Name: "gyro_cal_factor", Unit: "deg/s"},
			},
		},
	},
	210: {
		1: {
			"sensor_type": {
				"barometer": {Name: "baro_cal_factor", Unit: "Pa"},
			},
		},
	},
	258: {
		20: {
			"heart_rate_source_type": {
				"local": {Name: "heart_rate_local_device_type", Type: "local_device_type"},
			},
		},
	},
}
View Source
var TypeDefMap = map[string]typeDefMap{}/* 178 elements not displayed */

Functions

func GetFloatFormatter

func GetFloatFormatter(fDef LocalFieldDef) scalar.FltFn

func GetSintFormatter

func GetSintFormatter(fDef LocalFieldDef) scalar.SintFn

func GetUintFormatter

func GetUintFormatter(fDef LocalFieldDef) scalar.UintFn

Types

type FieldDef

type FieldDef struct {
	Name        string
	Type        string
	Unit        string
	Scale       float64
	Offset      int64
	Size        uint64
	HasSubField bool
}

type LocalFieldDef

type LocalFieldDef struct {
	Name             string
	Type             string
	Format           string
	Unit             string
	Scale            float64
	Offset           int64
	Size             uint64
	GlobalFieldDef   FieldDef
	GlobalMessageNo  uint64
	GlobalFieldDefNo uint64
}

type TypeDefLookup

type TypeDefLookup struct {
	Name string
	Type string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL