Documentation
¶
Overview ¶
Package profile defines an abstraction layer of types used in the FIT file above the base types (primitive-types) such as sint, uint, etc. Here is an example to help understanding it better:
- Type DateTime is a time representation decoded in uint32 format in the FIT binary proto. The value of uint32 is a number counted since FIT Epoch (time since 31 Dec 1989 00:00:000 UTC).
Using an abstraction layer like the profile type allows time to be stored in binary files as compact as uint32 values. This means that when we encounter a field with the DateTime type, we can decode it into time.Time{}.
Index ¶
Constants ¶
View Source
const Version uint16 = 21133
Version is the current profile version, v21.133, in uint16 representation.
-> "21" + "133" = "21133" -> 21133.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProfileType ¶
type ProfileType uint16
const ( Enum ProfileType = iota Sint8 Uint8 Sint16 Uint16 Sint32 Uint32 String Float32 Float64 Uint8z Uint16z Uint32z Byte Sint64 Uint64 Uint64z Bool File MesgNum Checksum FileFlags MesgCount DateTime LocalDateTime MessageIndex DeviceIndex Gender Language LanguageBits0 LanguageBits1 LanguageBits2 LanguageBits3 LanguageBits4 TimeZone DisplayMeasure DisplayHeart DisplayPower DisplayPosition Switch Sport SportBits0 SportBits1 SportBits2 SportBits3 SportBits4 SportBits5 SportBits6 SubSport SportEvent Activity Intensity SessionTrigger AutolapTrigger LapTrigger TimeMode BacklightMode DateMode BacklightTimeout Event EventType TimerTrigger FitnessEquipmentState Tone Autoscroll ActivityClass HrZoneCalc PwrZoneCalc WktStepDuration WktStepTarget Goal GoalRecurrence GoalSource Schedule CoursePoint Manufacturer GarminProduct AntplusDeviceType AntNetwork WorkoutCapabilities BatteryStatus HrType CourseCapabilities Weight WorkoutHr WorkoutPower BpStatus UserLocalId SwimStroke ActivityType ActivitySubtype ActivityLevel Side LeftRightBalance LeftRightBalance100 LengthType DayOfWeek ConnectivityCapabilities WeatherReport WeatherStatus WeatherSeverity WeatherSevereType TimeIntoDay LocaltimeIntoDay StrokeType BodyLocation SegmentLapStatus SegmentLeaderboardType SegmentDeleteStatus SegmentSelectionType SourceType LocalDeviceType BleDeviceType AntChannelId DisplayOrientation WorkoutEquipment WatchfaceMode DigitalWatchfaceLayout AnalogWatchfaceLayout RiderPositionType PowerPhaseType CameraEventType SensorType BikeLightNetworkConfigType CommTimeoutType CameraOrientationType AttitudeStage AttitudeValidity AutoSyncFrequency ExdLayout ExdDisplayType ExdDataUnits ExdQualifiers ExdDescriptors AutoActivityDetect SupportedExdScreenLayouts FitBaseType TurnType BikeLightBeamAngleMode FitBaseUnit SetType MaxMetCategory ExerciseCategory BenchPressExerciseName CalfRaiseExerciseName CardioExerciseName CarryExerciseName ChopExerciseName CoreExerciseName CrunchExerciseName CurlExerciseName DeadliftExerciseName FlyeExerciseName HipRaiseExerciseName HipStabilityExerciseName HipSwingExerciseName HyperextensionExerciseName LateralRaiseExerciseName LegCurlExerciseName LegRaiseExerciseName LungeExerciseName OlympicLiftExerciseName PlankExerciseName PlyoExerciseName PullUpExerciseName PushUpExerciseName RowExerciseName ShoulderPressExerciseName ShoulderStabilityExerciseName ShrugExerciseName SitUpExerciseName SquatExerciseName TotalBodyExerciseName TricepsExtensionExerciseName WarmUpExerciseName RunExerciseName WaterType TissueModelType DiveGasStatus DiveAlert DiveAlarmType DiveBacklightMode SleepLevel Spo2MeasurementType CcrSetpointSwitchMode DiveGasMode ProjectileType FaveroProduct SplitType ClimbProEvent GasConsumptionRateType TapSensitivity RadarThreatLevelType MaxMetSpeedSource MaxMetHeartRateSource HrvStatus NoFlyTimeMode Invalid ProfileType = 65535 )
func ProfileTypeFromBaseType ¶ added in v0.11.0
func ProfileTypeFromBaseType(baseType basetype.BaseType) ProfileType
func ProfileTypeFromString ¶
func ProfileTypeFromString(s string) ProfileType
FromString parse string into ProfileType constant it's represent, return ProfileTypeInvalid if not found.
func (ProfileType) BaseType ¶
func (p ProfileType) BaseType() basetype.BaseType
func (ProfileType) String ¶
func (p ProfileType) String() string
func (ProfileType) Uint16 ¶ added in v0.14.0
func (p ProfileType) Uint16() uint16
Directories
¶
Path | Synopsis |
---|---|
Package basetype defines the base of all types used in FIT.
|
Package basetype defines the base of all types used in FIT. |
Package filedef contains the implementation of known common file types and its listener to convert decoded FIT file into the desired common file type as soon as the message is decoded.
|
Package filedef contains the implementation of known common file types and its listener to convert decoded FIT file into the desired common file type as soon as the message is decoded. |
Package mesgdef contains all the messages defined in the Global Profile (Profile.xlsx), which is generated by internal/cmd/fitgen/main.go.
|
Package mesgdef contains all the messages defined in the Global Profile (Profile.xlsx), which is generated by internal/cmd/fitgen/main.go. |
Package typedef contains all the types defined in the Global Profile (Profile.xlsx) generated by internal/cmd/fitgen/main.go.
|
Package typedef contains all the types defined in the Global Profile (Profile.xlsx) generated by internal/cmd/fitgen/main.go. |
untyped
|
|
fieldnum
Package fieldnum contains untyped constants for greater flexibility, intended to simplify code typing when creating messages and fields using the factory and reduce human error.
|
Package fieldnum contains untyped constants for greater flexibility, intended to simplify code typing when creating messages and fields using the factory and reduce human error. |
mesgnum
Package mesgnum contains untyped constants for greater flexibility, intended to simplify code typing when creating messages and fields using the factory and reduce human error.
|
Package mesgnum contains untyped constants for greater flexibility, intended to simplify code typing when creating messages and fields using the factory and reduce human error. |
Click to show internal directories.
Click to hide internal directories.