mesgdef

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Overview

Package mesgdef contains all the messages defined in the Global Profile (Profile.xlsx), which is generated by internal/cmd/fitgen/main.go. Each message includes a constructor to convert a proto.Message to its corresponding struct and vice versa, the struct could be convert back to proto.Message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AadAccelFeatures added in v0.10.0

type AadAccelFeatures struct {
	Timestamp          time.Time
	EnergyTotal        uint32 // Total accelerometer energy in the interval
	Time               uint16 // Units: s; Time interval length in seconds
	ZeroCrossCnt       uint16 // Count of zero crossings
	TimeAboveThreshold uint16 // Scale: 25; Units: s; Total accelerometer time above threshold in the interval
	Instance           uint8  // Instance ID of zero crossing algorithm

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

AadAccelFeatures is a AadAccelFeatures message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAadAccelFeatures added in v0.10.0

func NewAadAccelFeatures(mesg *proto.Message) *AadAccelFeatures

NewAadAccelFeatures creates new AadAccelFeatures struct based on given mesg. If mesg is nil, it will return AadAccelFeatures with all fields being set to its corresponding invalid value.

func (*AadAccelFeatures) SetDeveloperFields added in v0.10.0

func (m *AadAccelFeatures) SetDeveloperFields(developerFields ...proto.DeveloperField) *AadAccelFeatures

SetDeveloperFields sets DeveloperFields.

func (*AadAccelFeatures) SetEnergyTotal added in v0.10.0

func (m *AadAccelFeatures) SetEnergyTotal(v uint32) *AadAccelFeatures

SetEnergyTotal sets EnergyTotal value.

Total accelerometer energy in the interval

func (*AadAccelFeatures) SetInstance added in v0.10.0

func (m *AadAccelFeatures) SetInstance(v uint8) *AadAccelFeatures

SetInstance sets Instance value.

Instance ID of zero crossing algorithm

func (*AadAccelFeatures) SetTime added in v0.10.0

func (m *AadAccelFeatures) SetTime(v uint16) *AadAccelFeatures

SetTime sets Time value.

Units: s; Time interval length in seconds

func (*AadAccelFeatures) SetTimeAboveThreshold added in v0.10.0

func (m *AadAccelFeatures) SetTimeAboveThreshold(v uint16) *AadAccelFeatures

SetTimeAboveThreshold sets TimeAboveThreshold value.

Scale: 25; Units: s; Total accelerometer time above threshold in the interval

func (*AadAccelFeatures) SetTimeAboveThresholdScaled added in v0.17.2

func (m *AadAccelFeatures) SetTimeAboveThresholdScaled(v float64) *AadAccelFeatures

SetTimeAboveThresholdScaled is similar to SetTimeAboveThreshold except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 25; Units: s; Total accelerometer time above threshold in the interval

func (*AadAccelFeatures) SetTimestamp added in v0.10.0

func (m *AadAccelFeatures) SetTimestamp(v time.Time) *AadAccelFeatures

SetTimestamp sets Timestamp value.

func (*AadAccelFeatures) SetUnknownFields added in v0.23.6

func (m *AadAccelFeatures) SetUnknownFields(unknownFields ...proto.Field) *AadAccelFeatures

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AadAccelFeatures) SetZeroCrossCnt added in v0.10.0

func (m *AadAccelFeatures) SetZeroCrossCnt(v uint16) *AadAccelFeatures

SetZeroCrossCnt sets ZeroCrossCnt value.

Count of zero crossings

func (*AadAccelFeatures) TimeAboveThresholdScaled added in v0.10.0

func (m *AadAccelFeatures) TimeAboveThresholdScaled() float64

TimeAboveThresholdScaled return TimeAboveThreshold in its scaled value. If TimeAboveThreshold value is invalid, float64 invalid value will be returned.

Scale: 25; Units: s; Total accelerometer time above threshold in the interval

func (*AadAccelFeatures) TimestampUint32 added in v0.15.0

func (m *AadAccelFeatures) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*AadAccelFeatures) ToMesg added in v0.10.0

func (m *AadAccelFeatures) ToMesg(options *Options) proto.Message

ToMesg converts AadAccelFeatures into proto.Message. If options is nil, default options will be used.

type AccelerometerData

type AccelerometerData struct {
	Timestamp                  time.Time // Units: s; Whole second part of the timestamp
	SampleTimeOffset           []uint16  // Array: [N]; Units: ms; Each time in the array describes the time at which the accelerometer sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in accel_x and accel_y and accel_z
	AccelX                     []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	AccelY                     []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	AccelZ                     []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	CalibratedAccelX           []float32 // Array: [N]; Units: g; Calibrated accel reading
	CalibratedAccelY           []float32 // Array: [N]; Units: g; Calibrated accel reading
	CalibratedAccelZ           []float32 // Array: [N]; Units: g; Calibrated accel reading
	CompressedCalibratedAccelX []int16   // Array: [N]; Units: mG; Calibrated accel reading
	CompressedCalibratedAccelY []int16   // Array: [N]; Units: mG; Calibrated accel reading
	CompressedCalibratedAccelZ []int16   // Array: [N]; Units: mG; Calibrated accel reading
	TimestampMs                uint16    // Units: ms; Millisecond part of the timestamp.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

AccelerometerData is a AccelerometerData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAccelerometerData

func NewAccelerometerData(mesg *proto.Message) *AccelerometerData

NewAccelerometerData creates new AccelerometerData struct based on given mesg. If mesg is nil, it will return AccelerometerData with all fields being set to its corresponding invalid value.

func (*AccelerometerData) SetAccelX added in v0.4.0

func (m *AccelerometerData) SetAccelX(v []uint16) *AccelerometerData

SetAccelX sets AccelX value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*AccelerometerData) SetAccelY added in v0.4.0

func (m *AccelerometerData) SetAccelY(v []uint16) *AccelerometerData

SetAccelY sets AccelY value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*AccelerometerData) SetAccelZ added in v0.4.0

func (m *AccelerometerData) SetAccelZ(v []uint16) *AccelerometerData

SetAccelZ sets AccelZ value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*AccelerometerData) SetCalibratedAccelX added in v0.4.0

func (m *AccelerometerData) SetCalibratedAccelX(v []float32) *AccelerometerData

SetCalibratedAccelX sets CalibratedAccelX value.

Array: [N]; Units: g; Calibrated accel reading

func (*AccelerometerData) SetCalibratedAccelY added in v0.4.0

func (m *AccelerometerData) SetCalibratedAccelY(v []float32) *AccelerometerData

SetCalibratedAccelY sets CalibratedAccelY value.

Array: [N]; Units: g; Calibrated accel reading

func (*AccelerometerData) SetCalibratedAccelZ added in v0.4.0

func (m *AccelerometerData) SetCalibratedAccelZ(v []float32) *AccelerometerData

SetCalibratedAccelZ sets CalibratedAccelZ value.

Array: [N]; Units: g; Calibrated accel reading

func (*AccelerometerData) SetCompressedCalibratedAccelX added in v0.4.0

func (m *AccelerometerData) SetCompressedCalibratedAccelX(v []int16) *AccelerometerData

SetCompressedCalibratedAccelX sets CompressedCalibratedAccelX value.

Array: [N]; Units: mG; Calibrated accel reading

func (*AccelerometerData) SetCompressedCalibratedAccelY added in v0.4.0

func (m *AccelerometerData) SetCompressedCalibratedAccelY(v []int16) *AccelerometerData

SetCompressedCalibratedAccelY sets CompressedCalibratedAccelY value.

Array: [N]; Units: mG; Calibrated accel reading

func (*AccelerometerData) SetCompressedCalibratedAccelZ added in v0.4.0

func (m *AccelerometerData) SetCompressedCalibratedAccelZ(v []int16) *AccelerometerData

SetCompressedCalibratedAccelZ sets CompressedCalibratedAccelZ value.

Array: [N]; Units: mG; Calibrated accel reading

func (*AccelerometerData) SetDeveloperFields added in v0.4.0

func (m *AccelerometerData) SetDeveloperFields(developerFields ...proto.DeveloperField) *AccelerometerData

SetDeveloperFields sets DeveloperFields.

func (*AccelerometerData) SetSampleTimeOffset added in v0.4.0

func (m *AccelerometerData) SetSampleTimeOffset(v []uint16) *AccelerometerData

SetSampleTimeOffset sets SampleTimeOffset value.

Array: [N]; Units: ms; Each time in the array describes the time at which the accelerometer sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in accel_x and accel_y and accel_z

func (*AccelerometerData) SetTimestamp added in v0.4.0

func (m *AccelerometerData) SetTimestamp(v time.Time) *AccelerometerData

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*AccelerometerData) SetTimestampMs added in v0.4.0

func (m *AccelerometerData) SetTimestampMs(v uint16) *AccelerometerData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*AccelerometerData) SetUnknownFields added in v0.23.6

func (m *AccelerometerData) SetUnknownFields(unknownFields ...proto.Field) *AccelerometerData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AccelerometerData) TimestampUint32 added in v0.15.0

func (m *AccelerometerData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*AccelerometerData) ToMesg added in v0.3.0

func (m *AccelerometerData) ToMesg(options *Options) proto.Message

ToMesg converts AccelerometerData into proto.Message. If options is nil, default options will be used.

type Activity

type Activity struct {
	Timestamp      time.Time
	LocalTimestamp time.Time // timestamp epoch expressed in local time, used to convert activity timestamps to local time
	TotalTimerTime uint32    // Scale: 1000; Units: s; Exclude pauses
	NumSessions    uint16
	Type           typedef.Activity
	Event          typedef.Event
	EventType      typedef.EventType
	EventGroup     uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Activity is a Activity message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewActivity

func NewActivity(mesg *proto.Message) *Activity

NewActivity creates new Activity struct based on given mesg. If mesg is nil, it will return Activity with all fields being set to its corresponding invalid value.

func (*Activity) LocalTimestampUint32 added in v0.15.0

func (m *Activity) LocalTimestampUint32() uint32

LocalTimestampUint32 returns LocalTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Activity) SetDeveloperFields added in v0.4.0

func (m *Activity) SetDeveloperFields(developerFields ...proto.DeveloperField) *Activity

SetDeveloperFields sets DeveloperFields.

func (*Activity) SetEvent added in v0.4.0

func (m *Activity) SetEvent(v typedef.Event) *Activity

SetEvent sets Event value.

func (*Activity) SetEventGroup added in v0.4.0

func (m *Activity) SetEventGroup(v uint8) *Activity

SetEventGroup sets EventGroup value.

func (*Activity) SetEventType added in v0.4.0

func (m *Activity) SetEventType(v typedef.EventType) *Activity

SetEventType sets EventType value.

func (*Activity) SetLocalTimestamp added in v0.4.0

func (m *Activity) SetLocalTimestamp(v time.Time) *Activity

SetLocalTimestamp sets LocalTimestamp value.

timestamp epoch expressed in local time, used to convert activity timestamps to local time

func (*Activity) SetNumSessions added in v0.4.0

func (m *Activity) SetNumSessions(v uint16) *Activity

SetNumSessions sets NumSessions value.

func (*Activity) SetTimestamp added in v0.4.0

func (m *Activity) SetTimestamp(v time.Time) *Activity

SetTimestamp sets Timestamp value.

func (*Activity) SetTotalTimerTime added in v0.4.0

func (m *Activity) SetTotalTimerTime(v uint32) *Activity

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s; Exclude pauses

func (*Activity) SetTotalTimerTimeScaled added in v0.17.2

func (m *Activity) SetTotalTimerTimeScaled(v float64) *Activity

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Exclude pauses

func (*Activity) SetType added in v0.4.0

func (m *Activity) SetType(v typedef.Activity) *Activity

SetType sets Type value.

func (*Activity) SetUnknownFields added in v0.23.6

func (m *Activity) SetUnknownFields(unknownFields ...proto.Field) *Activity

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Activity) TimestampUint32 added in v0.15.0

func (m *Activity) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Activity) ToMesg added in v0.3.0

func (m *Activity) ToMesg(options *Options) proto.Message

ToMesg converts Activity into proto.Message. If options is nil, default options will be used.

func (*Activity) TotalTimerTimeScaled added in v0.8.0

func (m *Activity) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Exclude pauses

type AntChannelId

type AntChannelId struct {
	DeviceNumber     uint16 // Base: uint16z
	ChannelNumber    uint8
	DeviceType       uint8 // Base: uint8z
	TransmissionType uint8 // Base: uint8z
	DeviceIndex      typedef.DeviceIndex

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

AntChannelId is a AntChannelId message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAntChannelId

func NewAntChannelId(mesg *proto.Message) *AntChannelId

NewAntChannelId creates new AntChannelId struct based on given mesg. If mesg is nil, it will return AntChannelId with all fields being set to its corresponding invalid value.

func (*AntChannelId) SetChannelNumber added in v0.4.0

func (m *AntChannelId) SetChannelNumber(v uint8) *AntChannelId

SetChannelNumber sets ChannelNumber value.

func (*AntChannelId) SetDeveloperFields added in v0.4.0

func (m *AntChannelId) SetDeveloperFields(developerFields ...proto.DeveloperField) *AntChannelId

SetDeveloperFields sets DeveloperFields.

func (*AntChannelId) SetDeviceIndex added in v0.4.0

func (m *AntChannelId) SetDeviceIndex(v typedef.DeviceIndex) *AntChannelId

SetDeviceIndex sets DeviceIndex value.

func (*AntChannelId) SetDeviceNumber added in v0.4.0

func (m *AntChannelId) SetDeviceNumber(v uint16) *AntChannelId

SetDeviceNumber sets DeviceNumber value.

Base: uint16z

func (*AntChannelId) SetDeviceType added in v0.4.0

func (m *AntChannelId) SetDeviceType(v uint8) *AntChannelId

SetDeviceType sets DeviceType value.

Base: uint8z

func (*AntChannelId) SetTransmissionType added in v0.4.0

func (m *AntChannelId) SetTransmissionType(v uint8) *AntChannelId

SetTransmissionType sets TransmissionType value.

Base: uint8z

func (*AntChannelId) SetUnknownFields added in v0.23.6

func (m *AntChannelId) SetUnknownFields(unknownFields ...proto.Field) *AntChannelId

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AntChannelId) ToMesg added in v0.3.0

func (m *AntChannelId) ToMesg(options *Options) proto.Message

ToMesg converts AntChannelId into proto.Message. If options is nil, default options will be used.

type AntRx

type AntRx struct {
	Timestamp           time.Time // Units: s
	MesgData            []byte    // Array: [N]
	Data                []byte    // Array: [N]
	FractionalTimestamp uint16    // Scale: 32768; Units: s
	MesgId              byte
	ChannelNumber       uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

AntRx is a AntRx message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAntRx

func NewAntRx(mesg *proto.Message) *AntRx

NewAntRx creates new AntRx struct based on given mesg. If mesg is nil, it will return AntRx with all fields being set to its corresponding invalid value.

func (*AntRx) FractionalTimestampScaled added in v0.8.0

func (m *AntRx) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value. If FractionalTimestamp value is invalid, float64 invalid value will be returned.

Scale: 32768; Units: s

func (*AntRx) IsExpandedField added in v0.21.0

func (m *AntRx) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 3, 4.

func (*AntRx) MarkAsExpandedField added in v0.21.0

func (m *AntRx) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 3, 4.

func (*AntRx) SetChannelNumber added in v0.4.0

func (m *AntRx) SetChannelNumber(v uint8) *AntRx

SetChannelNumber sets ChannelNumber value.

func (*AntRx) SetData added in v0.4.0

func (m *AntRx) SetData(v []byte) *AntRx

SetData sets Data value.

Array: [N]

func (*AntRx) SetDeveloperFields added in v0.4.0

func (m *AntRx) SetDeveloperFields(developerFields ...proto.DeveloperField) *AntRx

SetDeveloperFields sets DeveloperFields.

func (*AntRx) SetFractionalTimestamp added in v0.4.0

func (m *AntRx) SetFractionalTimestamp(v uint16) *AntRx

SetFractionalTimestamp sets FractionalTimestamp value.

Scale: 32768; Units: s

func (*AntRx) SetFractionalTimestampScaled added in v0.17.2

func (m *AntRx) SetFractionalTimestampScaled(v float64) *AntRx

SetFractionalTimestampScaled is similar to SetFractionalTimestamp except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 32768; Units: s

func (*AntRx) SetMesgData added in v0.4.0

func (m *AntRx) SetMesgData(v []byte) *AntRx

SetMesgData sets MesgData value.

Array: [N]

func (*AntRx) SetMesgId added in v0.4.0

func (m *AntRx) SetMesgId(v byte) *AntRx

SetMesgId sets MesgId value.

func (*AntRx) SetTimestamp added in v0.4.0

func (m *AntRx) SetTimestamp(v time.Time) *AntRx

SetTimestamp sets Timestamp value.

Units: s

func (*AntRx) SetUnknownFields added in v0.23.6

func (m *AntRx) SetUnknownFields(unknownFields ...proto.Field) *AntRx

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AntRx) TimestampUint32 added in v0.15.0

func (m *AntRx) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*AntRx) ToMesg added in v0.3.0

func (m *AntRx) ToMesg(options *Options) proto.Message

ToMesg converts AntRx into proto.Message. If options is nil, default options will be used.

type AntTx

type AntTx struct {
	Timestamp           time.Time // Units: s
	MesgData            []byte    // Array: [N]
	Data                []byte    // Array: [N]
	FractionalTimestamp uint16    // Scale: 32768; Units: s
	MesgId              byte
	ChannelNumber       uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

AntTx is a AntTx message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAntTx

func NewAntTx(mesg *proto.Message) *AntTx

NewAntTx creates new AntTx struct based on given mesg. If mesg is nil, it will return AntTx with all fields being set to its corresponding invalid value.

func (*AntTx) FractionalTimestampScaled added in v0.8.0

func (m *AntTx) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value. If FractionalTimestamp value is invalid, float64 invalid value will be returned.

Scale: 32768; Units: s

func (*AntTx) IsExpandedField added in v0.21.0

func (m *AntTx) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 3, 4.

func (*AntTx) MarkAsExpandedField added in v0.21.0

func (m *AntTx) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 3, 4.

func (*AntTx) SetChannelNumber added in v0.4.0

func (m *AntTx) SetChannelNumber(v uint8) *AntTx

SetChannelNumber sets ChannelNumber value.

func (*AntTx) SetData added in v0.4.0

func (m *AntTx) SetData(v []byte) *AntTx

SetData sets Data value.

Array: [N]

func (*AntTx) SetDeveloperFields added in v0.4.0

func (m *AntTx) SetDeveloperFields(developerFields ...proto.DeveloperField) *AntTx

SetDeveloperFields sets DeveloperFields.

func (*AntTx) SetFractionalTimestamp added in v0.4.0

func (m *AntTx) SetFractionalTimestamp(v uint16) *AntTx

SetFractionalTimestamp sets FractionalTimestamp value.

Scale: 32768; Units: s

func (*AntTx) SetFractionalTimestampScaled added in v0.17.2

func (m *AntTx) SetFractionalTimestampScaled(v float64) *AntTx

SetFractionalTimestampScaled is similar to SetFractionalTimestamp except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 32768; Units: s

func (*AntTx) SetMesgData added in v0.4.0

func (m *AntTx) SetMesgData(v []byte) *AntTx

SetMesgData sets MesgData value.

Array: [N]

func (*AntTx) SetMesgId added in v0.4.0

func (m *AntTx) SetMesgId(v byte) *AntTx

SetMesgId sets MesgId value.

func (*AntTx) SetTimestamp added in v0.4.0

func (m *AntTx) SetTimestamp(v time.Time) *AntTx

SetTimestamp sets Timestamp value.

Units: s

func (*AntTx) SetUnknownFields added in v0.23.6

func (m *AntTx) SetUnknownFields(unknownFields ...proto.Field) *AntTx

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AntTx) TimestampUint32 added in v0.15.0

func (m *AntTx) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*AntTx) ToMesg added in v0.3.0

func (m *AntTx) ToMesg(options *Options) proto.Message

ToMesg converts AntTx into proto.Message. If options is nil, default options will be used.

type AviationAttitude

type AviationAttitude struct {
	Timestamp             time.Time                  // Units: s; Timestamp message was output
	SystemTime            []uint32                   // Array: [N]; Units: ms; System time associated with sample expressed in ms.
	Pitch                 []int16                    // Array: [N]; Scale: 10430.38; Units: radians; Range -PI/2 to +PI/2
	Roll                  []int16                    // Array: [N]; Scale: 10430.38; Units: radians; Range -PI to +PI
	AccelLateral          []int16                    // Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)
	AccelNormal           []int16                    // Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)
	TurnRate              []int16                    // Array: [N]; Scale: 1024; Units: radians/second; Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)
	Stage                 []typedef.AttitudeStage    // Array: [N]
	AttitudeStageComplete []uint8                    // Array: [N]; Units: %; The percent complete of the current attitude stage. Set to 0 for attitude stages 0, 1 and 2 and to 100 for attitude stage 3 by AHRS modules that do not support it. Range - 100
	Track                 []uint16                   // Array: [N]; Scale: 10430.38; Units: radians; Track Angle/Heading Range 0 - 2pi
	Validity              []typedef.AttitudeValidity // Array: [N]
	TimestampMs           uint16                     // Units: ms; Fractional part of timestamp, added to timestamp

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

AviationAttitude is a AviationAttitude message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewAviationAttitude

func NewAviationAttitude(mesg *proto.Message) *AviationAttitude

NewAviationAttitude creates new AviationAttitude struct based on given mesg. If mesg is nil, it will return AviationAttitude with all fields being set to its corresponding invalid value.

func (*AviationAttitude) AccelLateralScaled added in v0.8.0

func (m *AviationAttitude) AccelLateralScaled() []float64

AccelLateralScaled return AccelLateral in its scaled value. If AccelLateral value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) AccelNormalScaled added in v0.8.0

func (m *AviationAttitude) AccelNormalScaled() []float64

AccelNormalScaled return AccelNormal in its scaled value. If AccelNormal value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) PitchScaled added in v0.8.0

func (m *AviationAttitude) PitchScaled() []float64

PitchScaled return Pitch in its scaled value. If Pitch value is invalid, nil will be returned.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI/2 to +PI/2

func (*AviationAttitude) RollScaled added in v0.8.0

func (m *AviationAttitude) RollScaled() []float64

RollScaled return Roll in its scaled value. If Roll value is invalid, nil will be returned.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI to +PI

func (*AviationAttitude) SetAccelLateral added in v0.4.0

func (m *AviationAttitude) SetAccelLateral(v []int16) *AviationAttitude

SetAccelLateral sets AccelLateral value.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) SetAccelLateralScaled added in v0.17.2

func (m *AviationAttitude) SetAccelLateralScaled(vs []float64) *AviationAttitude

SetAccelLateralScaled is similar to SetAccelLateral except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) SetAccelNormal added in v0.4.0

func (m *AviationAttitude) SetAccelNormal(v []int16) *AviationAttitude

SetAccelNormal sets AccelNormal value.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) SetAccelNormalScaled added in v0.17.2

func (m *AviationAttitude) SetAccelNormalScaled(vs []float64) *AviationAttitude

SetAccelNormalScaled is similar to SetAccelNormal except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)

func (*AviationAttitude) SetAttitudeStageComplete added in v0.4.0

func (m *AviationAttitude) SetAttitudeStageComplete(v []uint8) *AviationAttitude

SetAttitudeStageComplete sets AttitudeStageComplete value.

Array: [N]; Units: %; The percent complete of the current attitude stage. Set to 0 for attitude stages 0, 1 and 2 and to 100 for attitude stage 3 by AHRS modules that do not support it. Range - 100

func (*AviationAttitude) SetDeveloperFields added in v0.4.0

func (m *AviationAttitude) SetDeveloperFields(developerFields ...proto.DeveloperField) *AviationAttitude

SetDeveloperFields sets DeveloperFields.

func (*AviationAttitude) SetPitch added in v0.4.0

func (m *AviationAttitude) SetPitch(v []int16) *AviationAttitude

SetPitch sets Pitch value.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI/2 to +PI/2

func (*AviationAttitude) SetPitchScaled added in v0.17.2

func (m *AviationAttitude) SetPitchScaled(vs []float64) *AviationAttitude

SetPitchScaled is similar to SetPitch except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI/2 to +PI/2

func (*AviationAttitude) SetRoll added in v0.4.0

func (m *AviationAttitude) SetRoll(v []int16) *AviationAttitude

SetRoll sets Roll value.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI to +PI

func (*AviationAttitude) SetRollScaled added in v0.17.2

func (m *AviationAttitude) SetRollScaled(vs []float64) *AviationAttitude

SetRollScaled is similar to SetRoll except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10430.38; Units: radians; Range -PI to +PI

func (*AviationAttitude) SetStage added in v0.4.0

SetStage sets Stage value.

Array: [N]

func (*AviationAttitude) SetSystemTime added in v0.4.0

func (m *AviationAttitude) SetSystemTime(v []uint32) *AviationAttitude

SetSystemTime sets SystemTime value.

Array: [N]; Units: ms; System time associated with sample expressed in ms.

func (*AviationAttitude) SetTimestamp added in v0.4.0

func (m *AviationAttitude) SetTimestamp(v time.Time) *AviationAttitude

SetTimestamp sets Timestamp value.

Units: s; Timestamp message was output

func (*AviationAttitude) SetTimestampMs added in v0.4.0

func (m *AviationAttitude) SetTimestampMs(v uint16) *AviationAttitude

SetTimestampMs sets TimestampMs value.

Units: ms; Fractional part of timestamp, added to timestamp

func (*AviationAttitude) SetTrack added in v0.4.0

func (m *AviationAttitude) SetTrack(v []uint16) *AviationAttitude

SetTrack sets Track value.

Array: [N]; Scale: 10430.38; Units: radians; Track Angle/Heading Range 0 - 2pi

func (*AviationAttitude) SetTrackScaled added in v0.17.2

func (m *AviationAttitude) SetTrackScaled(vs []float64) *AviationAttitude

SetTrackScaled is similar to SetTrack except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10430.38; Units: radians; Track Angle/Heading Range 0 - 2pi

func (*AviationAttitude) SetTurnRate added in v0.4.0

func (m *AviationAttitude) SetTurnRate(v []int16) *AviationAttitude

SetTurnRate sets TurnRate value.

Array: [N]; Scale: 1024; Units: radians/second; Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)

func (*AviationAttitude) SetTurnRateScaled added in v0.17.2

func (m *AviationAttitude) SetTurnRateScaled(vs []float64) *AviationAttitude

SetTurnRateScaled is similar to SetTurnRate except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1024; Units: radians/second; Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)

func (*AviationAttitude) SetUnknownFields added in v0.23.6

func (m *AviationAttitude) SetUnknownFields(unknownFields ...proto.Field) *AviationAttitude

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*AviationAttitude) SetValidity added in v0.4.0

SetValidity sets Validity value.

Array: [N]

func (*AviationAttitude) TimestampUint32 added in v0.15.0

func (m *AviationAttitude) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*AviationAttitude) ToMesg added in v0.3.0

func (m *AviationAttitude) ToMesg(options *Options) proto.Message

ToMesg converts AviationAttitude into proto.Message. If options is nil, default options will be used.

func (*AviationAttitude) TrackScaled added in v0.8.0

func (m *AviationAttitude) TrackScaled() []float64

TrackScaled return Track in its scaled value. If Track value is invalid, nil will be returned.

Array: [N]; Scale: 10430.38; Units: radians; Track Angle/Heading Range 0 - 2pi

func (*AviationAttitude) TurnRateScaled added in v0.8.0

func (m *AviationAttitude) TurnRateScaled() []float64

TurnRateScaled return TurnRate in its scaled value. If TurnRate value is invalid, nil will be returned.

Array: [N]; Scale: 1024; Units: radians/second; Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)

type BarometerData

type BarometerData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	SampleTimeOffset []uint16  // Array: [N]; Units: ms; Each time in the array describes the time at which the barometer sample with the corresponding index was taken. The samples may span across seconds. Array size must match the number of samples in baro_cal
	BaroPres         []uint32  // Array: [N]; Units: Pa; These are the raw ADC reading. The samples may span across seconds. A conversion will need to be done on this data once read.
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

BarometerData is a BarometerData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewBarometerData

func NewBarometerData(mesg *proto.Message) *BarometerData

NewBarometerData creates new BarometerData struct based on given mesg. If mesg is nil, it will return BarometerData with all fields being set to its corresponding invalid value.

func (*BarometerData) SetBaroPres added in v0.4.0

func (m *BarometerData) SetBaroPres(v []uint32) *BarometerData

SetBaroPres sets BaroPres value.

Array: [N]; Units: Pa; These are the raw ADC reading. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*BarometerData) SetDeveloperFields added in v0.4.0

func (m *BarometerData) SetDeveloperFields(developerFields ...proto.DeveloperField) *BarometerData

SetDeveloperFields sets DeveloperFields.

func (*BarometerData) SetSampleTimeOffset added in v0.4.0

func (m *BarometerData) SetSampleTimeOffset(v []uint16) *BarometerData

SetSampleTimeOffset sets SampleTimeOffset value.

Array: [N]; Units: ms; Each time in the array describes the time at which the barometer sample with the corresponding index was taken. The samples may span across seconds. Array size must match the number of samples in baro_cal

func (*BarometerData) SetTimestamp added in v0.4.0

func (m *BarometerData) SetTimestamp(v time.Time) *BarometerData

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*BarometerData) SetTimestampMs added in v0.4.0

func (m *BarometerData) SetTimestampMs(v uint16) *BarometerData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*BarometerData) SetUnknownFields added in v0.23.6

func (m *BarometerData) SetUnknownFields(unknownFields ...proto.Field) *BarometerData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*BarometerData) TimestampUint32 added in v0.15.0

func (m *BarometerData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*BarometerData) ToMesg added in v0.3.0

func (m *BarometerData) ToMesg(options *Options) proto.Message

ToMesg converts BarometerData into proto.Message. If options is nil, default options will be used.

type BeatIntervals

type BeatIntervals struct {
	Timestamp   time.Time
	Time        []uint16 // Array: [N]; Units: ms; Array of millisecond times between beats
	TimestampMs uint16   // Units: ms; Milliseconds past date_time

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

BeatIntervals is a BeatIntervals message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewBeatIntervals

func NewBeatIntervals(mesg *proto.Message) *BeatIntervals

NewBeatIntervals creates new BeatIntervals struct based on given mesg. If mesg is nil, it will return BeatIntervals with all fields being set to its corresponding invalid value.

func (*BeatIntervals) SetDeveloperFields added in v0.4.0

func (m *BeatIntervals) SetDeveloperFields(developerFields ...proto.DeveloperField) *BeatIntervals

SetDeveloperFields sets DeveloperFields.

func (*BeatIntervals) SetTime added in v0.4.0

func (m *BeatIntervals) SetTime(v []uint16) *BeatIntervals

SetTime sets Time value.

Array: [N]; Units: ms; Array of millisecond times between beats

func (*BeatIntervals) SetTimestamp added in v0.4.0

func (m *BeatIntervals) SetTimestamp(v time.Time) *BeatIntervals

SetTimestamp sets Timestamp value.

func (*BeatIntervals) SetTimestampMs added in v0.4.0

func (m *BeatIntervals) SetTimestampMs(v uint16) *BeatIntervals

SetTimestampMs sets TimestampMs value.

Units: ms; Milliseconds past date_time

func (*BeatIntervals) SetUnknownFields added in v0.23.6

func (m *BeatIntervals) SetUnknownFields(unknownFields ...proto.Field) *BeatIntervals

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*BeatIntervals) TimestampUint32 added in v0.15.0

func (m *BeatIntervals) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*BeatIntervals) ToMesg added in v0.3.0

func (m *BeatIntervals) ToMesg(options *Options) proto.Message

ToMesg converts BeatIntervals into proto.Message. If options is nil, default options will be used.

type BikeProfile

type BikeProfile struct {
	Name                     string
	FrontGear                []uint8 // Base: uint8z; Array: [N]; Number of teeth on each gear 0 is innermost
	RearGear                 []uint8 // Base: uint8z; Array: [N]; Number of teeth on each gear 0 is innermost
	Odometer                 uint32  // Scale: 100; Units: m
	MessageIndex             typedef.MessageIndex
	BikeSpdAntId             uint16 // Base: uint16z
	BikeCadAntId             uint16 // Base: uint16z
	BikeSpdcadAntId          uint16 // Base: uint16z
	BikePowerAntId           uint16 // Base: uint16z
	CustomWheelsize          uint16 // Scale: 1000; Units: m
	AutoWheelsize            uint16 // Scale: 1000; Units: m
	BikeWeight               uint16 // Scale: 10; Units: kg
	PowerCalFactor           uint16 // Scale: 10; Units: %
	Sport                    typedef.Sport
	SubSport                 typedef.SubSport
	AutoWheelCal             typedef.Bool
	AutoPowerZero            typedef.Bool
	Id                       uint8
	SpdEnabled               typedef.Bool
	CadEnabled               typedef.Bool
	SpdcadEnabled            typedef.Bool
	PowerEnabled             typedef.Bool
	CrankLength              uint8 // Scale: 2; Offset: -110; Units: mm
	Enabled                  typedef.Bool
	BikeSpdAntIdTransType    uint8 // Base: uint8z
	BikeCadAntIdTransType    uint8 // Base: uint8z
	BikeSpdcadAntIdTransType uint8 // Base: uint8z
	BikePowerAntIdTransType  uint8 // Base: uint8z
	OdometerRollover         uint8 // Rollover counter that can be used to extend the odometer
	FrontGearNum             uint8 // Base: uint8z; Number of front gears
	RearGearNum              uint8 // Base: uint8z; Number of rear gears
	ShimanoDi2Enabled        typedef.Bool

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

BikeProfile is a BikeProfile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewBikeProfile

func NewBikeProfile(mesg *proto.Message) *BikeProfile

NewBikeProfile creates new BikeProfile struct based on given mesg. If mesg is nil, it will return BikeProfile with all fields being set to its corresponding invalid value.

func (*BikeProfile) AutoWheelsizeScaled added in v0.8.0

func (m *BikeProfile) AutoWheelsizeScaled() float64

AutoWheelsizeScaled return AutoWheelsize in its scaled value. If AutoWheelsize value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m

func (*BikeProfile) BikeWeightScaled added in v0.8.0

func (m *BikeProfile) BikeWeightScaled() float64

BikeWeightScaled return BikeWeight in its scaled value. If BikeWeight value is invalid, float64 invalid value will be returned.

Scale: 10; Units: kg

func (*BikeProfile) CrankLengthScaled added in v0.8.0

func (m *BikeProfile) CrankLengthScaled() float64

CrankLengthScaled return CrankLength in its scaled value. If CrankLength value is invalid, float64 invalid value will be returned.

Scale: 2; Offset: -110; Units: mm

func (*BikeProfile) CustomWheelsizeScaled added in v0.8.0

func (m *BikeProfile) CustomWheelsizeScaled() float64

CustomWheelsizeScaled return CustomWheelsize in its scaled value. If CustomWheelsize value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m

func (*BikeProfile) OdometerScaled added in v0.8.0

func (m *BikeProfile) OdometerScaled() float64

OdometerScaled return Odometer in its scaled value. If Odometer value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*BikeProfile) PowerCalFactorScaled added in v0.8.0

func (m *BikeProfile) PowerCalFactorScaled() float64

PowerCalFactorScaled return PowerCalFactor in its scaled value. If PowerCalFactor value is invalid, float64 invalid value will be returned.

Scale: 10; Units: %

func (*BikeProfile) SetAutoPowerZero added in v0.4.0

func (m *BikeProfile) SetAutoPowerZero(v typedef.Bool) *BikeProfile

SetAutoPowerZero sets AutoPowerZero value.

func (*BikeProfile) SetAutoWheelCal added in v0.4.0

func (m *BikeProfile) SetAutoWheelCal(v typedef.Bool) *BikeProfile

SetAutoWheelCal sets AutoWheelCal value.

func (*BikeProfile) SetAutoWheelsize added in v0.4.0

func (m *BikeProfile) SetAutoWheelsize(v uint16) *BikeProfile

SetAutoWheelsize sets AutoWheelsize value.

Scale: 1000; Units: m

func (*BikeProfile) SetAutoWheelsizeScaled added in v0.17.2

func (m *BikeProfile) SetAutoWheelsizeScaled(v float64) *BikeProfile

SetAutoWheelsizeScaled is similar to SetAutoWheelsize except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m

func (*BikeProfile) SetBikeCadAntId added in v0.4.0

func (m *BikeProfile) SetBikeCadAntId(v uint16) *BikeProfile

SetBikeCadAntId sets BikeCadAntId value.

Base: uint16z

func (*BikeProfile) SetBikeCadAntIdTransType added in v0.4.0

func (m *BikeProfile) SetBikeCadAntIdTransType(v uint8) *BikeProfile

SetBikeCadAntIdTransType sets BikeCadAntIdTransType value.

Base: uint8z

func (*BikeProfile) SetBikePowerAntId added in v0.4.0

func (m *BikeProfile) SetBikePowerAntId(v uint16) *BikeProfile

SetBikePowerAntId sets BikePowerAntId value.

Base: uint16z

func (*BikeProfile) SetBikePowerAntIdTransType added in v0.4.0

func (m *BikeProfile) SetBikePowerAntIdTransType(v uint8) *BikeProfile

SetBikePowerAntIdTransType sets BikePowerAntIdTransType value.

Base: uint8z

func (*BikeProfile) SetBikeSpdAntId added in v0.4.0

func (m *BikeProfile) SetBikeSpdAntId(v uint16) *BikeProfile

SetBikeSpdAntId sets BikeSpdAntId value.

Base: uint16z

func (*BikeProfile) SetBikeSpdAntIdTransType added in v0.4.0

func (m *BikeProfile) SetBikeSpdAntIdTransType(v uint8) *BikeProfile

SetBikeSpdAntIdTransType sets BikeSpdAntIdTransType value.

Base: uint8z

func (*BikeProfile) SetBikeSpdcadAntId added in v0.4.0

func (m *BikeProfile) SetBikeSpdcadAntId(v uint16) *BikeProfile

SetBikeSpdcadAntId sets BikeSpdcadAntId value.

Base: uint16z

func (*BikeProfile) SetBikeSpdcadAntIdTransType added in v0.4.0

func (m *BikeProfile) SetBikeSpdcadAntIdTransType(v uint8) *BikeProfile

SetBikeSpdcadAntIdTransType sets BikeSpdcadAntIdTransType value.

Base: uint8z

func (*BikeProfile) SetBikeWeight added in v0.4.0

func (m *BikeProfile) SetBikeWeight(v uint16) *BikeProfile

SetBikeWeight sets BikeWeight value.

Scale: 10; Units: kg

func (*BikeProfile) SetBikeWeightScaled added in v0.17.2

func (m *BikeProfile) SetBikeWeightScaled(v float64) *BikeProfile

SetBikeWeightScaled is similar to SetBikeWeight except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: kg

func (*BikeProfile) SetCadEnabled added in v0.4.0

func (m *BikeProfile) SetCadEnabled(v typedef.Bool) *BikeProfile

SetCadEnabled sets CadEnabled value.

func (*BikeProfile) SetCrankLength added in v0.4.0

func (m *BikeProfile) SetCrankLength(v uint8) *BikeProfile

SetCrankLength sets CrankLength value.

Scale: 2; Offset: -110; Units: mm

func (*BikeProfile) SetCrankLengthScaled added in v0.17.2

func (m *BikeProfile) SetCrankLengthScaled(v float64) *BikeProfile

SetCrankLengthScaled is similar to SetCrankLength except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Offset: -110; Units: mm

func (*BikeProfile) SetCustomWheelsize added in v0.4.0

func (m *BikeProfile) SetCustomWheelsize(v uint16) *BikeProfile

SetCustomWheelsize sets CustomWheelsize value.

Scale: 1000; Units: m

func (*BikeProfile) SetCustomWheelsizeScaled added in v0.17.2

func (m *BikeProfile) SetCustomWheelsizeScaled(v float64) *BikeProfile

SetCustomWheelsizeScaled is similar to SetCustomWheelsize except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m

func (*BikeProfile) SetDeveloperFields added in v0.4.0

func (m *BikeProfile) SetDeveloperFields(developerFields ...proto.DeveloperField) *BikeProfile

SetDeveloperFields sets DeveloperFields.

func (*BikeProfile) SetEnabled added in v0.4.0

func (m *BikeProfile) SetEnabled(v typedef.Bool) *BikeProfile

SetEnabled sets Enabled value.

func (*BikeProfile) SetFrontGear added in v0.4.0

func (m *BikeProfile) SetFrontGear(v []uint8) *BikeProfile

SetFrontGear sets FrontGear value.

Base: uint8z; Array: [N]; Number of teeth on each gear 0 is innermost

func (*BikeProfile) SetFrontGearNum added in v0.4.0

func (m *BikeProfile) SetFrontGearNum(v uint8) *BikeProfile

SetFrontGearNum sets FrontGearNum value.

Base: uint8z; Number of front gears

func (*BikeProfile) SetId added in v0.4.0

func (m *BikeProfile) SetId(v uint8) *BikeProfile

SetId sets Id value.

func (*BikeProfile) SetMessageIndex added in v0.4.0

func (m *BikeProfile) SetMessageIndex(v typedef.MessageIndex) *BikeProfile

SetMessageIndex sets MessageIndex value.

func (*BikeProfile) SetName added in v0.4.0

func (m *BikeProfile) SetName(v string) *BikeProfile

SetName sets Name value.

func (*BikeProfile) SetOdometer added in v0.4.0

func (m *BikeProfile) SetOdometer(v uint32) *BikeProfile

SetOdometer sets Odometer value.

Scale: 100; Units: m

func (*BikeProfile) SetOdometerRollover added in v0.4.0

func (m *BikeProfile) SetOdometerRollover(v uint8) *BikeProfile

SetOdometerRollover sets OdometerRollover value.

Rollover counter that can be used to extend the odometer

func (*BikeProfile) SetOdometerScaled added in v0.17.2

func (m *BikeProfile) SetOdometerScaled(v float64) *BikeProfile

SetOdometerScaled is similar to SetOdometer except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*BikeProfile) SetPowerCalFactor added in v0.4.0

func (m *BikeProfile) SetPowerCalFactor(v uint16) *BikeProfile

SetPowerCalFactor sets PowerCalFactor value.

Scale: 10; Units: %

func (*BikeProfile) SetPowerCalFactorScaled added in v0.17.2

func (m *BikeProfile) SetPowerCalFactorScaled(v float64) *BikeProfile

SetPowerCalFactorScaled is similar to SetPowerCalFactor except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: %

func (*BikeProfile) SetPowerEnabled added in v0.4.0

func (m *BikeProfile) SetPowerEnabled(v typedef.Bool) *BikeProfile

SetPowerEnabled sets PowerEnabled value.

func (*BikeProfile) SetRearGear added in v0.4.0

func (m *BikeProfile) SetRearGear(v []uint8) *BikeProfile

SetRearGear sets RearGear value.

Base: uint8z; Array: [N]; Number of teeth on each gear 0 is innermost

func (*BikeProfile) SetRearGearNum added in v0.4.0

func (m *BikeProfile) SetRearGearNum(v uint8) *BikeProfile

SetRearGearNum sets RearGearNum value.

Base: uint8z; Number of rear gears

func (*BikeProfile) SetShimanoDi2Enabled added in v0.4.0

func (m *BikeProfile) SetShimanoDi2Enabled(v typedef.Bool) *BikeProfile

SetShimanoDi2Enabled sets ShimanoDi2Enabled value.

func (*BikeProfile) SetSpdEnabled added in v0.4.0

func (m *BikeProfile) SetSpdEnabled(v typedef.Bool) *BikeProfile

SetSpdEnabled sets SpdEnabled value.

func (*BikeProfile) SetSpdcadEnabled added in v0.4.0

func (m *BikeProfile) SetSpdcadEnabled(v typedef.Bool) *BikeProfile

SetSpdcadEnabled sets SpdcadEnabled value.

func (*BikeProfile) SetSport added in v0.4.0

func (m *BikeProfile) SetSport(v typedef.Sport) *BikeProfile

SetSport sets Sport value.

func (*BikeProfile) SetSubSport added in v0.4.0

func (m *BikeProfile) SetSubSport(v typedef.SubSport) *BikeProfile

SetSubSport sets SubSport value.

func (*BikeProfile) SetUnknownFields added in v0.23.6

func (m *BikeProfile) SetUnknownFields(unknownFields ...proto.Field) *BikeProfile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*BikeProfile) ToMesg added in v0.3.0

func (m *BikeProfile) ToMesg(options *Options) proto.Message

ToMesg converts BikeProfile into proto.Message. If options is nil, default options will be used.

type BloodPressure

type BloodPressure struct {
	Timestamp            time.Time            // Units: s
	SystolicPressure     uint16               // Units: mmHg
	DiastolicPressure    uint16               // Units: mmHg
	MeanArterialPressure uint16               // Units: mmHg
	Map3SampleMean       uint16               // Units: mmHg
	MapMorningValues     uint16               // Units: mmHg
	MapEveningValues     uint16               // Units: mmHg
	UserProfileIndex     typedef.MessageIndex // Associates this blood pressure message to a user. This corresponds to the index of the user profile message in the blood pressure file.
	HeartRate            uint8                // Units: bpm
	HeartRateType        typedef.HrType
	Status               typedef.BpStatus

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

BloodPressure is a BloodPressure message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewBloodPressure

func NewBloodPressure(mesg *proto.Message) *BloodPressure

NewBloodPressure creates new BloodPressure struct based on given mesg. If mesg is nil, it will return BloodPressure with all fields being set to its corresponding invalid value.

func (*BloodPressure) SetDeveloperFields added in v0.4.0

func (m *BloodPressure) SetDeveloperFields(developerFields ...proto.DeveloperField) *BloodPressure

SetDeveloperFields sets DeveloperFields.

func (*BloodPressure) SetDiastolicPressure added in v0.4.0

func (m *BloodPressure) SetDiastolicPressure(v uint16) *BloodPressure

SetDiastolicPressure sets DiastolicPressure value.

Units: mmHg

func (*BloodPressure) SetHeartRate added in v0.4.0

func (m *BloodPressure) SetHeartRate(v uint8) *BloodPressure

SetHeartRate sets HeartRate value.

Units: bpm

func (*BloodPressure) SetHeartRateType added in v0.4.0

func (m *BloodPressure) SetHeartRateType(v typedef.HrType) *BloodPressure

SetHeartRateType sets HeartRateType value.

func (*BloodPressure) SetMap3SampleMean added in v0.4.0

func (m *BloodPressure) SetMap3SampleMean(v uint16) *BloodPressure

SetMap3SampleMean sets Map3SampleMean value.

Units: mmHg

func (*BloodPressure) SetMapEveningValues added in v0.4.0

func (m *BloodPressure) SetMapEveningValues(v uint16) *BloodPressure

SetMapEveningValues sets MapEveningValues value.

Units: mmHg

func (*BloodPressure) SetMapMorningValues added in v0.4.0

func (m *BloodPressure) SetMapMorningValues(v uint16) *BloodPressure

SetMapMorningValues sets MapMorningValues value.

Units: mmHg

func (*BloodPressure) SetMeanArterialPressure added in v0.4.0

func (m *BloodPressure) SetMeanArterialPressure(v uint16) *BloodPressure

SetMeanArterialPressure sets MeanArterialPressure value.

Units: mmHg

func (*BloodPressure) SetStatus added in v0.4.0

func (m *BloodPressure) SetStatus(v typedef.BpStatus) *BloodPressure

SetStatus sets Status value.

func (*BloodPressure) SetSystolicPressure added in v0.4.0

func (m *BloodPressure) SetSystolicPressure(v uint16) *BloodPressure

SetSystolicPressure sets SystolicPressure value.

Units: mmHg

func (*BloodPressure) SetTimestamp added in v0.4.0

func (m *BloodPressure) SetTimestamp(v time.Time) *BloodPressure

SetTimestamp sets Timestamp value.

Units: s

func (*BloodPressure) SetUnknownFields added in v0.23.6

func (m *BloodPressure) SetUnknownFields(unknownFields ...proto.Field) *BloodPressure

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*BloodPressure) SetUserProfileIndex added in v0.4.0

func (m *BloodPressure) SetUserProfileIndex(v typedef.MessageIndex) *BloodPressure

SetUserProfileIndex sets UserProfileIndex value.

Associates this blood pressure message to a user. This corresponds to the index of the user profile message in the blood pressure file.

func (*BloodPressure) TimestampUint32 added in v0.15.0

func (m *BloodPressure) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*BloodPressure) ToMesg added in v0.3.0

func (m *BloodPressure) ToMesg(options *Options) proto.Message

ToMesg converts BloodPressure into proto.Message. If options is nil, default options will be used.

type CadenceZone

type CadenceZone struct {
	Name         string
	MessageIndex typedef.MessageIndex
	HighValue    uint8 // Units: rpm

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

CadenceZone is a CadenceZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewCadenceZone

func NewCadenceZone(mesg *proto.Message) *CadenceZone

NewCadenceZone creates new CadenceZone struct based on given mesg. If mesg is nil, it will return CadenceZone with all fields being set to its corresponding invalid value.

func (*CadenceZone) SetDeveloperFields added in v0.4.0

func (m *CadenceZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *CadenceZone

SetDeveloperFields sets DeveloperFields.

func (*CadenceZone) SetHighValue added in v0.4.0

func (m *CadenceZone) SetHighValue(v uint8) *CadenceZone

SetHighValue sets HighValue value.

Units: rpm

func (*CadenceZone) SetMessageIndex added in v0.4.0

func (m *CadenceZone) SetMessageIndex(v typedef.MessageIndex) *CadenceZone

SetMessageIndex sets MessageIndex value.

func (*CadenceZone) SetName added in v0.4.0

func (m *CadenceZone) SetName(v string) *CadenceZone

SetName sets Name value.

func (*CadenceZone) SetUnknownFields added in v0.23.6

func (m *CadenceZone) SetUnknownFields(unknownFields ...proto.Field) *CadenceZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*CadenceZone) ToMesg added in v0.3.0

func (m *CadenceZone) ToMesg(options *Options) proto.Message

ToMesg converts CadenceZone into proto.Message. If options is nil, default options will be used.

type CameraEvent

type CameraEvent struct {
	Timestamp         time.Time // Units: s; Whole second part of the timestamp.
	CameraFileUuid    string
	TimestampMs       uint16 // Units: ms; Millisecond part of the timestamp.
	CameraEventType   typedef.CameraEventType
	CameraOrientation typedef.CameraOrientationType

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

CameraEvent is a CameraEvent message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewCameraEvent

func NewCameraEvent(mesg *proto.Message) *CameraEvent

NewCameraEvent creates new CameraEvent struct based on given mesg. If mesg is nil, it will return CameraEvent with all fields being set to its corresponding invalid value.

func (*CameraEvent) SetCameraEventType added in v0.4.0

func (m *CameraEvent) SetCameraEventType(v typedef.CameraEventType) *CameraEvent

SetCameraEventType sets CameraEventType value.

func (*CameraEvent) SetCameraFileUuid added in v0.4.0

func (m *CameraEvent) SetCameraFileUuid(v string) *CameraEvent

SetCameraFileUuid sets CameraFileUuid value.

func (*CameraEvent) SetCameraOrientation added in v0.4.0

func (m *CameraEvent) SetCameraOrientation(v typedef.CameraOrientationType) *CameraEvent

SetCameraOrientation sets CameraOrientation value.

func (*CameraEvent) SetDeveloperFields added in v0.4.0

func (m *CameraEvent) SetDeveloperFields(developerFields ...proto.DeveloperField) *CameraEvent

SetDeveloperFields sets DeveloperFields.

func (*CameraEvent) SetTimestamp added in v0.4.0

func (m *CameraEvent) SetTimestamp(v time.Time) *CameraEvent

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp.

func (*CameraEvent) SetTimestampMs added in v0.4.0

func (m *CameraEvent) SetTimestampMs(v uint16) *CameraEvent

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*CameraEvent) SetUnknownFields added in v0.23.6

func (m *CameraEvent) SetUnknownFields(unknownFields ...proto.Field) *CameraEvent

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*CameraEvent) TimestampUint32 added in v0.15.0

func (m *CameraEvent) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*CameraEvent) ToMesg added in v0.3.0

func (m *CameraEvent) ToMesg(options *Options) proto.Message

ToMesg converts CameraEvent into proto.Message. If options is nil, default options will be used.

type Capabilities

type Capabilities struct {
	Languages             []uint8                          // Base: uint8z; Array: [N]; Use language_bits_x types where x is index of array.
	Sports                []typedef.SportBits0             // Base: uint8z; Array: [N]; Use sport_bits_x types where x is index of array.
	WorkoutsSupported     typedef.WorkoutCapabilities      // Base: uint32z
	ConnectivitySupported typedef.ConnectivityCapabilities // Base: uint32z

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Capabilities is a Capabilities message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewCapabilities

func NewCapabilities(mesg *proto.Message) *Capabilities

NewCapabilities creates new Capabilities struct based on given mesg. If mesg is nil, it will return Capabilities with all fields being set to its corresponding invalid value.

func (*Capabilities) SetConnectivitySupported added in v0.4.0

func (m *Capabilities) SetConnectivitySupported(v typedef.ConnectivityCapabilities) *Capabilities

SetConnectivitySupported sets ConnectivitySupported value.

Base: uint32z

func (*Capabilities) SetDeveloperFields added in v0.4.0

func (m *Capabilities) SetDeveloperFields(developerFields ...proto.DeveloperField) *Capabilities

SetDeveloperFields sets DeveloperFields.

func (*Capabilities) SetLanguages added in v0.4.0

func (m *Capabilities) SetLanguages(v []uint8) *Capabilities

SetLanguages sets Languages value.

Base: uint8z; Array: [N]; Use language_bits_x types where x is index of array.

func (*Capabilities) SetSports added in v0.4.0

func (m *Capabilities) SetSports(v []typedef.SportBits0) *Capabilities

SetSports sets Sports value.

Base: uint8z; Array: [N]; Use sport_bits_x types where x is index of array.

func (*Capabilities) SetUnknownFields added in v0.23.6

func (m *Capabilities) SetUnknownFields(unknownFields ...proto.Field) *Capabilities

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Capabilities) SetWorkoutsSupported added in v0.4.0

func (m *Capabilities) SetWorkoutsSupported(v typedef.WorkoutCapabilities) *Capabilities

SetWorkoutsSupported sets WorkoutsSupported value.

Base: uint32z

func (*Capabilities) ToMesg added in v0.3.0

func (m *Capabilities) ToMesg(options *Options) proto.Message

ToMesg converts Capabilities into proto.Message. If options is nil, default options will be used.

type ChronoShotData added in v0.10.0

type ChronoShotData struct {
	Timestamp time.Time
	ShotSpeed uint32 // Scale: 1000; Units: m/s
	ShotNum   uint16

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ChronoShotData is a ChronoShotData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewChronoShotData added in v0.10.0

func NewChronoShotData(mesg *proto.Message) *ChronoShotData

NewChronoShotData creates new ChronoShotData struct based on given mesg. If mesg is nil, it will return ChronoShotData with all fields being set to its corresponding invalid value.

func (*ChronoShotData) SetDeveloperFields added in v0.10.0

func (m *ChronoShotData) SetDeveloperFields(developerFields ...proto.DeveloperField) *ChronoShotData

SetDeveloperFields sets DeveloperFields.

func (*ChronoShotData) SetShotNum added in v0.10.0

func (m *ChronoShotData) SetShotNum(v uint16) *ChronoShotData

SetShotNum sets ShotNum value.

func (*ChronoShotData) SetShotSpeed added in v0.10.0

func (m *ChronoShotData) SetShotSpeed(v uint32) *ChronoShotData

SetShotSpeed sets ShotSpeed value.

Scale: 1000; Units: m/s

func (*ChronoShotData) SetShotSpeedScaled added in v0.17.2

func (m *ChronoShotData) SetShotSpeedScaled(v float64) *ChronoShotData

SetShotSpeedScaled is similar to SetShotSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*ChronoShotData) SetTimestamp added in v0.10.0

func (m *ChronoShotData) SetTimestamp(v time.Time) *ChronoShotData

SetTimestamp sets Timestamp value.

func (*ChronoShotData) SetUnknownFields added in v0.23.6

func (m *ChronoShotData) SetUnknownFields(unknownFields ...proto.Field) *ChronoShotData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ChronoShotData) ShotSpeedScaled added in v0.10.0

func (m *ChronoShotData) ShotSpeedScaled() float64

ShotSpeedScaled return ShotSpeed in its scaled value. If ShotSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*ChronoShotData) TimestampUint32 added in v0.15.0

func (m *ChronoShotData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ChronoShotData) ToMesg added in v0.10.0

func (m *ChronoShotData) ToMesg(options *Options) proto.Message

ToMesg converts ChronoShotData into proto.Message. If options is nil, default options will be used.

type ChronoShotSession added in v0.10.0

type ChronoShotSession struct {
	Timestamp         time.Time
	MinSpeed          uint32 // Scale: 1000; Units: m/s
	MaxSpeed          uint32 // Scale: 1000; Units: m/s
	AvgSpeed          uint32 // Scale: 1000; Units: m/s
	GrainWeight       uint32 // Scale: 10; Units: gr
	StandardDeviation uint32 // Scale: 1000; Units: m/s
	ShotCount         uint16
	ProjectileType    typedef.ProjectileType

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ChronoShotSession is a ChronoShotSession message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewChronoShotSession added in v0.10.0

func NewChronoShotSession(mesg *proto.Message) *ChronoShotSession

NewChronoShotSession creates new ChronoShotSession struct based on given mesg. If mesg is nil, it will return ChronoShotSession with all fields being set to its corresponding invalid value.

func (*ChronoShotSession) AvgSpeedScaled added in v0.10.0

func (m *ChronoShotSession) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*ChronoShotSession) GrainWeightScaled added in v0.10.0

func (m *ChronoShotSession) GrainWeightScaled() float64

GrainWeightScaled return GrainWeight in its scaled value. If GrainWeight value is invalid, float64 invalid value will be returned.

Scale: 10; Units: gr

func (*ChronoShotSession) MaxSpeedScaled added in v0.10.0

func (m *ChronoShotSession) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*ChronoShotSession) MinSpeedScaled added in v0.10.0

func (m *ChronoShotSession) MinSpeedScaled() float64

MinSpeedScaled return MinSpeed in its scaled value. If MinSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetAvgSpeed added in v0.10.0

func (m *ChronoShotSession) SetAvgSpeed(v uint32) *ChronoShotSession

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetAvgSpeedScaled added in v0.17.2

func (m *ChronoShotSession) SetAvgSpeedScaled(v float64) *ChronoShotSession

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetDeveloperFields added in v0.10.0

func (m *ChronoShotSession) SetDeveloperFields(developerFields ...proto.DeveloperField) *ChronoShotSession

SetDeveloperFields sets DeveloperFields.

func (*ChronoShotSession) SetGrainWeight added in v0.10.0

func (m *ChronoShotSession) SetGrainWeight(v uint32) *ChronoShotSession

SetGrainWeight sets GrainWeight value.

Scale: 10; Units: gr

func (*ChronoShotSession) SetGrainWeightScaled added in v0.17.2

func (m *ChronoShotSession) SetGrainWeightScaled(v float64) *ChronoShotSession

SetGrainWeightScaled is similar to SetGrainWeight except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 10; Units: gr

func (*ChronoShotSession) SetMaxSpeed added in v0.10.0

func (m *ChronoShotSession) SetMaxSpeed(v uint32) *ChronoShotSession

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetMaxSpeedScaled added in v0.17.2

func (m *ChronoShotSession) SetMaxSpeedScaled(v float64) *ChronoShotSession

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetMinSpeed added in v0.10.0

func (m *ChronoShotSession) SetMinSpeed(v uint32) *ChronoShotSession

SetMinSpeed sets MinSpeed value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetMinSpeedScaled added in v0.17.2

func (m *ChronoShotSession) SetMinSpeedScaled(v float64) *ChronoShotSession

SetMinSpeedScaled is similar to SetMinSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetProjectileType added in v0.10.0

func (m *ChronoShotSession) SetProjectileType(v typedef.ProjectileType) *ChronoShotSession

SetProjectileType sets ProjectileType value.

func (*ChronoShotSession) SetShotCount added in v0.10.0

func (m *ChronoShotSession) SetShotCount(v uint16) *ChronoShotSession

SetShotCount sets ShotCount value.

func (*ChronoShotSession) SetStandardDeviation added in v0.24.4

func (m *ChronoShotSession) SetStandardDeviation(v uint32) *ChronoShotSession

SetStandardDeviation sets StandardDeviation value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetStandardDeviationScaled added in v0.24.4

func (m *ChronoShotSession) SetStandardDeviationScaled(v float64) *ChronoShotSession

SetStandardDeviationScaled is similar to SetStandardDeviation except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetTimestamp added in v0.10.0

func (m *ChronoShotSession) SetTimestamp(v time.Time) *ChronoShotSession

SetTimestamp sets Timestamp value.

func (*ChronoShotSession) SetUnknownFields added in v0.23.6

func (m *ChronoShotSession) SetUnknownFields(unknownFields ...proto.Field) *ChronoShotSession

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ChronoShotSession) StandardDeviationScaled added in v0.24.4

func (m *ChronoShotSession) StandardDeviationScaled() float64

StandardDeviationScaled return StandardDeviation in its scaled value. If StandardDeviation value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*ChronoShotSession) TimestampUint32 added in v0.15.0

func (m *ChronoShotSession) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ChronoShotSession) ToMesg added in v0.10.0

func (m *ChronoShotSession) ToMesg(options *Options) proto.Message

ToMesg converts ChronoShotSession into proto.Message. If options is nil, default options will be used.

type ClimbPro

type ClimbPro struct {
	Timestamp     time.Time // Units: s
	PositionLat   int32     // Units: semicircles
	PositionLong  int32     // Units: semicircles
	CurrentDist   float32   // Units: m
	ClimbNumber   uint16
	ClimbProEvent typedef.ClimbProEvent
	ClimbCategory uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ClimbPro is a ClimbPro message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewClimbPro

func NewClimbPro(mesg *proto.Message) *ClimbPro

NewClimbPro creates new ClimbPro struct based on given mesg. If mesg is nil, it will return ClimbPro with all fields being set to its corresponding invalid value.

func (*ClimbPro) PositionLatDegrees added in v0.15.0

func (m *ClimbPro) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*ClimbPro) PositionLongDegrees added in v0.15.0

func (m *ClimbPro) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*ClimbPro) SetClimbCategory added in v0.4.0

func (m *ClimbPro) SetClimbCategory(v uint8) *ClimbPro

SetClimbCategory sets ClimbCategory value.

func (*ClimbPro) SetClimbNumber added in v0.4.0

func (m *ClimbPro) SetClimbNumber(v uint16) *ClimbPro

SetClimbNumber sets ClimbNumber value.

func (*ClimbPro) SetClimbProEvent added in v0.4.0

func (m *ClimbPro) SetClimbProEvent(v typedef.ClimbProEvent) *ClimbPro

SetClimbProEvent sets ClimbProEvent value.

func (*ClimbPro) SetCurrentDist added in v0.4.0

func (m *ClimbPro) SetCurrentDist(v float32) *ClimbPro

SetCurrentDist sets CurrentDist value.

Units: m

func (*ClimbPro) SetDeveloperFields added in v0.4.0

func (m *ClimbPro) SetDeveloperFields(developerFields ...proto.DeveloperField) *ClimbPro

SetDeveloperFields sets DeveloperFields.

func (*ClimbPro) SetPositionLat added in v0.4.0

func (m *ClimbPro) SetPositionLat(v int32) *ClimbPro

SetPositionLat sets PositionLat value.

Units: semicircles

func (*ClimbPro) SetPositionLatDegrees added in v0.17.2

func (m *ClimbPro) SetPositionLatDegrees(degrees float64) *ClimbPro

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*ClimbPro) SetPositionLong added in v0.4.0

func (m *ClimbPro) SetPositionLong(v int32) *ClimbPro

SetPositionLong sets PositionLong value.

Units: semicircles

func (*ClimbPro) SetPositionLongDegrees added in v0.17.2

func (m *ClimbPro) SetPositionLongDegrees(degrees float64) *ClimbPro

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*ClimbPro) SetTimestamp added in v0.4.0

func (m *ClimbPro) SetTimestamp(v time.Time) *ClimbPro

SetTimestamp sets Timestamp value.

Units: s

func (*ClimbPro) SetUnknownFields added in v0.23.6

func (m *ClimbPro) SetUnknownFields(unknownFields ...proto.Field) *ClimbPro

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ClimbPro) TimestampUint32 added in v0.15.0

func (m *ClimbPro) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ClimbPro) ToMesg added in v0.3.0

func (m *ClimbPro) ToMesg(options *Options) proto.Message

ToMesg converts ClimbPro into proto.Message. If options is nil, default options will be used.

type Connectivity

type Connectivity struct {
	Name                        string
	BluetoothEnabled            typedef.Bool // Use Bluetooth for connectivity features
	BluetoothLeEnabled          typedef.Bool // Use Bluetooth Low Energy for connectivity features
	AntEnabled                  typedef.Bool // Use ANT for connectivity features
	LiveTrackingEnabled         typedef.Bool
	WeatherConditionsEnabled    typedef.Bool
	WeatherAlertsEnabled        typedef.Bool
	AutoActivityUploadEnabled   typedef.Bool
	CourseDownloadEnabled       typedef.Bool
	WorkoutDownloadEnabled      typedef.Bool
	GpsEphemerisDownloadEnabled typedef.Bool
	IncidentDetectionEnabled    typedef.Bool
	GrouptrackEnabled           typedef.Bool

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Connectivity is a Connectivity message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewConnectivity

func NewConnectivity(mesg *proto.Message) *Connectivity

NewConnectivity creates new Connectivity struct based on given mesg. If mesg is nil, it will return Connectivity with all fields being set to its corresponding invalid value.

func (*Connectivity) SetAntEnabled added in v0.4.0

func (m *Connectivity) SetAntEnabled(v typedef.Bool) *Connectivity

SetAntEnabled sets AntEnabled value.

Use ANT for connectivity features

func (*Connectivity) SetAutoActivityUploadEnabled added in v0.4.0

func (m *Connectivity) SetAutoActivityUploadEnabled(v typedef.Bool) *Connectivity

SetAutoActivityUploadEnabled sets AutoActivityUploadEnabled value.

func (*Connectivity) SetBluetoothEnabled added in v0.4.0

func (m *Connectivity) SetBluetoothEnabled(v typedef.Bool) *Connectivity

SetBluetoothEnabled sets BluetoothEnabled value.

Use Bluetooth for connectivity features

func (*Connectivity) SetBluetoothLeEnabled added in v0.4.0

func (m *Connectivity) SetBluetoothLeEnabled(v typedef.Bool) *Connectivity

SetBluetoothLeEnabled sets BluetoothLeEnabled value.

Use Bluetooth Low Energy for connectivity features

func (*Connectivity) SetCourseDownloadEnabled added in v0.4.0

func (m *Connectivity) SetCourseDownloadEnabled(v typedef.Bool) *Connectivity

SetCourseDownloadEnabled sets CourseDownloadEnabled value.

func (*Connectivity) SetDeveloperFields added in v0.4.0

func (m *Connectivity) SetDeveloperFields(developerFields ...proto.DeveloperField) *Connectivity

SetDeveloperFields sets DeveloperFields.

func (*Connectivity) SetGpsEphemerisDownloadEnabled added in v0.4.0

func (m *Connectivity) SetGpsEphemerisDownloadEnabled(v typedef.Bool) *Connectivity

SetGpsEphemerisDownloadEnabled sets GpsEphemerisDownloadEnabled value.

func (*Connectivity) SetGrouptrackEnabled added in v0.4.0

func (m *Connectivity) SetGrouptrackEnabled(v typedef.Bool) *Connectivity

SetGrouptrackEnabled sets GrouptrackEnabled value.

func (*Connectivity) SetIncidentDetectionEnabled added in v0.4.0

func (m *Connectivity) SetIncidentDetectionEnabled(v typedef.Bool) *Connectivity

SetIncidentDetectionEnabled sets IncidentDetectionEnabled value.

func (*Connectivity) SetLiveTrackingEnabled added in v0.4.0

func (m *Connectivity) SetLiveTrackingEnabled(v typedef.Bool) *Connectivity

SetLiveTrackingEnabled sets LiveTrackingEnabled value.

func (*Connectivity) SetName added in v0.4.0

func (m *Connectivity) SetName(v string) *Connectivity

SetName sets Name value.

func (*Connectivity) SetUnknownFields added in v0.23.6

func (m *Connectivity) SetUnknownFields(unknownFields ...proto.Field) *Connectivity

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Connectivity) SetWeatherAlertsEnabled added in v0.4.0

func (m *Connectivity) SetWeatherAlertsEnabled(v typedef.Bool) *Connectivity

SetWeatherAlertsEnabled sets WeatherAlertsEnabled value.

func (*Connectivity) SetWeatherConditionsEnabled added in v0.4.0

func (m *Connectivity) SetWeatherConditionsEnabled(v typedef.Bool) *Connectivity

SetWeatherConditionsEnabled sets WeatherConditionsEnabled value.

func (*Connectivity) SetWorkoutDownloadEnabled added in v0.4.0

func (m *Connectivity) SetWorkoutDownloadEnabled(v typedef.Bool) *Connectivity

SetWorkoutDownloadEnabled sets WorkoutDownloadEnabled value.

func (*Connectivity) ToMesg added in v0.3.0

func (m *Connectivity) ToMesg(options *Options) proto.Message

ToMesg converts Connectivity into proto.Message. If options is nil, default options will be used.

type Course

type Course struct {
	Name         string
	Capabilities typedef.CourseCapabilities // Base: uint32z
	Sport        typedef.Sport
	SubSport     typedef.SubSport

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Course is a Course message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewCourse

func NewCourse(mesg *proto.Message) *Course

NewCourse creates new Course struct based on given mesg. If mesg is nil, it will return Course with all fields being set to its corresponding invalid value.

func (*Course) SetCapabilities added in v0.4.0

func (m *Course) SetCapabilities(v typedef.CourseCapabilities) *Course

SetCapabilities sets Capabilities value.

Base: uint32z

func (*Course) SetDeveloperFields added in v0.4.0

func (m *Course) SetDeveloperFields(developerFields ...proto.DeveloperField) *Course

SetDeveloperFields sets DeveloperFields.

func (*Course) SetName added in v0.4.0

func (m *Course) SetName(v string) *Course

SetName sets Name value.

func (*Course) SetSport added in v0.4.0

func (m *Course) SetSport(v typedef.Sport) *Course

SetSport sets Sport value.

func (*Course) SetSubSport added in v0.4.0

func (m *Course) SetSubSport(v typedef.SubSport) *Course

SetSubSport sets SubSport value.

func (*Course) SetUnknownFields added in v0.23.6

func (m *Course) SetUnknownFields(unknownFields ...proto.Field) *Course

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Course) ToMesg added in v0.3.0

func (m *Course) ToMesg(options *Options) proto.Message

ToMesg converts Course into proto.Message. If options is nil, default options will be used.

type CoursePoint

type CoursePoint struct {
	Timestamp    time.Time
	Name         string
	PositionLat  int32  // Units: semicircles
	PositionLong int32  // Units: semicircles
	Distance     uint32 // Scale: 100; Units: m
	MessageIndex typedef.MessageIndex
	Type         typedef.CoursePoint
	Favorite     typedef.Bool

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

CoursePoint is a CoursePoint message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewCoursePoint

func NewCoursePoint(mesg *proto.Message) *CoursePoint

NewCoursePoint creates new CoursePoint struct based on given mesg. If mesg is nil, it will return CoursePoint with all fields being set to its corresponding invalid value.

func (*CoursePoint) DistanceScaled added in v0.8.0

func (m *CoursePoint) DistanceScaled() float64

DistanceScaled return Distance in its scaled value. If Distance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*CoursePoint) PositionLatDegrees added in v0.15.0

func (m *CoursePoint) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*CoursePoint) PositionLongDegrees added in v0.15.0

func (m *CoursePoint) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*CoursePoint) SetDeveloperFields added in v0.4.0

func (m *CoursePoint) SetDeveloperFields(developerFields ...proto.DeveloperField) *CoursePoint

SetDeveloperFields sets DeveloperFields.

func (*CoursePoint) SetDistance added in v0.4.0

func (m *CoursePoint) SetDistance(v uint32) *CoursePoint

SetDistance sets Distance value.

Scale: 100; Units: m

func (*CoursePoint) SetDistanceScaled added in v0.17.2

func (m *CoursePoint) SetDistanceScaled(v float64) *CoursePoint

SetDistanceScaled is similar to SetDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*CoursePoint) SetFavorite added in v0.4.0

func (m *CoursePoint) SetFavorite(v typedef.Bool) *CoursePoint

SetFavorite sets Favorite value.

func (*CoursePoint) SetMessageIndex added in v0.4.0

func (m *CoursePoint) SetMessageIndex(v typedef.MessageIndex) *CoursePoint

SetMessageIndex sets MessageIndex value.

func (*CoursePoint) SetName added in v0.4.0

func (m *CoursePoint) SetName(v string) *CoursePoint

SetName sets Name value.

func (*CoursePoint) SetPositionLat added in v0.4.0

func (m *CoursePoint) SetPositionLat(v int32) *CoursePoint

SetPositionLat sets PositionLat value.

Units: semicircles

func (*CoursePoint) SetPositionLatDegrees added in v0.17.2

func (m *CoursePoint) SetPositionLatDegrees(degrees float64) *CoursePoint

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*CoursePoint) SetPositionLong added in v0.4.0

func (m *CoursePoint) SetPositionLong(v int32) *CoursePoint

SetPositionLong sets PositionLong value.

Units: semicircles

func (*CoursePoint) SetPositionLongDegrees added in v0.17.2

func (m *CoursePoint) SetPositionLongDegrees(degrees float64) *CoursePoint

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*CoursePoint) SetTimestamp added in v0.4.0

func (m *CoursePoint) SetTimestamp(v time.Time) *CoursePoint

SetTimestamp sets Timestamp value.

func (*CoursePoint) SetType added in v0.4.0

func (m *CoursePoint) SetType(v typedef.CoursePoint) *CoursePoint

SetType sets Type value.

func (*CoursePoint) SetUnknownFields added in v0.23.6

func (m *CoursePoint) SetUnknownFields(unknownFields ...proto.Field) *CoursePoint

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*CoursePoint) TimestampUint32 added in v0.15.0

func (m *CoursePoint) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*CoursePoint) ToMesg added in v0.3.0

func (m *CoursePoint) ToMesg(options *Options) proto.Message

ToMesg converts CoursePoint into proto.Message. If options is nil, default options will be used.

type DeveloperDataId

type DeveloperDataId struct {
	DeveloperId        []byte // Array: [N]
	ApplicationId      []byte // Array: [N]
	ApplicationVersion uint32
	ManufacturerId     typedef.Manufacturer
	DeveloperDataIndex uint8

	UnknownFields []proto.Field // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
}

DeveloperDataId is a DeveloperDataId message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDeveloperDataId

func NewDeveloperDataId(mesg *proto.Message) *DeveloperDataId

NewDeveloperDataId creates new DeveloperDataId struct based on given mesg. If mesg is nil, it will return DeveloperDataId with all fields being set to its corresponding invalid value.

func (*DeveloperDataId) SetApplicationId added in v0.4.0

func (m *DeveloperDataId) SetApplicationId(v []byte) *DeveloperDataId

SetApplicationId sets ApplicationId value.

Array: [N]

func (*DeveloperDataId) SetApplicationVersion added in v0.4.0

func (m *DeveloperDataId) SetApplicationVersion(v uint32) *DeveloperDataId

SetApplicationVersion sets ApplicationVersion value.

func (*DeveloperDataId) SetDeveloperDataIndex added in v0.4.0

func (m *DeveloperDataId) SetDeveloperDataIndex(v uint8) *DeveloperDataId

SetDeveloperDataIndex sets DeveloperDataIndex value.

func (*DeveloperDataId) SetDeveloperId added in v0.4.0

func (m *DeveloperDataId) SetDeveloperId(v []byte) *DeveloperDataId

SetDeveloperId sets DeveloperId value.

Array: [N]

func (*DeveloperDataId) SetManufacturerId added in v0.4.0

func (m *DeveloperDataId) SetManufacturerId(v typedef.Manufacturer) *DeveloperDataId

SetManufacturerId sets ManufacturerId value.

func (*DeveloperDataId) SetUnknownFields added in v0.23.6

func (m *DeveloperDataId) SetUnknownFields(unknownFields ...proto.Field) *DeveloperDataId

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DeveloperDataId) ToMesg added in v0.3.0

func (m *DeveloperDataId) ToMesg(options *Options) proto.Message

ToMesg converts DeveloperDataId into proto.Message. If options is nil, default options will be used.

type DeviceAuxBatteryInfo

type DeviceAuxBatteryInfo struct {
	Timestamp         time.Time
	BatteryVoltage    uint16 // Scale: 256; Units: V
	DeviceIndex       typedef.DeviceIndex
	BatteryStatus     typedef.BatteryStatus
	BatteryIdentifier uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DeviceAuxBatteryInfo is a DeviceAuxBatteryInfo message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDeviceAuxBatteryInfo

func NewDeviceAuxBatteryInfo(mesg *proto.Message) *DeviceAuxBatteryInfo

NewDeviceAuxBatteryInfo creates new DeviceAuxBatteryInfo struct based on given mesg. If mesg is nil, it will return DeviceAuxBatteryInfo with all fields being set to its corresponding invalid value.

func (*DeviceAuxBatteryInfo) BatteryVoltageScaled added in v0.8.0

func (m *DeviceAuxBatteryInfo) BatteryVoltageScaled() float64

BatteryVoltageScaled return BatteryVoltage in its scaled value. If BatteryVoltage value is invalid, float64 invalid value will be returned.

Scale: 256; Units: V

func (*DeviceAuxBatteryInfo) SetBatteryIdentifier added in v0.4.0

func (m *DeviceAuxBatteryInfo) SetBatteryIdentifier(v uint8) *DeviceAuxBatteryInfo

SetBatteryIdentifier sets BatteryIdentifier value.

func (*DeviceAuxBatteryInfo) SetBatteryStatus added in v0.4.0

SetBatteryStatus sets BatteryStatus value.

func (*DeviceAuxBatteryInfo) SetBatteryVoltage added in v0.4.0

func (m *DeviceAuxBatteryInfo) SetBatteryVoltage(v uint16) *DeviceAuxBatteryInfo

SetBatteryVoltage sets BatteryVoltage value.

Scale: 256; Units: V

func (*DeviceAuxBatteryInfo) SetBatteryVoltageScaled added in v0.17.2

func (m *DeviceAuxBatteryInfo) SetBatteryVoltageScaled(v float64) *DeviceAuxBatteryInfo

SetBatteryVoltageScaled is similar to SetBatteryVoltage except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 256; Units: V

func (*DeviceAuxBatteryInfo) SetDeveloperFields added in v0.4.0

func (m *DeviceAuxBatteryInfo) SetDeveloperFields(developerFields ...proto.DeveloperField) *DeviceAuxBatteryInfo

SetDeveloperFields sets DeveloperFields.

func (*DeviceAuxBatteryInfo) SetDeviceIndex added in v0.4.0

SetDeviceIndex sets DeviceIndex value.

func (*DeviceAuxBatteryInfo) SetTimestamp added in v0.4.0

func (m *DeviceAuxBatteryInfo) SetTimestamp(v time.Time) *DeviceAuxBatteryInfo

SetTimestamp sets Timestamp value.

func (*DeviceAuxBatteryInfo) SetUnknownFields added in v0.23.6

func (m *DeviceAuxBatteryInfo) SetUnknownFields(unknownFields ...proto.Field) *DeviceAuxBatteryInfo

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DeviceAuxBatteryInfo) TimestampUint32 added in v0.15.0

func (m *DeviceAuxBatteryInfo) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*DeviceAuxBatteryInfo) ToMesg added in v0.3.0

func (m *DeviceAuxBatteryInfo) ToMesg(options *Options) proto.Message

ToMesg converts DeviceAuxBatteryInfo into proto.Message. If options is nil, default options will be used.

type DeviceInfo

type DeviceInfo struct {
	Timestamp           time.Time // Units: s
	Descriptor          string    // Used to describe the sensor or location
	ProductName         string    // Optional free form string to indicate the devices name or model
	SerialNumber        uint32    // Base: uint32z
	CumOperatingTime    uint32    // Units: s; Reset by new battery or charge.
	Manufacturer        typedef.Manufacturer
	Product             uint16
	SoftwareVersion     uint16 // Scale: 100
	BatteryVoltage      uint16 // Scale: 256; Units: V
	AntDeviceNumber     uint16 // Base: uint16z
	DeviceIndex         typedef.DeviceIndex
	DeviceType          uint8
	HardwareVersion     uint8
	BatteryStatus       typedef.BatteryStatus
	SensorPosition      typedef.BodyLocation // Indicates the location of the sensor
	AntTransmissionType uint8                // Base: uint8z
	AntNetwork          typedef.AntNetwork
	SourceType          typedef.SourceType
	BatteryLevel        uint8 // Units: %

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DeviceInfo is a DeviceInfo message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDeviceInfo

func NewDeviceInfo(mesg *proto.Message) *DeviceInfo

NewDeviceInfo creates new DeviceInfo struct based on given mesg. If mesg is nil, it will return DeviceInfo with all fields being set to its corresponding invalid value.

func (*DeviceInfo) BatteryVoltageScaled added in v0.8.0

func (m *DeviceInfo) BatteryVoltageScaled() float64

BatteryVoltageScaled return BatteryVoltage in its scaled value. If BatteryVoltage value is invalid, float64 invalid value will be returned.

Scale: 256; Units: V

func (*DeviceInfo) GetDeviceType added in v0.16.0

func (m *DeviceInfo) GetDeviceType() (name string, value any)

GetDeviceType returns Dynamic Field interpretation of DeviceType. Otherwise, returns the original value of DeviceType.

Based on m.SourceType:

  • name: "ble_device_type", value: typedef.BleDeviceType(m.DeviceType)
  • name: "antplus_device_type", value: typedef.AntplusDeviceType(m.DeviceType)
  • name: "ant_device_type", value: uint8(m.DeviceType)
  • name: "local_device_type", value: typedef.LocalDeviceType(m.DeviceType)

Otherwise:

  • name: "device_type", value: m.DeviceType

func (*DeviceInfo) GetProduct added in v0.16.0

func (m *DeviceInfo) GetProduct() (name string, value any)

GetProduct returns Dynamic Field interpretation of Product. Otherwise, returns the original value of Product.

Based on m.Manufacturer:

  • name: "favero_product", value: typedef.FaveroProduct(m.Product)
  • name: "garmin_product", value: typedef.GarminProduct(m.Product)

Otherwise:

  • name: "product", value: m.Product

func (*DeviceInfo) SetAntDeviceNumber added in v0.4.0

func (m *DeviceInfo) SetAntDeviceNumber(v uint16) *DeviceInfo

SetAntDeviceNumber sets AntDeviceNumber value.

Base: uint16z

func (*DeviceInfo) SetAntNetwork added in v0.4.0

func (m *DeviceInfo) SetAntNetwork(v typedef.AntNetwork) *DeviceInfo

SetAntNetwork sets AntNetwork value.

func (*DeviceInfo) SetAntTransmissionType added in v0.4.0

func (m *DeviceInfo) SetAntTransmissionType(v uint8) *DeviceInfo

SetAntTransmissionType sets AntTransmissionType value.

Base: uint8z

func (*DeviceInfo) SetBatteryLevel added in v0.4.0

func (m *DeviceInfo) SetBatteryLevel(v uint8) *DeviceInfo

SetBatteryLevel sets BatteryLevel value.

Units: %

func (*DeviceInfo) SetBatteryStatus added in v0.4.0

func (m *DeviceInfo) SetBatteryStatus(v typedef.BatteryStatus) *DeviceInfo

SetBatteryStatus sets BatteryStatus value.

func (*DeviceInfo) SetBatteryVoltage added in v0.4.0

func (m *DeviceInfo) SetBatteryVoltage(v uint16) *DeviceInfo

SetBatteryVoltage sets BatteryVoltage value.

Scale: 256; Units: V

func (*DeviceInfo) SetBatteryVoltageScaled added in v0.17.2

func (m *DeviceInfo) SetBatteryVoltageScaled(v float64) *DeviceInfo

SetBatteryVoltageScaled is similar to SetBatteryVoltage except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 256; Units: V

func (*DeviceInfo) SetCumOperatingTime added in v0.4.0

func (m *DeviceInfo) SetCumOperatingTime(v uint32) *DeviceInfo

SetCumOperatingTime sets CumOperatingTime value.

Units: s; Reset by new battery or charge.

func (*DeviceInfo) SetDescriptor added in v0.4.0

func (m *DeviceInfo) SetDescriptor(v string) *DeviceInfo

SetDescriptor sets Descriptor value.

Used to describe the sensor or location

func (*DeviceInfo) SetDeveloperFields added in v0.4.0

func (m *DeviceInfo) SetDeveloperFields(developerFields ...proto.DeveloperField) *DeviceInfo

SetDeveloperFields sets DeveloperFields.

func (*DeviceInfo) SetDeviceIndex added in v0.4.0

func (m *DeviceInfo) SetDeviceIndex(v typedef.DeviceIndex) *DeviceInfo

SetDeviceIndex sets DeviceIndex value.

func (*DeviceInfo) SetDeviceType added in v0.4.0

func (m *DeviceInfo) SetDeviceType(v uint8) *DeviceInfo

SetDeviceType sets DeviceType value.

func (*DeviceInfo) SetHardwareVersion added in v0.4.0

func (m *DeviceInfo) SetHardwareVersion(v uint8) *DeviceInfo

SetHardwareVersion sets HardwareVersion value.

func (*DeviceInfo) SetManufacturer added in v0.4.0

func (m *DeviceInfo) SetManufacturer(v typedef.Manufacturer) *DeviceInfo

SetManufacturer sets Manufacturer value.

func (*DeviceInfo) SetProduct added in v0.4.0

func (m *DeviceInfo) SetProduct(v uint16) *DeviceInfo

SetProduct sets Product value.

func (*DeviceInfo) SetProductName added in v0.4.0

func (m *DeviceInfo) SetProductName(v string) *DeviceInfo

SetProductName sets ProductName value.

Optional free form string to indicate the devices name or model

func (*DeviceInfo) SetSensorPosition added in v0.4.0

func (m *DeviceInfo) SetSensorPosition(v typedef.BodyLocation) *DeviceInfo

SetSensorPosition sets SensorPosition value.

Indicates the location of the sensor

func (*DeviceInfo) SetSerialNumber added in v0.4.0

func (m *DeviceInfo) SetSerialNumber(v uint32) *DeviceInfo

SetSerialNumber sets SerialNumber value.

Base: uint32z

func (*DeviceInfo) SetSoftwareVersion added in v0.4.0

func (m *DeviceInfo) SetSoftwareVersion(v uint16) *DeviceInfo

SetSoftwareVersion sets SoftwareVersion value.

Scale: 100

func (*DeviceInfo) SetSoftwareVersionScaled added in v0.17.2

func (m *DeviceInfo) SetSoftwareVersionScaled(v float64) *DeviceInfo

SetSoftwareVersionScaled is similar to SetSoftwareVersion except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100

func (*DeviceInfo) SetSourceType added in v0.4.0

func (m *DeviceInfo) SetSourceType(v typedef.SourceType) *DeviceInfo

SetSourceType sets SourceType value.

func (*DeviceInfo) SetTimestamp added in v0.4.0

func (m *DeviceInfo) SetTimestamp(v time.Time) *DeviceInfo

SetTimestamp sets Timestamp value.

Units: s

func (*DeviceInfo) SetUnknownFields added in v0.23.6

func (m *DeviceInfo) SetUnknownFields(unknownFields ...proto.Field) *DeviceInfo

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DeviceInfo) SoftwareVersionScaled added in v0.8.0

func (m *DeviceInfo) SoftwareVersionScaled() float64

SoftwareVersionScaled return SoftwareVersion in its scaled value. If SoftwareVersion value is invalid, float64 invalid value will be returned.

Scale: 100

func (*DeviceInfo) TimestampUint32 added in v0.15.0

func (m *DeviceInfo) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*DeviceInfo) ToMesg added in v0.3.0

func (m *DeviceInfo) ToMesg(options *Options) proto.Message

ToMesg converts DeviceInfo into proto.Message. If options is nil, default options will be used.

type DeviceSettings

type DeviceSettings struct {
	TimeOffset                          []uint32                   // Array: [N]; Units: s; Offset from system time.
	TimeMode                            []typedef.TimeMode         // Array: [N]; Display mode for the time
	TimeZoneOffset                      []int8                     // Array: [N]; Scale: 4; Units: hr; timezone offset in 1/4 hour increments
	ClockTime                           time.Time                  // UTC timestamp used to set the devices clock and date
	PagesEnabled                        []uint16                   // Array: [N]; Bitfield to configure enabled screens for each supported loop
	DefaultPage                         []uint16                   // Array: [N]; Bitfield to indicate one page as default for each supported loop
	UtcOffset                           uint32                     // Offset from system time. Required to convert timestamp from system time to UTC.
	AutoActivityDetect                  typedef.AutoActivityDetect // Allows setting specific activities auto-activity detect enabled/disabled settings
	AutosyncMinSteps                    uint16                     // Units: steps; Minimum steps before an autosync can occur
	AutosyncMinTime                     uint16                     // Units: minutes; Minimum minutes before an autosync can occur
	ActiveTimeZone                      uint8                      // Index into time zone arrays.
	BacklightMode                       typedef.BacklightMode      // Mode for backlight
	ActivityTrackerEnabled              typedef.Bool               // Enabled state of the activity tracker functionality
	MoveAlertEnabled                    typedef.Bool               // Enabled state of the move alert
	DateMode                            typedef.DateMode           // Display mode for the date
	DisplayOrientation                  typedef.DisplayOrientation
	MountingSide                        typedef.Side
	LactateThresholdAutodetectEnabled   typedef.Bool               // Enable auto-detect setting for the lactate threshold feature.
	BleAutoUploadEnabled                typedef.Bool               // Automatically upload using BLE
	AutoSyncFrequency                   typedef.AutoSyncFrequency  // Helps to conserve battery by changing modes
	NumberOfScreens                     uint8                      // Number of screens configured to display
	SmartNotificationDisplayOrientation typedef.DisplayOrientation // Smart Notification display orientation
	TapInterface                        typedef.Switch
	TapSensitivity                      typedef.TapSensitivity // Used to hold the tap threshold setting

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DeviceSettings is a DeviceSettings message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDeviceSettings

func NewDeviceSettings(mesg *proto.Message) *DeviceSettings

NewDeviceSettings creates new DeviceSettings struct based on given mesg. If mesg is nil, it will return DeviceSettings with all fields being set to its corresponding invalid value.

func (*DeviceSettings) ClockTimeUint32 added in v0.15.0

func (m *DeviceSettings) ClockTimeUint32() uint32

ClockTimeUint32 returns ClockTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*DeviceSettings) SetActiveTimeZone added in v0.4.0

func (m *DeviceSettings) SetActiveTimeZone(v uint8) *DeviceSettings

SetActiveTimeZone sets ActiveTimeZone value.

Index into time zone arrays.

func (*DeviceSettings) SetActivityTrackerEnabled added in v0.4.0

func (m *DeviceSettings) SetActivityTrackerEnabled(v typedef.Bool) *DeviceSettings

SetActivityTrackerEnabled sets ActivityTrackerEnabled value.

Enabled state of the activity tracker functionality

func (*DeviceSettings) SetAutoActivityDetect added in v0.4.0

func (m *DeviceSettings) SetAutoActivityDetect(v typedef.AutoActivityDetect) *DeviceSettings

SetAutoActivityDetect sets AutoActivityDetect value.

Allows setting specific activities auto-activity detect enabled/disabled settings

func (*DeviceSettings) SetAutoSyncFrequency added in v0.4.0

func (m *DeviceSettings) SetAutoSyncFrequency(v typedef.AutoSyncFrequency) *DeviceSettings

SetAutoSyncFrequency sets AutoSyncFrequency value.

Helps to conserve battery by changing modes

func (*DeviceSettings) SetAutosyncMinSteps added in v0.4.0

func (m *DeviceSettings) SetAutosyncMinSteps(v uint16) *DeviceSettings

SetAutosyncMinSteps sets AutosyncMinSteps value.

Units: steps; Minimum steps before an autosync can occur

func (*DeviceSettings) SetAutosyncMinTime added in v0.4.0

func (m *DeviceSettings) SetAutosyncMinTime(v uint16) *DeviceSettings

SetAutosyncMinTime sets AutosyncMinTime value.

Units: minutes; Minimum minutes before an autosync can occur

func (*DeviceSettings) SetBacklightMode added in v0.4.0

func (m *DeviceSettings) SetBacklightMode(v typedef.BacklightMode) *DeviceSettings

SetBacklightMode sets BacklightMode value.

Mode for backlight

func (*DeviceSettings) SetBleAutoUploadEnabled added in v0.4.0

func (m *DeviceSettings) SetBleAutoUploadEnabled(v typedef.Bool) *DeviceSettings

SetBleAutoUploadEnabled sets BleAutoUploadEnabled value.

Automatically upload using BLE

func (*DeviceSettings) SetClockTime added in v0.4.0

func (m *DeviceSettings) SetClockTime(v time.Time) *DeviceSettings

SetClockTime sets ClockTime value.

UTC timestamp used to set the devices clock and date

func (*DeviceSettings) SetDateMode added in v0.4.0

func (m *DeviceSettings) SetDateMode(v typedef.DateMode) *DeviceSettings

SetDateMode sets DateMode value.

Display mode for the date

func (*DeviceSettings) SetDefaultPage added in v0.4.0

func (m *DeviceSettings) SetDefaultPage(v []uint16) *DeviceSettings

SetDefaultPage sets DefaultPage value.

Array: [N]; Bitfield to indicate one page as default for each supported loop

func (*DeviceSettings) SetDeveloperFields added in v0.4.0

func (m *DeviceSettings) SetDeveloperFields(developerFields ...proto.DeveloperField) *DeviceSettings

SetDeveloperFields sets DeveloperFields.

func (*DeviceSettings) SetDisplayOrientation added in v0.4.0

func (m *DeviceSettings) SetDisplayOrientation(v typedef.DisplayOrientation) *DeviceSettings

SetDisplayOrientation sets DisplayOrientation value.

func (*DeviceSettings) SetLactateThresholdAutodetectEnabled added in v0.4.0

func (m *DeviceSettings) SetLactateThresholdAutodetectEnabled(v typedef.Bool) *DeviceSettings

SetLactateThresholdAutodetectEnabled sets LactateThresholdAutodetectEnabled value.

Enable auto-detect setting for the lactate threshold feature.

func (*DeviceSettings) SetMountingSide added in v0.4.0

func (m *DeviceSettings) SetMountingSide(v typedef.Side) *DeviceSettings

SetMountingSide sets MountingSide value.

func (*DeviceSettings) SetMoveAlertEnabled added in v0.4.0

func (m *DeviceSettings) SetMoveAlertEnabled(v typedef.Bool) *DeviceSettings

SetMoveAlertEnabled sets MoveAlertEnabled value.

Enabled state of the move alert

func (*DeviceSettings) SetNumberOfScreens added in v0.4.0

func (m *DeviceSettings) SetNumberOfScreens(v uint8) *DeviceSettings

SetNumberOfScreens sets NumberOfScreens value.

Number of screens configured to display

func (*DeviceSettings) SetPagesEnabled added in v0.4.0

func (m *DeviceSettings) SetPagesEnabled(v []uint16) *DeviceSettings

SetPagesEnabled sets PagesEnabled value.

Array: [N]; Bitfield to configure enabled screens for each supported loop

func (*DeviceSettings) SetSmartNotificationDisplayOrientation added in v0.4.0

func (m *DeviceSettings) SetSmartNotificationDisplayOrientation(v typedef.DisplayOrientation) *DeviceSettings

SetSmartNotificationDisplayOrientation sets SmartNotificationDisplayOrientation value.

Smart Notification display orientation

func (*DeviceSettings) SetTapInterface added in v0.4.0

func (m *DeviceSettings) SetTapInterface(v typedef.Switch) *DeviceSettings

SetTapInterface sets TapInterface value.

func (*DeviceSettings) SetTapSensitivity added in v0.4.0

func (m *DeviceSettings) SetTapSensitivity(v typedef.TapSensitivity) *DeviceSettings

SetTapSensitivity sets TapSensitivity value.

Used to hold the tap threshold setting

func (*DeviceSettings) SetTimeMode added in v0.4.0

func (m *DeviceSettings) SetTimeMode(v []typedef.TimeMode) *DeviceSettings

SetTimeMode sets TimeMode value.

Array: [N]; Display mode for the time

func (*DeviceSettings) SetTimeOffset added in v0.4.0

func (m *DeviceSettings) SetTimeOffset(v []uint32) *DeviceSettings

SetTimeOffset sets TimeOffset value.

Array: [N]; Units: s; Offset from system time.

func (*DeviceSettings) SetTimeZoneOffset added in v0.4.0

func (m *DeviceSettings) SetTimeZoneOffset(v []int8) *DeviceSettings

SetTimeZoneOffset sets TimeZoneOffset value.

Array: [N]; Scale: 4; Units: hr; timezone offset in 1/4 hour increments

func (*DeviceSettings) SetTimeZoneOffsetScaled added in v0.17.2

func (m *DeviceSettings) SetTimeZoneOffsetScaled(vs []float64) *DeviceSettings

SetTimeZoneOffsetScaled is similar to SetTimeZoneOffset except it accepts a scaled value. This method automatically converts the given value to its []int8 form, discarding any applied scale and offset.

Array: [N]; Scale: 4; Units: hr; timezone offset in 1/4 hour increments

func (*DeviceSettings) SetUnknownFields added in v0.23.6

func (m *DeviceSettings) SetUnknownFields(unknownFields ...proto.Field) *DeviceSettings

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DeviceSettings) SetUtcOffset added in v0.4.0

func (m *DeviceSettings) SetUtcOffset(v uint32) *DeviceSettings

SetUtcOffset sets UtcOffset value.

Offset from system time. Required to convert timestamp from system time to UTC.

func (*DeviceSettings) TimeZoneOffsetScaled added in v0.8.0

func (m *DeviceSettings) TimeZoneOffsetScaled() []float64

TimeZoneOffsetScaled return TimeZoneOffset in its scaled value. If TimeZoneOffset value is invalid, nil will be returned.

Array: [N]; Scale: 4; Units: hr; timezone offset in 1/4 hour increments

func (*DeviceSettings) ToMesg added in v0.3.0

func (m *DeviceSettings) ToMesg(options *Options) proto.Message

ToMesg converts DeviceSettings into proto.Message. If options is nil, default options will be used.

type DiveAlarm

type DiveAlarm struct {
	DiveTypes        []typedef.SubSport    // Array: [N]; Dive types the alarm will trigger on
	Depth            uint32                // Scale: 1000; Units: m; Depth setting (m) for depth type alarms
	Time             int32                 // Units: s; Time setting (s) for time type alarms
	Id               uint32                // Alarm ID
	Speed            int32                 // Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms
	MessageIndex     typedef.MessageIndex  // Index of the alarm
	Enabled          typedef.Bool          // Enablement flag
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm
	PopupEnabled     typedef.Bool          // Show a visible pop-up for this alarm
	TriggerOnDescent typedef.Bool          // Trigger the alarm on descent
	TriggerOnAscent  typedef.Bool          // Trigger the alarm on ascent
	Repeating        typedef.Bool          // Repeat alarm each time threshold is crossed?

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DiveAlarm is a DiveAlarm message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDiveAlarm

func NewDiveAlarm(mesg *proto.Message) *DiveAlarm

NewDiveAlarm creates new DiveAlarm struct based on given mesg. If mesg is nil, it will return DiveAlarm with all fields being set to its corresponding invalid value.

func (*DiveAlarm) DepthScaled added in v0.8.0

func (m *DiveAlarm) DepthScaled() float64

DepthScaled return Depth in its scaled value. If Depth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveAlarm) SetAlarmType added in v0.4.0

func (m *DiveAlarm) SetAlarmType(v typedef.DiveAlarmType) *DiveAlarm

SetAlarmType sets AlarmType value.

Alarm type setting

func (*DiveAlarm) SetDepth added in v0.4.0

func (m *DiveAlarm) SetDepth(v uint32) *DiveAlarm

SetDepth sets Depth value.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveAlarm) SetDepthScaled added in v0.17.2

func (m *DiveAlarm) SetDepthScaled(v float64) *DiveAlarm

SetDepthScaled is similar to SetDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveAlarm) SetDeveloperFields added in v0.4.0

func (m *DiveAlarm) SetDeveloperFields(developerFields ...proto.DeveloperField) *DiveAlarm

SetDeveloperFields sets DeveloperFields.

func (*DiveAlarm) SetDiveTypes added in v0.4.0

func (m *DiveAlarm) SetDiveTypes(v []typedef.SubSport) *DiveAlarm

SetDiveTypes sets DiveTypes value.

Array: [N]; Dive types the alarm will trigger on

func (*DiveAlarm) SetEnabled added in v0.4.0

func (m *DiveAlarm) SetEnabled(v typedef.Bool) *DiveAlarm

SetEnabled sets Enabled value.

Enablement flag

func (*DiveAlarm) SetId added in v0.4.0

func (m *DiveAlarm) SetId(v uint32) *DiveAlarm

SetId sets Id value.

Alarm ID

func (*DiveAlarm) SetMessageIndex added in v0.4.0

func (m *DiveAlarm) SetMessageIndex(v typedef.MessageIndex) *DiveAlarm

SetMessageIndex sets MessageIndex value.

Index of the alarm

func (*DiveAlarm) SetPopupEnabled added in v0.4.0

func (m *DiveAlarm) SetPopupEnabled(v typedef.Bool) *DiveAlarm

SetPopupEnabled sets PopupEnabled value.

Show a visible pop-up for this alarm

func (*DiveAlarm) SetRepeating added in v0.4.0

func (m *DiveAlarm) SetRepeating(v typedef.Bool) *DiveAlarm

SetRepeating sets Repeating value.

Repeat alarm each time threshold is crossed?

func (*DiveAlarm) SetSound added in v0.4.0

func (m *DiveAlarm) SetSound(v typedef.Tone) *DiveAlarm

SetSound sets Sound value.

Tone and Vibe setting for the alarm

func (*DiveAlarm) SetSpeed added in v0.4.0

func (m *DiveAlarm) SetSpeed(v int32) *DiveAlarm

SetSpeed sets Speed value.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveAlarm) SetSpeedScaled added in v0.17.2

func (m *DiveAlarm) SetSpeedScaled(v float64) *DiveAlarm

SetSpeedScaled is similar to SetSpeed except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveAlarm) SetTime added in v0.4.0

func (m *DiveAlarm) SetTime(v int32) *DiveAlarm

SetTime sets Time value.

Units: s; Time setting (s) for time type alarms

func (*DiveAlarm) SetTriggerOnAscent added in v0.4.0

func (m *DiveAlarm) SetTriggerOnAscent(v typedef.Bool) *DiveAlarm

SetTriggerOnAscent sets TriggerOnAscent value.

Trigger the alarm on ascent

func (*DiveAlarm) SetTriggerOnDescent added in v0.4.0

func (m *DiveAlarm) SetTriggerOnDescent(v typedef.Bool) *DiveAlarm

SetTriggerOnDescent sets TriggerOnDescent value.

Trigger the alarm on descent

func (*DiveAlarm) SetUnknownFields added in v0.23.6

func (m *DiveAlarm) SetUnknownFields(unknownFields ...proto.Field) *DiveAlarm

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DiveAlarm) SpeedScaled added in v0.8.0

func (m *DiveAlarm) SpeedScaled() float64

SpeedScaled return Speed in its scaled value. If Speed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveAlarm) ToMesg added in v0.3.0

func (m *DiveAlarm) ToMesg(options *Options) proto.Message

ToMesg converts DiveAlarm into proto.Message. If options is nil, default options will be used.

type DiveApneaAlarm

type DiveApneaAlarm struct {
	DiveTypes        []typedef.SubSport    // Array: [N]; Dive types the alarm will trigger on
	Depth            uint32                // Scale: 1000; Units: m; Depth setting (m) for depth type alarms
	Time             int32                 // Units: s; Time setting (s) for time type alarms
	Id               uint32                // Alarm ID
	Speed            int32                 // Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms
	MessageIndex     typedef.MessageIndex  // Index of the alarm
	Enabled          typedef.Bool          // Enablement flag
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm.
	PopupEnabled     typedef.Bool          // Show a visible pop-up for this alarm
	TriggerOnDescent typedef.Bool          // Trigger the alarm on descent
	TriggerOnAscent  typedef.Bool          // Trigger the alarm on ascent
	Repeating        typedef.Bool          // Repeat alarm each time threshold is crossed?

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DiveApneaAlarm is a DiveApneaAlarm message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDiveApneaAlarm

func NewDiveApneaAlarm(mesg *proto.Message) *DiveApneaAlarm

NewDiveApneaAlarm creates new DiveApneaAlarm struct based on given mesg. If mesg is nil, it will return DiveApneaAlarm with all fields being set to its corresponding invalid value.

func (*DiveApneaAlarm) DepthScaled added in v0.8.0

func (m *DiveApneaAlarm) DepthScaled() float64

DepthScaled return Depth in its scaled value. If Depth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveApneaAlarm) SetAlarmType added in v0.4.0

func (m *DiveApneaAlarm) SetAlarmType(v typedef.DiveAlarmType) *DiveApneaAlarm

SetAlarmType sets AlarmType value.

Alarm type setting

func (*DiveApneaAlarm) SetDepth added in v0.4.0

func (m *DiveApneaAlarm) SetDepth(v uint32) *DiveApneaAlarm

SetDepth sets Depth value.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveApneaAlarm) SetDepthScaled added in v0.17.2

func (m *DiveApneaAlarm) SetDepthScaled(v float64) *DiveApneaAlarm

SetDepthScaled is similar to SetDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; Depth setting (m) for depth type alarms

func (*DiveApneaAlarm) SetDeveloperFields added in v0.4.0

func (m *DiveApneaAlarm) SetDeveloperFields(developerFields ...proto.DeveloperField) *DiveApneaAlarm

SetDeveloperFields sets DeveloperFields.

func (*DiveApneaAlarm) SetDiveTypes added in v0.4.0

func (m *DiveApneaAlarm) SetDiveTypes(v []typedef.SubSport) *DiveApneaAlarm

SetDiveTypes sets DiveTypes value.

Array: [N]; Dive types the alarm will trigger on

func (*DiveApneaAlarm) SetEnabled added in v0.4.0

func (m *DiveApneaAlarm) SetEnabled(v typedef.Bool) *DiveApneaAlarm

SetEnabled sets Enabled value.

Enablement flag

func (*DiveApneaAlarm) SetId added in v0.4.0

func (m *DiveApneaAlarm) SetId(v uint32) *DiveApneaAlarm

SetId sets Id value.

Alarm ID

func (*DiveApneaAlarm) SetMessageIndex added in v0.4.0

func (m *DiveApneaAlarm) SetMessageIndex(v typedef.MessageIndex) *DiveApneaAlarm

SetMessageIndex sets MessageIndex value.

Index of the alarm

func (*DiveApneaAlarm) SetPopupEnabled added in v0.4.0

func (m *DiveApneaAlarm) SetPopupEnabled(v typedef.Bool) *DiveApneaAlarm

SetPopupEnabled sets PopupEnabled value.

Show a visible pop-up for this alarm

func (*DiveApneaAlarm) SetRepeating added in v0.4.0

func (m *DiveApneaAlarm) SetRepeating(v typedef.Bool) *DiveApneaAlarm

SetRepeating sets Repeating value.

Repeat alarm each time threshold is crossed?

func (*DiveApneaAlarm) SetSound added in v0.4.0

func (m *DiveApneaAlarm) SetSound(v typedef.Tone) *DiveApneaAlarm

SetSound sets Sound value.

Tone and Vibe setting for the alarm.

func (*DiveApneaAlarm) SetSpeed added in v0.4.0

func (m *DiveApneaAlarm) SetSpeed(v int32) *DiveApneaAlarm

SetSpeed sets Speed value.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveApneaAlarm) SetSpeedScaled added in v0.17.2

func (m *DiveApneaAlarm) SetSpeedScaled(v float64) *DiveApneaAlarm

SetSpeedScaled is similar to SetSpeed except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveApneaAlarm) SetTime added in v0.4.0

func (m *DiveApneaAlarm) SetTime(v int32) *DiveApneaAlarm

SetTime sets Time value.

Units: s; Time setting (s) for time type alarms

func (*DiveApneaAlarm) SetTriggerOnAscent added in v0.4.0

func (m *DiveApneaAlarm) SetTriggerOnAscent(v typedef.Bool) *DiveApneaAlarm

SetTriggerOnAscent sets TriggerOnAscent value.

Trigger the alarm on ascent

func (*DiveApneaAlarm) SetTriggerOnDescent added in v0.4.0

func (m *DiveApneaAlarm) SetTriggerOnDescent(v typedef.Bool) *DiveApneaAlarm

SetTriggerOnDescent sets TriggerOnDescent value.

Trigger the alarm on descent

func (*DiveApneaAlarm) SetUnknownFields added in v0.23.6

func (m *DiveApneaAlarm) SetUnknownFields(unknownFields ...proto.Field) *DiveApneaAlarm

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DiveApneaAlarm) SpeedScaled added in v0.8.0

func (m *DiveApneaAlarm) SpeedScaled() float64

SpeedScaled return Speed in its scaled value. If Speed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

func (*DiveApneaAlarm) ToMesg added in v0.3.0

func (m *DiveApneaAlarm) ToMesg(options *Options) proto.Message

ToMesg converts DiveApneaAlarm into proto.Message. If options is nil, default options will be used.

type DiveGas

type DiveGas struct {
	MessageIndex  typedef.MessageIndex
	HeliumContent uint8 // Units: percent
	OxygenContent uint8 // Units: percent
	Status        typedef.DiveGasStatus
	Mode          typedef.DiveGasMode

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DiveGas is a DiveGas message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDiveGas

func NewDiveGas(mesg *proto.Message) *DiveGas

NewDiveGas creates new DiveGas struct based on given mesg. If mesg is nil, it will return DiveGas with all fields being set to its corresponding invalid value.

func (*DiveGas) SetDeveloperFields added in v0.4.0

func (m *DiveGas) SetDeveloperFields(developerFields ...proto.DeveloperField) *DiveGas

SetDeveloperFields sets DeveloperFields.

func (*DiveGas) SetHeliumContent added in v0.4.0

func (m *DiveGas) SetHeliumContent(v uint8) *DiveGas

SetHeliumContent sets HeliumContent value.

Units: percent

func (*DiveGas) SetMessageIndex added in v0.4.0

func (m *DiveGas) SetMessageIndex(v typedef.MessageIndex) *DiveGas

SetMessageIndex sets MessageIndex value.

func (*DiveGas) SetMode added in v0.4.0

func (m *DiveGas) SetMode(v typedef.DiveGasMode) *DiveGas

SetMode sets Mode value.

func (*DiveGas) SetOxygenContent added in v0.4.0

func (m *DiveGas) SetOxygenContent(v uint8) *DiveGas

SetOxygenContent sets OxygenContent value.

Units: percent

func (*DiveGas) SetStatus added in v0.4.0

func (m *DiveGas) SetStatus(v typedef.DiveGasStatus) *DiveGas

SetStatus sets Status value.

func (*DiveGas) SetUnknownFields added in v0.23.6

func (m *DiveGas) SetUnknownFields(unknownFields ...proto.Field) *DiveGas

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DiveGas) ToMesg added in v0.3.0

func (m *DiveGas) ToMesg(options *Options) proto.Message

ToMesg converts DiveGas into proto.Message. If options is nil, default options will be used.

type DiveSettings

type DiveSettings struct {
	Timestamp                 time.Time
	Name                      string
	WaterDensity              float32 // Units: kg/m^3; Fresh water is usually 1000; salt water is usually 1025
	BottomDepth               float32
	BottomTime                uint32
	ApneaCountdownTime        uint32
	CcrLowSetpointDepth       uint32 // Scale: 1000; Units: m; Depth to switch to low setpoint in automatic mode
	CcrHighSetpointDepth      uint32 // Scale: 1000; Units: m; Depth to switch to high setpoint in automatic mode
	MessageIndex              typedef.MessageIndex
	RepeatDiveInterval        uint16               // Units: s; Time between surfacing and ending the activity
	SafetyStopTime            uint16               // Units: s; Time at safety stop (if enabled)
	TravelGas                 typedef.MessageIndex // Index of travel dive_gas message
	Model                     typedef.TissueModelType
	GfLow                     uint8 // Units: percent
	GfHigh                    uint8 // Units: percent
	WaterType                 typedef.WaterType
	Po2Warn                   uint8 // Scale: 100; Units: percent; Typically 1.40
	Po2Critical               uint8 // Scale: 100; Units: percent; Typically 1.60
	Po2Deco                   uint8 // Scale: 100; Units: percent
	SafetyStopEnabled         typedef.Bool
	ApneaCountdownEnabled     typedef.Bool
	BacklightMode             typedef.DiveBacklightMode
	BacklightBrightness       uint8
	BacklightTimeout          typedef.BacklightTimeout
	HeartRateSourceType       typedef.SourceType
	HeartRateSource           uint8
	CcrLowSetpointSwitchMode  typedef.CcrSetpointSwitchMode  // If low PO2 should be switched to automatically
	CcrLowSetpoint            uint8                          // Scale: 100; Units: percent; Target PO2 when using low setpoint
	CcrHighSetpointSwitchMode typedef.CcrSetpointSwitchMode  // If high PO2 should be switched to automatically
	CcrHighSetpoint           uint8                          // Scale: 100; Units: percent; Target PO2 when using high setpoint
	GasConsumptionDisplay     typedef.GasConsumptionRateType // Type of gas consumption rate to display. Some values are only valid if tank volume is known.
	UpKeyEnabled              typedef.Bool                   // Indicates whether the up key is enabled during dives
	DiveSounds                typedef.Tone                   // Sounds and vibration enabled or disabled in-dive
	LastStopMultiple          uint8                          // Scale: 10; Usually 1.0/1.5/2.0 representing 3/4.5/6m or 10/15/20ft
	NoFlyTimeMode             typedef.NoFlyTimeMode          // Indicates which guidelines to use for no-fly surface interval.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DiveSettings is a DiveSettings message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDiveSettings

func NewDiveSettings(mesg *proto.Message) *DiveSettings

NewDiveSettings creates new DiveSettings struct based on given mesg. If mesg is nil, it will return DiveSettings with all fields being set to its corresponding invalid value.

func (*DiveSettings) CcrHighSetpointDepthScaled added in v0.8.0

func (m *DiveSettings) CcrHighSetpointDepthScaled() float64

CcrHighSetpointDepthScaled return CcrHighSetpointDepth in its scaled value. If CcrHighSetpointDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; Depth to switch to high setpoint in automatic mode

func (*DiveSettings) CcrHighSetpointScaled added in v0.8.0

func (m *DiveSettings) CcrHighSetpointScaled() float64

CcrHighSetpointScaled return CcrHighSetpoint in its scaled value. If CcrHighSetpoint value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent; Target PO2 when using high setpoint

func (*DiveSettings) CcrLowSetpointDepthScaled added in v0.8.0

func (m *DiveSettings) CcrLowSetpointDepthScaled() float64

CcrLowSetpointDepthScaled return CcrLowSetpointDepth in its scaled value. If CcrLowSetpointDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; Depth to switch to low setpoint in automatic mode

func (*DiveSettings) CcrLowSetpointScaled added in v0.8.0

func (m *DiveSettings) CcrLowSetpointScaled() float64

CcrLowSetpointScaled return CcrLowSetpoint in its scaled value. If CcrLowSetpoint value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent; Target PO2 when using low setpoint

func (*DiveSettings) GetHeartRateSource added in v0.16.0

func (m *DiveSettings) GetHeartRateSource() (name string, value any)

GetHeartRateSource returns Dynamic Field interpretation of HeartRateSource. Otherwise, returns the original value of HeartRateSource.

Based on m.HeartRateSourceType:

  • name: "heart_rate_antplus_device_type", value: typedef.AntplusDeviceType(m.HeartRateSource)
  • name: "heart_rate_local_device_type", value: typedef.LocalDeviceType(m.HeartRateSource)

Otherwise:

  • name: "heart_rate_source", value: m.HeartRateSource

func (*DiveSettings) LastStopMultipleScaled added in v0.8.0

func (m *DiveSettings) LastStopMultipleScaled() float64

LastStopMultipleScaled return LastStopMultiple in its scaled value. If LastStopMultiple value is invalid, float64 invalid value will be returned.

Scale: 10; Usually 1.0/1.5/2.0 representing 3/4.5/6m or 10/15/20ft

func (*DiveSettings) Po2CriticalScaled added in v0.8.0

func (m *DiveSettings) Po2CriticalScaled() float64

Po2CriticalScaled return Po2Critical in its scaled value. If Po2Critical value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent; Typically 1.60

func (*DiveSettings) Po2DecoScaled added in v0.8.0

func (m *DiveSettings) Po2DecoScaled() float64

Po2DecoScaled return Po2Deco in its scaled value. If Po2Deco value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*DiveSettings) Po2WarnScaled added in v0.8.0

func (m *DiveSettings) Po2WarnScaled() float64

Po2WarnScaled return Po2Warn in its scaled value. If Po2Warn value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent; Typically 1.40

func (*DiveSettings) SetApneaCountdownEnabled added in v0.4.0

func (m *DiveSettings) SetApneaCountdownEnabled(v typedef.Bool) *DiveSettings

SetApneaCountdownEnabled sets ApneaCountdownEnabled value.

func (*DiveSettings) SetApneaCountdownTime added in v0.4.0

func (m *DiveSettings) SetApneaCountdownTime(v uint32) *DiveSettings

SetApneaCountdownTime sets ApneaCountdownTime value.

func (*DiveSettings) SetBacklightBrightness added in v0.4.0

func (m *DiveSettings) SetBacklightBrightness(v uint8) *DiveSettings

SetBacklightBrightness sets BacklightBrightness value.

func (*DiveSettings) SetBacklightMode added in v0.4.0

func (m *DiveSettings) SetBacklightMode(v typedef.DiveBacklightMode) *DiveSettings

SetBacklightMode sets BacklightMode value.

func (*DiveSettings) SetBacklightTimeout added in v0.4.0

func (m *DiveSettings) SetBacklightTimeout(v typedef.BacklightTimeout) *DiveSettings

SetBacklightTimeout sets BacklightTimeout value.

func (*DiveSettings) SetBottomDepth added in v0.4.0

func (m *DiveSettings) SetBottomDepth(v float32) *DiveSettings

SetBottomDepth sets BottomDepth value.

func (*DiveSettings) SetBottomTime added in v0.4.0

func (m *DiveSettings) SetBottomTime(v uint32) *DiveSettings

SetBottomTime sets BottomTime value.

func (*DiveSettings) SetCcrHighSetpoint added in v0.4.0

func (m *DiveSettings) SetCcrHighSetpoint(v uint8) *DiveSettings

SetCcrHighSetpoint sets CcrHighSetpoint value.

Scale: 100; Units: percent; Target PO2 when using high setpoint

func (*DiveSettings) SetCcrHighSetpointDepth added in v0.4.0

func (m *DiveSettings) SetCcrHighSetpointDepth(v uint32) *DiveSettings

SetCcrHighSetpointDepth sets CcrHighSetpointDepth value.

Scale: 1000; Units: m; Depth to switch to high setpoint in automatic mode

func (*DiveSettings) SetCcrHighSetpointDepthScaled added in v0.17.2

func (m *DiveSettings) SetCcrHighSetpointDepthScaled(v float64) *DiveSettings

SetCcrHighSetpointDepthScaled is similar to SetCcrHighSetpointDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; Depth to switch to high setpoint in automatic mode

func (*DiveSettings) SetCcrHighSetpointScaled added in v0.17.2

func (m *DiveSettings) SetCcrHighSetpointScaled(v float64) *DiveSettings

SetCcrHighSetpointScaled is similar to SetCcrHighSetpoint except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent; Target PO2 when using high setpoint

func (*DiveSettings) SetCcrHighSetpointSwitchMode added in v0.4.0

func (m *DiveSettings) SetCcrHighSetpointSwitchMode(v typedef.CcrSetpointSwitchMode) *DiveSettings

SetCcrHighSetpointSwitchMode sets CcrHighSetpointSwitchMode value.

If high PO2 should be switched to automatically

func (*DiveSettings) SetCcrLowSetpoint added in v0.4.0

func (m *DiveSettings) SetCcrLowSetpoint(v uint8) *DiveSettings

SetCcrLowSetpoint sets CcrLowSetpoint value.

Scale: 100; Units: percent; Target PO2 when using low setpoint

func (*DiveSettings) SetCcrLowSetpointDepth added in v0.4.0

func (m *DiveSettings) SetCcrLowSetpointDepth(v uint32) *DiveSettings

SetCcrLowSetpointDepth sets CcrLowSetpointDepth value.

Scale: 1000; Units: m; Depth to switch to low setpoint in automatic mode

func (*DiveSettings) SetCcrLowSetpointDepthScaled added in v0.17.2

func (m *DiveSettings) SetCcrLowSetpointDepthScaled(v float64) *DiveSettings

SetCcrLowSetpointDepthScaled is similar to SetCcrLowSetpointDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; Depth to switch to low setpoint in automatic mode

func (*DiveSettings) SetCcrLowSetpointScaled added in v0.17.2

func (m *DiveSettings) SetCcrLowSetpointScaled(v float64) *DiveSettings

SetCcrLowSetpointScaled is similar to SetCcrLowSetpoint except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent; Target PO2 when using low setpoint

func (*DiveSettings) SetCcrLowSetpointSwitchMode added in v0.4.0

func (m *DiveSettings) SetCcrLowSetpointSwitchMode(v typedef.CcrSetpointSwitchMode) *DiveSettings

SetCcrLowSetpointSwitchMode sets CcrLowSetpointSwitchMode value.

If low PO2 should be switched to automatically

func (*DiveSettings) SetDeveloperFields added in v0.4.0

func (m *DiveSettings) SetDeveloperFields(developerFields ...proto.DeveloperField) *DiveSettings

SetDeveloperFields sets DeveloperFields.

func (*DiveSettings) SetDiveSounds added in v0.4.0

func (m *DiveSettings) SetDiveSounds(v typedef.Tone) *DiveSettings

SetDiveSounds sets DiveSounds value.

Sounds and vibration enabled or disabled in-dive

func (*DiveSettings) SetGasConsumptionDisplay added in v0.4.0

func (m *DiveSettings) SetGasConsumptionDisplay(v typedef.GasConsumptionRateType) *DiveSettings

SetGasConsumptionDisplay sets GasConsumptionDisplay value.

Type of gas consumption rate to display. Some values are only valid if tank volume is known.

func (*DiveSettings) SetGfHigh added in v0.4.0

func (m *DiveSettings) SetGfHigh(v uint8) *DiveSettings

SetGfHigh sets GfHigh value.

Units: percent

func (*DiveSettings) SetGfLow added in v0.4.0

func (m *DiveSettings) SetGfLow(v uint8) *DiveSettings

SetGfLow sets GfLow value.

Units: percent

func (*DiveSettings) SetHeartRateSource added in v0.4.0

func (m *DiveSettings) SetHeartRateSource(v uint8) *DiveSettings

SetHeartRateSource sets HeartRateSource value.

func (*DiveSettings) SetHeartRateSourceType added in v0.4.0

func (m *DiveSettings) SetHeartRateSourceType(v typedef.SourceType) *DiveSettings

SetHeartRateSourceType sets HeartRateSourceType value.

func (*DiveSettings) SetLastStopMultiple added in v0.4.0

func (m *DiveSettings) SetLastStopMultiple(v uint8) *DiveSettings

SetLastStopMultiple sets LastStopMultiple value.

Scale: 10; Usually 1.0/1.5/2.0 representing 3/4.5/6m or 10/15/20ft

func (*DiveSettings) SetLastStopMultipleScaled added in v0.17.2

func (m *DiveSettings) SetLastStopMultipleScaled(v float64) *DiveSettings

SetLastStopMultipleScaled is similar to SetLastStopMultiple except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10; Usually 1.0/1.5/2.0 representing 3/4.5/6m or 10/15/20ft

func (*DiveSettings) SetMessageIndex added in v0.4.0

func (m *DiveSettings) SetMessageIndex(v typedef.MessageIndex) *DiveSettings

SetMessageIndex sets MessageIndex value.

func (*DiveSettings) SetModel added in v0.4.0

SetModel sets Model value.

func (*DiveSettings) SetName added in v0.4.0

func (m *DiveSettings) SetName(v string) *DiveSettings

SetName sets Name value.

func (*DiveSettings) SetNoFlyTimeMode added in v0.4.0

func (m *DiveSettings) SetNoFlyTimeMode(v typedef.NoFlyTimeMode) *DiveSettings

SetNoFlyTimeMode sets NoFlyTimeMode value.

Indicates which guidelines to use for no-fly surface interval.

func (*DiveSettings) SetPo2Critical added in v0.4.0

func (m *DiveSettings) SetPo2Critical(v uint8) *DiveSettings

SetPo2Critical sets Po2Critical value.

Scale: 100; Units: percent; Typically 1.60

func (*DiveSettings) SetPo2CriticalScaled added in v0.17.2

func (m *DiveSettings) SetPo2CriticalScaled(v float64) *DiveSettings

SetPo2CriticalScaled is similar to SetPo2Critical except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent; Typically 1.60

func (*DiveSettings) SetPo2Deco added in v0.4.0

func (m *DiveSettings) SetPo2Deco(v uint8) *DiveSettings

SetPo2Deco sets Po2Deco value.

Scale: 100; Units: percent

func (*DiveSettings) SetPo2DecoScaled added in v0.17.2

func (m *DiveSettings) SetPo2DecoScaled(v float64) *DiveSettings

SetPo2DecoScaled is similar to SetPo2Deco except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*DiveSettings) SetPo2Warn added in v0.4.0

func (m *DiveSettings) SetPo2Warn(v uint8) *DiveSettings

SetPo2Warn sets Po2Warn value.

Scale: 100; Units: percent; Typically 1.40

func (*DiveSettings) SetPo2WarnScaled added in v0.17.2

func (m *DiveSettings) SetPo2WarnScaled(v float64) *DiveSettings

SetPo2WarnScaled is similar to SetPo2Warn except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent; Typically 1.40

func (*DiveSettings) SetRepeatDiveInterval added in v0.4.0

func (m *DiveSettings) SetRepeatDiveInterval(v uint16) *DiveSettings

SetRepeatDiveInterval sets RepeatDiveInterval value.

Units: s; Time between surfacing and ending the activity

func (*DiveSettings) SetSafetyStopEnabled added in v0.4.0

func (m *DiveSettings) SetSafetyStopEnabled(v typedef.Bool) *DiveSettings

SetSafetyStopEnabled sets SafetyStopEnabled value.

func (*DiveSettings) SetSafetyStopTime added in v0.4.0

func (m *DiveSettings) SetSafetyStopTime(v uint16) *DiveSettings

SetSafetyStopTime sets SafetyStopTime value.

Units: s; Time at safety stop (if enabled)

func (*DiveSettings) SetTimestamp added in v0.4.0

func (m *DiveSettings) SetTimestamp(v time.Time) *DiveSettings

SetTimestamp sets Timestamp value.

func (*DiveSettings) SetTravelGas added in v0.4.0

func (m *DiveSettings) SetTravelGas(v typedef.MessageIndex) *DiveSettings

SetTravelGas sets TravelGas value.

Index of travel dive_gas message

func (*DiveSettings) SetUnknownFields added in v0.23.6

func (m *DiveSettings) SetUnknownFields(unknownFields ...proto.Field) *DiveSettings

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DiveSettings) SetUpKeyEnabled added in v0.4.0

func (m *DiveSettings) SetUpKeyEnabled(v typedef.Bool) *DiveSettings

SetUpKeyEnabled sets UpKeyEnabled value.

Indicates whether the up key is enabled during dives

func (*DiveSettings) SetWaterDensity added in v0.4.0

func (m *DiveSettings) SetWaterDensity(v float32) *DiveSettings

SetWaterDensity sets WaterDensity value.

Units: kg/m^3; Fresh water is usually 1000; salt water is usually 1025

func (*DiveSettings) SetWaterType added in v0.4.0

func (m *DiveSettings) SetWaterType(v typedef.WaterType) *DiveSettings

SetWaterType sets WaterType value.

func (*DiveSettings) TimestampUint32 added in v0.15.0

func (m *DiveSettings) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*DiveSettings) ToMesg added in v0.3.0

func (m *DiveSettings) ToMesg(options *Options) proto.Message

ToMesg converts DiveSettings into proto.Message. If options is nil, default options will be used.

type DiveSummary

type DiveSummary struct {
	Timestamp       time.Time // Units: s
	AvgDepth        uint32    // Scale: 1000; Units: m; 0 if above water
	MaxDepth        uint32    // Scale: 1000; Units: m; 0 if above water
	SurfaceInterval uint32    // Units: s; Time since end of last dive
	DiveNumber      uint32
	BottomTime      uint32 // Scale: 1000; Units: s
	DescentTime     uint32 // Scale: 1000; Units: s; Time to reach deepest level stop
	AscentTime      uint32 // Scale: 1000; Units: s; Time after leaving bottom until reaching surface
	AvgAscentRate   int32  // Scale: 1000; Units: m/s; Average ascent rate, not including descents or stops
	AvgDescentRate  uint32 // Scale: 1000; Units: m/s; Average descent rate, not including ascents or stops
	MaxAscentRate   uint32 // Scale: 1000; Units: m/s; Maximum ascent rate
	MaxDescentRate  uint32 // Scale: 1000; Units: m/s; Maximum descent rate
	HangTime        uint32 // Scale: 1000; Units: s; Time spent neither ascending nor descending
	ReferenceMesg   typedef.MesgNum
	ReferenceIndex  typedef.MessageIndex
	StartN2         uint16 // Units: percent
	EndN2           uint16 // Units: percent
	O2Toxicity      uint16 // Units: OTUs
	AvgPressureSac  uint16 // Scale: 100; Units: bar/min; Average pressure-based surface air consumption
	AvgVolumeSac    uint16 // Scale: 100; Units: L/min; Average volumetric surface air consumption
	AvgRmv          uint16 // Scale: 100; Units: L/min; Average respiratory minute volume
	StartCns        uint8  // Units: percent
	EndCns          uint8  // Units: percent

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

DiveSummary is a DiveSummary message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewDiveSummary

func NewDiveSummary(mesg *proto.Message) *DiveSummary

NewDiveSummary creates new DiveSummary struct based on given mesg. If mesg is nil, it will return DiveSummary with all fields being set to its corresponding invalid value.

func (*DiveSummary) AscentTimeScaled added in v0.8.0

func (m *DiveSummary) AscentTimeScaled() float64

AscentTimeScaled return AscentTime in its scaled value. If AscentTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time after leaving bottom until reaching surface

func (*DiveSummary) AvgAscentRateScaled added in v0.8.0

func (m *DiveSummary) AvgAscentRateScaled() float64

AvgAscentRateScaled return AvgAscentRate in its scaled value. If AvgAscentRate value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; Average ascent rate, not including descents or stops

func (*DiveSummary) AvgDepthScaled added in v0.8.0

func (m *DiveSummary) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value. If AvgDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) AvgDescentRateScaled added in v0.8.0

func (m *DiveSummary) AvgDescentRateScaled() float64

AvgDescentRateScaled return AvgDescentRate in its scaled value. If AvgDescentRate value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; Average descent rate, not including ascents or stops

func (*DiveSummary) AvgPressureSacScaled added in v0.8.0

func (m *DiveSummary) AvgPressureSacScaled() float64

AvgPressureSacScaled return AvgPressureSac in its scaled value. If AvgPressureSac value is invalid, float64 invalid value will be returned.

Scale: 100; Units: bar/min; Average pressure-based surface air consumption

func (*DiveSummary) AvgRmvScaled added in v0.8.0

func (m *DiveSummary) AvgRmvScaled() float64

AvgRmvScaled return AvgRmv in its scaled value. If AvgRmv value is invalid, float64 invalid value will be returned.

Scale: 100; Units: L/min; Average respiratory minute volume

func (*DiveSummary) AvgVolumeSacScaled added in v0.8.0

func (m *DiveSummary) AvgVolumeSacScaled() float64

AvgVolumeSacScaled return AvgVolumeSac in its scaled value. If AvgVolumeSac value is invalid, float64 invalid value will be returned.

Scale: 100; Units: L/min; Average volumetric surface air consumption

func (*DiveSummary) BottomTimeScaled added in v0.8.0

func (m *DiveSummary) BottomTimeScaled() float64

BottomTimeScaled return BottomTime in its scaled value. If BottomTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*DiveSummary) DescentTimeScaled added in v0.8.0

func (m *DiveSummary) DescentTimeScaled() float64

DescentTimeScaled return DescentTime in its scaled value. If DescentTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time to reach deepest level stop

func (*DiveSummary) HangTimeScaled added in v0.8.0

func (m *DiveSummary) HangTimeScaled() float64

HangTimeScaled return HangTime in its scaled value. If HangTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time spent neither ascending nor descending

func (*DiveSummary) MaxAscentRateScaled added in v0.8.0

func (m *DiveSummary) MaxAscentRateScaled() float64

MaxAscentRateScaled return MaxAscentRate in its scaled value. If MaxAscentRate value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; Maximum ascent rate

func (*DiveSummary) MaxDepthScaled added in v0.8.0

func (m *DiveSummary) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value. If MaxDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) MaxDescentRateScaled added in v0.8.0

func (m *DiveSummary) MaxDescentRateScaled() float64

MaxDescentRateScaled return MaxDescentRate in its scaled value. If MaxDescentRate value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; Maximum descent rate

func (*DiveSummary) SetAscentTime added in v0.4.0

func (m *DiveSummary) SetAscentTime(v uint32) *DiveSummary

SetAscentTime sets AscentTime value.

Scale: 1000; Units: s; Time after leaving bottom until reaching surface

func (*DiveSummary) SetAscentTimeScaled added in v0.17.2

func (m *DiveSummary) SetAscentTimeScaled(v float64) *DiveSummary

SetAscentTimeScaled is similar to SetAscentTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time after leaving bottom until reaching surface

func (*DiveSummary) SetAvgAscentRate added in v0.4.0

func (m *DiveSummary) SetAvgAscentRate(v int32) *DiveSummary

SetAvgAscentRate sets AvgAscentRate value.

Scale: 1000; Units: m/s; Average ascent rate, not including descents or stops

func (*DiveSummary) SetAvgAscentRateScaled added in v0.17.2

func (m *DiveSummary) SetAvgAscentRateScaled(v float64) *DiveSummary

SetAvgAscentRateScaled is similar to SetAvgAscentRate except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; Average ascent rate, not including descents or stops

func (*DiveSummary) SetAvgDepth added in v0.4.0

func (m *DiveSummary) SetAvgDepth(v uint32) *DiveSummary

SetAvgDepth sets AvgDepth value.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) SetAvgDepthScaled added in v0.17.2

func (m *DiveSummary) SetAvgDepthScaled(v float64) *DiveSummary

SetAvgDepthScaled is similar to SetAvgDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) SetAvgDescentRate added in v0.4.0

func (m *DiveSummary) SetAvgDescentRate(v uint32) *DiveSummary

SetAvgDescentRate sets AvgDescentRate value.

Scale: 1000; Units: m/s; Average descent rate, not including ascents or stops

func (*DiveSummary) SetAvgDescentRateScaled added in v0.17.2

func (m *DiveSummary) SetAvgDescentRateScaled(v float64) *DiveSummary

SetAvgDescentRateScaled is similar to SetAvgDescentRate except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; Average descent rate, not including ascents or stops

func (*DiveSummary) SetAvgPressureSac added in v0.4.0

func (m *DiveSummary) SetAvgPressureSac(v uint16) *DiveSummary

SetAvgPressureSac sets AvgPressureSac value.

Scale: 100; Units: bar/min; Average pressure-based surface air consumption

func (*DiveSummary) SetAvgPressureSacScaled added in v0.17.2

func (m *DiveSummary) SetAvgPressureSacScaled(v float64) *DiveSummary

SetAvgPressureSacScaled is similar to SetAvgPressureSac except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: bar/min; Average pressure-based surface air consumption

func (*DiveSummary) SetAvgRmv added in v0.4.0

func (m *DiveSummary) SetAvgRmv(v uint16) *DiveSummary

SetAvgRmv sets AvgRmv value.

Scale: 100; Units: L/min; Average respiratory minute volume

func (*DiveSummary) SetAvgRmvScaled added in v0.17.2

func (m *DiveSummary) SetAvgRmvScaled(v float64) *DiveSummary

SetAvgRmvScaled is similar to SetAvgRmv except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: L/min; Average respiratory minute volume

func (*DiveSummary) SetAvgVolumeSac added in v0.4.0

func (m *DiveSummary) SetAvgVolumeSac(v uint16) *DiveSummary

SetAvgVolumeSac sets AvgVolumeSac value.

Scale: 100; Units: L/min; Average volumetric surface air consumption

func (*DiveSummary) SetAvgVolumeSacScaled added in v0.17.2

func (m *DiveSummary) SetAvgVolumeSacScaled(v float64) *DiveSummary

SetAvgVolumeSacScaled is similar to SetAvgVolumeSac except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: L/min; Average volumetric surface air consumption

func (*DiveSummary) SetBottomTime added in v0.4.0

func (m *DiveSummary) SetBottomTime(v uint32) *DiveSummary

SetBottomTime sets BottomTime value.

Scale: 1000; Units: s

func (*DiveSummary) SetBottomTimeScaled added in v0.17.2

func (m *DiveSummary) SetBottomTimeScaled(v float64) *DiveSummary

SetBottomTimeScaled is similar to SetBottomTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*DiveSummary) SetDescentTime added in v0.4.0

func (m *DiveSummary) SetDescentTime(v uint32) *DiveSummary

SetDescentTime sets DescentTime value.

Scale: 1000; Units: s; Time to reach deepest level stop

func (*DiveSummary) SetDescentTimeScaled added in v0.17.2

func (m *DiveSummary) SetDescentTimeScaled(v float64) *DiveSummary

SetDescentTimeScaled is similar to SetDescentTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time to reach deepest level stop

func (*DiveSummary) SetDeveloperFields added in v0.4.0

func (m *DiveSummary) SetDeveloperFields(developerFields ...proto.DeveloperField) *DiveSummary

SetDeveloperFields sets DeveloperFields.

func (*DiveSummary) SetDiveNumber added in v0.4.0

func (m *DiveSummary) SetDiveNumber(v uint32) *DiveSummary

SetDiveNumber sets DiveNumber value.

func (*DiveSummary) SetEndCns added in v0.4.0

func (m *DiveSummary) SetEndCns(v uint8) *DiveSummary

SetEndCns sets EndCns value.

Units: percent

func (*DiveSummary) SetEndN2 added in v0.4.0

func (m *DiveSummary) SetEndN2(v uint16) *DiveSummary

SetEndN2 sets EndN2 value.

Units: percent

func (*DiveSummary) SetHangTime added in v0.4.0

func (m *DiveSummary) SetHangTime(v uint32) *DiveSummary

SetHangTime sets HangTime value.

Scale: 1000; Units: s; Time spent neither ascending nor descending

func (*DiveSummary) SetHangTimeScaled added in v0.17.2

func (m *DiveSummary) SetHangTimeScaled(v float64) *DiveSummary

SetHangTimeScaled is similar to SetHangTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time spent neither ascending nor descending

func (*DiveSummary) SetMaxAscentRate added in v0.4.0

func (m *DiveSummary) SetMaxAscentRate(v uint32) *DiveSummary

SetMaxAscentRate sets MaxAscentRate value.

Scale: 1000; Units: m/s; Maximum ascent rate

func (*DiveSummary) SetMaxAscentRateScaled added in v0.17.2

func (m *DiveSummary) SetMaxAscentRateScaled(v float64) *DiveSummary

SetMaxAscentRateScaled is similar to SetMaxAscentRate except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; Maximum ascent rate

func (*DiveSummary) SetMaxDepth added in v0.4.0

func (m *DiveSummary) SetMaxDepth(v uint32) *DiveSummary

SetMaxDepth sets MaxDepth value.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) SetMaxDepthScaled added in v0.17.2

func (m *DiveSummary) SetMaxDepthScaled(v float64) *DiveSummary

SetMaxDepthScaled is similar to SetMaxDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*DiveSummary) SetMaxDescentRate added in v0.4.0

func (m *DiveSummary) SetMaxDescentRate(v uint32) *DiveSummary

SetMaxDescentRate sets MaxDescentRate value.

Scale: 1000; Units: m/s; Maximum descent rate

func (*DiveSummary) SetMaxDescentRateScaled added in v0.17.2

func (m *DiveSummary) SetMaxDescentRateScaled(v float64) *DiveSummary

SetMaxDescentRateScaled is similar to SetMaxDescentRate except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; Maximum descent rate

func (*DiveSummary) SetO2Toxicity added in v0.4.0

func (m *DiveSummary) SetO2Toxicity(v uint16) *DiveSummary

SetO2Toxicity sets O2Toxicity value.

Units: OTUs

func (*DiveSummary) SetReferenceIndex added in v0.4.0

func (m *DiveSummary) SetReferenceIndex(v typedef.MessageIndex) *DiveSummary

SetReferenceIndex sets ReferenceIndex value.

func (*DiveSummary) SetReferenceMesg added in v0.4.0

func (m *DiveSummary) SetReferenceMesg(v typedef.MesgNum) *DiveSummary

SetReferenceMesg sets ReferenceMesg value.

func (*DiveSummary) SetStartCns added in v0.4.0

func (m *DiveSummary) SetStartCns(v uint8) *DiveSummary

SetStartCns sets StartCns value.

Units: percent

func (*DiveSummary) SetStartN2 added in v0.4.0

func (m *DiveSummary) SetStartN2(v uint16) *DiveSummary

SetStartN2 sets StartN2 value.

Units: percent

func (*DiveSummary) SetSurfaceInterval added in v0.4.0

func (m *DiveSummary) SetSurfaceInterval(v uint32) *DiveSummary

SetSurfaceInterval sets SurfaceInterval value.

Units: s; Time since end of last dive

func (*DiveSummary) SetTimestamp added in v0.4.0

func (m *DiveSummary) SetTimestamp(v time.Time) *DiveSummary

SetTimestamp sets Timestamp value.

Units: s

func (*DiveSummary) SetUnknownFields added in v0.23.6

func (m *DiveSummary) SetUnknownFields(unknownFields ...proto.Field) *DiveSummary

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*DiveSummary) TimestampUint32 added in v0.15.0

func (m *DiveSummary) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*DiveSummary) ToMesg added in v0.3.0

func (m *DiveSummary) ToMesg(options *Options) proto.Message

ToMesg converts DiveSummary into proto.Message. If options is nil, default options will be used.

type Event

type Event struct {
	Timestamp                   time.Time // Units: s
	StartTimestamp              time.Time // Units: s; Timestamp of when the event started
	Data                        uint32
	Data16                      uint16
	Score                       uint16 // Do not populate directly. Autogenerated by decoder for sport_point subfield components
	OpponentScore               uint16 // Do not populate directly. Autogenerated by decoder for sport_point subfield components
	Event                       typedef.Event
	EventType                   typedef.EventType
	EventGroup                  uint8
	FrontGearNum                uint8 // Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Front gear number. 1 is innermost.
	FrontGear                   uint8 // Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of front teeth.
	RearGearNum                 uint8 // Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Rear gear number. 1 is innermost.
	RearGear                    uint8 // Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of rear teeth.
	DeviceIndex                 typedef.DeviceIndex
	ActivityType                typedef.ActivityType         // Activity Type associated with an auto_activity_detect event
	RadarThreatLevelMax         typedef.RadarThreatLevelType // Do not populate directly. Autogenerated by decoder for threat_alert subfield components.
	RadarThreatCount            uint8                        // Do not populate directly. Autogenerated by decoder for threat_alert subfield components.
	RadarThreatAvgApproachSpeed uint8                        // Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components
	RadarThreatMaxApproachSpeed uint8                        // Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Event is a Event message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewEvent

func NewEvent(mesg *proto.Message) *Event

NewEvent creates new Event struct based on given mesg. If mesg is nil, it will return Event with all fields being set to its corresponding invalid value.

func (*Event) GetData added in v0.16.0

func (m *Event) GetData() (name string, value any)

GetData returns Dynamic Field interpretation of Data. Otherwise, returns the original value of Data.

Based on m.Event:

  • name: "timer_trigger", value: typedef.TimerTrigger(m.Data)
  • name: "course_point_index", value: typedef.MessageIndex(m.Data)
  • name: "battery_level", units: "V" , value: (float64(m.Data) * 1000) - 0
  • name: "virtual_partner_speed", units: "m/s" , value: (float64(m.Data) * 1000) - 0
  • name: "hr_high_alert", units: "bpm" , value: uint8(m.Data)
  • name: "hr_low_alert", units: "bpm" , value: uint8(m.Data)
  • name: "speed_high_alert", units: "m/s" , value: (float64(m.Data) * 1000) - 0
  • name: "speed_low_alert", units: "m/s" , value: (float64(m.Data) * 1000) - 0
  • name: "cad_high_alert", units: "rpm" , value: uint16(m.Data)
  • name: "cad_low_alert", units: "rpm" , value: uint16(m.Data)
  • name: "power_high_alert", units: "watts" , value: uint16(m.Data)
  • name: "power_low_alert", units: "watts" , value: uint16(m.Data)
  • name: "time_duration_alert", units: "s" , value: (float64(m.Data) * 1000) - 0
  • name: "distance_duration_alert", units: "m" , value: (float64(m.Data) * 100) - 0
  • name: "calorie_duration_alert", units: "calories" , value: uint32(m.Data)
  • name: "fitness_equipment_state", value: typedef.FitnessEquipmentState(m.Data)
  • name: "sport_point", value: uint32(m.Data)
  • name: "gear_change_data", value: uint32(m.Data)
  • name: "rider_position", value: typedef.RiderPositionType(m.Data)
  • name: "comm_timeout", value: typedef.CommTimeoutType(m.Data)
  • name: "dive_alert", value: typedef.DiveAlert(m.Data)
  • name: "auto_activity_detect_duration", units: "min" , value: uint16(m.Data)
  • name: "radar_threat_alert", value: uint32(m.Data)

Otherwise:

  • name: "data", value: m.Data

func (*Event) GetStartTimestamp added in v0.16.0

func (m *Event) GetStartTimestamp() (name string, value any)

GetStartTimestamp returns Dynamic Field interpretation of StartTimestamp. Otherwise, returns the original value of StartTimestamp.

Based on m.Event:

  • name: "auto_activity_detect_start_timestamp", units: "s" , value: time.Time(m.StartTimestamp)

Otherwise:

  • name: "start_timestamp", units: "s" , value: m.StartTimestamp

func (*Event) IsExpandedField added in v0.21.0

func (m *Event) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 3, 7, 8, 9, 10, 11, 12, 21, 22, 23, 24.

func (*Event) MarkAsExpandedField added in v0.21.0

func (m *Event) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 3, 7, 8, 9, 10, 11, 12, 21, 22, 23, 24.

func (*Event) RadarThreatAvgApproachSpeedScaled added in v0.8.0

func (m *Event) RadarThreatAvgApproachSpeedScaled() float64

RadarThreatAvgApproachSpeedScaled return RadarThreatAvgApproachSpeed in its scaled value. If RadarThreatAvgApproachSpeed value is invalid, float64 invalid value will be returned.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) RadarThreatMaxApproachSpeedScaled added in v0.8.0

func (m *Event) RadarThreatMaxApproachSpeedScaled() float64

RadarThreatMaxApproachSpeedScaled return RadarThreatMaxApproachSpeed in its scaled value. If RadarThreatMaxApproachSpeed value is invalid, float64 invalid value will be returned.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) SetActivityType added in v0.4.0

func (m *Event) SetActivityType(v typedef.ActivityType) *Event

SetActivityType sets ActivityType value.

Activity Type associated with an auto_activity_detect event

func (*Event) SetData added in v0.4.0

func (m *Event) SetData(v uint32) *Event

SetData sets Data value.

func (*Event) SetData16 added in v0.4.0

func (m *Event) SetData16(v uint16) *Event

SetData16 sets Data16 value.

func (*Event) SetDeveloperFields added in v0.4.0

func (m *Event) SetDeveloperFields(developerFields ...proto.DeveloperField) *Event

SetDeveloperFields sets DeveloperFields.

func (*Event) SetDeviceIndex added in v0.4.0

func (m *Event) SetDeviceIndex(v typedef.DeviceIndex) *Event

SetDeviceIndex sets DeviceIndex value.

func (*Event) SetEvent added in v0.4.0

func (m *Event) SetEvent(v typedef.Event) *Event

SetEvent sets Event value.

func (*Event) SetEventGroup added in v0.4.0

func (m *Event) SetEventGroup(v uint8) *Event

SetEventGroup sets EventGroup value.

func (*Event) SetEventType added in v0.4.0

func (m *Event) SetEventType(v typedef.EventType) *Event

SetEventType sets EventType value.

func (*Event) SetFrontGear added in v0.4.0

func (m *Event) SetFrontGear(v uint8) *Event

SetFrontGear sets FrontGear value.

Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of front teeth.

func (*Event) SetFrontGearNum added in v0.4.0

func (m *Event) SetFrontGearNum(v uint8) *Event

SetFrontGearNum sets FrontGearNum value.

Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Front gear number. 1 is innermost.

func (*Event) SetOpponentScore added in v0.4.0

func (m *Event) SetOpponentScore(v uint16) *Event

SetOpponentScore sets OpponentScore value.

Do not populate directly. Autogenerated by decoder for sport_point subfield components

func (*Event) SetRadarThreatAvgApproachSpeed added in v0.4.0

func (m *Event) SetRadarThreatAvgApproachSpeed(v uint8) *Event

SetRadarThreatAvgApproachSpeed sets RadarThreatAvgApproachSpeed value.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) SetRadarThreatAvgApproachSpeedScaled added in v0.17.2

func (m *Event) SetRadarThreatAvgApproachSpeedScaled(v float64) *Event

SetRadarThreatAvgApproachSpeedScaled is similar to SetRadarThreatAvgApproachSpeed except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) SetRadarThreatCount added in v0.4.0

func (m *Event) SetRadarThreatCount(v uint8) *Event

SetRadarThreatCount sets RadarThreatCount value.

Do not populate directly. Autogenerated by decoder for threat_alert subfield components.

func (*Event) SetRadarThreatLevelMax added in v0.4.0

func (m *Event) SetRadarThreatLevelMax(v typedef.RadarThreatLevelType) *Event

SetRadarThreatLevelMax sets RadarThreatLevelMax value.

Do not populate directly. Autogenerated by decoder for threat_alert subfield components.

func (*Event) SetRadarThreatMaxApproachSpeed added in v0.4.0

func (m *Event) SetRadarThreatMaxApproachSpeed(v uint8) *Event

SetRadarThreatMaxApproachSpeed sets RadarThreatMaxApproachSpeed value.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) SetRadarThreatMaxApproachSpeedScaled added in v0.17.2

func (m *Event) SetRadarThreatMaxApproachSpeedScaled(v float64) *Event

SetRadarThreatMaxApproachSpeedScaled is similar to SetRadarThreatMaxApproachSpeed except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components

func (*Event) SetRearGear added in v0.4.0

func (m *Event) SetRearGear(v uint8) *Event

SetRearGear sets RearGear value.

Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of rear teeth.

func (*Event) SetRearGearNum added in v0.4.0

func (m *Event) SetRearGearNum(v uint8) *Event

SetRearGearNum sets RearGearNum value.

Base: uint8z; Do not populate directly. Autogenerated by decoder for gear_change subfield components. Rear gear number. 1 is innermost.

func (*Event) SetScore added in v0.4.0

func (m *Event) SetScore(v uint16) *Event

SetScore sets Score value.

Do not populate directly. Autogenerated by decoder for sport_point subfield components

func (*Event) SetStartTimestamp added in v0.4.0

func (m *Event) SetStartTimestamp(v time.Time) *Event

SetStartTimestamp sets StartTimestamp value.

Units: s; Timestamp of when the event started

func (*Event) SetTimestamp added in v0.4.0

func (m *Event) SetTimestamp(v time.Time) *Event

SetTimestamp sets Timestamp value.

Units: s

func (*Event) SetUnknownFields added in v0.23.6

func (m *Event) SetUnknownFields(unknownFields ...proto.Field) *Event

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Event) StartTimestampUint32 added in v0.15.0

func (m *Event) StartTimestampUint32() uint32

StartTimestampUint32 returns StartTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Event) TimestampUint32 added in v0.15.0

func (m *Event) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Event) ToMesg added in v0.3.0

func (m *Event) ToMesg(options *Options) proto.Message

ToMesg converts Event into proto.Message. If options is nil, default options will be used.

type ExdDataConceptConfiguration

type ExdDataConceptConfiguration struct {
	ScreenIndex  uint8
	ConceptField byte
	FieldId      uint8
	ConceptIndex uint8
	DataPage     uint8
	ConceptKey   uint8
	Scaling      uint8
	DataUnits    typedef.ExdDataUnits
	Qualifier    typedef.ExdQualifiers
	Descriptor   typedef.ExdDescriptors
	IsSigned     typedef.Bool

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

ExdDataConceptConfiguration is a ExdDataConceptConfiguration message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewExdDataConceptConfiguration

func NewExdDataConceptConfiguration(mesg *proto.Message) *ExdDataConceptConfiguration

NewExdDataConceptConfiguration creates new ExdDataConceptConfiguration struct based on given mesg. If mesg is nil, it will return ExdDataConceptConfiguration with all fields being set to its corresponding invalid value.

func (*ExdDataConceptConfiguration) IsExpandedField added in v0.21.0

func (m *ExdDataConceptConfiguration) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 2, 3.

func (*ExdDataConceptConfiguration) MarkAsExpandedField added in v0.21.0

func (m *ExdDataConceptConfiguration) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 2, 3.

func (*ExdDataConceptConfiguration) SetConceptField added in v0.4.0

SetConceptField sets ConceptField value.

func (*ExdDataConceptConfiguration) SetConceptIndex added in v0.4.0

SetConceptIndex sets ConceptIndex value.

func (*ExdDataConceptConfiguration) SetConceptKey added in v0.4.0

SetConceptKey sets ConceptKey value.

func (*ExdDataConceptConfiguration) SetDataPage added in v0.4.0

SetDataPage sets DataPage value.

func (*ExdDataConceptConfiguration) SetDataUnits added in v0.4.0

SetDataUnits sets DataUnits value.

func (*ExdDataConceptConfiguration) SetDescriptor added in v0.4.0

SetDescriptor sets Descriptor value.

func (*ExdDataConceptConfiguration) SetDeveloperFields added in v0.4.0

func (m *ExdDataConceptConfiguration) SetDeveloperFields(developerFields ...proto.DeveloperField) *ExdDataConceptConfiguration

SetDeveloperFields sets DeveloperFields.

func (*ExdDataConceptConfiguration) SetFieldId added in v0.4.0

SetFieldId sets FieldId value.

func (*ExdDataConceptConfiguration) SetIsSigned added in v0.4.0

SetIsSigned sets IsSigned value.

func (*ExdDataConceptConfiguration) SetQualifier added in v0.4.0

SetQualifier sets Qualifier value.

func (*ExdDataConceptConfiguration) SetScaling added in v0.4.0

SetScaling sets Scaling value.

func (*ExdDataConceptConfiguration) SetScreenIndex added in v0.4.0

SetScreenIndex sets ScreenIndex value.

func (*ExdDataConceptConfiguration) SetUnknownFields added in v0.23.6

func (m *ExdDataConceptConfiguration) SetUnknownFields(unknownFields ...proto.Field) *ExdDataConceptConfiguration

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ExdDataConceptConfiguration) ToMesg added in v0.3.0

func (m *ExdDataConceptConfiguration) ToMesg(options *Options) proto.Message

ToMesg converts ExdDataConceptConfiguration into proto.Message. If options is nil, default options will be used.

type ExdDataFieldConfiguration

type ExdDataFieldConfiguration struct {
	Title        [32]string // Array: [32]
	ScreenIndex  uint8
	ConceptField byte
	FieldId      uint8
	ConceptCount uint8
	DisplayType  typedef.ExdDisplayType

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

ExdDataFieldConfiguration is a ExdDataFieldConfiguration message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewExdDataFieldConfiguration

func NewExdDataFieldConfiguration(mesg *proto.Message) *ExdDataFieldConfiguration

NewExdDataFieldConfiguration creates new ExdDataFieldConfiguration struct based on given mesg. If mesg is nil, it will return ExdDataFieldConfiguration with all fields being set to its corresponding invalid value.

func (*ExdDataFieldConfiguration) IsExpandedField added in v0.21.0

func (m *ExdDataFieldConfiguration) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 2, 3.

func (*ExdDataFieldConfiguration) MarkAsExpandedField added in v0.21.0

func (m *ExdDataFieldConfiguration) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 2, 3.

func (*ExdDataFieldConfiguration) SetConceptCount added in v0.4.0

SetConceptCount sets ConceptCount value.

func (*ExdDataFieldConfiguration) SetConceptField added in v0.4.0

SetConceptField sets ConceptField value.

func (*ExdDataFieldConfiguration) SetDeveloperFields added in v0.4.0

func (m *ExdDataFieldConfiguration) SetDeveloperFields(developerFields ...proto.DeveloperField) *ExdDataFieldConfiguration

SetDeveloperFields sets DeveloperFields.

func (*ExdDataFieldConfiguration) SetDisplayType added in v0.4.0

SetDisplayType sets DisplayType value.

func (*ExdDataFieldConfiguration) SetFieldId added in v0.4.0

SetFieldId sets FieldId value.

func (*ExdDataFieldConfiguration) SetScreenIndex added in v0.4.0

SetScreenIndex sets ScreenIndex value.

func (*ExdDataFieldConfiguration) SetTitle added in v0.4.0

SetTitle sets Title value.

Array: [32]

func (*ExdDataFieldConfiguration) SetUnknownFields added in v0.23.6

func (m *ExdDataFieldConfiguration) SetUnknownFields(unknownFields ...proto.Field) *ExdDataFieldConfiguration

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ExdDataFieldConfiguration) ToMesg added in v0.3.0

func (m *ExdDataFieldConfiguration) ToMesg(options *Options) proto.Message

ToMesg converts ExdDataFieldConfiguration into proto.Message. If options is nil, default options will be used.

type ExdScreenConfiguration

type ExdScreenConfiguration struct {
	ScreenIndex   uint8
	FieldCount    uint8 // number of fields in screen
	Layout        typedef.ExdLayout
	ScreenEnabled typedef.Bool

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ExdScreenConfiguration is a ExdScreenConfiguration message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewExdScreenConfiguration

func NewExdScreenConfiguration(mesg *proto.Message) *ExdScreenConfiguration

NewExdScreenConfiguration creates new ExdScreenConfiguration struct based on given mesg. If mesg is nil, it will return ExdScreenConfiguration with all fields being set to its corresponding invalid value.

func (*ExdScreenConfiguration) SetDeveloperFields added in v0.4.0

func (m *ExdScreenConfiguration) SetDeveloperFields(developerFields ...proto.DeveloperField) *ExdScreenConfiguration

SetDeveloperFields sets DeveloperFields.

func (*ExdScreenConfiguration) SetFieldCount added in v0.4.0

SetFieldCount sets FieldCount value.

number of fields in screen

func (*ExdScreenConfiguration) SetLayout added in v0.4.0

SetLayout sets Layout value.

func (*ExdScreenConfiguration) SetScreenEnabled added in v0.4.0

SetScreenEnabled sets ScreenEnabled value.

func (*ExdScreenConfiguration) SetScreenIndex added in v0.4.0

func (m *ExdScreenConfiguration) SetScreenIndex(v uint8) *ExdScreenConfiguration

SetScreenIndex sets ScreenIndex value.

func (*ExdScreenConfiguration) SetUnknownFields added in v0.23.6

func (m *ExdScreenConfiguration) SetUnknownFields(unknownFields ...proto.Field) *ExdScreenConfiguration

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ExdScreenConfiguration) ToMesg added in v0.3.0

func (m *ExdScreenConfiguration) ToMesg(options *Options) proto.Message

ToMesg converts ExdScreenConfiguration into proto.Message. If options is nil, default options will be used.

type ExerciseTitle

type ExerciseTitle struct {
	WktStepName      []string // Array: [N]
	MessageIndex     typedef.MessageIndex
	ExerciseCategory typedef.ExerciseCategory
	ExerciseName     uint16

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ExerciseTitle is a ExerciseTitle message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewExerciseTitle

func NewExerciseTitle(mesg *proto.Message) *ExerciseTitle

NewExerciseTitle creates new ExerciseTitle struct based on given mesg. If mesg is nil, it will return ExerciseTitle with all fields being set to its corresponding invalid value.

func (*ExerciseTitle) SetDeveloperFields added in v0.4.0

func (m *ExerciseTitle) SetDeveloperFields(developerFields ...proto.DeveloperField) *ExerciseTitle

SetDeveloperFields sets DeveloperFields.

func (*ExerciseTitle) SetExerciseCategory added in v0.4.0

func (m *ExerciseTitle) SetExerciseCategory(v typedef.ExerciseCategory) *ExerciseTitle

SetExerciseCategory sets ExerciseCategory value.

func (*ExerciseTitle) SetExerciseName added in v0.4.0

func (m *ExerciseTitle) SetExerciseName(v uint16) *ExerciseTitle

SetExerciseName sets ExerciseName value.

func (*ExerciseTitle) SetMessageIndex added in v0.4.0

func (m *ExerciseTitle) SetMessageIndex(v typedef.MessageIndex) *ExerciseTitle

SetMessageIndex sets MessageIndex value.

func (*ExerciseTitle) SetUnknownFields added in v0.23.6

func (m *ExerciseTitle) SetUnknownFields(unknownFields ...proto.Field) *ExerciseTitle

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ExerciseTitle) SetWktStepName added in v0.4.0

func (m *ExerciseTitle) SetWktStepName(v []string) *ExerciseTitle

SetWktStepName sets WktStepName value.

Array: [N]

func (*ExerciseTitle) ToMesg added in v0.3.0

func (m *ExerciseTitle) ToMesg(options *Options) proto.Message

ToMesg converts ExerciseTitle into proto.Message. If options is nil, default options will be used.

type Factory added in v0.3.0

type Factory interface {
	// CreateField creates new field based on defined messages in the factory.
	// If not found, it returns new field with "unknown" name.
	CreateField(mesgNum typedef.MesgNum, num byte) proto.Field
}

Factory defines a contract that any Factory containing these method can be used by mesgdef's structs.

type FieldCapabilities

type FieldCapabilities struct {
	MessageIndex typedef.MessageIndex
	MesgNum      typedef.MesgNum
	Count        uint16
	File         typedef.File
	FieldNum     uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

FieldCapabilities is a FieldCapabilities message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewFieldCapabilities

func NewFieldCapabilities(mesg *proto.Message) *FieldCapabilities

NewFieldCapabilities creates new FieldCapabilities struct based on given mesg. If mesg is nil, it will return FieldCapabilities with all fields being set to its corresponding invalid value.

func (*FieldCapabilities) SetCount added in v0.4.0

func (m *FieldCapabilities) SetCount(v uint16) *FieldCapabilities

SetCount sets Count value.

func (*FieldCapabilities) SetDeveloperFields added in v0.4.0

func (m *FieldCapabilities) SetDeveloperFields(developerFields ...proto.DeveloperField) *FieldCapabilities

SetDeveloperFields sets DeveloperFields.

func (*FieldCapabilities) SetFieldNum added in v0.4.0

func (m *FieldCapabilities) SetFieldNum(v uint8) *FieldCapabilities

SetFieldNum sets FieldNum value.

func (*FieldCapabilities) SetFile added in v0.4.0

SetFile sets File value.

func (*FieldCapabilities) SetMesgNum added in v0.4.0

SetMesgNum sets MesgNum value.

func (*FieldCapabilities) SetMessageIndex added in v0.4.0

SetMessageIndex sets MessageIndex value.

func (*FieldCapabilities) SetUnknownFields added in v0.23.6

func (m *FieldCapabilities) SetUnknownFields(unknownFields ...proto.Field) *FieldCapabilities

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*FieldCapabilities) ToMesg added in v0.3.0

func (m *FieldCapabilities) ToMesg(options *Options) proto.Message

ToMesg converts FieldCapabilities into proto.Message. If options is nil, default options will be used.

type FieldDescription

type FieldDescription struct {
	FieldName             []string // Array: [N]
	Components            string
	Units                 []string // Array: [N]
	Bits                  string
	Accumulate            string
	FitBaseUnitId         typedef.FitBaseUnit
	NativeMesgNum         typedef.MesgNum
	DeveloperDataIndex    uint8
	FieldDefinitionNumber uint8
	FitBaseTypeId         basetype.BaseType
	Array                 uint8
	Scale                 uint8
	Offset                int8
	NativeFieldNum        uint8

	UnknownFields []proto.Field // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
}

FieldDescription is a FieldDescription message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewFieldDescription

func NewFieldDescription(mesg *proto.Message) *FieldDescription

NewFieldDescription creates new FieldDescription struct based on given mesg. If mesg is nil, it will return FieldDescription with all fields being set to its corresponding invalid value.

func (*FieldDescription) SetAccumulate added in v0.4.0

func (m *FieldDescription) SetAccumulate(v string) *FieldDescription

SetAccumulate sets Accumulate value.

func (*FieldDescription) SetArray added in v0.4.0

func (m *FieldDescription) SetArray(v uint8) *FieldDescription

SetArray sets Array value.

func (*FieldDescription) SetBits added in v0.4.0

func (m *FieldDescription) SetBits(v string) *FieldDescription

SetBits sets Bits value.

func (*FieldDescription) SetComponents added in v0.4.0

func (m *FieldDescription) SetComponents(v string) *FieldDescription

SetComponents sets Components value.

func (*FieldDescription) SetDeveloperDataIndex added in v0.4.0

func (m *FieldDescription) SetDeveloperDataIndex(v uint8) *FieldDescription

SetDeveloperDataIndex sets DeveloperDataIndex value.

func (*FieldDescription) SetFieldDefinitionNumber added in v0.4.0

func (m *FieldDescription) SetFieldDefinitionNumber(v uint8) *FieldDescription

SetFieldDefinitionNumber sets FieldDefinitionNumber value.

func (*FieldDescription) SetFieldName added in v0.4.0

func (m *FieldDescription) SetFieldName(v []string) *FieldDescription

SetFieldName sets FieldName value.

Array: [N]

func (*FieldDescription) SetFitBaseTypeId added in v0.4.0

func (m *FieldDescription) SetFitBaseTypeId(v basetype.BaseType) *FieldDescription

SetFitBaseTypeId sets FitBaseTypeId value.

func (*FieldDescription) SetFitBaseUnitId added in v0.4.0

func (m *FieldDescription) SetFitBaseUnitId(v typedef.FitBaseUnit) *FieldDescription

SetFitBaseUnitId sets FitBaseUnitId value.

func (*FieldDescription) SetNativeFieldNum added in v0.4.0

func (m *FieldDescription) SetNativeFieldNum(v uint8) *FieldDescription

SetNativeFieldNum sets NativeFieldNum value.

func (*FieldDescription) SetNativeMesgNum added in v0.4.0

func (m *FieldDescription) SetNativeMesgNum(v typedef.MesgNum) *FieldDescription

SetNativeMesgNum sets NativeMesgNum value.

func (*FieldDescription) SetOffset added in v0.4.0

func (m *FieldDescription) SetOffset(v int8) *FieldDescription

SetOffset sets Offset value.

func (*FieldDescription) SetScale added in v0.4.0

func (m *FieldDescription) SetScale(v uint8) *FieldDescription

SetScale sets Scale value.

func (*FieldDescription) SetUnits added in v0.4.0

func (m *FieldDescription) SetUnits(v []string) *FieldDescription

SetUnits sets Units value.

Array: [N]

func (*FieldDescription) SetUnknownFields added in v0.23.6

func (m *FieldDescription) SetUnknownFields(unknownFields ...proto.Field) *FieldDescription

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*FieldDescription) ToMesg added in v0.3.0

func (m *FieldDescription) ToMesg(options *Options) proto.Message

ToMesg converts FieldDescription into proto.Message. If options is nil, default options will be used.

type FileCapabilities

type FileCapabilities struct {
	Directory    string
	MaxSize      uint32 // Units: bytes
	MessageIndex typedef.MessageIndex
	MaxCount     uint16
	Type         typedef.File
	Flags        typedef.FileFlags // Base: uint8z

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

FileCapabilities is a FileCapabilities message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewFileCapabilities

func NewFileCapabilities(mesg *proto.Message) *FileCapabilities

NewFileCapabilities creates new FileCapabilities struct based on given mesg. If mesg is nil, it will return FileCapabilities with all fields being set to its corresponding invalid value.

func (*FileCapabilities) SetDeveloperFields added in v0.4.0

func (m *FileCapabilities) SetDeveloperFields(developerFields ...proto.DeveloperField) *FileCapabilities

SetDeveloperFields sets DeveloperFields.

func (*FileCapabilities) SetDirectory added in v0.4.0

func (m *FileCapabilities) SetDirectory(v string) *FileCapabilities

SetDirectory sets Directory value.

func (*FileCapabilities) SetFlags added in v0.4.0

SetFlags sets Flags value.

Base: uint8z

func (*FileCapabilities) SetMaxCount added in v0.4.0

func (m *FileCapabilities) SetMaxCount(v uint16) *FileCapabilities

SetMaxCount sets MaxCount value.

func (*FileCapabilities) SetMaxSize added in v0.4.0

func (m *FileCapabilities) SetMaxSize(v uint32) *FileCapabilities

SetMaxSize sets MaxSize value.

Units: bytes

func (*FileCapabilities) SetMessageIndex added in v0.4.0

func (m *FileCapabilities) SetMessageIndex(v typedef.MessageIndex) *FileCapabilities

SetMessageIndex sets MessageIndex value.

func (*FileCapabilities) SetType added in v0.4.0

SetType sets Type value.

func (*FileCapabilities) SetUnknownFields added in v0.23.6

func (m *FileCapabilities) SetUnknownFields(unknownFields ...proto.Field) *FileCapabilities

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*FileCapabilities) ToMesg added in v0.3.0

func (m *FileCapabilities) ToMesg(options *Options) proto.Message

ToMesg converts FileCapabilities into proto.Message. If options is nil, default options will be used.

type FileCreator

type FileCreator struct {
	SoftwareVersion uint16
	HardwareVersion uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

FileCreator is a FileCreator message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewFileCreator

func NewFileCreator(mesg *proto.Message) *FileCreator

NewFileCreator creates new FileCreator struct based on given mesg. If mesg is nil, it will return FileCreator with all fields being set to its corresponding invalid value.

func (*FileCreator) SetDeveloperFields added in v0.4.0

func (m *FileCreator) SetDeveloperFields(developerFields ...proto.DeveloperField) *FileCreator

SetDeveloperFields sets DeveloperFields.

func (*FileCreator) SetHardwareVersion added in v0.4.0

func (m *FileCreator) SetHardwareVersion(v uint8) *FileCreator

SetHardwareVersion sets HardwareVersion value.

func (*FileCreator) SetSoftwareVersion added in v0.4.0

func (m *FileCreator) SetSoftwareVersion(v uint16) *FileCreator

SetSoftwareVersion sets SoftwareVersion value.

func (*FileCreator) SetUnknownFields added in v0.23.6

func (m *FileCreator) SetUnknownFields(unknownFields ...proto.Field) *FileCreator

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*FileCreator) ToMesg added in v0.3.0

func (m *FileCreator) ToMesg(options *Options) proto.Message

ToMesg converts FileCreator into proto.Message. If options is nil, default options will be used.

type FileId

type FileId struct {
	TimeCreated  time.Time // Only set for files that are can be created/erased.
	ProductName  string    // Optional free form string to indicate the devices name or model
	SerialNumber uint32    // Base: uint32z
	Manufacturer typedef.Manufacturer
	Product      uint16
	Number       uint16 // Only set for files that are not created/erased.
	Type         typedef.File

	UnknownFields []proto.Field // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
}

FileId is a FileId message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewFileId

func NewFileId(mesg *proto.Message) *FileId

NewFileId creates new FileId struct based on given mesg. If mesg is nil, it will return FileId with all fields being set to its corresponding invalid value.

func (*FileId) GetProduct added in v0.16.0

func (m *FileId) GetProduct() (name string, value any)

GetProduct returns Dynamic Field interpretation of Product. Otherwise, returns the original value of Product.

Based on m.Manufacturer:

  • name: "favero_product", value: typedef.FaveroProduct(m.Product)
  • name: "garmin_product", value: typedef.GarminProduct(m.Product)

Otherwise:

  • name: "product", value: m.Product

func (*FileId) SetManufacturer added in v0.4.0

func (m *FileId) SetManufacturer(v typedef.Manufacturer) *FileId

SetManufacturer sets Manufacturer value.

func (*FileId) SetNumber added in v0.4.0

func (m *FileId) SetNumber(v uint16) *FileId

SetNumber sets Number value.

Only set for files that are not created/erased.

func (*FileId) SetProduct added in v0.4.0

func (m *FileId) SetProduct(v uint16) *FileId

SetProduct sets Product value.

func (*FileId) SetProductName added in v0.4.0

func (m *FileId) SetProductName(v string) *FileId

SetProductName sets ProductName value.

Optional free form string to indicate the devices name or model

func (*FileId) SetSerialNumber added in v0.4.0

func (m *FileId) SetSerialNumber(v uint32) *FileId

SetSerialNumber sets SerialNumber value.

Base: uint32z

func (*FileId) SetTimeCreated added in v0.4.0

func (m *FileId) SetTimeCreated(v time.Time) *FileId

SetTimeCreated sets TimeCreated value.

Only set for files that are can be created/erased.

func (*FileId) SetType added in v0.4.0

func (m *FileId) SetType(v typedef.File) *FileId

SetType sets Type value.

func (*FileId) SetUnknownFields added in v0.23.6

func (m *FileId) SetUnknownFields(unknownFields ...proto.Field) *FileId

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*FileId) TimeCreatedUint32 added in v0.15.0

func (m *FileId) TimeCreatedUint32() uint32

TimeCreatedUint32 returns TimeCreated in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*FileId) ToMesg added in v0.3.0

func (m *FileId) ToMesg(options *Options) proto.Message

ToMesg converts FileId into proto.Message. If options is nil, default options will be used.

type Goal

type Goal struct {
	StartDate       time.Time
	EndDate         time.Time
	Value           uint32
	TargetValue     uint32
	MessageIndex    typedef.MessageIndex
	RecurrenceValue uint16
	Sport           typedef.Sport
	SubSport        typedef.SubSport
	Type            typedef.Goal
	Repeat          typedef.Bool
	Recurrence      typedef.GoalRecurrence
	Enabled         typedef.Bool
	Source          typedef.GoalSource

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Goal is a Goal message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewGoal

func NewGoal(mesg *proto.Message) *Goal

NewGoal creates new Goal struct based on given mesg. If mesg is nil, it will return Goal with all fields being set to its corresponding invalid value.

func (*Goal) EndDateUint32 added in v0.15.0

func (m *Goal) EndDateUint32() uint32

EndDateUint32 returns EndDate in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Goal) SetDeveloperFields added in v0.4.0

func (m *Goal) SetDeveloperFields(developerFields ...proto.DeveloperField) *Goal

SetDeveloperFields sets DeveloperFields.

func (*Goal) SetEnabled added in v0.4.0

func (m *Goal) SetEnabled(v typedef.Bool) *Goal

SetEnabled sets Enabled value.

func (*Goal) SetEndDate added in v0.4.0

func (m *Goal) SetEndDate(v time.Time) *Goal

SetEndDate sets EndDate value.

func (*Goal) SetMessageIndex added in v0.4.0

func (m *Goal) SetMessageIndex(v typedef.MessageIndex) *Goal

SetMessageIndex sets MessageIndex value.

func (*Goal) SetRecurrence added in v0.4.0

func (m *Goal) SetRecurrence(v typedef.GoalRecurrence) *Goal

SetRecurrence sets Recurrence value.

func (*Goal) SetRecurrenceValue added in v0.4.0

func (m *Goal) SetRecurrenceValue(v uint16) *Goal

SetRecurrenceValue sets RecurrenceValue value.

func (*Goal) SetRepeat added in v0.4.0

func (m *Goal) SetRepeat(v typedef.Bool) *Goal

SetRepeat sets Repeat value.

func (*Goal) SetSource added in v0.4.0

func (m *Goal) SetSource(v typedef.GoalSource) *Goal

SetSource sets Source value.

func (*Goal) SetSport added in v0.4.0

func (m *Goal) SetSport(v typedef.Sport) *Goal

SetSport sets Sport value.

func (*Goal) SetStartDate added in v0.4.0

func (m *Goal) SetStartDate(v time.Time) *Goal

SetStartDate sets StartDate value.

func (*Goal) SetSubSport added in v0.4.0

func (m *Goal) SetSubSport(v typedef.SubSport) *Goal

SetSubSport sets SubSport value.

func (*Goal) SetTargetValue added in v0.4.0

func (m *Goal) SetTargetValue(v uint32) *Goal

SetTargetValue sets TargetValue value.

func (*Goal) SetType added in v0.4.0

func (m *Goal) SetType(v typedef.Goal) *Goal

SetType sets Type value.

func (*Goal) SetUnknownFields added in v0.23.6

func (m *Goal) SetUnknownFields(unknownFields ...proto.Field) *Goal

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Goal) SetValue added in v0.4.0

func (m *Goal) SetValue(v uint32) *Goal

SetValue sets Value value.

func (*Goal) StartDateUint32 added in v0.15.0

func (m *Goal) StartDateUint32() uint32

StartDateUint32 returns StartDate in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Goal) ToMesg added in v0.3.0

func (m *Goal) ToMesg(options *Options) proto.Message

ToMesg converts Goal into proto.Message. If options is nil, default options will be used.

type GpsMetadata

type GpsMetadata struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp.
	UtcTimestamp     time.Time // Units: s; Used to correlate UTC to system time if the timestamp of the message is in system time. This UTC time is derived from the GPS data.
	PositionLat      int32     // Units: semicircles
	PositionLong     int32     // Units: semicircles
	EnhancedAltitude uint32    // Scale: 5; Offset: 500; Units: m
	EnhancedSpeed    uint32    // Scale: 1000; Units: m/s
	Velocity         [3]int16  // Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.
	Heading          uint16    // Scale: 100; Units: degrees

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

GpsMetadata is a GpsMetadata message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewGpsMetadata

func NewGpsMetadata(mesg *proto.Message) *GpsMetadata

NewGpsMetadata creates new GpsMetadata struct based on given mesg. If mesg is nil, it will return GpsMetadata with all fields being set to its corresponding invalid value.

func (*GpsMetadata) EnhancedAltitudeScaled added in v0.8.0

func (m *GpsMetadata) EnhancedAltitudeScaled() float64

EnhancedAltitudeScaled return EnhancedAltitude in its scaled value. If EnhancedAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*GpsMetadata) EnhancedSpeedScaled added in v0.8.0

func (m *GpsMetadata) EnhancedSpeedScaled() float64

EnhancedSpeedScaled return EnhancedSpeed in its scaled value. If EnhancedSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*GpsMetadata) HeadingScaled added in v0.8.0

func (m *GpsMetadata) HeadingScaled() float64

HeadingScaled return Heading in its scaled value. If Heading value is invalid, float64 invalid value will be returned.

Scale: 100; Units: degrees

func (*GpsMetadata) PositionLatDegrees added in v0.15.0

func (m *GpsMetadata) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*GpsMetadata) PositionLongDegrees added in v0.15.0

func (m *GpsMetadata) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*GpsMetadata) SetDeveloperFields added in v0.4.0

func (m *GpsMetadata) SetDeveloperFields(developerFields ...proto.DeveloperField) *GpsMetadata

SetDeveloperFields sets DeveloperFields.

func (*GpsMetadata) SetEnhancedAltitude added in v0.4.0

func (m *GpsMetadata) SetEnhancedAltitude(v uint32) *GpsMetadata

SetEnhancedAltitude sets EnhancedAltitude value.

Scale: 5; Offset: 500; Units: m

func (*GpsMetadata) SetEnhancedAltitudeScaled added in v0.17.2

func (m *GpsMetadata) SetEnhancedAltitudeScaled(v float64) *GpsMetadata

SetEnhancedAltitudeScaled is similar to SetEnhancedAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*GpsMetadata) SetEnhancedSpeed added in v0.4.0

func (m *GpsMetadata) SetEnhancedSpeed(v uint32) *GpsMetadata

SetEnhancedSpeed sets EnhancedSpeed value.

Scale: 1000; Units: m/s

func (*GpsMetadata) SetEnhancedSpeedScaled added in v0.17.2

func (m *GpsMetadata) SetEnhancedSpeedScaled(v float64) *GpsMetadata

SetEnhancedSpeedScaled is similar to SetEnhancedSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*GpsMetadata) SetHeading added in v0.4.0

func (m *GpsMetadata) SetHeading(v uint16) *GpsMetadata

SetHeading sets Heading value.

Scale: 100; Units: degrees

func (*GpsMetadata) SetHeadingScaled added in v0.17.2

func (m *GpsMetadata) SetHeadingScaled(v float64) *GpsMetadata

SetHeadingScaled is similar to SetHeading except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: degrees

func (*GpsMetadata) SetPositionLat added in v0.4.0

func (m *GpsMetadata) SetPositionLat(v int32) *GpsMetadata

SetPositionLat sets PositionLat value.

Units: semicircles

func (*GpsMetadata) SetPositionLatDegrees added in v0.17.2

func (m *GpsMetadata) SetPositionLatDegrees(degrees float64) *GpsMetadata

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*GpsMetadata) SetPositionLong added in v0.4.0

func (m *GpsMetadata) SetPositionLong(v int32) *GpsMetadata

SetPositionLong sets PositionLong value.

Units: semicircles

func (*GpsMetadata) SetPositionLongDegrees added in v0.17.2

func (m *GpsMetadata) SetPositionLongDegrees(degrees float64) *GpsMetadata

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*GpsMetadata) SetTimestamp added in v0.4.0

func (m *GpsMetadata) SetTimestamp(v time.Time) *GpsMetadata

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp.

func (*GpsMetadata) SetTimestampMs added in v0.4.0

func (m *GpsMetadata) SetTimestampMs(v uint16) *GpsMetadata

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*GpsMetadata) SetUnknownFields added in v0.23.6

func (m *GpsMetadata) SetUnknownFields(unknownFields ...proto.Field) *GpsMetadata

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*GpsMetadata) SetUtcTimestamp added in v0.4.0

func (m *GpsMetadata) SetUtcTimestamp(v time.Time) *GpsMetadata

SetUtcTimestamp sets UtcTimestamp value.

Units: s; Used to correlate UTC to system time if the timestamp of the message is in system time. This UTC time is derived from the GPS data.

func (*GpsMetadata) SetVelocity added in v0.4.0

func (m *GpsMetadata) SetVelocity(v [3]int16) *GpsMetadata

SetVelocity sets Velocity value.

Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.

func (*GpsMetadata) SetVelocityScaled added in v0.17.2

func (m *GpsMetadata) SetVelocityScaled(vs [3]float64) *GpsMetadata

SetVelocityScaled is similar to SetVelocity except it accepts a scaled value. This method automatically converts the given value to its [3]int16 form, discarding any applied scale and offset.

Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.

func (*GpsMetadata) TimestampUint32 added in v0.15.0

func (m *GpsMetadata) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*GpsMetadata) ToMesg added in v0.3.0

func (m *GpsMetadata) ToMesg(options *Options) proto.Message

ToMesg converts GpsMetadata into proto.Message. If options is nil, default options will be used.

func (*GpsMetadata) UtcTimestampUint32 added in v0.15.0

func (m *GpsMetadata) UtcTimestampUint32() uint32

UtcTimestampUint32 returns UtcTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*GpsMetadata) VelocityScaled added in v0.8.0

func (m *GpsMetadata) VelocityScaled() [3]float64

VelocityScaled return Velocity in its scaled value. If Velocity value is invalid, nil will be returned.

Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.

type GyroscopeData

type GyroscopeData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	SampleTimeOffset []uint16  // Array: [N]; Units: ms; Each time in the array describes the time at which the gyro sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in gyro_x and gyro_y and gyro_z
	GyroX            []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	GyroY            []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	GyroZ            []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	CalibratedGyroX  []float32 // Array: [N]; Units: deg/s; Calibrated gyro reading
	CalibratedGyroY  []float32 // Array: [N]; Units: deg/s; Calibrated gyro reading
	CalibratedGyroZ  []float32 // Array: [N]; Units: deg/s; Calibrated gyro reading
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

GyroscopeData is a GyroscopeData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewGyroscopeData

func NewGyroscopeData(mesg *proto.Message) *GyroscopeData

NewGyroscopeData creates new GyroscopeData struct based on given mesg. If mesg is nil, it will return GyroscopeData with all fields being set to its corresponding invalid value.

func (*GyroscopeData) SetCalibratedGyroX added in v0.4.0

func (m *GyroscopeData) SetCalibratedGyroX(v []float32) *GyroscopeData

SetCalibratedGyroX sets CalibratedGyroX value.

Array: [N]; Units: deg/s; Calibrated gyro reading

func (*GyroscopeData) SetCalibratedGyroY added in v0.4.0

func (m *GyroscopeData) SetCalibratedGyroY(v []float32) *GyroscopeData

SetCalibratedGyroY sets CalibratedGyroY value.

Array: [N]; Units: deg/s; Calibrated gyro reading

func (*GyroscopeData) SetCalibratedGyroZ added in v0.4.0

func (m *GyroscopeData) SetCalibratedGyroZ(v []float32) *GyroscopeData

SetCalibratedGyroZ sets CalibratedGyroZ value.

Array: [N]; Units: deg/s; Calibrated gyro reading

func (*GyroscopeData) SetDeveloperFields added in v0.4.0

func (m *GyroscopeData) SetDeveloperFields(developerFields ...proto.DeveloperField) *GyroscopeData

SetDeveloperFields sets DeveloperFields.

func (*GyroscopeData) SetGyroX added in v0.4.0

func (m *GyroscopeData) SetGyroX(v []uint16) *GyroscopeData

SetGyroX sets GyroX value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*GyroscopeData) SetGyroY added in v0.4.0

func (m *GyroscopeData) SetGyroY(v []uint16) *GyroscopeData

SetGyroY sets GyroY value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*GyroscopeData) SetGyroZ added in v0.4.0

func (m *GyroscopeData) SetGyroZ(v []uint16) *GyroscopeData

SetGyroZ sets GyroZ value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*GyroscopeData) SetSampleTimeOffset added in v0.4.0

func (m *GyroscopeData) SetSampleTimeOffset(v []uint16) *GyroscopeData

SetSampleTimeOffset sets SampleTimeOffset value.

Array: [N]; Units: ms; Each time in the array describes the time at which the gyro sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in gyro_x and gyro_y and gyro_z

func (*GyroscopeData) SetTimestamp added in v0.4.0

func (m *GyroscopeData) SetTimestamp(v time.Time) *GyroscopeData

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*GyroscopeData) SetTimestampMs added in v0.4.0

func (m *GyroscopeData) SetTimestampMs(v uint16) *GyroscopeData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*GyroscopeData) SetUnknownFields added in v0.23.6

func (m *GyroscopeData) SetUnknownFields(unknownFields ...proto.Field) *GyroscopeData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*GyroscopeData) TimestampUint32 added in v0.15.0

func (m *GyroscopeData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*GyroscopeData) ToMesg added in v0.3.0

func (m *GyroscopeData) ToMesg(options *Options) proto.Message

ToMesg converts GyroscopeData into proto.Message. If options is nil, default options will be used.

type Hr

type Hr struct {
	Timestamp           time.Time
	FilteredBpm         []uint8  // Array: [N]; Units: bpm
	EventTimestamp      []uint32 // Array: [N]; Scale: 1024; Units: s
	EventTimestamp12    []byte   // Array: [N]; Units: s
	FractionalTimestamp uint16   // Scale: 32768; Units: s
	Time256             uint8    // Scale: 256; Units: s

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Hr is a Hr message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHr

func NewHr(mesg *proto.Message) *Hr

NewHr creates new Hr struct based on given mesg. If mesg is nil, it will return Hr with all fields being set to its corresponding invalid value.

func (*Hr) EventTimestampScaled added in v0.8.0

func (m *Hr) EventTimestampScaled() []float64

EventTimestampScaled return EventTimestamp in its scaled value. If EventTimestamp value is invalid, nil will be returned.

Array: [N]; Scale: 1024; Units: s

func (*Hr) FractionalTimestampScaled added in v0.8.0

func (m *Hr) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value. If FractionalTimestamp value is invalid, float64 invalid value will be returned.

Scale: 32768; Units: s

func (*Hr) IsExpandedField added in v0.21.0

func (m *Hr) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 0, 9.

func (*Hr) MarkAsExpandedField added in v0.21.0

func (m *Hr) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 0, 9.

func (*Hr) SetDeveloperFields added in v0.4.0

func (m *Hr) SetDeveloperFields(developerFields ...proto.DeveloperField) *Hr

SetDeveloperFields sets DeveloperFields.

func (*Hr) SetEventTimestamp added in v0.4.0

func (m *Hr) SetEventTimestamp(v []uint32) *Hr

SetEventTimestamp sets EventTimestamp value.

Array: [N]; Scale: 1024; Units: s

func (*Hr) SetEventTimestamp12 added in v0.4.0

func (m *Hr) SetEventTimestamp12(v []byte) *Hr

SetEventTimestamp12 sets EventTimestamp12 value.

Array: [N]; Units: s

func (*Hr) SetEventTimestampScaled added in v0.17.2

func (m *Hr) SetEventTimestampScaled(vs []float64) *Hr

SetEventTimestampScaled is similar to SetEventTimestamp except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1024; Units: s

func (*Hr) SetFilteredBpm added in v0.4.0

func (m *Hr) SetFilteredBpm(v []uint8) *Hr

SetFilteredBpm sets FilteredBpm value.

Array: [N]; Units: bpm

func (*Hr) SetFractionalTimestamp added in v0.4.0

func (m *Hr) SetFractionalTimestamp(v uint16) *Hr

SetFractionalTimestamp sets FractionalTimestamp value.

Scale: 32768; Units: s

func (*Hr) SetFractionalTimestampScaled added in v0.17.2

func (m *Hr) SetFractionalTimestampScaled(v float64) *Hr

SetFractionalTimestampScaled is similar to SetFractionalTimestamp except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 32768; Units: s

func (*Hr) SetTime256 added in v0.4.0

func (m *Hr) SetTime256(v uint8) *Hr

SetTime256 sets Time256 value.

Scale: 256; Units: s

func (*Hr) SetTime256Scaled added in v0.17.2

func (m *Hr) SetTime256Scaled(v float64) *Hr

SetTime256Scaled is similar to SetTime256 except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 256; Units: s

func (*Hr) SetTimestamp added in v0.4.0

func (m *Hr) SetTimestamp(v time.Time) *Hr

SetTimestamp sets Timestamp value.

func (*Hr) SetUnknownFields added in v0.23.6

func (m *Hr) SetUnknownFields(unknownFields ...proto.Field) *Hr

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Hr) Time256Scaled added in v0.8.0

func (m *Hr) Time256Scaled() float64

Time256Scaled return Time256 in its scaled value. If Time256 value is invalid, float64 invalid value will be returned.

Scale: 256; Units: s

func (*Hr) TimestampUint32 added in v0.15.0

func (m *Hr) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Hr) ToMesg added in v0.3.0

func (m *Hr) ToMesg(options *Options) proto.Message

ToMesg converts Hr into proto.Message. If options is nil, default options will be used.

type HrZone

type HrZone struct {
	Name         string
	MessageIndex typedef.MessageIndex
	HighBpm      uint8 // Units: bpm

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HrZone is a HrZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHrZone

func NewHrZone(mesg *proto.Message) *HrZone

NewHrZone creates new HrZone struct based on given mesg. If mesg is nil, it will return HrZone with all fields being set to its corresponding invalid value.

func (*HrZone) SetDeveloperFields added in v0.4.0

func (m *HrZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *HrZone

SetDeveloperFields sets DeveloperFields.

func (*HrZone) SetHighBpm added in v0.4.0

func (m *HrZone) SetHighBpm(v uint8) *HrZone

SetHighBpm sets HighBpm value.

Units: bpm

func (*HrZone) SetMessageIndex added in v0.4.0

func (m *HrZone) SetMessageIndex(v typedef.MessageIndex) *HrZone

SetMessageIndex sets MessageIndex value.

func (*HrZone) SetName added in v0.4.0

func (m *HrZone) SetName(v string) *HrZone

SetName sets Name value.

func (*HrZone) SetUnknownFields added in v0.23.6

func (m *HrZone) SetUnknownFields(unknownFields ...proto.Field) *HrZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HrZone) ToMesg added in v0.3.0

func (m *HrZone) ToMesg(options *Options) proto.Message

ToMesg converts HrZone into proto.Message. If options is nil, default options will be used.

type HrmProfile

type HrmProfile struct {
	MessageIndex      typedef.MessageIndex
	HrmAntId          uint16 // Base: uint16z
	Enabled           typedef.Bool
	LogHrv            typedef.Bool
	HrmAntIdTransType uint8 // Base: uint8z

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HrmProfile is a HrmProfile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHrmProfile

func NewHrmProfile(mesg *proto.Message) *HrmProfile

NewHrmProfile creates new HrmProfile struct based on given mesg. If mesg is nil, it will return HrmProfile with all fields being set to its corresponding invalid value.

func (*HrmProfile) SetDeveloperFields added in v0.4.0

func (m *HrmProfile) SetDeveloperFields(developerFields ...proto.DeveloperField) *HrmProfile

SetDeveloperFields sets DeveloperFields.

func (*HrmProfile) SetEnabled added in v0.4.0

func (m *HrmProfile) SetEnabled(v typedef.Bool) *HrmProfile

SetEnabled sets Enabled value.

func (*HrmProfile) SetHrmAntId added in v0.4.0

func (m *HrmProfile) SetHrmAntId(v uint16) *HrmProfile

SetHrmAntId sets HrmAntId value.

Base: uint16z

func (*HrmProfile) SetHrmAntIdTransType added in v0.4.0

func (m *HrmProfile) SetHrmAntIdTransType(v uint8) *HrmProfile

SetHrmAntIdTransType sets HrmAntIdTransType value.

Base: uint8z

func (*HrmProfile) SetLogHrv added in v0.4.0

func (m *HrmProfile) SetLogHrv(v typedef.Bool) *HrmProfile

SetLogHrv sets LogHrv value.

func (*HrmProfile) SetMessageIndex added in v0.4.0

func (m *HrmProfile) SetMessageIndex(v typedef.MessageIndex) *HrmProfile

SetMessageIndex sets MessageIndex value.

func (*HrmProfile) SetUnknownFields added in v0.23.6

func (m *HrmProfile) SetUnknownFields(unknownFields ...proto.Field) *HrmProfile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HrmProfile) ToMesg added in v0.3.0

func (m *HrmProfile) ToMesg(options *Options) proto.Message

ToMesg converts HrmProfile into proto.Message. If options is nil, default options will be used.

type Hrv

type Hrv struct {
	Time []uint16 // Array: [N]; Scale: 1000; Units: s; Time between beats

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Hrv is a Hrv message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHrv

func NewHrv(mesg *proto.Message) *Hrv

NewHrv creates new Hrv struct based on given mesg. If mesg is nil, it will return Hrv with all fields being set to its corresponding invalid value.

func (*Hrv) SetDeveloperFields added in v0.4.0

func (m *Hrv) SetDeveloperFields(developerFields ...proto.DeveloperField) *Hrv

SetDeveloperFields sets DeveloperFields.

func (*Hrv) SetTime added in v0.4.0

func (m *Hrv) SetTime(v []uint16) *Hrv

SetTime sets Time value.

Array: [N]; Scale: 1000; Units: s; Time between beats

func (*Hrv) SetTimeScaled added in v0.17.2

func (m *Hrv) SetTimeScaled(vs []float64) *Hrv

SetTimeScaled is similar to SetTime except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s; Time between beats

func (*Hrv) SetUnknownFields added in v0.23.6

func (m *Hrv) SetUnknownFields(unknownFields ...proto.Field) *Hrv

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Hrv) TimeScaled added in v0.8.0

func (m *Hrv) TimeScaled() []float64

TimeScaled return Time in its scaled value. If Time value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s; Time between beats

func (*Hrv) ToMesg added in v0.3.0

func (m *Hrv) ToMesg(options *Options) proto.Message

ToMesg converts Hrv into proto.Message. If options is nil, default options will be used.

type HrvStatusSummary

type HrvStatusSummary struct {
	Timestamp             time.Time
	WeeklyAverage         uint16 // Scale: 128; Units: ms; 7 day RMSSD average over sleep
	LastNightAverage      uint16 // Scale: 128; Units: ms; Last night RMSSD average over sleep
	LastNight5MinHigh     uint16 // Scale: 128; Units: ms; 5 minute high RMSSD value over sleep
	BaselineLowUpper      uint16 // Scale: 128; Units: ms; 3 week baseline, upper boundary of low HRV status
	BaselineBalancedLower uint16 // Scale: 128; Units: ms; 3 week baseline, lower boundary of balanced HRV status
	BaselineBalancedUpper uint16 // Scale: 128; Units: ms; 3 week baseline, upper boundary of balanced HRV status
	Status                typedef.HrvStatus

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HrvStatusSummary is a HrvStatusSummary message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHrvStatusSummary

func NewHrvStatusSummary(mesg *proto.Message) *HrvStatusSummary

NewHrvStatusSummary creates new HrvStatusSummary struct based on given mesg. If mesg is nil, it will return HrvStatusSummary with all fields being set to its corresponding invalid value.

func (*HrvStatusSummary) BaselineBalancedLowerScaled added in v0.8.0

func (m *HrvStatusSummary) BaselineBalancedLowerScaled() float64

BaselineBalancedLowerScaled return BaselineBalancedLower in its scaled value. If BaselineBalancedLower value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 3 week baseline, lower boundary of balanced HRV status

func (*HrvStatusSummary) BaselineBalancedUpperScaled added in v0.8.0

func (m *HrvStatusSummary) BaselineBalancedUpperScaled() float64

BaselineBalancedUpperScaled return BaselineBalancedUpper in its scaled value. If BaselineBalancedUpper value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 3 week baseline, upper boundary of balanced HRV status

func (*HrvStatusSummary) BaselineLowUpperScaled added in v0.8.0

func (m *HrvStatusSummary) BaselineLowUpperScaled() float64

BaselineLowUpperScaled return BaselineLowUpper in its scaled value. If BaselineLowUpper value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 3 week baseline, upper boundary of low HRV status

func (*HrvStatusSummary) LastNight5MinHighScaled added in v0.8.0

func (m *HrvStatusSummary) LastNight5MinHighScaled() float64

LastNight5MinHighScaled return LastNight5MinHigh in its scaled value. If LastNight5MinHigh value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 5 minute high RMSSD value over sleep

func (*HrvStatusSummary) LastNightAverageScaled added in v0.8.0

func (m *HrvStatusSummary) LastNightAverageScaled() float64

LastNightAverageScaled return LastNightAverage in its scaled value. If LastNightAverage value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; Last night RMSSD average over sleep

func (*HrvStatusSummary) SetBaselineBalancedLower added in v0.4.0

func (m *HrvStatusSummary) SetBaselineBalancedLower(v uint16) *HrvStatusSummary

SetBaselineBalancedLower sets BaselineBalancedLower value.

Scale: 128; Units: ms; 3 week baseline, lower boundary of balanced HRV status

func (*HrvStatusSummary) SetBaselineBalancedLowerScaled added in v0.17.2

func (m *HrvStatusSummary) SetBaselineBalancedLowerScaled(v float64) *HrvStatusSummary

SetBaselineBalancedLowerScaled is similar to SetBaselineBalancedLower except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 3 week baseline, lower boundary of balanced HRV status

func (*HrvStatusSummary) SetBaselineBalancedUpper added in v0.4.0

func (m *HrvStatusSummary) SetBaselineBalancedUpper(v uint16) *HrvStatusSummary

SetBaselineBalancedUpper sets BaselineBalancedUpper value.

Scale: 128; Units: ms; 3 week baseline, upper boundary of balanced HRV status

func (*HrvStatusSummary) SetBaselineBalancedUpperScaled added in v0.17.2

func (m *HrvStatusSummary) SetBaselineBalancedUpperScaled(v float64) *HrvStatusSummary

SetBaselineBalancedUpperScaled is similar to SetBaselineBalancedUpper except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 3 week baseline, upper boundary of balanced HRV status

func (*HrvStatusSummary) SetBaselineLowUpper added in v0.4.0

func (m *HrvStatusSummary) SetBaselineLowUpper(v uint16) *HrvStatusSummary

SetBaselineLowUpper sets BaselineLowUpper value.

Scale: 128; Units: ms; 3 week baseline, upper boundary of low HRV status

func (*HrvStatusSummary) SetBaselineLowUpperScaled added in v0.17.2

func (m *HrvStatusSummary) SetBaselineLowUpperScaled(v float64) *HrvStatusSummary

SetBaselineLowUpperScaled is similar to SetBaselineLowUpper except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 3 week baseline, upper boundary of low HRV status

func (*HrvStatusSummary) SetDeveloperFields added in v0.4.0

func (m *HrvStatusSummary) SetDeveloperFields(developerFields ...proto.DeveloperField) *HrvStatusSummary

SetDeveloperFields sets DeveloperFields.

func (*HrvStatusSummary) SetLastNight5MinHigh added in v0.4.0

func (m *HrvStatusSummary) SetLastNight5MinHigh(v uint16) *HrvStatusSummary

SetLastNight5MinHigh sets LastNight5MinHigh value.

Scale: 128; Units: ms; 5 minute high RMSSD value over sleep

func (*HrvStatusSummary) SetLastNight5MinHighScaled added in v0.17.2

func (m *HrvStatusSummary) SetLastNight5MinHighScaled(v float64) *HrvStatusSummary

SetLastNight5MinHighScaled is similar to SetLastNight5MinHigh except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 5 minute high RMSSD value over sleep

func (*HrvStatusSummary) SetLastNightAverage added in v0.4.0

func (m *HrvStatusSummary) SetLastNightAverage(v uint16) *HrvStatusSummary

SetLastNightAverage sets LastNightAverage value.

Scale: 128; Units: ms; Last night RMSSD average over sleep

func (*HrvStatusSummary) SetLastNightAverageScaled added in v0.17.2

func (m *HrvStatusSummary) SetLastNightAverageScaled(v float64) *HrvStatusSummary

SetLastNightAverageScaled is similar to SetLastNightAverage except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; Last night RMSSD average over sleep

func (*HrvStatusSummary) SetStatus added in v0.4.0

SetStatus sets Status value.

func (*HrvStatusSummary) SetTimestamp added in v0.4.0

func (m *HrvStatusSummary) SetTimestamp(v time.Time) *HrvStatusSummary

SetTimestamp sets Timestamp value.

func (*HrvStatusSummary) SetUnknownFields added in v0.23.6

func (m *HrvStatusSummary) SetUnknownFields(unknownFields ...proto.Field) *HrvStatusSummary

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HrvStatusSummary) SetWeeklyAverage added in v0.4.0

func (m *HrvStatusSummary) SetWeeklyAverage(v uint16) *HrvStatusSummary

SetWeeklyAverage sets WeeklyAverage value.

Scale: 128; Units: ms; 7 day RMSSD average over sleep

func (*HrvStatusSummary) SetWeeklyAverageScaled added in v0.17.2

func (m *HrvStatusSummary) SetWeeklyAverageScaled(v float64) *HrvStatusSummary

SetWeeklyAverageScaled is similar to SetWeeklyAverage except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 7 day RMSSD average over sleep

func (*HrvStatusSummary) TimestampUint32 added in v0.15.0

func (m *HrvStatusSummary) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HrvStatusSummary) ToMesg added in v0.3.0

func (m *HrvStatusSummary) ToMesg(options *Options) proto.Message

ToMesg converts HrvStatusSummary into proto.Message. If options is nil, default options will be used.

func (*HrvStatusSummary) WeeklyAverageScaled added in v0.8.0

func (m *HrvStatusSummary) WeeklyAverageScaled() float64

WeeklyAverageScaled return WeeklyAverage in its scaled value. If WeeklyAverage value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 7 day RMSSD average over sleep

type HrvValue

type HrvValue struct {
	Timestamp time.Time
	Value     uint16 // Scale: 128; Units: ms; 5 minute RMSSD

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HrvValue is a HrvValue message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHrvValue

func NewHrvValue(mesg *proto.Message) *HrvValue

NewHrvValue creates new HrvValue struct based on given mesg. If mesg is nil, it will return HrvValue with all fields being set to its corresponding invalid value.

func (*HrvValue) SetDeveloperFields added in v0.4.0

func (m *HrvValue) SetDeveloperFields(developerFields ...proto.DeveloperField) *HrvValue

SetDeveloperFields sets DeveloperFields.

func (*HrvValue) SetTimestamp added in v0.4.0

func (m *HrvValue) SetTimestamp(v time.Time) *HrvValue

SetTimestamp sets Timestamp value.

func (*HrvValue) SetUnknownFields added in v0.23.6

func (m *HrvValue) SetUnknownFields(unknownFields ...proto.Field) *HrvValue

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HrvValue) SetValue added in v0.4.0

func (m *HrvValue) SetValue(v uint16) *HrvValue

SetValue sets Value value.

Scale: 128; Units: ms; 5 minute RMSSD

func (*HrvValue) SetValueScaled added in v0.17.2

func (m *HrvValue) SetValueScaled(v float64) *HrvValue

SetValueScaled is similar to SetValue except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 128; Units: ms; 5 minute RMSSD

func (*HrvValue) TimestampUint32 added in v0.15.0

func (m *HrvValue) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HrvValue) ToMesg added in v0.3.0

func (m *HrvValue) ToMesg(options *Options) proto.Message

ToMesg converts HrvValue into proto.Message. If options is nil, default options will be used.

func (*HrvValue) ValueScaled added in v0.8.0

func (m *HrvValue) ValueScaled() float64

ValueScaled return Value in its scaled value. If Value value is invalid, float64 invalid value will be returned.

Scale: 128; Units: ms; 5 minute RMSSD

type HsaAccelerometerData added in v0.10.0

type HsaAccelerometerData struct {
	Timestamp        time.Time // Units: s
	AccelX           []int16   // Array: [N]; Scale: 1.024; Units: mG; X-Axis Measurement
	AccelY           []int16   // Array: [N]; Scale: 1.024; Units: mG; Y-Axis Measurement
	AccelZ           []int16   // Array: [N]; Scale: 1.024; Units: mG; Z-Axis Measurement
	Timestamp32K     uint32    // 32 kHz timestamp
	TimestampMs      uint16    // Units: ms; Millisecond resolution of the timestamp
	SamplingInterval uint16    // Units: ms; Sampling Interval in Milliseconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaAccelerometerData is a HsaAccelerometerData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaAccelerometerData added in v0.10.0

func NewHsaAccelerometerData(mesg *proto.Message) *HsaAccelerometerData

NewHsaAccelerometerData creates new HsaAccelerometerData struct based on given mesg. If mesg is nil, it will return HsaAccelerometerData with all fields being set to its corresponding invalid value.

func (*HsaAccelerometerData) AccelXScaled added in v0.10.0

func (m *HsaAccelerometerData) AccelXScaled() []float64

AccelXScaled return AccelX in its scaled value. If AccelX value is invalid, nil will be returned.

Array: [N]; Scale: 1.024; Units: mG; X-Axis Measurement

func (*HsaAccelerometerData) AccelYScaled added in v0.10.0

func (m *HsaAccelerometerData) AccelYScaled() []float64

AccelYScaled return AccelY in its scaled value. If AccelY value is invalid, nil will be returned.

Array: [N]; Scale: 1.024; Units: mG; Y-Axis Measurement

func (*HsaAccelerometerData) AccelZScaled added in v0.10.0

func (m *HsaAccelerometerData) AccelZScaled() []float64

AccelZScaled return AccelZ in its scaled value. If AccelZ value is invalid, nil will be returned.

Array: [N]; Scale: 1.024; Units: mG; Z-Axis Measurement

func (*HsaAccelerometerData) SetAccelX added in v0.10.0

func (m *HsaAccelerometerData) SetAccelX(v []int16) *HsaAccelerometerData

SetAccelX sets AccelX value.

Array: [N]; Scale: 1.024; Units: mG; X-Axis Measurement

func (*HsaAccelerometerData) SetAccelXScaled added in v0.17.2

func (m *HsaAccelerometerData) SetAccelXScaled(vs []float64) *HsaAccelerometerData

SetAccelXScaled is similar to SetAccelX except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1.024; Units: mG; X-Axis Measurement

func (*HsaAccelerometerData) SetAccelY added in v0.10.0

func (m *HsaAccelerometerData) SetAccelY(v []int16) *HsaAccelerometerData

SetAccelY sets AccelY value.

Array: [N]; Scale: 1.024; Units: mG; Y-Axis Measurement

func (*HsaAccelerometerData) SetAccelYScaled added in v0.17.2

func (m *HsaAccelerometerData) SetAccelYScaled(vs []float64) *HsaAccelerometerData

SetAccelYScaled is similar to SetAccelY except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1.024; Units: mG; Y-Axis Measurement

func (*HsaAccelerometerData) SetAccelZ added in v0.10.0

func (m *HsaAccelerometerData) SetAccelZ(v []int16) *HsaAccelerometerData

SetAccelZ sets AccelZ value.

Array: [N]; Scale: 1.024; Units: mG; Z-Axis Measurement

func (*HsaAccelerometerData) SetAccelZScaled added in v0.17.2

func (m *HsaAccelerometerData) SetAccelZScaled(vs []float64) *HsaAccelerometerData

SetAccelZScaled is similar to SetAccelZ except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1.024; Units: mG; Z-Axis Measurement

func (*HsaAccelerometerData) SetDeveloperFields added in v0.10.0

func (m *HsaAccelerometerData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaAccelerometerData

SetDeveloperFields sets DeveloperFields.

func (*HsaAccelerometerData) SetSamplingInterval added in v0.10.0

func (m *HsaAccelerometerData) SetSamplingInterval(v uint16) *HsaAccelerometerData

SetSamplingInterval sets SamplingInterval value.

Units: ms; Sampling Interval in Milliseconds

func (*HsaAccelerometerData) SetTimestamp added in v0.10.0

func (m *HsaAccelerometerData) SetTimestamp(v time.Time) *HsaAccelerometerData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaAccelerometerData) SetTimestamp32K added in v0.10.0

func (m *HsaAccelerometerData) SetTimestamp32K(v uint32) *HsaAccelerometerData

SetTimestamp32K sets Timestamp32K value.

32 kHz timestamp

func (*HsaAccelerometerData) SetTimestampMs added in v0.10.0

func (m *HsaAccelerometerData) SetTimestampMs(v uint16) *HsaAccelerometerData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond resolution of the timestamp

func (*HsaAccelerometerData) SetUnknownFields added in v0.23.6

func (m *HsaAccelerometerData) SetUnknownFields(unknownFields ...proto.Field) *HsaAccelerometerData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaAccelerometerData) TimestampUint32 added in v0.15.0

func (m *HsaAccelerometerData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaAccelerometerData) ToMesg added in v0.10.0

func (m *HsaAccelerometerData) ToMesg(options *Options) proto.Message

ToMesg converts HsaAccelerometerData into proto.Message. If options is nil, default options will be used.

type HsaBodyBatteryData added in v0.10.0

type HsaBodyBatteryData struct {
	Timestamp          time.Time // Units: s
	Level              []int8    // Array: [N]; Units: percent; Body battery level: [0,100] Blank: -16
	Charged            []int16   // Array: [N]; Body battery charged value
	Uncharged          []int16   // Array: [N]; Body battery uncharged value
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaBodyBatteryData is a HsaBodyBatteryData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaBodyBatteryData added in v0.10.0

func NewHsaBodyBatteryData(mesg *proto.Message) *HsaBodyBatteryData

NewHsaBodyBatteryData creates new HsaBodyBatteryData struct based on given mesg. If mesg is nil, it will return HsaBodyBatteryData with all fields being set to its corresponding invalid value.

func (*HsaBodyBatteryData) SetCharged added in v0.10.0

func (m *HsaBodyBatteryData) SetCharged(v []int16) *HsaBodyBatteryData

SetCharged sets Charged value.

Array: [N]; Body battery charged value

func (*HsaBodyBatteryData) SetDeveloperFields added in v0.10.0

func (m *HsaBodyBatteryData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaBodyBatteryData

SetDeveloperFields sets DeveloperFields.

func (*HsaBodyBatteryData) SetLevel added in v0.10.0

func (m *HsaBodyBatteryData) SetLevel(v []int8) *HsaBodyBatteryData

SetLevel sets Level value.

Array: [N]; Units: percent; Body battery level: [0,100] Blank: -16

func (*HsaBodyBatteryData) SetProcessingInterval added in v0.10.0

func (m *HsaBodyBatteryData) SetProcessingInterval(v uint16) *HsaBodyBatteryData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaBodyBatteryData) SetTimestamp added in v0.10.0

func (m *HsaBodyBatteryData) SetTimestamp(v time.Time) *HsaBodyBatteryData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaBodyBatteryData) SetUncharged added in v0.10.0

func (m *HsaBodyBatteryData) SetUncharged(v []int16) *HsaBodyBatteryData

SetUncharged sets Uncharged value.

Array: [N]; Body battery uncharged value

func (*HsaBodyBatteryData) SetUnknownFields added in v0.23.6

func (m *HsaBodyBatteryData) SetUnknownFields(unknownFields ...proto.Field) *HsaBodyBatteryData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaBodyBatteryData) TimestampUint32 added in v0.15.0

func (m *HsaBodyBatteryData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaBodyBatteryData) ToMesg added in v0.10.0

func (m *HsaBodyBatteryData) ToMesg(options *Options) proto.Message

ToMesg converts HsaBodyBatteryData into proto.Message. If options is nil, default options will be used.

type HsaConfigurationData added in v0.10.0

type HsaConfigurationData struct {
	Timestamp time.Time // Units: s; Encoded configuration data
	Data      []byte    // Array: [N]; Encoded configuration data. Health SDK use only
	DataSize  uint8     // Size in bytes of data field

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaConfigurationData is a HsaConfigurationData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaConfigurationData added in v0.10.0

func NewHsaConfigurationData(mesg *proto.Message) *HsaConfigurationData

NewHsaConfigurationData creates new HsaConfigurationData struct based on given mesg. If mesg is nil, it will return HsaConfigurationData with all fields being set to its corresponding invalid value.

func (*HsaConfigurationData) SetData added in v0.10.0

SetData sets Data value.

Array: [N]; Encoded configuration data. Health SDK use only

func (*HsaConfigurationData) SetDataSize added in v0.10.0

func (m *HsaConfigurationData) SetDataSize(v uint8) *HsaConfigurationData

SetDataSize sets DataSize value.

Size in bytes of data field

func (*HsaConfigurationData) SetDeveloperFields added in v0.10.0

func (m *HsaConfigurationData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaConfigurationData

SetDeveloperFields sets DeveloperFields.

func (*HsaConfigurationData) SetTimestamp added in v0.10.0

func (m *HsaConfigurationData) SetTimestamp(v time.Time) *HsaConfigurationData

SetTimestamp sets Timestamp value.

Units: s; Encoded configuration data

func (*HsaConfigurationData) SetUnknownFields added in v0.23.6

func (m *HsaConfigurationData) SetUnknownFields(unknownFields ...proto.Field) *HsaConfigurationData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaConfigurationData) TimestampUint32 added in v0.15.0

func (m *HsaConfigurationData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaConfigurationData) ToMesg added in v0.10.0

func (m *HsaConfigurationData) ToMesg(options *Options) proto.Message

ToMesg converts HsaConfigurationData into proto.Message. If options is nil, default options will be used.

type HsaEvent added in v0.10.0

type HsaEvent struct {
	Timestamp time.Time // Units: s
	EventId   uint8     // Event ID. Health SDK use only

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaEvent is a HsaEvent message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaEvent added in v0.10.0

func NewHsaEvent(mesg *proto.Message) *HsaEvent

NewHsaEvent creates new HsaEvent struct based on given mesg. If mesg is nil, it will return HsaEvent with all fields being set to its corresponding invalid value.

func (*HsaEvent) SetDeveloperFields added in v0.10.0

func (m *HsaEvent) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaEvent

SetDeveloperFields sets DeveloperFields.

func (*HsaEvent) SetEventId added in v0.10.0

func (m *HsaEvent) SetEventId(v uint8) *HsaEvent

SetEventId sets EventId value.

Event ID. Health SDK use only

func (*HsaEvent) SetTimestamp added in v0.10.0

func (m *HsaEvent) SetTimestamp(v time.Time) *HsaEvent

SetTimestamp sets Timestamp value.

Units: s

func (*HsaEvent) SetUnknownFields added in v0.23.6

func (m *HsaEvent) SetUnknownFields(unknownFields ...proto.Field) *HsaEvent

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaEvent) TimestampUint32 added in v0.15.0

func (m *HsaEvent) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaEvent) ToMesg added in v0.10.0

func (m *HsaEvent) ToMesg(options *Options) proto.Message

ToMesg converts HsaEvent into proto.Message. If options is nil, default options will be used.

type HsaGyroscopeData added in v0.10.0

type HsaGyroscopeData struct {
	Timestamp        time.Time // Units: s
	GyroX            []int16   // Array: [N]; Scale: 28.57143; Units: deg/s; X-Axis Measurement
	GyroY            []int16   // Array: [N]; Scale: 28.57143; Units: deg/s; Y-Axis Measurement
	GyroZ            []int16   // Array: [N]; Scale: 28.57143; Units: deg/s; Z-Axis Measurement
	Timestamp32K     uint32    // Units: 1/32768 s; 32 kHz timestamp
	TimestampMs      uint16    // Units: ms; Millisecond resolution of the timestamp
	SamplingInterval uint16    // Units: 1/32768 s; Sampling Interval in 32 kHz timescale

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaGyroscopeData is a HsaGyroscopeData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaGyroscopeData added in v0.10.0

func NewHsaGyroscopeData(mesg *proto.Message) *HsaGyroscopeData

NewHsaGyroscopeData creates new HsaGyroscopeData struct based on given mesg. If mesg is nil, it will return HsaGyroscopeData with all fields being set to its corresponding invalid value.

func (*HsaGyroscopeData) GyroXScaled added in v0.10.0

func (m *HsaGyroscopeData) GyroXScaled() []float64

GyroXScaled return GyroX in its scaled value. If GyroX value is invalid, nil will be returned.

Array: [N]; Scale: 28.57143; Units: deg/s; X-Axis Measurement

func (*HsaGyroscopeData) GyroYScaled added in v0.10.0

func (m *HsaGyroscopeData) GyroYScaled() []float64

GyroYScaled return GyroY in its scaled value. If GyroY value is invalid, nil will be returned.

Array: [N]; Scale: 28.57143; Units: deg/s; Y-Axis Measurement

func (*HsaGyroscopeData) GyroZScaled added in v0.10.0

func (m *HsaGyroscopeData) GyroZScaled() []float64

GyroZScaled return GyroZ in its scaled value. If GyroZ value is invalid, nil will be returned.

Array: [N]; Scale: 28.57143; Units: deg/s; Z-Axis Measurement

func (*HsaGyroscopeData) SetDeveloperFields added in v0.10.0

func (m *HsaGyroscopeData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaGyroscopeData

SetDeveloperFields sets DeveloperFields.

func (*HsaGyroscopeData) SetGyroX added in v0.10.0

func (m *HsaGyroscopeData) SetGyroX(v []int16) *HsaGyroscopeData

SetGyroX sets GyroX value.

Array: [N]; Scale: 28.57143; Units: deg/s; X-Axis Measurement

func (*HsaGyroscopeData) SetGyroXScaled added in v0.17.2

func (m *HsaGyroscopeData) SetGyroXScaled(vs []float64) *HsaGyroscopeData

SetGyroXScaled is similar to SetGyroX except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 28.57143; Units: deg/s; X-Axis Measurement

func (*HsaGyroscopeData) SetGyroY added in v0.10.0

func (m *HsaGyroscopeData) SetGyroY(v []int16) *HsaGyroscopeData

SetGyroY sets GyroY value.

Array: [N]; Scale: 28.57143; Units: deg/s; Y-Axis Measurement

func (*HsaGyroscopeData) SetGyroYScaled added in v0.17.2

func (m *HsaGyroscopeData) SetGyroYScaled(vs []float64) *HsaGyroscopeData

SetGyroYScaled is similar to SetGyroY except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 28.57143; Units: deg/s; Y-Axis Measurement

func (*HsaGyroscopeData) SetGyroZ added in v0.10.0

func (m *HsaGyroscopeData) SetGyroZ(v []int16) *HsaGyroscopeData

SetGyroZ sets GyroZ value.

Array: [N]; Scale: 28.57143; Units: deg/s; Z-Axis Measurement

func (*HsaGyroscopeData) SetGyroZScaled added in v0.17.2

func (m *HsaGyroscopeData) SetGyroZScaled(vs []float64) *HsaGyroscopeData

SetGyroZScaled is similar to SetGyroZ except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 28.57143; Units: deg/s; Z-Axis Measurement

func (*HsaGyroscopeData) SetSamplingInterval added in v0.10.0

func (m *HsaGyroscopeData) SetSamplingInterval(v uint16) *HsaGyroscopeData

SetSamplingInterval sets SamplingInterval value.

Units: 1/32768 s; Sampling Interval in 32 kHz timescale

func (*HsaGyroscopeData) SetTimestamp added in v0.10.0

func (m *HsaGyroscopeData) SetTimestamp(v time.Time) *HsaGyroscopeData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaGyroscopeData) SetTimestamp32K added in v0.10.0

func (m *HsaGyroscopeData) SetTimestamp32K(v uint32) *HsaGyroscopeData

SetTimestamp32K sets Timestamp32K value.

Units: 1/32768 s; 32 kHz timestamp

func (*HsaGyroscopeData) SetTimestampMs added in v0.10.0

func (m *HsaGyroscopeData) SetTimestampMs(v uint16) *HsaGyroscopeData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond resolution of the timestamp

func (*HsaGyroscopeData) SetUnknownFields added in v0.23.6

func (m *HsaGyroscopeData) SetUnknownFields(unknownFields ...proto.Field) *HsaGyroscopeData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaGyroscopeData) TimestampUint32 added in v0.15.0

func (m *HsaGyroscopeData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaGyroscopeData) ToMesg added in v0.10.0

func (m *HsaGyroscopeData) ToMesg(options *Options) proto.Message

ToMesg converts HsaGyroscopeData into proto.Message. If options is nil, default options will be used.

type HsaHeartRateData added in v0.10.0

type HsaHeartRateData struct {
	Timestamp          time.Time // Units: s
	HeartRate          []uint8   // Array: [N]; Units: bpm; Beats / min. Blank: 0
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds
	Status             uint8     // Status of measurements in buffer - 0 indicates SEARCHING 1 indicates LOCKED

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaHeartRateData is a HsaHeartRateData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaHeartRateData added in v0.10.0

func NewHsaHeartRateData(mesg *proto.Message) *HsaHeartRateData

NewHsaHeartRateData creates new HsaHeartRateData struct based on given mesg. If mesg is nil, it will return HsaHeartRateData with all fields being set to its corresponding invalid value.

func (*HsaHeartRateData) SetDeveloperFields added in v0.10.0

func (m *HsaHeartRateData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaHeartRateData

SetDeveloperFields sets DeveloperFields.

func (*HsaHeartRateData) SetHeartRate added in v0.10.0

func (m *HsaHeartRateData) SetHeartRate(v []uint8) *HsaHeartRateData

SetHeartRate sets HeartRate value.

Array: [N]; Units: bpm; Beats / min. Blank: 0

func (*HsaHeartRateData) SetProcessingInterval added in v0.10.0

func (m *HsaHeartRateData) SetProcessingInterval(v uint16) *HsaHeartRateData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaHeartRateData) SetStatus added in v0.10.0

func (m *HsaHeartRateData) SetStatus(v uint8) *HsaHeartRateData

SetStatus sets Status value.

Status of measurements in buffer - 0 indicates SEARCHING 1 indicates LOCKED

func (*HsaHeartRateData) SetTimestamp added in v0.10.0

func (m *HsaHeartRateData) SetTimestamp(v time.Time) *HsaHeartRateData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaHeartRateData) SetUnknownFields added in v0.23.6

func (m *HsaHeartRateData) SetUnknownFields(unknownFields ...proto.Field) *HsaHeartRateData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaHeartRateData) TimestampUint32 added in v0.15.0

func (m *HsaHeartRateData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaHeartRateData) ToMesg added in v0.10.0

func (m *HsaHeartRateData) ToMesg(options *Options) proto.Message

ToMesg converts HsaHeartRateData into proto.Message. If options is nil, default options will be used.

type HsaRespirationData added in v0.10.0

type HsaRespirationData struct {
	Timestamp          time.Time // Units: s
	RespirationRate    []int16   // Array: [N]; Scale: 100; Units: breaths/min; Breaths / min: [1,100] Invalid: 255 Excess motion: 254 Off wrist: 253 Not available: 252 Blank: 2.4
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaRespirationData is a HsaRespirationData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaRespirationData added in v0.10.0

func NewHsaRespirationData(mesg *proto.Message) *HsaRespirationData

NewHsaRespirationData creates new HsaRespirationData struct based on given mesg. If mesg is nil, it will return HsaRespirationData with all fields being set to its corresponding invalid value.

func (*HsaRespirationData) RespirationRateScaled added in v0.10.0

func (m *HsaRespirationData) RespirationRateScaled() []float64

RespirationRateScaled return RespirationRate in its scaled value. If RespirationRate value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: breaths/min; Breaths / min: [1,100] Invalid: 255 Excess motion: 254 Off wrist: 253 Not available: 252 Blank: 2.4

func (*HsaRespirationData) SetDeveloperFields added in v0.10.0

func (m *HsaRespirationData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaRespirationData

SetDeveloperFields sets DeveloperFields.

func (*HsaRespirationData) SetProcessingInterval added in v0.10.0

func (m *HsaRespirationData) SetProcessingInterval(v uint16) *HsaRespirationData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaRespirationData) SetRespirationRate added in v0.10.0

func (m *HsaRespirationData) SetRespirationRate(v []int16) *HsaRespirationData

SetRespirationRate sets RespirationRate value.

Array: [N]; Scale: 100; Units: breaths/min; Breaths / min: [1,100] Invalid: 255 Excess motion: 254 Off wrist: 253 Not available: 252 Blank: 2.4

func (*HsaRespirationData) SetRespirationRateScaled added in v0.17.2

func (m *HsaRespirationData) SetRespirationRateScaled(vs []float64) *HsaRespirationData

SetRespirationRateScaled is similar to SetRespirationRate except it accepts a scaled value. This method automatically converts the given value to its []int16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: breaths/min; Breaths / min: [1,100] Invalid: 255 Excess motion: 254 Off wrist: 253 Not available: 252 Blank: 2.4

func (*HsaRespirationData) SetTimestamp added in v0.10.0

func (m *HsaRespirationData) SetTimestamp(v time.Time) *HsaRespirationData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaRespirationData) SetUnknownFields added in v0.23.6

func (m *HsaRespirationData) SetUnknownFields(unknownFields ...proto.Field) *HsaRespirationData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaRespirationData) TimestampUint32 added in v0.15.0

func (m *HsaRespirationData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaRespirationData) ToMesg added in v0.10.0

func (m *HsaRespirationData) ToMesg(options *Options) proto.Message

ToMesg converts HsaRespirationData into proto.Message. If options is nil, default options will be used.

type HsaSpo2Data added in v0.10.0

type HsaSpo2Data struct {
	Timestamp          time.Time // Units: s
	ReadingSpo2        []uint8   // Array: [N]; Units: percent; SpO2 Reading: [70,100] Blank: 240
	Confidence         []uint8   // Array: [N]; SpO2 Confidence: [0,254]
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaSpo2Data is a HsaSpo2Data message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaSpo2Data added in v0.10.0

func NewHsaSpo2Data(mesg *proto.Message) *HsaSpo2Data

NewHsaSpo2Data creates new HsaSpo2Data struct based on given mesg. If mesg is nil, it will return HsaSpo2Data with all fields being set to its corresponding invalid value.

func (*HsaSpo2Data) SetConfidence added in v0.10.0

func (m *HsaSpo2Data) SetConfidence(v []uint8) *HsaSpo2Data

SetConfidence sets Confidence value.

Array: [N]; SpO2 Confidence: [0,254]

func (*HsaSpo2Data) SetDeveloperFields added in v0.10.0

func (m *HsaSpo2Data) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaSpo2Data

SetDeveloperFields sets DeveloperFields.

func (*HsaSpo2Data) SetProcessingInterval added in v0.10.0

func (m *HsaSpo2Data) SetProcessingInterval(v uint16) *HsaSpo2Data

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaSpo2Data) SetReadingSpo2 added in v0.10.0

func (m *HsaSpo2Data) SetReadingSpo2(v []uint8) *HsaSpo2Data

SetReadingSpo2 sets ReadingSpo2 value.

Array: [N]; Units: percent; SpO2 Reading: [70,100] Blank: 240

func (*HsaSpo2Data) SetTimestamp added in v0.10.0

func (m *HsaSpo2Data) SetTimestamp(v time.Time) *HsaSpo2Data

SetTimestamp sets Timestamp value.

Units: s

func (*HsaSpo2Data) SetUnknownFields added in v0.23.6

func (m *HsaSpo2Data) SetUnknownFields(unknownFields ...proto.Field) *HsaSpo2Data

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaSpo2Data) TimestampUint32 added in v0.15.0

func (m *HsaSpo2Data) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaSpo2Data) ToMesg added in v0.10.0

func (m *HsaSpo2Data) ToMesg(options *Options) proto.Message

ToMesg converts HsaSpo2Data into proto.Message. If options is nil, default options will be used.

type HsaStepData added in v0.10.0

type HsaStepData struct {
	Timestamp          time.Time // Units: s
	Steps              []uint32  // Array: [N]; Units: steps; Total step sum
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds. File start: 0xFFFFFFEF File stop: 0xFFFFFFEE

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaStepData is a HsaStepData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaStepData added in v0.10.0

func NewHsaStepData(mesg *proto.Message) *HsaStepData

NewHsaStepData creates new HsaStepData struct based on given mesg. If mesg is nil, it will return HsaStepData with all fields being set to its corresponding invalid value.

func (*HsaStepData) SetDeveloperFields added in v0.10.0

func (m *HsaStepData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaStepData

SetDeveloperFields sets DeveloperFields.

func (*HsaStepData) SetProcessingInterval added in v0.10.0

func (m *HsaStepData) SetProcessingInterval(v uint16) *HsaStepData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds. File start: 0xFFFFFFEF File stop: 0xFFFFFFEE

func (*HsaStepData) SetSteps added in v0.10.0

func (m *HsaStepData) SetSteps(v []uint32) *HsaStepData

SetSteps sets Steps value.

Array: [N]; Units: steps; Total step sum

func (*HsaStepData) SetTimestamp added in v0.10.0

func (m *HsaStepData) SetTimestamp(v time.Time) *HsaStepData

SetTimestamp sets Timestamp value.

Units: s

func (*HsaStepData) SetUnknownFields added in v0.23.6

func (m *HsaStepData) SetUnknownFields(unknownFields ...proto.Field) *HsaStepData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaStepData) TimestampUint32 added in v0.15.0

func (m *HsaStepData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaStepData) ToMesg added in v0.10.0

func (m *HsaStepData) ToMesg(options *Options) proto.Message

ToMesg converts HsaStepData into proto.Message. If options is nil, default options will be used.

type HsaStressData added in v0.10.0

type HsaStressData struct {
	Timestamp          time.Time
	StressLevel        []int8 // Array: [N]; Units: s; Stress Level: [0,100] Off wrist: -1 Excess motion: -2 Not enough data: -3 Recovering from exercise: -4 Unidentified: -5 Blank: -16
	ProcessingInterval uint16 // Units: s; Processing interval length in seconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaStressData is a HsaStressData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaStressData added in v0.10.0

func NewHsaStressData(mesg *proto.Message) *HsaStressData

NewHsaStressData creates new HsaStressData struct based on given mesg. If mesg is nil, it will return HsaStressData with all fields being set to its corresponding invalid value.

func (*HsaStressData) SetDeveloperFields added in v0.10.0

func (m *HsaStressData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaStressData

SetDeveloperFields sets DeveloperFields.

func (*HsaStressData) SetProcessingInterval added in v0.10.0

func (m *HsaStressData) SetProcessingInterval(v uint16) *HsaStressData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaStressData) SetStressLevel added in v0.10.0

func (m *HsaStressData) SetStressLevel(v []int8) *HsaStressData

SetStressLevel sets StressLevel value.

Array: [N]; Units: s; Stress Level: [0,100] Off wrist: -1 Excess motion: -2 Not enough data: -3 Recovering from exercise: -4 Unidentified: -5 Blank: -16

func (*HsaStressData) SetTimestamp added in v0.10.0

func (m *HsaStressData) SetTimestamp(v time.Time) *HsaStressData

SetTimestamp sets Timestamp value.

func (*HsaStressData) SetUnknownFields added in v0.23.6

func (m *HsaStressData) SetUnknownFields(unknownFields ...proto.Field) *HsaStressData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaStressData) TimestampUint32 added in v0.15.0

func (m *HsaStressData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaStressData) ToMesg added in v0.10.0

func (m *HsaStressData) ToMesg(options *Options) proto.Message

ToMesg converts HsaStressData into proto.Message. If options is nil, default options will be used.

type HsaWristTemperatureData added in v0.10.0

type HsaWristTemperatureData struct {
	Timestamp          time.Time // Units: s
	Value              []uint16  // Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

HsaWristTemperatureData is a HsaWristTemperatureData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewHsaWristTemperatureData added in v0.10.0

func NewHsaWristTemperatureData(mesg *proto.Message) *HsaWristTemperatureData

NewHsaWristTemperatureData creates new HsaWristTemperatureData struct based on given mesg. If mesg is nil, it will return HsaWristTemperatureData with all fields being set to its corresponding invalid value.

func (*HsaWristTemperatureData) SetDeveloperFields added in v0.10.0

func (m *HsaWristTemperatureData) SetDeveloperFields(developerFields ...proto.DeveloperField) *HsaWristTemperatureData

SetDeveloperFields sets DeveloperFields.

func (*HsaWristTemperatureData) SetProcessingInterval added in v0.10.0

func (m *HsaWristTemperatureData) SetProcessingInterval(v uint16) *HsaWristTemperatureData

SetProcessingInterval sets ProcessingInterval value.

Units: s; Processing interval length in seconds

func (*HsaWristTemperatureData) SetTimestamp added in v0.10.0

SetTimestamp sets Timestamp value.

Units: s

func (*HsaWristTemperatureData) SetUnknownFields added in v0.23.6

func (m *HsaWristTemperatureData) SetUnknownFields(unknownFields ...proto.Field) *HsaWristTemperatureData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*HsaWristTemperatureData) SetValue added in v0.10.0

SetValue sets Value value.

Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading

func (*HsaWristTemperatureData) SetValueScaled added in v0.17.2

func (m *HsaWristTemperatureData) SetValueScaled(vs []float64) *HsaWristTemperatureData

SetValueScaled is similar to SetValue except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading

func (*HsaWristTemperatureData) TimestampUint32 added in v0.15.0

func (m *HsaWristTemperatureData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*HsaWristTemperatureData) ToMesg added in v0.10.0

func (m *HsaWristTemperatureData) ToMesg(options *Options) proto.Message

ToMesg converts HsaWristTemperatureData into proto.Message. If options is nil, default options will be used.

func (*HsaWristTemperatureData) ValueScaled added in v0.10.0

func (m *HsaWristTemperatureData) ValueScaled() []float64

ValueScaled return Value in its scaled value. If Value value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading

type Jump

type Jump struct {
	Timestamp     time.Time // Units: s
	Distance      float32   // Units: m
	Height        float32   // Units: m
	HangTime      float32   // Units: s
	Score         float32   // A score for a jump calculated based on hang time, rotations, and distance.
	PositionLat   int32     // Units: semicircles
	PositionLong  int32     // Units: semicircles
	EnhancedSpeed uint32    // Scale: 1000; Units: m/s
	Speed         uint16    // Scale: 1000; Units: m/s
	Rotations     uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Jump is a Jump message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewJump

func NewJump(mesg *proto.Message) *Jump

NewJump creates new Jump struct based on given mesg. If mesg is nil, it will return Jump with all fields being set to its corresponding invalid value.

func (*Jump) EnhancedSpeedScaled added in v0.8.0

func (m *Jump) EnhancedSpeedScaled() float64

EnhancedSpeedScaled return EnhancedSpeed in its scaled value. If EnhancedSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Jump) IsExpandedField added in v0.21.0

func (m *Jump) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 8.

func (*Jump) MarkAsExpandedField added in v0.21.0

func (m *Jump) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 8.

func (*Jump) PositionLatDegrees added in v0.15.0

func (m *Jump) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*Jump) PositionLongDegrees added in v0.15.0

func (m *Jump) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*Jump) SetDeveloperFields added in v0.4.0

func (m *Jump) SetDeveloperFields(developerFields ...proto.DeveloperField) *Jump

SetDeveloperFields sets DeveloperFields.

func (*Jump) SetDistance added in v0.4.0

func (m *Jump) SetDistance(v float32) *Jump

SetDistance sets Distance value.

Units: m

func (*Jump) SetEnhancedSpeed added in v0.4.0

func (m *Jump) SetEnhancedSpeed(v uint32) *Jump

SetEnhancedSpeed sets EnhancedSpeed value.

Scale: 1000; Units: m/s

func (*Jump) SetEnhancedSpeedScaled added in v0.17.2

func (m *Jump) SetEnhancedSpeedScaled(v float64) *Jump

SetEnhancedSpeedScaled is similar to SetEnhancedSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Jump) SetHangTime added in v0.4.0

func (m *Jump) SetHangTime(v float32) *Jump

SetHangTime sets HangTime value.

Units: s

func (*Jump) SetHeight added in v0.4.0

func (m *Jump) SetHeight(v float32) *Jump

SetHeight sets Height value.

Units: m

func (*Jump) SetPositionLat added in v0.4.0

func (m *Jump) SetPositionLat(v int32) *Jump

SetPositionLat sets PositionLat value.

Units: semicircles

func (*Jump) SetPositionLatDegrees added in v0.17.2

func (m *Jump) SetPositionLatDegrees(degrees float64) *Jump

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Jump) SetPositionLong added in v0.4.0

func (m *Jump) SetPositionLong(v int32) *Jump

SetPositionLong sets PositionLong value.

Units: semicircles

func (*Jump) SetPositionLongDegrees added in v0.17.2

func (m *Jump) SetPositionLongDegrees(degrees float64) *Jump

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Jump) SetRotations added in v0.4.0

func (m *Jump) SetRotations(v uint8) *Jump

SetRotations sets Rotations value.

func (*Jump) SetScore added in v0.4.0

func (m *Jump) SetScore(v float32) *Jump

SetScore sets Score value.

A score for a jump calculated based on hang time, rotations, and distance.

func (*Jump) SetSpeed added in v0.4.0

func (m *Jump) SetSpeed(v uint16) *Jump

SetSpeed sets Speed value.

Scale: 1000; Units: m/s

func (*Jump) SetSpeedScaled added in v0.17.2

func (m *Jump) SetSpeedScaled(v float64) *Jump

SetSpeedScaled is similar to SetSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Jump) SetTimestamp added in v0.4.0

func (m *Jump) SetTimestamp(v time.Time) *Jump

SetTimestamp sets Timestamp value.

Units: s

func (*Jump) SetUnknownFields added in v0.23.6

func (m *Jump) SetUnknownFields(unknownFields ...proto.Field) *Jump

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Jump) SpeedScaled added in v0.8.0

func (m *Jump) SpeedScaled() float64

SpeedScaled return Speed in its scaled value. If Speed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Jump) TimestampUint32 added in v0.15.0

func (m *Jump) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Jump) ToMesg added in v0.3.0

func (m *Jump) ToMesg(options *Options) proto.Message

ToMesg converts Jump into proto.Message. If options is nil, default options will be used.

type Lap

type Lap struct {
	Timestamp                     time.Time // Units: s; Lap end time.
	StartTime                     time.Time
	TimeInHrZone                  []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInSpeedZone               []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInCadenceZone             []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInPowerZone               []uint32 // Array: [N]; Scale: 1000; Units: s
	StrokeCount                   []uint16 // Array: [N]; Units: counts; stroke_type enum used as the index
	ZoneCount                     []uint16 // Array: [N]; Units: counts; zone number used as the index
	AvgTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin
	MinTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin
	MaxTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin
	AvgSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen
	MinSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen
	MaxSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen
	AvgLeftPowerPhase             []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.
	AvgLeftPowerPhasePeak         []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhase            []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhasePeak        []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.
	AvgPowerPosition              []uint16 // Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.
	MaxPowerPosition              []uint16 // Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.
	AvgCadencePosition            []uint8  // Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.
	MaxCadencePosition            []uint8  // Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.
	StartPositionLat              int32    // Units: semicircles
	StartPositionLong             int32    // Units: semicircles
	EndPositionLat                int32    // Units: semicircles
	EndPositionLong               int32    // Units: semicircles
	TotalElapsedTime              uint32   // Scale: 1000; Units: s; Time (includes pauses)
	TotalTimerTime                uint32   // Scale: 1000; Units: s; Timer Time (excludes pauses)
	TotalDistance                 uint32   // Scale: 100; Units: m
	TotalCycles                   uint32   // Units: cycles
	TotalWork                     uint32   // Units: J
	TotalMovingTime               uint32   // Scale: 1000; Units: s
	TimeStanding                  uint32   // Scale: 1000; Units: s; Total time spent in the standing position
	EnhancedAvgSpeed              uint32   // Scale: 1000; Units: m/s
	EnhancedMaxSpeed              uint32   // Scale: 1000; Units: m/s
	EnhancedAvgAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMinAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMaxAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	AvgDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	MaxDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	TotalGrit                     float32  // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	TotalFlow                     float32  // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	AvgGrit                       float32  // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	AvgFlow                       float32  // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	MessageIndex                  typedef.MessageIndex
	TotalCalories                 uint16 // Units: kcal
	TotalFatCalories              uint16 // Units: kcal; If New Leaf
	AvgSpeed                      uint16 // Scale: 1000; Units: m/s
	MaxSpeed                      uint16 // Scale: 1000; Units: m/s
	AvgPower                      uint16 // Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
	MaxPower                      uint16 // Units: watts
	TotalAscent                   uint16 // Units: m
	TotalDescent                  uint16 // Units: m
	NumLengths                    uint16 // Units: lengths; # of lengths of swim pool
	NormalizedPower               uint16 // Units: watts
	LeftRightBalance              typedef.LeftRightBalance100
	FirstLengthIndex              uint16
	AvgStrokeDistance             uint16 // Scale: 100; Units: m
	NumActiveLengths              uint16 // Units: lengths; # of active lengths of swim pool
	AvgAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	MaxAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	AvgGrade                      int16  // Scale: 100; Units: %
	AvgPosGrade                   int16  // Scale: 100; Units: %
	AvgNegGrade                   int16  // Scale: 100; Units: %
	MaxPosGrade                   int16  // Scale: 100; Units: %
	MaxNegGrade                   int16  // Scale: 100; Units: %
	AvgPosVerticalSpeed           int16  // Scale: 1000; Units: m/s
	AvgNegVerticalSpeed           int16  // Scale: 1000; Units: m/s
	MaxPosVerticalSpeed           int16  // Scale: 1000; Units: m/s
	MaxNegVerticalSpeed           int16  // Scale: 1000; Units: m/s
	RepetitionNum                 uint16
	MinAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	WktStepIndex                  typedef.MessageIndex
	OpponentScore                 uint16
	AvgVerticalOscillation        uint16 // Scale: 10; Units: mm
	AvgStanceTimePercent          uint16 // Scale: 100; Units: percent
	AvgStanceTime                 uint16 // Scale: 10; Units: ms
	PlayerScore                   uint16
	StandCount                    uint16 // Number of transitions to the standing state
	AvgLevMotorPower              uint16 // Units: watts; lev average motor power during lap
	MaxLevMotorPower              uint16 // Units: watts; lev maximum motor power during lap
	AvgVerticalRatio              uint16 // Scale: 100; Units: percent
	AvgStanceTimeBalance          uint16 // Scale: 100; Units: percent
	AvgStepLength                 uint16 // Scale: 10; Units: mm
	AvgVam                        uint16 // Scale: 1000; Units: m/s
	EnhancedAvgRespirationRate    uint16 // Scale: 100; Units: Breaths/min
	EnhancedMaxRespirationRate    uint16 // Scale: 100; Units: Breaths/min
	JumpCount                     uint16
	AvgCoreTemperature            uint16 // Scale: 100; Units: C
	MinCoreTemperature            uint16 // Scale: 100; Units: C
	MaxCoreTemperature            uint16 // Scale: 100; Units: C
	Event                         typedef.Event
	EventType                     typedef.EventType
	AvgHeartRate                  uint8 // Units: bpm
	MaxHeartRate                  uint8 // Units: bpm
	AvgCadence                    uint8 // Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
	MaxCadence                    uint8 // Units: rpm
	Intensity                     typedef.Intensity
	LapTrigger                    typedef.LapTrigger
	Sport                         typedef.Sport
	EventGroup                    uint8
	SwimStroke                    typedef.SwimStroke
	SubSport                      typedef.SubSport
	GpsAccuracy                   uint8 // Units: m
	AvgTemperature                int8  // Units: C
	MaxTemperature                int8  // Units: C
	MinHeartRate                  uint8 // Units: bpm
	AvgFractionalCadence          uint8 // Scale: 128; Units: rpm; fractional part of the avg_cadence
	MaxFractionalCadence          uint8 // Scale: 128; Units: rpm; fractional part of the max_cadence
	TotalFractionalCycles         uint8 // Scale: 128; Units: cycles; fractional part of the total_cycles
	AvgLeftTorqueEffectiveness    uint8 // Scale: 2; Units: percent
	AvgRightTorqueEffectiveness   uint8 // Scale: 2; Units: percent
	AvgLeftPedalSmoothness        uint8 // Scale: 2; Units: percent
	AvgRightPedalSmoothness       uint8 // Scale: 2; Units: percent
	AvgCombinedPedalSmoothness    uint8 // Scale: 2; Units: percent
	AvgLeftPco                    int8  // Units: mm; Average left platform center offset
	AvgRightPco                   int8  // Units: mm; Average right platform center offset
	LevBatteryConsumption         uint8 // Scale: 2; Units: percent; lev battery consumption during lap
	MinTemperature                int8  // Units: C
	AvgRespirationRate            uint8
	MaxRespirationRate            uint8
	TotalFractionalAscent         uint8 // Scale: 100; Units: m; fractional part of total_ascent
	TotalFractionalDescent        uint8 // Scale: 100; Units: m; fractional part of total_descent

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Lap is a Lap message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewLap

func NewLap(mesg *proto.Message) *Lap

NewLap creates new Lap struct based on given mesg. If mesg is nil, it will return Lap with all fields being set to its corresponding invalid value.

func (*Lap) AvgAltitudeScaled added in v0.8.0

func (m *Lap) AvgAltitudeScaled() float64

AvgAltitudeScaled return AvgAltitude in its scaled value. If AvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value. If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Lap) AvgCoreTemperatureScaled added in v0.8.0

func (m *Lap) AvgCoreTemperatureScaled() float64

AvgCoreTemperatureScaled return AvgCoreTemperature in its scaled value. If AvgCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Lap) AvgDepthScaled added in v0.8.0

func (m *Lap) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value. If AvgDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Lap) AvgFractionalCadenceScaled added in v0.8.0

func (m *Lap) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value. If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Lap) AvgGradeScaled added in v0.8.0

func (m *Lap) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value. If AvgGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Lap) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value. If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Lap) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *Lap) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value. If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *Lap) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value. If AvgLeftPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *Lap) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value. If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Lap) AvgNegGradeScaled added in v0.8.0

func (m *Lap) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value. If AvgNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Lap) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *Lap) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value. If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) AvgPosGradeScaled added in v0.8.0

func (m *Lap) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value. If AvgPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Lap) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *Lap) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value. If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value. If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Lap) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *Lap) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value. If AvgRightPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) AvgRightPowerPhaseScaled added in v0.8.0

func (m *Lap) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value. If AvgRightPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *Lap) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value. If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Lap) AvgSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) AvgSaturatedHemoglobinPercentScaled() []float64

AvgSaturatedHemoglobinPercentScaled return AvgSaturatedHemoglobinPercent in its scaled value. If AvgSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Lap) AvgSpeedScaled added in v0.8.0

func (m *Lap) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) AvgStanceTimeBalanceScaled added in v0.8.0

func (m *Lap) AvgStanceTimeBalanceScaled() float64

AvgStanceTimeBalanceScaled return AvgStanceTimeBalance in its scaled value. If AvgStanceTimeBalance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Lap) AvgStanceTimePercentScaled added in v0.8.0

func (m *Lap) AvgStanceTimePercentScaled() float64

AvgStanceTimePercentScaled return AvgStanceTimePercent in its scaled value. If AvgStanceTimePercent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Lap) AvgStanceTimeScaled added in v0.8.0

func (m *Lap) AvgStanceTimeScaled() float64

AvgStanceTimeScaled return AvgStanceTime in its scaled value. If AvgStanceTime value is invalid, float64 invalid value will be returned.

Scale: 10; Units: ms

func (*Lap) AvgStepLengthScaled added in v0.8.0

func (m *Lap) AvgStepLengthScaled() float64

AvgStepLengthScaled return AvgStepLength in its scaled value. If AvgStepLength value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Lap) AvgStrokeDistanceScaled added in v0.8.0

func (m *Lap) AvgStrokeDistanceScaled() float64

AvgStrokeDistanceScaled return AvgStrokeDistance in its scaled value. If AvgStrokeDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Lap) AvgTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) AvgTotalHemoglobinConcScaled() []float64

AvgTotalHemoglobinConcScaled return AvgTotalHemoglobinConc in its scaled value. If AvgTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Lap) AvgVamScaled added in v0.8.0

func (m *Lap) AvgVamScaled() float64

AvgVamScaled return AvgVam in its scaled value. If AvgVam value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) AvgVerticalOscillationScaled added in v0.8.0

func (m *Lap) AvgVerticalOscillationScaled() float64

AvgVerticalOscillationScaled return AvgVerticalOscillation in its scaled value. If AvgVerticalOscillation value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Lap) AvgVerticalRatioScaled added in v0.8.0

func (m *Lap) AvgVerticalRatioScaled() float64

AvgVerticalRatioScaled return AvgVerticalRatio in its scaled value. If AvgVerticalRatio value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Lap) EndPositionLatDegrees added in v0.15.0

func (m *Lap) EndPositionLatDegrees() float64

EndPositionLatDegrees returns EndPositionLat in degrees instead of semicircles. If EndPositionLat value is invalid, float64 invalid value will be returned.

func (*Lap) EndPositionLongDegrees added in v0.15.0

func (m *Lap) EndPositionLongDegrees() float64

EndPositionLongDegrees returns EndPositionLong in degrees instead of semicircles. If EndPositionLong value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedAvgAltitudeScaled added in v0.8.0

func (m *Lap) EnhancedAvgAltitudeScaled() float64

EnhancedAvgAltitudeScaled return EnhancedAvgAltitude in its scaled value. If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Lap) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value. If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Lap) EnhancedAvgSpeedScaled added in v0.8.0

func (m *Lap) EnhancedAvgSpeedScaled() float64

EnhancedAvgSpeedScaled return EnhancedAvgSpeed in its scaled value. If EnhancedAvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *Lap) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value. If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Lap) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value. If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Lap) EnhancedMaxSpeedScaled added in v0.8.0

func (m *Lap) EnhancedMaxSpeedScaled() float64

EnhancedMaxSpeedScaled return EnhancedMaxSpeed in its scaled value. If EnhancedMaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) EnhancedMinAltitudeScaled added in v0.8.0

func (m *Lap) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value. If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) GetAvgCadence added in v0.16.0

func (m *Lap) GetAvgCadence() (name string, value any)

GetAvgCadence returns Dynamic Field interpretation of AvgCadence. Otherwise, returns the original value of AvgCadence.

Based on m.Sport:

  • name: "avg_running_cadence", units: "strides/min" , value: uint8(m.AvgCadence)

Otherwise:

  • name: "avg_cadence", units: "rpm" , value: m.AvgCadence

func (*Lap) GetMaxCadence added in v0.16.0

func (m *Lap) GetMaxCadence() (name string, value any)

GetMaxCadence returns Dynamic Field interpretation of MaxCadence. Otherwise, returns the original value of MaxCadence.

Based on m.Sport:

  • name: "max_running_cadence", units: "strides/min" , value: uint8(m.MaxCadence)

Otherwise:

  • name: "max_cadence", units: "rpm" , value: m.MaxCadence

func (*Lap) GetTotalCycles added in v0.16.0

func (m *Lap) GetTotalCycles() (name string, value any)

GetTotalCycles returns Dynamic Field interpretation of TotalCycles. Otherwise, returns the original value of TotalCycles.

Based on m.Sport:

  • name: "total_strides", units: "strides" , value: uint32(m.TotalCycles)
  • name: "total_strokes", units: "strokes" , value: uint32(m.TotalCycles)

Otherwise:

  • name: "total_cycles", units: "cycles" , value: m.TotalCycles

func (*Lap) IsExpandedField added in v0.21.0

func (m *Lap) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 110, 111, 112, 113, 114, 136, 137.

func (*Lap) LevBatteryConsumptionScaled added in v0.8.0

func (m *Lap) LevBatteryConsumptionScaled() float64

LevBatteryConsumptionScaled return LevBatteryConsumption in its scaled value. If LevBatteryConsumption value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent; lev battery consumption during lap

func (*Lap) MarkAsExpandedField added in v0.21.0

func (m *Lap) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 110, 111, 112, 113, 114, 136, 137.

func (*Lap) MaxAltitudeScaled added in v0.8.0

func (m *Lap) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value. If MaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) MaxCoreTemperatureScaled added in v0.8.0

func (m *Lap) MaxCoreTemperatureScaled() float64

MaxCoreTemperatureScaled return MaxCoreTemperature in its scaled value. If MaxCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Lap) MaxDepthScaled added in v0.8.0

func (m *Lap) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value. If MaxDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Lap) MaxFractionalCadenceScaled added in v0.8.0

func (m *Lap) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value. If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Lap) MaxNegGradeScaled added in v0.8.0

func (m *Lap) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value. If MaxNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Lap) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *Lap) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value. If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) MaxPosGradeScaled added in v0.8.0

func (m *Lap) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value. If MaxPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Lap) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *Lap) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value. If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) MaxSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) MaxSaturatedHemoglobinPercentScaled() []float64

MaxSaturatedHemoglobinPercentScaled return MaxSaturatedHemoglobinPercent in its scaled value. If MaxSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Lap) MaxSpeedScaled added in v0.8.0

func (m *Lap) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Lap) MaxTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) MaxTotalHemoglobinConcScaled() []float64

MaxTotalHemoglobinConcScaled return MaxTotalHemoglobinConc in its scaled value. If MaxTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Lap) MinAltitudeScaled added in v0.8.0

func (m *Lap) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value. If MinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Lap) MinCoreTemperatureScaled added in v0.8.0

func (m *Lap) MinCoreTemperatureScaled() float64

MinCoreTemperatureScaled return MinCoreTemperature in its scaled value. If MinCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Lap) MinSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) MinSaturatedHemoglobinPercentScaled() []float64

MinSaturatedHemoglobinPercentScaled return MinSaturatedHemoglobinPercent in its scaled value. If MinSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Lap) MinTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) MinTotalHemoglobinConcScaled() []float64

MinTotalHemoglobinConcScaled return MinTotalHemoglobinConc in its scaled value. If MinTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Lap) SetAvgAltitude added in v0.4.0

func (m *Lap) SetAvgAltitude(v uint16) *Lap

SetAvgAltitude sets AvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetAvgAltitudeScaled added in v0.17.2

func (m *Lap) SetAvgAltitudeScaled(v float64) *Lap

SetAvgAltitudeScaled is similar to SetAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetAvgCadence added in v0.4.0

func (m *Lap) SetAvgCadence(v uint8) *Lap

SetAvgCadence sets AvgCadence value.

Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time

func (*Lap) SetAvgCadencePosition added in v0.4.0

func (m *Lap) SetAvgCadencePosition(v []uint8) *Lap

SetAvgCadencePosition sets AvgCadencePosition value.

Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.

func (*Lap) SetAvgCombinedPedalSmoothness added in v0.4.0

func (m *Lap) SetAvgCombinedPedalSmoothness(v uint8) *Lap

SetAvgCombinedPedalSmoothness sets AvgCombinedPedalSmoothness value.

Scale: 2; Units: percent

func (*Lap) SetAvgCombinedPedalSmoothnessScaled added in v0.17.2

func (m *Lap) SetAvgCombinedPedalSmoothnessScaled(v float64) *Lap

SetAvgCombinedPedalSmoothnessScaled is similar to SetAvgCombinedPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Lap) SetAvgCoreTemperature added in v0.4.0

func (m *Lap) SetAvgCoreTemperature(v uint16) *Lap

SetAvgCoreTemperature sets AvgCoreTemperature value.

Scale: 100; Units: C

func (*Lap) SetAvgCoreTemperatureScaled added in v0.17.2

func (m *Lap) SetAvgCoreTemperatureScaled(v float64) *Lap

SetAvgCoreTemperatureScaled is similar to SetAvgCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Lap) SetAvgDepth added in v0.4.0

func (m *Lap) SetAvgDepth(v uint32) *Lap

SetAvgDepth sets AvgDepth value.

Scale: 1000; Units: m; 0 if above water

func (*Lap) SetAvgDepthScaled added in v0.17.2

func (m *Lap) SetAvgDepthScaled(v float64) *Lap

SetAvgDepthScaled is similar to SetAvgDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Lap) SetAvgFlow added in v0.4.0

func (m *Lap) SetAvgFlow(v float32) *Lap

SetAvgFlow sets AvgFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*Lap) SetAvgFractionalCadence added in v0.4.0

func (m *Lap) SetAvgFractionalCadence(v uint8) *Lap

SetAvgFractionalCadence sets AvgFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Lap) SetAvgFractionalCadenceScaled added in v0.17.2

func (m *Lap) SetAvgFractionalCadenceScaled(v float64) *Lap

SetAvgFractionalCadenceScaled is similar to SetAvgFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Lap) SetAvgGrade added in v0.4.0

func (m *Lap) SetAvgGrade(v int16) *Lap

SetAvgGrade sets AvgGrade value.

Scale: 100; Units: %

func (*Lap) SetAvgGradeScaled added in v0.17.2

func (m *Lap) SetAvgGradeScaled(v float64) *Lap

SetAvgGradeScaled is similar to SetAvgGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Lap) SetAvgGrit added in v0.4.0

func (m *Lap) SetAvgGrit(v float32) *Lap

SetAvgGrit sets AvgGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*Lap) SetAvgHeartRate added in v0.4.0

func (m *Lap) SetAvgHeartRate(v uint8) *Lap

SetAvgHeartRate sets AvgHeartRate value.

Units: bpm

func (*Lap) SetAvgLeftPco added in v0.4.0

func (m *Lap) SetAvgLeftPco(v int8) *Lap

SetAvgLeftPco sets AvgLeftPco value.

Units: mm; Average left platform center offset

func (*Lap) SetAvgLeftPedalSmoothness added in v0.4.0

func (m *Lap) SetAvgLeftPedalSmoothness(v uint8) *Lap

SetAvgLeftPedalSmoothness sets AvgLeftPedalSmoothness value.

Scale: 2; Units: percent

func (*Lap) SetAvgLeftPedalSmoothnessScaled added in v0.17.2

func (m *Lap) SetAvgLeftPedalSmoothnessScaled(v float64) *Lap

SetAvgLeftPedalSmoothnessScaled is similar to SetAvgLeftPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Lap) SetAvgLeftPowerPhase added in v0.4.0

func (m *Lap) SetAvgLeftPowerPhase(v []uint8) *Lap

SetAvgLeftPowerPhase sets AvgLeftPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgLeftPowerPhasePeak added in v0.4.0

func (m *Lap) SetAvgLeftPowerPhasePeak(v []uint8) *Lap

SetAvgLeftPowerPhasePeak sets AvgLeftPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgLeftPowerPhasePeakScaled added in v0.17.2

func (m *Lap) SetAvgLeftPowerPhasePeakScaled(vs []float64) *Lap

SetAvgLeftPowerPhasePeakScaled is similar to SetAvgLeftPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgLeftPowerPhaseScaled added in v0.17.2

func (m *Lap) SetAvgLeftPowerPhaseScaled(vs []float64) *Lap

SetAvgLeftPowerPhaseScaled is similar to SetAvgLeftPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgLeftTorqueEffectiveness added in v0.4.0

func (m *Lap) SetAvgLeftTorqueEffectiveness(v uint8) *Lap

SetAvgLeftTorqueEffectiveness sets AvgLeftTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Lap) SetAvgLeftTorqueEffectivenessScaled added in v0.17.2

func (m *Lap) SetAvgLeftTorqueEffectivenessScaled(v float64) *Lap

SetAvgLeftTorqueEffectivenessScaled is similar to SetAvgLeftTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Lap) SetAvgLevMotorPower added in v0.4.0

func (m *Lap) SetAvgLevMotorPower(v uint16) *Lap

SetAvgLevMotorPower sets AvgLevMotorPower value.

Units: watts; lev average motor power during lap

func (*Lap) SetAvgNegGrade added in v0.4.0

func (m *Lap) SetAvgNegGrade(v int16) *Lap

SetAvgNegGrade sets AvgNegGrade value.

Scale: 100; Units: %

func (*Lap) SetAvgNegGradeScaled added in v0.17.2

func (m *Lap) SetAvgNegGradeScaled(v float64) *Lap

SetAvgNegGradeScaled is similar to SetAvgNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Lap) SetAvgNegVerticalSpeed added in v0.4.0

func (m *Lap) SetAvgNegVerticalSpeed(v int16) *Lap

SetAvgNegVerticalSpeed sets AvgNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgNegVerticalSpeedScaled added in v0.17.2

func (m *Lap) SetAvgNegVerticalSpeedScaled(v float64) *Lap

SetAvgNegVerticalSpeedScaled is similar to SetAvgNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetAvgPosGrade added in v0.4.0

func (m *Lap) SetAvgPosGrade(v int16) *Lap

SetAvgPosGrade sets AvgPosGrade value.

Scale: 100; Units: %

func (*Lap) SetAvgPosGradeScaled added in v0.17.2

func (m *Lap) SetAvgPosGradeScaled(v float64) *Lap

SetAvgPosGradeScaled is similar to SetAvgPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Lap) SetAvgPosVerticalSpeed added in v0.4.0

func (m *Lap) SetAvgPosVerticalSpeed(v int16) *Lap

SetAvgPosVerticalSpeed sets AvgPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgPosVerticalSpeedScaled added in v0.17.2

func (m *Lap) SetAvgPosVerticalSpeedScaled(v float64) *Lap

SetAvgPosVerticalSpeedScaled is similar to SetAvgPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetAvgPower added in v0.4.0

func (m *Lap) SetAvgPower(v uint16) *Lap

SetAvgPower sets AvgPower value.

Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time

func (*Lap) SetAvgPowerPosition added in v0.4.0

func (m *Lap) SetAvgPowerPosition(v []uint16) *Lap

SetAvgPowerPosition sets AvgPowerPosition value.

Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.

func (*Lap) SetAvgRespirationRate added in v0.4.0

func (m *Lap) SetAvgRespirationRate(v uint8) *Lap

SetAvgRespirationRate sets AvgRespirationRate value.

func (*Lap) SetAvgRightPco added in v0.4.0

func (m *Lap) SetAvgRightPco(v int8) *Lap

SetAvgRightPco sets AvgRightPco value.

Units: mm; Average right platform center offset

func (*Lap) SetAvgRightPedalSmoothness added in v0.4.0

func (m *Lap) SetAvgRightPedalSmoothness(v uint8) *Lap

SetAvgRightPedalSmoothness sets AvgRightPedalSmoothness value.

Scale: 2; Units: percent

func (*Lap) SetAvgRightPedalSmoothnessScaled added in v0.17.2

func (m *Lap) SetAvgRightPedalSmoothnessScaled(v float64) *Lap

SetAvgRightPedalSmoothnessScaled is similar to SetAvgRightPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Lap) SetAvgRightPowerPhase added in v0.4.0

func (m *Lap) SetAvgRightPowerPhase(v []uint8) *Lap

SetAvgRightPowerPhase sets AvgRightPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgRightPowerPhasePeak added in v0.4.0

func (m *Lap) SetAvgRightPowerPhasePeak(v []uint8) *Lap

SetAvgRightPowerPhasePeak sets AvgRightPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgRightPowerPhasePeakScaled added in v0.17.2

func (m *Lap) SetAvgRightPowerPhasePeakScaled(vs []float64) *Lap

SetAvgRightPowerPhasePeakScaled is similar to SetAvgRightPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgRightPowerPhaseScaled added in v0.17.2

func (m *Lap) SetAvgRightPowerPhaseScaled(vs []float64) *Lap

SetAvgRightPowerPhaseScaled is similar to SetAvgRightPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Lap) SetAvgRightTorqueEffectiveness added in v0.4.0

func (m *Lap) SetAvgRightTorqueEffectiveness(v uint8) *Lap

SetAvgRightTorqueEffectiveness sets AvgRightTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Lap) SetAvgRightTorqueEffectivenessScaled added in v0.17.2

func (m *Lap) SetAvgRightTorqueEffectivenessScaled(v float64) *Lap

SetAvgRightTorqueEffectivenessScaled is similar to SetAvgRightTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Lap) SetAvgSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetAvgSaturatedHemoglobinPercent(v []uint16) *Lap

SetAvgSaturatedHemoglobinPercent sets AvgSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Lap) SetAvgSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Lap) SetAvgSaturatedHemoglobinPercentScaled(vs []float64) *Lap

SetAvgSaturatedHemoglobinPercentScaled is similar to SetAvgSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Lap) SetAvgSpeed added in v0.4.0

func (m *Lap) SetAvgSpeed(v uint16) *Lap

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgSpeedScaled added in v0.17.2

func (m *Lap) SetAvgSpeedScaled(v float64) *Lap

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetAvgStanceTime added in v0.4.0

func (m *Lap) SetAvgStanceTime(v uint16) *Lap

SetAvgStanceTime sets AvgStanceTime value.

Scale: 10; Units: ms

func (*Lap) SetAvgStanceTimeBalance added in v0.4.0

func (m *Lap) SetAvgStanceTimeBalance(v uint16) *Lap

SetAvgStanceTimeBalance sets AvgStanceTimeBalance value.

Scale: 100; Units: percent

func (*Lap) SetAvgStanceTimeBalanceScaled added in v0.17.2

func (m *Lap) SetAvgStanceTimeBalanceScaled(v float64) *Lap

SetAvgStanceTimeBalanceScaled is similar to SetAvgStanceTimeBalance except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Lap) SetAvgStanceTimePercent added in v0.4.0

func (m *Lap) SetAvgStanceTimePercent(v uint16) *Lap

SetAvgStanceTimePercent sets AvgStanceTimePercent value.

Scale: 100; Units: percent

func (*Lap) SetAvgStanceTimePercentScaled added in v0.17.2

func (m *Lap) SetAvgStanceTimePercentScaled(v float64) *Lap

SetAvgStanceTimePercentScaled is similar to SetAvgStanceTimePercent except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Lap) SetAvgStanceTimeScaled added in v0.17.2

func (m *Lap) SetAvgStanceTimeScaled(v float64) *Lap

SetAvgStanceTimeScaled is similar to SetAvgStanceTime except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: ms

func (*Lap) SetAvgStepLength added in v0.4.0

func (m *Lap) SetAvgStepLength(v uint16) *Lap

SetAvgStepLength sets AvgStepLength value.

Scale: 10; Units: mm

func (*Lap) SetAvgStepLengthScaled added in v0.17.2

func (m *Lap) SetAvgStepLengthScaled(v float64) *Lap

SetAvgStepLengthScaled is similar to SetAvgStepLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Lap) SetAvgStrokeDistance added in v0.4.0

func (m *Lap) SetAvgStrokeDistance(v uint16) *Lap

SetAvgStrokeDistance sets AvgStrokeDistance value.

Scale: 100; Units: m

func (*Lap) SetAvgStrokeDistanceScaled added in v0.17.2

func (m *Lap) SetAvgStrokeDistanceScaled(v float64) *Lap

SetAvgStrokeDistanceScaled is similar to SetAvgStrokeDistance except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Lap) SetAvgTemperature added in v0.4.0

func (m *Lap) SetAvgTemperature(v int8) *Lap

SetAvgTemperature sets AvgTemperature value.

Units: C

func (*Lap) SetAvgTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetAvgTotalHemoglobinConc(v []uint16) *Lap

SetAvgTotalHemoglobinConc sets AvgTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Lap) SetAvgTotalHemoglobinConcScaled added in v0.17.2

func (m *Lap) SetAvgTotalHemoglobinConcScaled(vs []float64) *Lap

SetAvgTotalHemoglobinConcScaled is similar to SetAvgTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Lap) SetAvgVam added in v0.4.0

func (m *Lap) SetAvgVam(v uint16) *Lap

SetAvgVam sets AvgVam value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgVamScaled added in v0.17.2

func (m *Lap) SetAvgVamScaled(v float64) *Lap

SetAvgVamScaled is similar to SetAvgVam except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetAvgVerticalOscillation added in v0.4.0

func (m *Lap) SetAvgVerticalOscillation(v uint16) *Lap

SetAvgVerticalOscillation sets AvgVerticalOscillation value.

Scale: 10; Units: mm

func (*Lap) SetAvgVerticalOscillationScaled added in v0.17.2

func (m *Lap) SetAvgVerticalOscillationScaled(v float64) *Lap

SetAvgVerticalOscillationScaled is similar to SetAvgVerticalOscillation except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Lap) SetAvgVerticalRatio added in v0.4.0

func (m *Lap) SetAvgVerticalRatio(v uint16) *Lap

SetAvgVerticalRatio sets AvgVerticalRatio value.

Scale: 100; Units: percent

func (*Lap) SetAvgVerticalRatioScaled added in v0.17.2

func (m *Lap) SetAvgVerticalRatioScaled(v float64) *Lap

SetAvgVerticalRatioScaled is similar to SetAvgVerticalRatio except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Lap) SetDeveloperFields added in v0.4.0

func (m *Lap) SetDeveloperFields(developerFields ...proto.DeveloperField) *Lap

SetDeveloperFields sets DeveloperFields.

func (*Lap) SetEndPositionLat added in v0.4.0

func (m *Lap) SetEndPositionLat(v int32) *Lap

SetEndPositionLat sets EndPositionLat value.

Units: semicircles

func (*Lap) SetEndPositionLatDegrees added in v0.17.2

func (m *Lap) SetEndPositionLatDegrees(degrees float64) *Lap

SetEndPositionLatDegrees is similar to SetEndPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Lap) SetEndPositionLong added in v0.4.0

func (m *Lap) SetEndPositionLong(v int32) *Lap

SetEndPositionLong sets EndPositionLong value.

Units: semicircles

func (*Lap) SetEndPositionLongDegrees added in v0.17.2

func (m *Lap) SetEndPositionLongDegrees(degrees float64) *Lap

SetEndPositionLongDegrees is similar to SetEndPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Lap) SetEnhancedAvgAltitude added in v0.4.0

func (m *Lap) SetEnhancedAvgAltitude(v uint32) *Lap

SetEnhancedAvgAltitude sets EnhancedAvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedAvgAltitudeScaled added in v0.17.2

func (m *Lap) SetEnhancedAvgAltitudeScaled(v float64) *Lap

SetEnhancedAvgAltitudeScaled is similar to SetEnhancedAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Lap) SetEnhancedAvgRespirationRate(v uint16) *Lap

SetEnhancedAvgRespirationRate sets EnhancedAvgRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedAvgRespirationRateScaled added in v0.17.2

func (m *Lap) SetEnhancedAvgRespirationRateScaled(v float64) *Lap

SetEnhancedAvgRespirationRateScaled is similar to SetEnhancedAvgRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedAvgSpeed added in v0.4.0

func (m *Lap) SetEnhancedAvgSpeed(v uint32) *Lap

SetEnhancedAvgSpeed sets EnhancedAvgSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedAvgSpeedScaled added in v0.17.2

func (m *Lap) SetEnhancedAvgSpeedScaled(v float64) *Lap

SetEnhancedAvgSpeedScaled is similar to SetEnhancedAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedMaxAltitude added in v0.4.0

func (m *Lap) SetEnhancedMaxAltitude(v uint32) *Lap

SetEnhancedMaxAltitude sets EnhancedMaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedMaxAltitudeScaled added in v0.17.2

func (m *Lap) SetEnhancedMaxAltitudeScaled(v float64) *Lap

SetEnhancedMaxAltitudeScaled is similar to SetEnhancedMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Lap) SetEnhancedMaxRespirationRate(v uint16) *Lap

SetEnhancedMaxRespirationRate sets EnhancedMaxRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedMaxRespirationRateScaled added in v0.17.2

func (m *Lap) SetEnhancedMaxRespirationRateScaled(v float64) *Lap

SetEnhancedMaxRespirationRateScaled is similar to SetEnhancedMaxRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedMaxSpeed added in v0.4.0

func (m *Lap) SetEnhancedMaxSpeed(v uint32) *Lap

SetEnhancedMaxSpeed sets EnhancedMaxSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedMaxSpeedScaled added in v0.17.2

func (m *Lap) SetEnhancedMaxSpeedScaled(v float64) *Lap

SetEnhancedMaxSpeedScaled is similar to SetEnhancedMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedMinAltitude added in v0.4.0

func (m *Lap) SetEnhancedMinAltitude(v uint32) *Lap

SetEnhancedMinAltitude sets EnhancedMinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedMinAltitudeScaled added in v0.17.2

func (m *Lap) SetEnhancedMinAltitudeScaled(v float64) *Lap

SetEnhancedMinAltitudeScaled is similar to SetEnhancedMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEvent added in v0.4.0

func (m *Lap) SetEvent(v typedef.Event) *Lap

SetEvent sets Event value.

func (*Lap) SetEventGroup added in v0.4.0

func (m *Lap) SetEventGroup(v uint8) *Lap

SetEventGroup sets EventGroup value.

func (*Lap) SetEventType added in v0.4.0

func (m *Lap) SetEventType(v typedef.EventType) *Lap

SetEventType sets EventType value.

func (*Lap) SetFirstLengthIndex added in v0.4.0

func (m *Lap) SetFirstLengthIndex(v uint16) *Lap

SetFirstLengthIndex sets FirstLengthIndex value.

func (*Lap) SetGpsAccuracy added in v0.4.0

func (m *Lap) SetGpsAccuracy(v uint8) *Lap

SetGpsAccuracy sets GpsAccuracy value.

Units: m

func (*Lap) SetIntensity added in v0.4.0

func (m *Lap) SetIntensity(v typedef.Intensity) *Lap

SetIntensity sets Intensity value.

func (*Lap) SetJumpCount added in v0.4.0

func (m *Lap) SetJumpCount(v uint16) *Lap

SetJumpCount sets JumpCount value.

func (*Lap) SetLapTrigger added in v0.4.0

func (m *Lap) SetLapTrigger(v typedef.LapTrigger) *Lap

SetLapTrigger sets LapTrigger value.

func (*Lap) SetLeftRightBalance added in v0.4.0

func (m *Lap) SetLeftRightBalance(v typedef.LeftRightBalance100) *Lap

SetLeftRightBalance sets LeftRightBalance value.

func (*Lap) SetLevBatteryConsumption added in v0.4.0

func (m *Lap) SetLevBatteryConsumption(v uint8) *Lap

SetLevBatteryConsumption sets LevBatteryConsumption value.

Scale: 2; Units: percent; lev battery consumption during lap

func (*Lap) SetLevBatteryConsumptionScaled added in v0.17.2

func (m *Lap) SetLevBatteryConsumptionScaled(v float64) *Lap

SetLevBatteryConsumptionScaled is similar to SetLevBatteryConsumption except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent; lev battery consumption during lap

func (*Lap) SetMaxAltitude added in v0.4.0

func (m *Lap) SetMaxAltitude(v uint16) *Lap

SetMaxAltitude sets MaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMaxAltitudeScaled added in v0.17.2

func (m *Lap) SetMaxAltitudeScaled(v float64) *Lap

SetMaxAltitudeScaled is similar to SetMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMaxCadence added in v0.4.0

func (m *Lap) SetMaxCadence(v uint8) *Lap

SetMaxCadence sets MaxCadence value.

Units: rpm

func (*Lap) SetMaxCadencePosition added in v0.4.0

func (m *Lap) SetMaxCadencePosition(v []uint8) *Lap

SetMaxCadencePosition sets MaxCadencePosition value.

Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.

func (*Lap) SetMaxCoreTemperature added in v0.4.0

func (m *Lap) SetMaxCoreTemperature(v uint16) *Lap

SetMaxCoreTemperature sets MaxCoreTemperature value.

Scale: 100; Units: C

func (*Lap) SetMaxCoreTemperatureScaled added in v0.17.2

func (m *Lap) SetMaxCoreTemperatureScaled(v float64) *Lap

SetMaxCoreTemperatureScaled is similar to SetMaxCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Lap) SetMaxDepth added in v0.4.0

func (m *Lap) SetMaxDepth(v uint32) *Lap

SetMaxDepth sets MaxDepth value.

Scale: 1000; Units: m; 0 if above water

func (*Lap) SetMaxDepthScaled added in v0.17.2

func (m *Lap) SetMaxDepthScaled(v float64) *Lap

SetMaxDepthScaled is similar to SetMaxDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Lap) SetMaxFractionalCadence added in v0.4.0

func (m *Lap) SetMaxFractionalCadence(v uint8) *Lap

SetMaxFractionalCadence sets MaxFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Lap) SetMaxFractionalCadenceScaled added in v0.17.2

func (m *Lap) SetMaxFractionalCadenceScaled(v float64) *Lap

SetMaxFractionalCadenceScaled is similar to SetMaxFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Lap) SetMaxHeartRate added in v0.4.0

func (m *Lap) SetMaxHeartRate(v uint8) *Lap

SetMaxHeartRate sets MaxHeartRate value.

Units: bpm

func (*Lap) SetMaxLevMotorPower added in v0.4.0

func (m *Lap) SetMaxLevMotorPower(v uint16) *Lap

SetMaxLevMotorPower sets MaxLevMotorPower value.

Units: watts; lev maximum motor power during lap

func (*Lap) SetMaxNegGrade added in v0.4.0

func (m *Lap) SetMaxNegGrade(v int16) *Lap

SetMaxNegGrade sets MaxNegGrade value.

Scale: 100; Units: %

func (*Lap) SetMaxNegGradeScaled added in v0.17.2

func (m *Lap) SetMaxNegGradeScaled(v float64) *Lap

SetMaxNegGradeScaled is similar to SetMaxNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Lap) SetMaxNegVerticalSpeed added in v0.4.0

func (m *Lap) SetMaxNegVerticalSpeed(v int16) *Lap

SetMaxNegVerticalSpeed sets MaxNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxNegVerticalSpeedScaled added in v0.17.2

func (m *Lap) SetMaxNegVerticalSpeedScaled(v float64) *Lap

SetMaxNegVerticalSpeedScaled is similar to SetMaxNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetMaxPosGrade added in v0.4.0

func (m *Lap) SetMaxPosGrade(v int16) *Lap

SetMaxPosGrade sets MaxPosGrade value.

Scale: 100; Units: %

func (*Lap) SetMaxPosGradeScaled added in v0.17.2

func (m *Lap) SetMaxPosGradeScaled(v float64) *Lap

SetMaxPosGradeScaled is similar to SetMaxPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Lap) SetMaxPosVerticalSpeed added in v0.4.0

func (m *Lap) SetMaxPosVerticalSpeed(v int16) *Lap

SetMaxPosVerticalSpeed sets MaxPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxPosVerticalSpeedScaled added in v0.17.2

func (m *Lap) SetMaxPosVerticalSpeedScaled(v float64) *Lap

SetMaxPosVerticalSpeedScaled is similar to SetMaxPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetMaxPower added in v0.4.0

func (m *Lap) SetMaxPower(v uint16) *Lap

SetMaxPower sets MaxPower value.

Units: watts

func (*Lap) SetMaxPowerPosition added in v0.4.0

func (m *Lap) SetMaxPowerPosition(v []uint16) *Lap

SetMaxPowerPosition sets MaxPowerPosition value.

Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.

func (*Lap) SetMaxRespirationRate added in v0.4.0

func (m *Lap) SetMaxRespirationRate(v uint8) *Lap

SetMaxRespirationRate sets MaxRespirationRate value.

func (*Lap) SetMaxSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetMaxSaturatedHemoglobinPercent(v []uint16) *Lap

SetMaxSaturatedHemoglobinPercent sets MaxSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Lap) SetMaxSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Lap) SetMaxSaturatedHemoglobinPercentScaled(vs []float64) *Lap

SetMaxSaturatedHemoglobinPercentScaled is similar to SetMaxSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Lap) SetMaxSpeed added in v0.4.0

func (m *Lap) SetMaxSpeed(v uint16) *Lap

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxSpeedScaled added in v0.17.2

func (m *Lap) SetMaxSpeedScaled(v float64) *Lap

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Lap) SetMaxTemperature added in v0.4.0

func (m *Lap) SetMaxTemperature(v int8) *Lap

SetMaxTemperature sets MaxTemperature value.

Units: C

func (*Lap) SetMaxTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetMaxTotalHemoglobinConc(v []uint16) *Lap

SetMaxTotalHemoglobinConc sets MaxTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Lap) SetMaxTotalHemoglobinConcScaled added in v0.17.2

func (m *Lap) SetMaxTotalHemoglobinConcScaled(vs []float64) *Lap

SetMaxTotalHemoglobinConcScaled is similar to SetMaxTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Lap) SetMessageIndex added in v0.4.0

func (m *Lap) SetMessageIndex(v typedef.MessageIndex) *Lap

SetMessageIndex sets MessageIndex value.

func (*Lap) SetMinAltitude added in v0.4.0

func (m *Lap) SetMinAltitude(v uint16) *Lap

SetMinAltitude sets MinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMinAltitudeScaled added in v0.17.2

func (m *Lap) SetMinAltitudeScaled(v float64) *Lap

SetMinAltitudeScaled is similar to SetMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMinCoreTemperature added in v0.4.0

func (m *Lap) SetMinCoreTemperature(v uint16) *Lap

SetMinCoreTemperature sets MinCoreTemperature value.

Scale: 100; Units: C

func (*Lap) SetMinCoreTemperatureScaled added in v0.17.2

func (m *Lap) SetMinCoreTemperatureScaled(v float64) *Lap

SetMinCoreTemperatureScaled is similar to SetMinCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Lap) SetMinHeartRate added in v0.4.0

func (m *Lap) SetMinHeartRate(v uint8) *Lap

SetMinHeartRate sets MinHeartRate value.

Units: bpm

func (*Lap) SetMinSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetMinSaturatedHemoglobinPercent(v []uint16) *Lap

SetMinSaturatedHemoglobinPercent sets MinSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Lap) SetMinSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Lap) SetMinSaturatedHemoglobinPercentScaled(vs []float64) *Lap

SetMinSaturatedHemoglobinPercentScaled is similar to SetMinSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Lap) SetMinTemperature added in v0.4.0

func (m *Lap) SetMinTemperature(v int8) *Lap

SetMinTemperature sets MinTemperature value.

Units: C

func (*Lap) SetMinTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetMinTotalHemoglobinConc(v []uint16) *Lap

SetMinTotalHemoglobinConc sets MinTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Lap) SetMinTotalHemoglobinConcScaled added in v0.17.2

func (m *Lap) SetMinTotalHemoglobinConcScaled(vs []float64) *Lap

SetMinTotalHemoglobinConcScaled is similar to SetMinTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Lap) SetNormalizedPower added in v0.4.0

func (m *Lap) SetNormalizedPower(v uint16) *Lap

SetNormalizedPower sets NormalizedPower value.

Units: watts

func (*Lap) SetNumActiveLengths added in v0.4.0

func (m *Lap) SetNumActiveLengths(v uint16) *Lap

SetNumActiveLengths sets NumActiveLengths value.

Units: lengths; # of active lengths of swim pool

func (*Lap) SetNumLengths added in v0.4.0

func (m *Lap) SetNumLengths(v uint16) *Lap

SetNumLengths sets NumLengths value.

Units: lengths; # of lengths of swim pool

func (*Lap) SetOpponentScore added in v0.4.0

func (m *Lap) SetOpponentScore(v uint16) *Lap

SetOpponentScore sets OpponentScore value.

func (*Lap) SetPlayerScore added in v0.4.0

func (m *Lap) SetPlayerScore(v uint16) *Lap

SetPlayerScore sets PlayerScore value.

func (*Lap) SetRepetitionNum added in v0.4.0

func (m *Lap) SetRepetitionNum(v uint16) *Lap

SetRepetitionNum sets RepetitionNum value.

func (*Lap) SetSport added in v0.4.0

func (m *Lap) SetSport(v typedef.Sport) *Lap

SetSport sets Sport value.

func (*Lap) SetStandCount added in v0.4.0

func (m *Lap) SetStandCount(v uint16) *Lap

SetStandCount sets StandCount value.

Number of transitions to the standing state

func (*Lap) SetStartPositionLat added in v0.4.0

func (m *Lap) SetStartPositionLat(v int32) *Lap

SetStartPositionLat sets StartPositionLat value.

Units: semicircles

func (*Lap) SetStartPositionLatDegrees added in v0.17.2

func (m *Lap) SetStartPositionLatDegrees(degrees float64) *Lap

SetStartPositionLatDegrees is similar to SetStartPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Lap) SetStartPositionLong added in v0.4.0

func (m *Lap) SetStartPositionLong(v int32) *Lap

SetStartPositionLong sets StartPositionLong value.

Units: semicircles

func (*Lap) SetStartPositionLongDegrees added in v0.17.2

func (m *Lap) SetStartPositionLongDegrees(degrees float64) *Lap

SetStartPositionLongDegrees is similar to SetStartPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Lap) SetStartTime added in v0.4.0

func (m *Lap) SetStartTime(v time.Time) *Lap

SetStartTime sets StartTime value.

func (*Lap) SetStrokeCount added in v0.4.0

func (m *Lap) SetStrokeCount(v []uint16) *Lap

SetStrokeCount sets StrokeCount value.

Array: [N]; Units: counts; stroke_type enum used as the index

func (*Lap) SetSubSport added in v0.4.0

func (m *Lap) SetSubSport(v typedef.SubSport) *Lap

SetSubSport sets SubSport value.

func (*Lap) SetSwimStroke added in v0.4.0

func (m *Lap) SetSwimStroke(v typedef.SwimStroke) *Lap

SetSwimStroke sets SwimStroke value.

func (*Lap) SetTimeInCadenceZone added in v0.4.0

func (m *Lap) SetTimeInCadenceZone(v []uint32) *Lap

SetTimeInCadenceZone sets TimeInCadenceZone value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInCadenceZoneScaled added in v0.17.2

func (m *Lap) SetTimeInCadenceZoneScaled(vs []float64) *Lap

SetTimeInCadenceZoneScaled is similar to SetTimeInCadenceZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInHrZone added in v0.4.0

func (m *Lap) SetTimeInHrZone(v []uint32) *Lap

SetTimeInHrZone sets TimeInHrZone value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInHrZoneScaled added in v0.17.2

func (m *Lap) SetTimeInHrZoneScaled(vs []float64) *Lap

SetTimeInHrZoneScaled is similar to SetTimeInHrZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInPowerZone added in v0.4.0

func (m *Lap) SetTimeInPowerZone(v []uint32) *Lap

SetTimeInPowerZone sets TimeInPowerZone value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInPowerZoneScaled added in v0.17.2

func (m *Lap) SetTimeInPowerZoneScaled(vs []float64) *Lap

SetTimeInPowerZoneScaled is similar to SetTimeInPowerZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInSpeedZone added in v0.4.0

func (m *Lap) SetTimeInSpeedZone(v []uint32) *Lap

SetTimeInSpeedZone sets TimeInSpeedZone value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInSpeedZoneScaled added in v0.17.2

func (m *Lap) SetTimeInSpeedZoneScaled(vs []float64) *Lap

SetTimeInSpeedZoneScaled is similar to SetTimeInSpeedZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeStanding added in v0.4.0

func (m *Lap) SetTimeStanding(v uint32) *Lap

SetTimeStanding sets TimeStanding value.

Scale: 1000; Units: s; Total time spent in the standing position

func (*Lap) SetTimeStandingScaled added in v0.17.2

func (m *Lap) SetTimeStandingScaled(v float64) *Lap

SetTimeStandingScaled is similar to SetTimeStanding except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Total time spent in the standing position

func (*Lap) SetTimestamp added in v0.4.0

func (m *Lap) SetTimestamp(v time.Time) *Lap

SetTimestamp sets Timestamp value.

Units: s; Lap end time.

func (*Lap) SetTotalAscent added in v0.4.0

func (m *Lap) SetTotalAscent(v uint16) *Lap

SetTotalAscent sets TotalAscent value.

Units: m

func (*Lap) SetTotalCalories added in v0.4.0

func (m *Lap) SetTotalCalories(v uint16) *Lap

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*Lap) SetTotalCycles added in v0.4.0

func (m *Lap) SetTotalCycles(v uint32) *Lap

SetTotalCycles sets TotalCycles value.

Units: cycles

func (*Lap) SetTotalDescent added in v0.4.0

func (m *Lap) SetTotalDescent(v uint16) *Lap

SetTotalDescent sets TotalDescent value.

Units: m

func (*Lap) SetTotalDistance added in v0.4.0

func (m *Lap) SetTotalDistance(v uint32) *Lap

SetTotalDistance sets TotalDistance value.

Scale: 100; Units: m

func (*Lap) SetTotalDistanceScaled added in v0.17.2

func (m *Lap) SetTotalDistanceScaled(v float64) *Lap

SetTotalDistanceScaled is similar to SetTotalDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Lap) SetTotalElapsedTime added in v0.4.0

func (m *Lap) SetTotalElapsedTime(v uint32) *Lap

SetTotalElapsedTime sets TotalElapsedTime value.

Scale: 1000; Units: s; Time (includes pauses)

func (*Lap) SetTotalElapsedTimeScaled added in v0.17.2

func (m *Lap) SetTotalElapsedTimeScaled(v float64) *Lap

SetTotalElapsedTimeScaled is similar to SetTotalElapsedTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time (includes pauses)

func (*Lap) SetTotalFatCalories added in v0.4.0

func (m *Lap) SetTotalFatCalories(v uint16) *Lap

SetTotalFatCalories sets TotalFatCalories value.

Units: kcal; If New Leaf

func (*Lap) SetTotalFlow added in v0.4.0

func (m *Lap) SetTotalFlow(v float32) *Lap

SetTotalFlow sets TotalFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*Lap) SetTotalFractionalAscent added in v0.4.0

func (m *Lap) SetTotalFractionalAscent(v uint8) *Lap

SetTotalFractionalAscent sets TotalFractionalAscent value.

Scale: 100; Units: m; fractional part of total_ascent

func (*Lap) SetTotalFractionalAscentScaled added in v0.17.2

func (m *Lap) SetTotalFractionalAscentScaled(v float64) *Lap

SetTotalFractionalAscentScaled is similar to SetTotalFractionalAscent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_ascent

func (*Lap) SetTotalFractionalCycles added in v0.4.0

func (m *Lap) SetTotalFractionalCycles(v uint8) *Lap

SetTotalFractionalCycles sets TotalFractionalCycles value.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Lap) SetTotalFractionalCyclesScaled added in v0.17.2

func (m *Lap) SetTotalFractionalCyclesScaled(v float64) *Lap

SetTotalFractionalCyclesScaled is similar to SetTotalFractionalCycles except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Lap) SetTotalFractionalDescent added in v0.4.0

func (m *Lap) SetTotalFractionalDescent(v uint8) *Lap

SetTotalFractionalDescent sets TotalFractionalDescent value.

Scale: 100; Units: m; fractional part of total_descent

func (*Lap) SetTotalFractionalDescentScaled added in v0.17.2

func (m *Lap) SetTotalFractionalDescentScaled(v float64) *Lap

SetTotalFractionalDescentScaled is similar to SetTotalFractionalDescent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_descent

func (*Lap) SetTotalGrit added in v0.4.0

func (m *Lap) SetTotalGrit(v float32) *Lap

SetTotalGrit sets TotalGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*Lap) SetTotalMovingTime added in v0.4.0

func (m *Lap) SetTotalMovingTime(v uint32) *Lap

SetTotalMovingTime sets TotalMovingTime value.

Scale: 1000; Units: s

func (*Lap) SetTotalMovingTimeScaled added in v0.17.2

func (m *Lap) SetTotalMovingTimeScaled(v float64) *Lap

SetTotalMovingTimeScaled is similar to SetTotalMovingTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Lap) SetTotalTimerTime added in v0.4.0

func (m *Lap) SetTotalTimerTime(v uint32) *Lap

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*Lap) SetTotalTimerTimeScaled added in v0.17.2

func (m *Lap) SetTotalTimerTimeScaled(v float64) *Lap

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*Lap) SetTotalWork added in v0.4.0

func (m *Lap) SetTotalWork(v uint32) *Lap

SetTotalWork sets TotalWork value.

Units: J

func (*Lap) SetUnknownFields added in v0.23.6

func (m *Lap) SetUnknownFields(unknownFields ...proto.Field) *Lap

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Lap) SetWktStepIndex added in v0.4.0

func (m *Lap) SetWktStepIndex(v typedef.MessageIndex) *Lap

SetWktStepIndex sets WktStepIndex value.

func (*Lap) SetZoneCount added in v0.4.0

func (m *Lap) SetZoneCount(v []uint16) *Lap

SetZoneCount sets ZoneCount value.

Array: [N]; Units: counts; zone number used as the index

func (*Lap) StartPositionLatDegrees added in v0.15.0

func (m *Lap) StartPositionLatDegrees() float64

StartPositionLatDegrees returns StartPositionLat in degrees instead of semicircles. If StartPositionLat value is invalid, float64 invalid value will be returned.

func (*Lap) StartPositionLongDegrees added in v0.15.0

func (m *Lap) StartPositionLongDegrees() float64

StartPositionLongDegrees returns StartPositionLong in degrees instead of semicircles. If StartPositionLong value is invalid, float64 invalid value will be returned.

func (*Lap) StartTimeUint32 added in v0.15.0

func (m *Lap) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Lap) TimeInCadenceZoneScaled added in v0.8.0

func (m *Lap) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value. If TimeInCadenceZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Lap) TimeInHrZoneScaled added in v0.8.0

func (m *Lap) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value. If TimeInHrZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Lap) TimeInPowerZoneScaled added in v0.8.0

func (m *Lap) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value. If TimeInPowerZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Lap) TimeInSpeedZoneScaled added in v0.8.0

func (m *Lap) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value. If TimeInSpeedZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Lap) TimeStandingScaled added in v0.8.0

func (m *Lap) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value. If TimeStanding value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Total time spent in the standing position

func (*Lap) TimestampUint32 added in v0.15.0

func (m *Lap) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Lap) ToMesg added in v0.3.0

func (m *Lap) ToMesg(options *Options) proto.Message

ToMesg converts Lap into proto.Message. If options is nil, default options will be used.

func (*Lap) TotalDistanceScaled added in v0.8.0

func (m *Lap) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value. If TotalDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Lap) TotalElapsedTimeScaled added in v0.8.0

func (m *Lap) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value. If TotalElapsedTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time (includes pauses)

func (*Lap) TotalFractionalAscentScaled added in v0.8.0

func (m *Lap) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value. If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_ascent

func (*Lap) TotalFractionalCyclesScaled added in v0.8.0

func (m *Lap) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value. If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Lap) TotalFractionalDescentScaled added in v0.8.0

func (m *Lap) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value. If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_descent

func (*Lap) TotalMovingTimeScaled added in v0.8.0

func (m *Lap) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value. If TotalMovingTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Lap) TotalTimerTimeScaled added in v0.8.0

func (m *Lap) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Timer Time (excludes pauses)

type Length

type Length struct {
	Timestamp                  time.Time
	StartTime                  time.Time
	StrokeCount                []uint16 // Array: [N]; Units: counts; stroke_type enum used as the index
	ZoneCount                  []uint16 // Array: [N]; Units: counts; zone number used as the index
	TotalElapsedTime           uint32   // Scale: 1000; Units: s
	TotalTimerTime             uint32   // Scale: 1000; Units: s
	MessageIndex               typedef.MessageIndex
	TotalStrokes               uint16 // Units: strokes
	AvgSpeed                   uint16 // Scale: 1000; Units: m/s
	TotalCalories              uint16 // Units: kcal
	PlayerScore                uint16
	OpponentScore              uint16
	EnhancedAvgRespirationRate uint16 // Scale: 100; Units: Breaths/min
	EnhancedMaxRespirationRate uint16 // Scale: 100; Units: Breaths/min
	Event                      typedef.Event
	EventType                  typedef.EventType
	SwimStroke                 typedef.SwimStroke // Units: swim_stroke
	AvgSwimmingCadence         uint8              // Units: strokes/min
	EventGroup                 uint8
	LengthType                 typedef.LengthType
	AvgRespirationRate         uint8
	MaxRespirationRate         uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Length is a Length message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewLength

func NewLength(mesg *proto.Message) *Length

NewLength creates new Length struct based on given mesg. If mesg is nil, it will return Length with all fields being set to its corresponding invalid value.

func (*Length) AvgSpeedScaled added in v0.8.0

func (m *Length) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Length) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Length) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value. If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Length) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Length) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value. If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Length) IsExpandedField added in v0.21.0

func (m *Length) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 22, 23.

func (*Length) MarkAsExpandedField added in v0.21.0

func (m *Length) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 22, 23.

func (*Length) SetAvgRespirationRate added in v0.4.0

func (m *Length) SetAvgRespirationRate(v uint8) *Length

SetAvgRespirationRate sets AvgRespirationRate value.

func (*Length) SetAvgSpeed added in v0.4.0

func (m *Length) SetAvgSpeed(v uint16) *Length

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*Length) SetAvgSpeedScaled added in v0.17.2

func (m *Length) SetAvgSpeedScaled(v float64) *Length

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Length) SetAvgSwimmingCadence added in v0.4.0

func (m *Length) SetAvgSwimmingCadence(v uint8) *Length

SetAvgSwimmingCadence sets AvgSwimmingCadence value.

Units: strokes/min

func (*Length) SetDeveloperFields added in v0.4.0

func (m *Length) SetDeveloperFields(developerFields ...proto.DeveloperField) *Length

SetDeveloperFields sets DeveloperFields.

func (*Length) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Length) SetEnhancedAvgRespirationRate(v uint16) *Length

SetEnhancedAvgRespirationRate sets EnhancedAvgRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Length) SetEnhancedAvgRespirationRateScaled added in v0.17.2

func (m *Length) SetEnhancedAvgRespirationRateScaled(v float64) *Length

SetEnhancedAvgRespirationRateScaled is similar to SetEnhancedAvgRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Length) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Length) SetEnhancedMaxRespirationRate(v uint16) *Length

SetEnhancedMaxRespirationRate sets EnhancedMaxRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Length) SetEnhancedMaxRespirationRateScaled added in v0.17.2

func (m *Length) SetEnhancedMaxRespirationRateScaled(v float64) *Length

SetEnhancedMaxRespirationRateScaled is similar to SetEnhancedMaxRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Length) SetEvent added in v0.4.0

func (m *Length) SetEvent(v typedef.Event) *Length

SetEvent sets Event value.

func (*Length) SetEventGroup added in v0.4.0

func (m *Length) SetEventGroup(v uint8) *Length

SetEventGroup sets EventGroup value.

func (*Length) SetEventType added in v0.4.0

func (m *Length) SetEventType(v typedef.EventType) *Length

SetEventType sets EventType value.

func (*Length) SetLengthType added in v0.4.0

func (m *Length) SetLengthType(v typedef.LengthType) *Length

SetLengthType sets LengthType value.

func (*Length) SetMaxRespirationRate added in v0.4.0

func (m *Length) SetMaxRespirationRate(v uint8) *Length

SetMaxRespirationRate sets MaxRespirationRate value.

func (*Length) SetMessageIndex added in v0.4.0

func (m *Length) SetMessageIndex(v typedef.MessageIndex) *Length

SetMessageIndex sets MessageIndex value.

func (*Length) SetOpponentScore added in v0.4.0

func (m *Length) SetOpponentScore(v uint16) *Length

SetOpponentScore sets OpponentScore value.

func (*Length) SetPlayerScore added in v0.4.0

func (m *Length) SetPlayerScore(v uint16) *Length

SetPlayerScore sets PlayerScore value.

func (*Length) SetStartTime added in v0.4.0

func (m *Length) SetStartTime(v time.Time) *Length

SetStartTime sets StartTime value.

func (*Length) SetStrokeCount added in v0.4.0

func (m *Length) SetStrokeCount(v []uint16) *Length

SetStrokeCount sets StrokeCount value.

Array: [N]; Units: counts; stroke_type enum used as the index

func (*Length) SetSwimStroke added in v0.4.0

func (m *Length) SetSwimStroke(v typedef.SwimStroke) *Length

SetSwimStroke sets SwimStroke value.

Units: swim_stroke

func (*Length) SetTimestamp added in v0.4.0

func (m *Length) SetTimestamp(v time.Time) *Length

SetTimestamp sets Timestamp value.

func (*Length) SetTotalCalories added in v0.4.0

func (m *Length) SetTotalCalories(v uint16) *Length

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*Length) SetTotalElapsedTime added in v0.4.0

func (m *Length) SetTotalElapsedTime(v uint32) *Length

SetTotalElapsedTime sets TotalElapsedTime value.

Scale: 1000; Units: s

func (*Length) SetTotalElapsedTimeScaled added in v0.17.2

func (m *Length) SetTotalElapsedTimeScaled(v float64) *Length

SetTotalElapsedTimeScaled is similar to SetTotalElapsedTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Length) SetTotalStrokes added in v0.4.0

func (m *Length) SetTotalStrokes(v uint16) *Length

SetTotalStrokes sets TotalStrokes value.

Units: strokes

func (*Length) SetTotalTimerTime added in v0.4.0

func (m *Length) SetTotalTimerTime(v uint32) *Length

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s

func (*Length) SetTotalTimerTimeScaled added in v0.17.2

func (m *Length) SetTotalTimerTimeScaled(v float64) *Length

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Length) SetUnknownFields added in v0.23.6

func (m *Length) SetUnknownFields(unknownFields ...proto.Field) *Length

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Length) SetZoneCount added in v0.4.0

func (m *Length) SetZoneCount(v []uint16) *Length

SetZoneCount sets ZoneCount value.

Array: [N]; Units: counts; zone number used as the index

func (*Length) StartTimeUint32 added in v0.15.0

func (m *Length) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Length) TimestampUint32 added in v0.15.0

func (m *Length) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Length) ToMesg added in v0.3.0

func (m *Length) ToMesg(options *Options) proto.Message

ToMesg converts Length into proto.Message. If options is nil, default options will be used.

func (*Length) TotalElapsedTimeScaled added in v0.8.0

func (m *Length) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value. If TotalElapsedTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Length) TotalTimerTimeScaled added in v0.8.0

func (m *Length) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

type MagnetometerData

type MagnetometerData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	SampleTimeOffset []uint16  // Array: [N]; Units: ms; Each time in the array describes the time at which the compass sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in cmps_x and cmps_y and cmps_z
	MagX             []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	MagY             []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	MagZ             []uint16  // Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.
	CalibratedMagX   []float32 // Array: [N]; Units: G; Calibrated Magnetometer reading
	CalibratedMagY   []float32 // Array: [N]; Units: G; Calibrated Magnetometer reading
	CalibratedMagZ   []float32 // Array: [N]; Units: G; Calibrated Magnetometer reading
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MagnetometerData is a MagnetometerData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMagnetometerData

func NewMagnetometerData(mesg *proto.Message) *MagnetometerData

NewMagnetometerData creates new MagnetometerData struct based on given mesg. If mesg is nil, it will return MagnetometerData with all fields being set to its corresponding invalid value.

func (*MagnetometerData) SetCalibratedMagX added in v0.4.0

func (m *MagnetometerData) SetCalibratedMagX(v []float32) *MagnetometerData

SetCalibratedMagX sets CalibratedMagX value.

Array: [N]; Units: G; Calibrated Magnetometer reading

func (*MagnetometerData) SetCalibratedMagY added in v0.4.0

func (m *MagnetometerData) SetCalibratedMagY(v []float32) *MagnetometerData

SetCalibratedMagY sets CalibratedMagY value.

Array: [N]; Units: G; Calibrated Magnetometer reading

func (*MagnetometerData) SetCalibratedMagZ added in v0.4.0

func (m *MagnetometerData) SetCalibratedMagZ(v []float32) *MagnetometerData

SetCalibratedMagZ sets CalibratedMagZ value.

Array: [N]; Units: G; Calibrated Magnetometer reading

func (*MagnetometerData) SetDeveloperFields added in v0.4.0

func (m *MagnetometerData) SetDeveloperFields(developerFields ...proto.DeveloperField) *MagnetometerData

SetDeveloperFields sets DeveloperFields.

func (*MagnetometerData) SetMagX added in v0.4.0

func (m *MagnetometerData) SetMagX(v []uint16) *MagnetometerData

SetMagX sets MagX value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*MagnetometerData) SetMagY added in v0.4.0

func (m *MagnetometerData) SetMagY(v []uint16) *MagnetometerData

SetMagY sets MagY value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*MagnetometerData) SetMagZ added in v0.4.0

func (m *MagnetometerData) SetMagZ(v []uint16) *MagnetometerData

SetMagZ sets MagZ value.

Array: [N]; Units: counts; These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read.

func (*MagnetometerData) SetSampleTimeOffset added in v0.4.0

func (m *MagnetometerData) SetSampleTimeOffset(v []uint16) *MagnetometerData

SetSampleTimeOffset sets SampleTimeOffset value.

Array: [N]; Units: ms; Each time in the array describes the time at which the compass sample with the corresponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in cmps_x and cmps_y and cmps_z

func (*MagnetometerData) SetTimestamp added in v0.4.0

func (m *MagnetometerData) SetTimestamp(v time.Time) *MagnetometerData

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*MagnetometerData) SetTimestampMs added in v0.4.0

func (m *MagnetometerData) SetTimestampMs(v uint16) *MagnetometerData

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*MagnetometerData) SetUnknownFields added in v0.23.6

func (m *MagnetometerData) SetUnknownFields(unknownFields ...proto.Field) *MagnetometerData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MagnetometerData) TimestampUint32 added in v0.15.0

func (m *MagnetometerData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*MagnetometerData) ToMesg added in v0.3.0

func (m *MagnetometerData) ToMesg(options *Options) proto.Message

ToMesg converts MagnetometerData into proto.Message. If options is nil, default options will be used.

type MaxMetData

type MaxMetData struct {
	UpdateTime     time.Time // Time maxMET and vo2 were calculated
	Vo2Max         uint16    // Scale: 10; Units: mL/kg/min
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	MaxMetCategory typedef.MaxMetCategory
	CalibratedData typedef.Bool                  // Indicates if calibrated data was used in the calculation
	HrSource       typedef.MaxMetHeartRateSource // Indicates if the estimate was obtained using a chest strap or wrist heart rate
	SpeedSource    typedef.MaxMetSpeedSource     // Indidcates if the estimate was obtained using onboard GPS or connected GPS

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MaxMetData is a MaxMetData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMaxMetData

func NewMaxMetData(mesg *proto.Message) *MaxMetData

NewMaxMetData creates new MaxMetData struct based on given mesg. If mesg is nil, it will return MaxMetData with all fields being set to its corresponding invalid value.

func (*MaxMetData) SetCalibratedData added in v0.4.0

func (m *MaxMetData) SetCalibratedData(v typedef.Bool) *MaxMetData

SetCalibratedData sets CalibratedData value.

Indicates if calibrated data was used in the calculation

func (*MaxMetData) SetDeveloperFields added in v0.4.0

func (m *MaxMetData) SetDeveloperFields(developerFields ...proto.DeveloperField) *MaxMetData

SetDeveloperFields sets DeveloperFields.

func (*MaxMetData) SetHrSource added in v0.4.0

SetHrSource sets HrSource value.

Indicates if the estimate was obtained using a chest strap or wrist heart rate

func (*MaxMetData) SetMaxMetCategory added in v0.4.0

func (m *MaxMetData) SetMaxMetCategory(v typedef.MaxMetCategory) *MaxMetData

SetMaxMetCategory sets MaxMetCategory value.

func (*MaxMetData) SetSpeedSource added in v0.4.0

func (m *MaxMetData) SetSpeedSource(v typedef.MaxMetSpeedSource) *MaxMetData

SetSpeedSource sets SpeedSource value.

Indidcates if the estimate was obtained using onboard GPS or connected GPS

func (*MaxMetData) SetSport added in v0.4.0

func (m *MaxMetData) SetSport(v typedef.Sport) *MaxMetData

SetSport sets Sport value.

func (*MaxMetData) SetSubSport added in v0.4.0

func (m *MaxMetData) SetSubSport(v typedef.SubSport) *MaxMetData

SetSubSport sets SubSport value.

func (*MaxMetData) SetUnknownFields added in v0.23.6

func (m *MaxMetData) SetUnknownFields(unknownFields ...proto.Field) *MaxMetData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MaxMetData) SetUpdateTime added in v0.4.0

func (m *MaxMetData) SetUpdateTime(v time.Time) *MaxMetData

SetUpdateTime sets UpdateTime value.

Time maxMET and vo2 were calculated

func (*MaxMetData) SetVo2Max added in v0.4.0

func (m *MaxMetData) SetVo2Max(v uint16) *MaxMetData

SetVo2Max sets Vo2Max value.

Scale: 10; Units: mL/kg/min

func (*MaxMetData) SetVo2MaxScaled added in v0.17.2

func (m *MaxMetData) SetVo2MaxScaled(v float64) *MaxMetData

SetVo2MaxScaled is similar to SetVo2Max except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mL/kg/min

func (*MaxMetData) ToMesg added in v0.3.0

func (m *MaxMetData) ToMesg(options *Options) proto.Message

ToMesg converts MaxMetData into proto.Message. If options is nil, default options will be used.

func (*MaxMetData) UpdateTimeUint32 added in v0.15.0

func (m *MaxMetData) UpdateTimeUint32() uint32

UpdateTimeUint32 returns UpdateTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*MaxMetData) Vo2MaxScaled added in v0.8.0

func (m *MaxMetData) Vo2MaxScaled() float64

Vo2MaxScaled return Vo2Max in its scaled value. If Vo2Max value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mL/kg/min

type MemoGlob

type MemoGlob struct {
	Memo        []byte               // Array: [N]; Deprecated. Use data field.
	Data        []uint8              // Base: uint8z; Array: [N]; Block of utf8 bytes. Note, mutltibyte characters may be split across adjoining memo_glob messages.
	PartIndex   uint32               // Sequence number of memo blocks
	MesgNum     typedef.MesgNum      // Message Number of the parent message
	ParentIndex typedef.MessageIndex // Index of mesg that this glob is associated with.
	FieldNum    uint8                // Field within the parent that this glob is associated with

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MemoGlob is a MemoGlob message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMemoGlob

func NewMemoGlob(mesg *proto.Message) *MemoGlob

NewMemoGlob creates new MemoGlob struct based on given mesg. If mesg is nil, it will return MemoGlob with all fields being set to its corresponding invalid value.

func (*MemoGlob) SetData added in v0.4.0

func (m *MemoGlob) SetData(v []uint8) *MemoGlob

SetData sets Data value.

Base: uint8z; Array: [N]; Block of utf8 bytes. Note, mutltibyte characters may be split across adjoining memo_glob messages.

func (*MemoGlob) SetDeveloperFields added in v0.4.0

func (m *MemoGlob) SetDeveloperFields(developerFields ...proto.DeveloperField) *MemoGlob

SetDeveloperFields sets DeveloperFields.

func (*MemoGlob) SetFieldNum added in v0.4.0

func (m *MemoGlob) SetFieldNum(v uint8) *MemoGlob

SetFieldNum sets FieldNum value.

Field within the parent that this glob is associated with

func (*MemoGlob) SetMemo added in v0.4.0

func (m *MemoGlob) SetMemo(v []byte) *MemoGlob

SetMemo sets Memo value.

Array: [N]; Deprecated. Use data field.

func (*MemoGlob) SetMesgNum added in v0.4.0

func (m *MemoGlob) SetMesgNum(v typedef.MesgNum) *MemoGlob

SetMesgNum sets MesgNum value.

Message Number of the parent message

func (*MemoGlob) SetParentIndex added in v0.4.0

func (m *MemoGlob) SetParentIndex(v typedef.MessageIndex) *MemoGlob

SetParentIndex sets ParentIndex value.

Index of mesg that this glob is associated with.

func (*MemoGlob) SetPartIndex added in v0.4.0

func (m *MemoGlob) SetPartIndex(v uint32) *MemoGlob

SetPartIndex sets PartIndex value.

Sequence number of memo blocks

func (*MemoGlob) SetUnknownFields added in v0.23.6

func (m *MemoGlob) SetUnknownFields(unknownFields ...proto.Field) *MemoGlob

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MemoGlob) ToMesg added in v0.3.0

func (m *MemoGlob) ToMesg(options *Options) proto.Message

ToMesg converts MemoGlob into proto.Message. If options is nil, default options will be used.

type MesgCapabilities

type MesgCapabilities struct {
	MessageIndex typedef.MessageIndex
	MesgNum      typedef.MesgNum
	Count        uint16
	File         typedef.File
	CountType    typedef.MesgCount

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MesgCapabilities is a MesgCapabilities message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMesgCapabilities

func NewMesgCapabilities(mesg *proto.Message) *MesgCapabilities

NewMesgCapabilities creates new MesgCapabilities struct based on given mesg. If mesg is nil, it will return MesgCapabilities with all fields being set to its corresponding invalid value.

func (*MesgCapabilities) GetCount added in v0.16.0

func (m *MesgCapabilities) GetCount() (name string, value any)

GetCount returns Dynamic Field interpretation of Count. Otherwise, returns the original value of Count.

Based on m.CountType:

  • name: "num_per_file", value: uint16(m.Count)
  • name: "max_per_file", value: uint16(m.Count)
  • name: "max_per_file_type", value: uint16(m.Count)

Otherwise:

  • name: "count", value: m.Count

func (*MesgCapabilities) SetCount added in v0.4.0

func (m *MesgCapabilities) SetCount(v uint16) *MesgCapabilities

SetCount sets Count value.

func (*MesgCapabilities) SetCountType added in v0.4.0

func (m *MesgCapabilities) SetCountType(v typedef.MesgCount) *MesgCapabilities

SetCountType sets CountType value.

func (*MesgCapabilities) SetDeveloperFields added in v0.4.0

func (m *MesgCapabilities) SetDeveloperFields(developerFields ...proto.DeveloperField) *MesgCapabilities

SetDeveloperFields sets DeveloperFields.

func (*MesgCapabilities) SetFile added in v0.4.0

SetFile sets File value.

func (*MesgCapabilities) SetMesgNum added in v0.4.0

SetMesgNum sets MesgNum value.

func (*MesgCapabilities) SetMessageIndex added in v0.4.0

func (m *MesgCapabilities) SetMessageIndex(v typedef.MessageIndex) *MesgCapabilities

SetMessageIndex sets MessageIndex value.

func (*MesgCapabilities) SetUnknownFields added in v0.23.6

func (m *MesgCapabilities) SetUnknownFields(unknownFields ...proto.Field) *MesgCapabilities

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MesgCapabilities) ToMesg added in v0.3.0

func (m *MesgCapabilities) ToMesg(options *Options) proto.Message

ToMesg converts MesgCapabilities into proto.Message. If options is nil, default options will be used.

type MetZone

type MetZone struct {
	MessageIndex typedef.MessageIndex
	Calories     uint16 // Scale: 10; Units: kcal / min
	HighBpm      uint8
	FatCalories  uint8 // Scale: 10; Units: kcal / min

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MetZone is a MetZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMetZone

func NewMetZone(mesg *proto.Message) *MetZone

NewMetZone creates new MetZone struct based on given mesg. If mesg is nil, it will return MetZone with all fields being set to its corresponding invalid value.

func (*MetZone) CaloriesScaled added in v0.8.0

func (m *MetZone) CaloriesScaled() float64

CaloriesScaled return Calories in its scaled value. If Calories value is invalid, float64 invalid value will be returned.

Scale: 10; Units: kcal / min

func (*MetZone) FatCaloriesScaled added in v0.8.0

func (m *MetZone) FatCaloriesScaled() float64

FatCaloriesScaled return FatCalories in its scaled value. If FatCalories value is invalid, float64 invalid value will be returned.

Scale: 10; Units: kcal / min

func (*MetZone) SetCalories added in v0.4.0

func (m *MetZone) SetCalories(v uint16) *MetZone

SetCalories sets Calories value.

Scale: 10; Units: kcal / min

func (*MetZone) SetCaloriesScaled added in v0.17.2

func (m *MetZone) SetCaloriesScaled(v float64) *MetZone

SetCaloriesScaled is similar to SetCalories except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: kcal / min

func (*MetZone) SetDeveloperFields added in v0.4.0

func (m *MetZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *MetZone

SetDeveloperFields sets DeveloperFields.

func (*MetZone) SetFatCalories added in v0.4.0

func (m *MetZone) SetFatCalories(v uint8) *MetZone

SetFatCalories sets FatCalories value.

Scale: 10; Units: kcal / min

func (*MetZone) SetFatCaloriesScaled added in v0.17.2

func (m *MetZone) SetFatCaloriesScaled(v float64) *MetZone

SetFatCaloriesScaled is similar to SetFatCalories except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10; Units: kcal / min

func (*MetZone) SetHighBpm added in v0.4.0

func (m *MetZone) SetHighBpm(v uint8) *MetZone

SetHighBpm sets HighBpm value.

func (*MetZone) SetMessageIndex added in v0.4.0

func (m *MetZone) SetMessageIndex(v typedef.MessageIndex) *MetZone

SetMessageIndex sets MessageIndex value.

func (*MetZone) SetUnknownFields added in v0.23.6

func (m *MetZone) SetUnknownFields(unknownFields ...proto.Field) *MetZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MetZone) ToMesg added in v0.3.0

func (m *MetZone) ToMesg(options *Options) proto.Message

ToMesg converts MetZone into proto.Message. If options is nil, default options will be used.

type Monitoring

type Monitoring struct {
	Timestamp                    time.Time           // Units: s; Must align to logging interval, for example, time must be 00:00:00 for daily log.
	LocalTimestamp               time.Time           // Must align to logging interval, for example, time must be 00:00:00 for daily log.
	ActivityTime                 [8]uint16           // Array: [8]; Units: minutes; Indexed using minute_activity_level enum
	Distance                     uint32              // Scale: 100; Units: m; Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.
	Cycles                       uint32              // Scale: 2; Units: cycles; Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.
	ActiveTime                   uint32              // Scale: 1000; Units: s
	Duration                     uint32              // Units: s
	Ascent                       uint32              // Scale: 1000; Units: m
	Descent                      uint32              // Scale: 1000; Units: m
	Calories                     uint16              // Units: kcal; Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation
	Distance16                   uint16              // Units: 100 * m
	Cycles16                     uint16              // Units: 2 * cycles (steps)
	ActiveTime16                 uint16              // Units: s
	Temperature                  int16               // Scale: 100; Units: C; Avg temperature during the logging interval ended at timestamp
	TemperatureMin               int16               // Scale: 100; Units: C; Min temperature during the logging interval ended at timestamp
	TemperatureMax               int16               // Scale: 100; Units: C; Max temperature during the logging interval ended at timestamp
	ActiveCalories               uint16              // Units: kcal
	Timestamp16                  uint16              // Units: s
	DurationMin                  uint16              // Units: min
	ModerateActivityMinutes      uint16              // Units: minutes
	VigorousActivityMinutes      uint16              // Units: minutes
	DeviceIndex                  typedef.DeviceIndex // Associates this data to device_info message. Not required for file with single device (sensor).
	ActivityType                 typedef.ActivityType
	ActivitySubtype              typedef.ActivitySubtype
	ActivityLevel                typedef.ActivityLevel
	CurrentActivityTypeIntensity byte  // Indicates single type / intensity for duration since last monitoring message.
	TimestampMin8                uint8 // Units: min
	HeartRate                    uint8 // Units: bpm
	Intensity                    uint8 // Scale: 10

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Monitoring is a Monitoring message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMonitoring

func NewMonitoring(mesg *proto.Message) *Monitoring

NewMonitoring creates new Monitoring struct based on given mesg. If mesg is nil, it will return Monitoring with all fields being set to its corresponding invalid value.

func (*Monitoring) ActiveTimeScaled added in v0.8.0

func (m *Monitoring) ActiveTimeScaled() float64

ActiveTimeScaled return ActiveTime in its scaled value. If ActiveTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Monitoring) AscentScaled added in v0.8.0

func (m *Monitoring) AscentScaled() float64

AscentScaled return Ascent in its scaled value. If Ascent value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m

func (*Monitoring) CyclesScaled added in v0.8.0

func (m *Monitoring) CyclesScaled() float64

CyclesScaled return Cycles in its scaled value. If Cycles value is invalid, float64 invalid value will be returned.

Scale: 2; Units: cycles; Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) DescentScaled added in v0.8.0

func (m *Monitoring) DescentScaled() float64

DescentScaled return Descent in its scaled value. If Descent value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m

func (*Monitoring) DistanceScaled added in v0.8.0

func (m *Monitoring) DistanceScaled() float64

DistanceScaled return Distance in its scaled value. If Distance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) GetCycles added in v0.16.0

func (m *Monitoring) GetCycles() (name string, value any)

GetCycles returns Dynamic Field interpretation of Cycles. Otherwise, returns the original value of Cycles.

Based on m.ActivityType:

  • name: "steps", units: "steps" , value: uint32(m.Cycles)
  • name: "strokes", units: "strokes" , value: (float64(m.Cycles) * 2) - 0

Otherwise:

  • name: "cycles", units: "cycles" , value: m.Cycles

func (*Monitoring) IntensityScaled added in v0.8.0

func (m *Monitoring) IntensityScaled() float64

IntensityScaled return Intensity in its scaled value. If Intensity value is invalid, float64 invalid value will be returned.

Scale: 10

func (*Monitoring) IsExpandedField added in v0.21.0

func (m *Monitoring) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 5, 28.

func (*Monitoring) LocalTimestampUint32 added in v0.15.0

func (m *Monitoring) LocalTimestampUint32() uint32

LocalTimestampUint32 returns LocalTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Monitoring) MarkAsExpandedField added in v0.21.0

func (m *Monitoring) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 5, 28.

func (*Monitoring) SetActiveCalories added in v0.4.0

func (m *Monitoring) SetActiveCalories(v uint16) *Monitoring

SetActiveCalories sets ActiveCalories value.

Units: kcal

func (*Monitoring) SetActiveTime added in v0.4.0

func (m *Monitoring) SetActiveTime(v uint32) *Monitoring

SetActiveTime sets ActiveTime value.

Scale: 1000; Units: s

func (*Monitoring) SetActiveTime16 added in v0.4.0

func (m *Monitoring) SetActiveTime16(v uint16) *Monitoring

SetActiveTime16 sets ActiveTime16 value.

Units: s

func (*Monitoring) SetActiveTimeScaled added in v0.17.2

func (m *Monitoring) SetActiveTimeScaled(v float64) *Monitoring

SetActiveTimeScaled is similar to SetActiveTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Monitoring) SetActivityLevel added in v0.4.0

func (m *Monitoring) SetActivityLevel(v typedef.ActivityLevel) *Monitoring

SetActivityLevel sets ActivityLevel value.

func (*Monitoring) SetActivitySubtype added in v0.4.0

func (m *Monitoring) SetActivitySubtype(v typedef.ActivitySubtype) *Monitoring

SetActivitySubtype sets ActivitySubtype value.

func (*Monitoring) SetActivityTime added in v0.4.0

func (m *Monitoring) SetActivityTime(v [8]uint16) *Monitoring

SetActivityTime sets ActivityTime value.

Array: [8]; Units: minutes; Indexed using minute_activity_level enum

func (*Monitoring) SetActivityType added in v0.4.0

func (m *Monitoring) SetActivityType(v typedef.ActivityType) *Monitoring

SetActivityType sets ActivityType value.

func (*Monitoring) SetAscent added in v0.4.0

func (m *Monitoring) SetAscent(v uint32) *Monitoring

SetAscent sets Ascent value.

Scale: 1000; Units: m

func (*Monitoring) SetAscentScaled added in v0.17.2

func (m *Monitoring) SetAscentScaled(v float64) *Monitoring

SetAscentScaled is similar to SetAscent except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m

func (*Monitoring) SetCalories added in v0.4.0

func (m *Monitoring) SetCalories(v uint16) *Monitoring

SetCalories sets Calories value.

Units: kcal; Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation

func (*Monitoring) SetCurrentActivityTypeIntensity added in v0.4.0

func (m *Monitoring) SetCurrentActivityTypeIntensity(v byte) *Monitoring

SetCurrentActivityTypeIntensity sets CurrentActivityTypeIntensity value.

Indicates single type / intensity for duration since last monitoring message.

func (*Monitoring) SetCycles added in v0.4.0

func (m *Monitoring) SetCycles(v uint32) *Monitoring

SetCycles sets Cycles value.

Scale: 2; Units: cycles; Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) SetCycles16 added in v0.4.0

func (m *Monitoring) SetCycles16(v uint16) *Monitoring

SetCycles16 sets Cycles16 value.

Units: 2 * cycles (steps)

func (*Monitoring) SetCyclesScaled added in v0.17.2

func (m *Monitoring) SetCyclesScaled(v float64) *Monitoring

SetCyclesScaled is similar to SetCycles except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 2; Units: cycles; Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) SetDescent added in v0.4.0

func (m *Monitoring) SetDescent(v uint32) *Monitoring

SetDescent sets Descent value.

Scale: 1000; Units: m

func (*Monitoring) SetDescentScaled added in v0.17.2

func (m *Monitoring) SetDescentScaled(v float64) *Monitoring

SetDescentScaled is similar to SetDescent except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m

func (*Monitoring) SetDeveloperFields added in v0.4.0

func (m *Monitoring) SetDeveloperFields(developerFields ...proto.DeveloperField) *Monitoring

SetDeveloperFields sets DeveloperFields.

func (*Monitoring) SetDeviceIndex added in v0.4.0

func (m *Monitoring) SetDeviceIndex(v typedef.DeviceIndex) *Monitoring

SetDeviceIndex sets DeviceIndex value.

Associates this data to device_info message. Not required for file with single device (sensor).

func (*Monitoring) SetDistance added in v0.4.0

func (m *Monitoring) SetDistance(v uint32) *Monitoring

SetDistance sets Distance value.

Scale: 100; Units: m; Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) SetDistance16 added in v0.4.0

func (m *Monitoring) SetDistance16(v uint16) *Monitoring

SetDistance16 sets Distance16 value.

Units: 100 * m

func (*Monitoring) SetDistanceScaled added in v0.17.2

func (m *Monitoring) SetDistanceScaled(v float64) *Monitoring

SetDistanceScaled is similar to SetDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m; Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.

func (*Monitoring) SetDuration added in v0.4.0

func (m *Monitoring) SetDuration(v uint32) *Monitoring

SetDuration sets Duration value.

Units: s

func (*Monitoring) SetDurationMin added in v0.4.0

func (m *Monitoring) SetDurationMin(v uint16) *Monitoring

SetDurationMin sets DurationMin value.

Units: min

func (*Monitoring) SetHeartRate added in v0.4.0

func (m *Monitoring) SetHeartRate(v uint8) *Monitoring

SetHeartRate sets HeartRate value.

Units: bpm

func (*Monitoring) SetIntensity added in v0.4.0

func (m *Monitoring) SetIntensity(v uint8) *Monitoring

SetIntensity sets Intensity value.

Scale: 10

func (*Monitoring) SetIntensityScaled added in v0.17.2

func (m *Monitoring) SetIntensityScaled(v float64) *Monitoring

SetIntensityScaled is similar to SetIntensity except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10

func (*Monitoring) SetLocalTimestamp added in v0.4.0

func (m *Monitoring) SetLocalTimestamp(v time.Time) *Monitoring

SetLocalTimestamp sets LocalTimestamp value.

Must align to logging interval, for example, time must be 00:00:00 for daily log.

func (*Monitoring) SetModerateActivityMinutes added in v0.4.0

func (m *Monitoring) SetModerateActivityMinutes(v uint16) *Monitoring

SetModerateActivityMinutes sets ModerateActivityMinutes value.

Units: minutes

func (*Monitoring) SetTemperature added in v0.4.0

func (m *Monitoring) SetTemperature(v int16) *Monitoring

SetTemperature sets Temperature value.

Scale: 100; Units: C; Avg temperature during the logging interval ended at timestamp

func (*Monitoring) SetTemperatureMax added in v0.4.0

func (m *Monitoring) SetTemperatureMax(v int16) *Monitoring

SetTemperatureMax sets TemperatureMax value.

Scale: 100; Units: C; Max temperature during the logging interval ended at timestamp

func (*Monitoring) SetTemperatureMaxScaled added in v0.17.2

func (m *Monitoring) SetTemperatureMaxScaled(v float64) *Monitoring

SetTemperatureMaxScaled is similar to SetTemperatureMax except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: C; Max temperature during the logging interval ended at timestamp

func (*Monitoring) SetTemperatureMin added in v0.4.0

func (m *Monitoring) SetTemperatureMin(v int16) *Monitoring

SetTemperatureMin sets TemperatureMin value.

Scale: 100; Units: C; Min temperature during the logging interval ended at timestamp

func (*Monitoring) SetTemperatureMinScaled added in v0.17.2

func (m *Monitoring) SetTemperatureMinScaled(v float64) *Monitoring

SetTemperatureMinScaled is similar to SetTemperatureMin except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: C; Min temperature during the logging interval ended at timestamp

func (*Monitoring) SetTemperatureScaled added in v0.17.2

func (m *Monitoring) SetTemperatureScaled(v float64) *Monitoring

SetTemperatureScaled is similar to SetTemperature except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: C; Avg temperature during the logging interval ended at timestamp

func (*Monitoring) SetTimestamp added in v0.4.0

func (m *Monitoring) SetTimestamp(v time.Time) *Monitoring

SetTimestamp sets Timestamp value.

Units: s; Must align to logging interval, for example, time must be 00:00:00 for daily log.

func (*Monitoring) SetTimestamp16 added in v0.4.0

func (m *Monitoring) SetTimestamp16(v uint16) *Monitoring

SetTimestamp16 sets Timestamp16 value.

Units: s

func (*Monitoring) SetTimestampMin8 added in v0.4.0

func (m *Monitoring) SetTimestampMin8(v uint8) *Monitoring

SetTimestampMin8 sets TimestampMin8 value.

Units: min

func (*Monitoring) SetUnknownFields added in v0.23.6

func (m *Monitoring) SetUnknownFields(unknownFields ...proto.Field) *Monitoring

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Monitoring) SetVigorousActivityMinutes added in v0.4.0

func (m *Monitoring) SetVigorousActivityMinutes(v uint16) *Monitoring

SetVigorousActivityMinutes sets VigorousActivityMinutes value.

Units: minutes

func (*Monitoring) TemperatureMaxScaled added in v0.8.0

func (m *Monitoring) TemperatureMaxScaled() float64

TemperatureMaxScaled return TemperatureMax in its scaled value. If TemperatureMax value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C; Max temperature during the logging interval ended at timestamp

func (*Monitoring) TemperatureMinScaled added in v0.8.0

func (m *Monitoring) TemperatureMinScaled() float64

TemperatureMinScaled return TemperatureMin in its scaled value. If TemperatureMin value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C; Min temperature during the logging interval ended at timestamp

func (*Monitoring) TemperatureScaled added in v0.8.0

func (m *Monitoring) TemperatureScaled() float64

TemperatureScaled return Temperature in its scaled value. If Temperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C; Avg temperature during the logging interval ended at timestamp

func (*Monitoring) TimestampUint32 added in v0.15.0

func (m *Monitoring) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Monitoring) ToMesg added in v0.3.0

func (m *Monitoring) ToMesg(options *Options) proto.Message

ToMesg converts Monitoring into proto.Message. If options is nil, default options will be used.

type MonitoringHrData

type MonitoringHrData struct {
	Timestamp                  time.Time // Units: s; Must align to logging interval, for example, time must be 00:00:00 for daily log.
	RestingHeartRate           uint8     // Units: bpm; 7-day rolling average
	CurrentDayRestingHeartRate uint8     // Units: bpm; RHR for today only. (Feeds into 7-day average)

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MonitoringHrData is a MonitoringHrData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMonitoringHrData

func NewMonitoringHrData(mesg *proto.Message) *MonitoringHrData

NewMonitoringHrData creates new MonitoringHrData struct based on given mesg. If mesg is nil, it will return MonitoringHrData with all fields being set to its corresponding invalid value.

func (*MonitoringHrData) SetCurrentDayRestingHeartRate added in v0.4.0

func (m *MonitoringHrData) SetCurrentDayRestingHeartRate(v uint8) *MonitoringHrData

SetCurrentDayRestingHeartRate sets CurrentDayRestingHeartRate value.

Units: bpm; RHR for today only. (Feeds into 7-day average)

func (*MonitoringHrData) SetDeveloperFields added in v0.4.0

func (m *MonitoringHrData) SetDeveloperFields(developerFields ...proto.DeveloperField) *MonitoringHrData

SetDeveloperFields sets DeveloperFields.

func (*MonitoringHrData) SetRestingHeartRate added in v0.4.0

func (m *MonitoringHrData) SetRestingHeartRate(v uint8) *MonitoringHrData

SetRestingHeartRate sets RestingHeartRate value.

Units: bpm; 7-day rolling average

func (*MonitoringHrData) SetTimestamp added in v0.4.0

func (m *MonitoringHrData) SetTimestamp(v time.Time) *MonitoringHrData

SetTimestamp sets Timestamp value.

Units: s; Must align to logging interval, for example, time must be 00:00:00 for daily log.

func (*MonitoringHrData) SetUnknownFields added in v0.23.6

func (m *MonitoringHrData) SetUnknownFields(unknownFields ...proto.Field) *MonitoringHrData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MonitoringHrData) TimestampUint32 added in v0.15.0

func (m *MonitoringHrData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*MonitoringHrData) ToMesg added in v0.3.0

func (m *MonitoringHrData) ToMesg(options *Options) proto.Message

ToMesg converts MonitoringHrData into proto.Message. If options is nil, default options will be used.

type MonitoringInfo

type MonitoringInfo struct {
	Timestamp            time.Time              // Units: s
	LocalTimestamp       time.Time              // Units: s; Use to convert activity timestamps to local time if device does not support time zone and daylight savings time correction.
	ActivityType         []typedef.ActivityType // Array: [N]
	CyclesToDistance     []uint16               // Array: [N]; Scale: 5000; Units: m/cycle; Indexed by activity_type
	CyclesToCalories     []uint16               // Array: [N]; Scale: 5000; Units: kcal/cycle; Indexed by activity_type
	RestingMetabolicRate uint16                 // Units: kcal / day

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

MonitoringInfo is a MonitoringInfo message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewMonitoringInfo

func NewMonitoringInfo(mesg *proto.Message) *MonitoringInfo

NewMonitoringInfo creates new MonitoringInfo struct based on given mesg. If mesg is nil, it will return MonitoringInfo with all fields being set to its corresponding invalid value.

func (*MonitoringInfo) CyclesToCaloriesScaled added in v0.8.0

func (m *MonitoringInfo) CyclesToCaloriesScaled() []float64

CyclesToCaloriesScaled return CyclesToCalories in its scaled value. If CyclesToCalories value is invalid, nil will be returned.

Array: [N]; Scale: 5000; Units: kcal/cycle; Indexed by activity_type

func (*MonitoringInfo) CyclesToDistanceScaled added in v0.8.0

func (m *MonitoringInfo) CyclesToDistanceScaled() []float64

CyclesToDistanceScaled return CyclesToDistance in its scaled value. If CyclesToDistance value is invalid, nil will be returned.

Array: [N]; Scale: 5000; Units: m/cycle; Indexed by activity_type

func (*MonitoringInfo) LocalTimestampUint32 added in v0.15.0

func (m *MonitoringInfo) LocalTimestampUint32() uint32

LocalTimestampUint32 returns LocalTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*MonitoringInfo) SetActivityType added in v0.4.0

func (m *MonitoringInfo) SetActivityType(v []typedef.ActivityType) *MonitoringInfo

SetActivityType sets ActivityType value.

Array: [N]

func (*MonitoringInfo) SetCyclesToCalories added in v0.4.0

func (m *MonitoringInfo) SetCyclesToCalories(v []uint16) *MonitoringInfo

SetCyclesToCalories sets CyclesToCalories value.

Array: [N]; Scale: 5000; Units: kcal/cycle; Indexed by activity_type

func (*MonitoringInfo) SetCyclesToCaloriesScaled added in v0.17.2

func (m *MonitoringInfo) SetCyclesToCaloriesScaled(vs []float64) *MonitoringInfo

SetCyclesToCaloriesScaled is similar to SetCyclesToCalories except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 5000; Units: kcal/cycle; Indexed by activity_type

func (*MonitoringInfo) SetCyclesToDistance added in v0.4.0

func (m *MonitoringInfo) SetCyclesToDistance(v []uint16) *MonitoringInfo

SetCyclesToDistance sets CyclesToDistance value.

Array: [N]; Scale: 5000; Units: m/cycle; Indexed by activity_type

func (*MonitoringInfo) SetCyclesToDistanceScaled added in v0.17.2

func (m *MonitoringInfo) SetCyclesToDistanceScaled(vs []float64) *MonitoringInfo

SetCyclesToDistanceScaled is similar to SetCyclesToDistance except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 5000; Units: m/cycle; Indexed by activity_type

func (*MonitoringInfo) SetDeveloperFields added in v0.4.0

func (m *MonitoringInfo) SetDeveloperFields(developerFields ...proto.DeveloperField) *MonitoringInfo

SetDeveloperFields sets DeveloperFields.

func (*MonitoringInfo) SetLocalTimestamp added in v0.4.0

func (m *MonitoringInfo) SetLocalTimestamp(v time.Time) *MonitoringInfo

SetLocalTimestamp sets LocalTimestamp value.

Units: s; Use to convert activity timestamps to local time if device does not support time zone and daylight savings time correction.

func (*MonitoringInfo) SetRestingMetabolicRate added in v0.4.0

func (m *MonitoringInfo) SetRestingMetabolicRate(v uint16) *MonitoringInfo

SetRestingMetabolicRate sets RestingMetabolicRate value.

Units: kcal / day

func (*MonitoringInfo) SetTimestamp added in v0.4.0

func (m *MonitoringInfo) SetTimestamp(v time.Time) *MonitoringInfo

SetTimestamp sets Timestamp value.

Units: s

func (*MonitoringInfo) SetUnknownFields added in v0.23.6

func (m *MonitoringInfo) SetUnknownFields(unknownFields ...proto.Field) *MonitoringInfo

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*MonitoringInfo) TimestampUint32 added in v0.15.0

func (m *MonitoringInfo) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*MonitoringInfo) ToMesg added in v0.3.0

func (m *MonitoringInfo) ToMesg(options *Options) proto.Message

ToMesg converts MonitoringInfo into proto.Message. If options is nil, default options will be used.

type NmeaSentence

type NmeaSentence struct {
	Timestamp   time.Time // Units: s; Timestamp message was output
	Sentence    string    // NMEA sentence
	TimestampMs uint16    // Units: ms; Fractional part of timestamp, added to timestamp

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

NmeaSentence is a NmeaSentence message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewNmeaSentence

func NewNmeaSentence(mesg *proto.Message) *NmeaSentence

NewNmeaSentence creates new NmeaSentence struct based on given mesg. If mesg is nil, it will return NmeaSentence with all fields being set to its corresponding invalid value.

func (*NmeaSentence) SetDeveloperFields added in v0.4.0

func (m *NmeaSentence) SetDeveloperFields(developerFields ...proto.DeveloperField) *NmeaSentence

SetDeveloperFields sets DeveloperFields.

func (*NmeaSentence) SetSentence added in v0.4.0

func (m *NmeaSentence) SetSentence(v string) *NmeaSentence

SetSentence sets Sentence value.

NMEA sentence

func (*NmeaSentence) SetTimestamp added in v0.4.0

func (m *NmeaSentence) SetTimestamp(v time.Time) *NmeaSentence

SetTimestamp sets Timestamp value.

Units: s; Timestamp message was output

func (*NmeaSentence) SetTimestampMs added in v0.4.0

func (m *NmeaSentence) SetTimestampMs(v uint16) *NmeaSentence

SetTimestampMs sets TimestampMs value.

Units: ms; Fractional part of timestamp, added to timestamp

func (*NmeaSentence) SetUnknownFields added in v0.23.6

func (m *NmeaSentence) SetUnknownFields(unknownFields ...proto.Field) *NmeaSentence

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*NmeaSentence) TimestampUint32 added in v0.15.0

func (m *NmeaSentence) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*NmeaSentence) ToMesg added in v0.3.0

func (m *NmeaSentence) ToMesg(options *Options) proto.Message

ToMesg converts NmeaSentence into proto.Message. If options is nil, default options will be used.

type ObdiiData

type ObdiiData struct {
	Timestamp        time.Time // Units: s; Timestamp message was output
	TimeOffset       []uint16  // Array: [N]; Units: ms; Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span across seconds.
	RawData          []byte    // Array: [N]; Raw parameter data
	PidDataSize      []uint8   // Array: [N]; Optional, data size of PID[i]. If not specified refer to SAE J1979.
	SystemTime       []uint32  // Array: [N]; System time associated with sample expressed in ms, can be used instead of time_offset. There will be a system_time value for each raw_data element. For multibyte pids the system_time is repeated.
	StartTimestamp   time.Time // Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample
	TimestampMs      uint16    // Units: ms; Fractional part of timestamp, added to timestamp
	StartTimestampMs uint16    // Units: ms; Fractional part of start_timestamp
	Pid              byte      // Parameter ID

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ObdiiData is a ObdiiData message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewObdiiData

func NewObdiiData(mesg *proto.Message) *ObdiiData

NewObdiiData creates new ObdiiData struct based on given mesg. If mesg is nil, it will return ObdiiData with all fields being set to its corresponding invalid value.

func (*ObdiiData) SetDeveloperFields added in v0.4.0

func (m *ObdiiData) SetDeveloperFields(developerFields ...proto.DeveloperField) *ObdiiData

SetDeveloperFields sets DeveloperFields.

func (*ObdiiData) SetPid added in v0.4.0

func (m *ObdiiData) SetPid(v byte) *ObdiiData

SetPid sets Pid value.

Parameter ID

func (*ObdiiData) SetPidDataSize added in v0.4.0

func (m *ObdiiData) SetPidDataSize(v []uint8) *ObdiiData

SetPidDataSize sets PidDataSize value.

Array: [N]; Optional, data size of PID[i]. If not specified refer to SAE J1979.

func (*ObdiiData) SetRawData added in v0.4.0

func (m *ObdiiData) SetRawData(v []byte) *ObdiiData

SetRawData sets RawData value.

Array: [N]; Raw parameter data

func (*ObdiiData) SetStartTimestamp added in v0.4.0

func (m *ObdiiData) SetStartTimestamp(v time.Time) *ObdiiData

SetStartTimestamp sets StartTimestamp value.

Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample

func (*ObdiiData) SetStartTimestampMs added in v0.4.0

func (m *ObdiiData) SetStartTimestampMs(v uint16) *ObdiiData

SetStartTimestampMs sets StartTimestampMs value.

Units: ms; Fractional part of start_timestamp

func (*ObdiiData) SetSystemTime added in v0.4.0

func (m *ObdiiData) SetSystemTime(v []uint32) *ObdiiData

SetSystemTime sets SystemTime value.

Array: [N]; System time associated with sample expressed in ms, can be used instead of time_offset. There will be a system_time value for each raw_data element. For multibyte pids the system_time is repeated.

func (*ObdiiData) SetTimeOffset added in v0.4.0

func (m *ObdiiData) SetTimeOffset(v []uint16) *ObdiiData

SetTimeOffset sets TimeOffset value.

Array: [N]; Units: ms; Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span across seconds.

func (*ObdiiData) SetTimestamp added in v0.4.0

func (m *ObdiiData) SetTimestamp(v time.Time) *ObdiiData

SetTimestamp sets Timestamp value.

Units: s; Timestamp message was output

func (*ObdiiData) SetTimestampMs added in v0.4.0

func (m *ObdiiData) SetTimestampMs(v uint16) *ObdiiData

SetTimestampMs sets TimestampMs value.

Units: ms; Fractional part of timestamp, added to timestamp

func (*ObdiiData) SetUnknownFields added in v0.23.6

func (m *ObdiiData) SetUnknownFields(unknownFields ...proto.Field) *ObdiiData

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ObdiiData) StartTimestampUint32 added in v0.15.0

func (m *ObdiiData) StartTimestampUint32() uint32

StartTimestampUint32 returns StartTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ObdiiData) TimestampUint32 added in v0.15.0

func (m *ObdiiData) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ObdiiData) ToMesg added in v0.3.0

func (m *ObdiiData) ToMesg(options *Options) proto.Message

ToMesg converts ObdiiData into proto.Message. If options is nil, default options will be used.

type OhrSettings

type OhrSettings struct {
	Timestamp time.Time // Units: s
	Enabled   typedef.Switch

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

OhrSettings is a OhrSettings message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewOhrSettings

func NewOhrSettings(mesg *proto.Message) *OhrSettings

NewOhrSettings creates new OhrSettings struct based on given mesg. If mesg is nil, it will return OhrSettings with all fields being set to its corresponding invalid value.

func (*OhrSettings) SetDeveloperFields added in v0.4.0

func (m *OhrSettings) SetDeveloperFields(developerFields ...proto.DeveloperField) *OhrSettings

SetDeveloperFields sets DeveloperFields.

func (*OhrSettings) SetEnabled added in v0.4.0

func (m *OhrSettings) SetEnabled(v typedef.Switch) *OhrSettings

SetEnabled sets Enabled value.

func (*OhrSettings) SetTimestamp added in v0.4.0

func (m *OhrSettings) SetTimestamp(v time.Time) *OhrSettings

SetTimestamp sets Timestamp value.

Units: s

func (*OhrSettings) SetUnknownFields added in v0.23.6

func (m *OhrSettings) SetUnknownFields(unknownFields ...proto.Field) *OhrSettings

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*OhrSettings) TimestampUint32 added in v0.15.0

func (m *OhrSettings) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*OhrSettings) ToMesg added in v0.3.0

func (m *OhrSettings) ToMesg(options *Options) proto.Message

ToMesg converts OhrSettings into proto.Message. If options is nil, default options will be used.

type OneDSensorCalibration

type OneDSensorCalibration struct {
	Timestamp          time.Time          // Units: s; Whole second part of the timestamp
	CalibrationFactor  uint32             // Calibration factor used to convert from raw ADC value to degrees, g, etc.
	CalibrationDivisor uint32             // Units: counts; Calibration factor divisor
	LevelShift         uint32             // Level shift value used to shift the ADC value back into range
	OffsetCal          int32              // Internal Calibration factor
	SensorType         typedef.SensorType // Indicates which sensor the calibration is for

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

OneDSensorCalibration is a OneDSensorCalibration message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewOneDSensorCalibration

func NewOneDSensorCalibration(mesg *proto.Message) *OneDSensorCalibration

NewOneDSensorCalibration creates new OneDSensorCalibration struct based on given mesg. If mesg is nil, it will return OneDSensorCalibration with all fields being set to its corresponding invalid value.

func (*OneDSensorCalibration) GetCalibrationFactor added in v0.16.0

func (m *OneDSensorCalibration) GetCalibrationFactor() (name string, value any)

GetCalibrationFactor returns Dynamic Field interpretation of CalibrationFactor. Otherwise, returns the original value of CalibrationFactor.

Based on m.SensorType:

  • name: "baro_cal_factor", units: "Pa" , value: uint32(m.CalibrationFactor)

Otherwise:

  • name: "calibration_factor", value: m.CalibrationFactor

func (*OneDSensorCalibration) SetCalibrationDivisor added in v0.4.0

func (m *OneDSensorCalibration) SetCalibrationDivisor(v uint32) *OneDSensorCalibration

SetCalibrationDivisor sets CalibrationDivisor value.

Units: counts; Calibration factor divisor

func (*OneDSensorCalibration) SetCalibrationFactor added in v0.4.0

func (m *OneDSensorCalibration) SetCalibrationFactor(v uint32) *OneDSensorCalibration

SetCalibrationFactor sets CalibrationFactor value.

Calibration factor used to convert from raw ADC value to degrees, g, etc.

func (*OneDSensorCalibration) SetDeveloperFields added in v0.4.0

func (m *OneDSensorCalibration) SetDeveloperFields(developerFields ...proto.DeveloperField) *OneDSensorCalibration

SetDeveloperFields sets DeveloperFields.

func (*OneDSensorCalibration) SetLevelShift added in v0.4.0

func (m *OneDSensorCalibration) SetLevelShift(v uint32) *OneDSensorCalibration

SetLevelShift sets LevelShift value.

Level shift value used to shift the ADC value back into range

func (*OneDSensorCalibration) SetOffsetCal added in v0.4.0

SetOffsetCal sets OffsetCal value.

Internal Calibration factor

func (*OneDSensorCalibration) SetSensorType added in v0.4.0

SetSensorType sets SensorType value.

Indicates which sensor the calibration is for

func (*OneDSensorCalibration) SetTimestamp added in v0.4.0

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*OneDSensorCalibration) SetUnknownFields added in v0.23.6

func (m *OneDSensorCalibration) SetUnknownFields(unknownFields ...proto.Field) *OneDSensorCalibration

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*OneDSensorCalibration) TimestampUint32 added in v0.15.0

func (m *OneDSensorCalibration) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*OneDSensorCalibration) ToMesg added in v0.3.0

func (m *OneDSensorCalibration) ToMesg(options *Options) proto.Message

ToMesg converts OneDSensorCalibration into proto.Message. If options is nil, default options will be used.

type Options added in v0.11.0

type Options struct {
	Factory               Factory // If not specified, factory.StandardFactory() will be used.
	IncludeExpandedFields bool
}

func DefaultOptions added in v0.11.0

func DefaultOptions() *Options

type PowerZone

type PowerZone struct {
	Name         string
	MessageIndex typedef.MessageIndex
	HighValue    uint16 // Units: watts

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

PowerZone is a PowerZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewPowerZone

func NewPowerZone(mesg *proto.Message) *PowerZone

NewPowerZone creates new PowerZone struct based on given mesg. If mesg is nil, it will return PowerZone with all fields being set to its corresponding invalid value.

func (*PowerZone) SetDeveloperFields added in v0.4.0

func (m *PowerZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *PowerZone

SetDeveloperFields sets DeveloperFields.

func (*PowerZone) SetHighValue added in v0.4.0

func (m *PowerZone) SetHighValue(v uint16) *PowerZone

SetHighValue sets HighValue value.

Units: watts

func (*PowerZone) SetMessageIndex added in v0.4.0

func (m *PowerZone) SetMessageIndex(v typedef.MessageIndex) *PowerZone

SetMessageIndex sets MessageIndex value.

func (*PowerZone) SetName added in v0.4.0

func (m *PowerZone) SetName(v string) *PowerZone

SetName sets Name value.

func (*PowerZone) SetUnknownFields added in v0.23.6

func (m *PowerZone) SetUnknownFields(unknownFields ...proto.Field) *PowerZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*PowerZone) ToMesg added in v0.3.0

func (m *PowerZone) ToMesg(options *Options) proto.Message

ToMesg converts PowerZone into proto.Message. If options is nil, default options will be used.

type RawBbi added in v0.10.0

type RawBbi struct {
	Timestamp   time.Time
	Data        []uint16 // Array: [N]; 1 bit for gap indicator, 1 bit for quality indicator, and 14 bits for Beat-to-Beat interval values in whole-integer millisecond resolution
	Time        []uint16 // Array: [N]; Units: ms; Array of millisecond times between beats
	Quality     []uint8  // Array: [N]; 1 = high confidence. 0 = low confidence. N/A when gap = 1
	Gap         []uint8  // Array: [N]; 1 = gap (time represents ms gap length). 0 = BBI data
	TimestampMs uint16   // Units: ms; Millisecond resolution of the timestamp

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

RawBbi is a RawBbi message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewRawBbi added in v0.10.0

func NewRawBbi(mesg *proto.Message) *RawBbi

NewRawBbi creates new RawBbi struct based on given mesg. If mesg is nil, it will return RawBbi with all fields being set to its corresponding invalid value.

func (*RawBbi) IsExpandedField added in v0.21.0

func (m *RawBbi) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 2, 3, 4.

func (*RawBbi) MarkAsExpandedField added in v0.21.0

func (m *RawBbi) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 2, 3, 4.

func (*RawBbi) SetData added in v0.10.0

func (m *RawBbi) SetData(v []uint16) *RawBbi

SetData sets Data value.

Array: [N]; 1 bit for gap indicator, 1 bit for quality indicator, and 14 bits for Beat-to-Beat interval values in whole-integer millisecond resolution

func (*RawBbi) SetDeveloperFields added in v0.10.0

func (m *RawBbi) SetDeveloperFields(developerFields ...proto.DeveloperField) *RawBbi

SetDeveloperFields sets DeveloperFields.

func (*RawBbi) SetGap added in v0.10.0

func (m *RawBbi) SetGap(v []uint8) *RawBbi

SetGap sets Gap value.

Array: [N]; 1 = gap (time represents ms gap length). 0 = BBI data

func (*RawBbi) SetQuality added in v0.10.0

func (m *RawBbi) SetQuality(v []uint8) *RawBbi

SetQuality sets Quality value.

Array: [N]; 1 = high confidence. 0 = low confidence. N/A when gap = 1

func (*RawBbi) SetTime added in v0.10.0

func (m *RawBbi) SetTime(v []uint16) *RawBbi

SetTime sets Time value.

Array: [N]; Units: ms; Array of millisecond times between beats

func (*RawBbi) SetTimestamp added in v0.10.0

func (m *RawBbi) SetTimestamp(v time.Time) *RawBbi

SetTimestamp sets Timestamp value.

func (*RawBbi) SetTimestampMs added in v0.10.0

func (m *RawBbi) SetTimestampMs(v uint16) *RawBbi

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond resolution of the timestamp

func (*RawBbi) SetUnknownFields added in v0.23.6

func (m *RawBbi) SetUnknownFields(unknownFields ...proto.Field) *RawBbi

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*RawBbi) TimestampUint32 added in v0.15.0

func (m *RawBbi) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*RawBbi) ToMesg added in v0.10.0

func (m *RawBbi) ToMesg(options *Options) proto.Message

ToMesg converts RawBbi into proto.Message. If options is nil, default options will be used.

type Record

type Record struct {
	Timestamp                     time.Time // Units: s
	Speed1S                       []uint8   // Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.
	LeftPowerPhase                []uint8   // Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase angles. Data value indexes defined by power_phase_type.
	LeftPowerPhasePeak            []uint8   // Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak angles. Data value indexes defined by power_phase_type.
	RightPowerPhase               []uint8   // Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase angles. Data value indexes defined by power_phase_type.
	RightPowerPhasePeak           []uint8   // Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak angles. Data value indexes defined by power_phase_type.
	PositionLat                   int32     // Units: semicircles
	PositionLong                  int32     // Units: semicircles
	Distance                      uint32    // Scale: 100; Units: m
	TimeFromCourse                int32     // Scale: 1000; Units: s
	TotalCycles                   uint32    // Units: cycles
	AccumulatedPower              uint32    // Units: watts
	EnhancedSpeed                 uint32    // Scale: 1000; Units: m/s
	EnhancedAltitude              uint32    // Scale: 5; Offset: 500; Units: m
	AbsolutePressure              uint32    // Units: Pa; Includes atmospheric pressure
	Depth                         uint32    // Scale: 1000; Units: m; 0 if above water
	NextStopDepth                 uint32    // Scale: 1000; Units: m; 0 if above water
	NextStopTime                  uint32    // Units: s
	TimeToSurface                 uint32    // Units: s
	NdlTime                       uint32    // Units: s
	Grit                          float32   // The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	Flow                          float32   // The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	AirTimeRemaining              uint32    // Units: s
	AscentRate                    int32     // Scale: 1000; Units: m/s
	Altitude                      uint16    // Scale: 5; Offset: 500; Units: m
	Speed                         uint16    // Scale: 1000; Units: m/s
	Power                         uint16    // Units: watts
	Grade                         int16     // Scale: 100; Units: %
	CompressedAccumulatedPower    uint16    // Units: watts
	VerticalSpeed                 int16     // Scale: 1000; Units: m/s
	Calories                      uint16    // Units: kcal
	VerticalOscillation           uint16    // Scale: 10; Units: mm
	StanceTimePercent             uint16    // Scale: 100; Units: percent
	StanceTime                    uint16    // Scale: 10; Units: ms
	BallSpeed                     uint16    // Scale: 100; Units: m/s
	Cadence256                    uint16    // Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatibility
	TotalHemoglobinConc           uint16    // Scale: 100; Units: g/dL; Total saturated and unsaturated hemoglobin
	TotalHemoglobinConcMin        uint16    // Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin
	TotalHemoglobinConcMax        uint16    // Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin
	SaturatedHemoglobinPercent    uint16    // Scale: 10; Units: %; Percentage of hemoglobin saturated with oxygen
	SaturatedHemoglobinPercentMin uint16    // Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen
	SaturatedHemoglobinPercentMax uint16    // Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen
	MotorPower                    uint16    // Units: watts; lev motor power
	VerticalRatio                 uint16    // Scale: 100; Units: percent
	StanceTimeBalance             uint16    // Scale: 100; Units: percent
	StepLength                    uint16    // Scale: 10; Units: mm
	CycleLength16                 uint16    // Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35
	N2Load                        uint16    // Units: percent
	EnhancedRespirationRate       uint16    // Scale: 100; Units: Breaths/min
	CurrentStress                 uint16    // Scale: 100; Current Stress value
	EbikeTravelRange              uint16    // Units: km
	PressureSac                   uint16    // Scale: 100; Units: bar/min; Pressure-based surface air consumption
	VolumeSac                     uint16    // Scale: 100; Units: L/min; Volumetric surface air consumption
	Rmv                           uint16    // Scale: 100; Units: L/min; Respiratory minute volume
	CoreTemperature               uint16    // Scale: 100; Units: C
	CompressedSpeedDistance       [3]byte   // Array: [3]; Units: m/s,m
	HeartRate                     uint8     // Units: bpm
	Cadence                       uint8     // Units: rpm
	Resistance                    uint8     // Relative. 0 is none 254 is Max.
	CycleLength                   uint8     // Scale: 100; Units: m
	Temperature                   int8      // Units: C
	Cycles                        uint8     // Units: cycles
	LeftRightBalance              typedef.LeftRightBalance
	GpsAccuracy                   uint8 // Units: m
	ActivityType                  typedef.ActivityType
	LeftTorqueEffectiveness       uint8 // Scale: 2; Units: percent
	RightTorqueEffectiveness      uint8 // Scale: 2; Units: percent
	LeftPedalSmoothness           uint8 // Scale: 2; Units: percent
	RightPedalSmoothness          uint8 // Scale: 2; Units: percent
	CombinedPedalSmoothness       uint8 // Scale: 2; Units: percent
	Time128                       uint8 // Scale: 128; Units: s
	StrokeType                    typedef.StrokeType
	Zone                          uint8
	FractionalCadence             uint8 // Scale: 128; Units: rpm
	DeviceIndex                   typedef.DeviceIndex
	LeftPco                       int8  // Units: mm; Left platform center offset
	RightPco                      int8  // Units: mm; Right platform center offset
	BatterySoc                    uint8 // Scale: 2; Units: percent; lev battery state of charge
	CnsLoad                       uint8 // Units: percent
	RespirationRate               uint8 // Units: s
	EbikeBatteryLevel             uint8 // Units: percent
	EbikeAssistMode               uint8 // Units: depends on sensor
	EbikeAssistLevelPercent       uint8 // Units: percent
	Po2                           uint8 // Scale: 100; Units: percent; Current partial pressure of oxygen

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Record is a Record message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewRecord

func NewRecord(mesg *proto.Message) *Record

NewRecord creates new Record struct based on given mesg. If mesg is nil, it will return Record with all fields being set to its corresponding invalid value.

func (*Record) AltitudeScaled added in v0.8.0

func (m *Record) AltitudeScaled() float64

AltitudeScaled return Altitude in its scaled value. If Altitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Record) AscentRateScaled added in v0.8.0

func (m *Record) AscentRateScaled() float64

AscentRateScaled return AscentRate in its scaled value. If AscentRate value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Record) BallSpeedScaled added in v0.8.0

func (m *Record) BallSpeedScaled() float64

BallSpeedScaled return BallSpeed in its scaled value. If BallSpeed value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m/s

func (*Record) BatterySocScaled added in v0.8.0

func (m *Record) BatterySocScaled() float64

BatterySocScaled return BatterySoc in its scaled value. If BatterySoc value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent; lev battery state of charge

func (*Record) Cadence256Scaled added in v0.8.0

func (m *Record) Cadence256Scaled() float64

Cadence256Scaled return Cadence256 in its scaled value. If Cadence256 value is invalid, float64 invalid value will be returned.

Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatibility

func (*Record) CombinedPedalSmoothnessScaled added in v0.8.0

func (m *Record) CombinedPedalSmoothnessScaled() float64

CombinedPedalSmoothnessScaled return CombinedPedalSmoothness in its scaled value. If CombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Record) CoreTemperatureScaled added in v0.8.0

func (m *Record) CoreTemperatureScaled() float64

CoreTemperatureScaled return CoreTemperature in its scaled value. If CoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Record) CurrentStressScaled added in v0.8.0

func (m *Record) CurrentStressScaled() float64

CurrentStressScaled return CurrentStress in its scaled value. If CurrentStress value is invalid, float64 invalid value will be returned.

Scale: 100; Current Stress value

func (*Record) CycleLength16Scaled added in v0.8.0

func (m *Record) CycleLength16Scaled() float64

CycleLength16Scaled return CycleLength16 in its scaled value. If CycleLength16 value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35

func (*Record) CycleLengthScaled added in v0.8.0

func (m *Record) CycleLengthScaled() float64

CycleLengthScaled return CycleLength in its scaled value. If CycleLength value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Record) DepthScaled added in v0.8.0

func (m *Record) DepthScaled() float64

DepthScaled return Depth in its scaled value. If Depth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Record) DistanceScaled added in v0.8.0

func (m *Record) DistanceScaled() float64

DistanceScaled return Distance in its scaled value. If Distance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Record) EnhancedAltitudeScaled added in v0.8.0

func (m *Record) EnhancedAltitudeScaled() float64

EnhancedAltitudeScaled return EnhancedAltitude in its scaled value. If EnhancedAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Record) EnhancedRespirationRateScaled added in v0.8.0

func (m *Record) EnhancedRespirationRateScaled() float64

EnhancedRespirationRateScaled return EnhancedRespirationRate in its scaled value. If EnhancedRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Record) EnhancedSpeedScaled added in v0.8.0

func (m *Record) EnhancedSpeedScaled() float64

EnhancedSpeedScaled return EnhancedSpeed in its scaled value. If EnhancedSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Record) FractionalCadenceScaled added in v0.8.0

func (m *Record) FractionalCadenceScaled() float64

FractionalCadenceScaled return FractionalCadence in its scaled value. If FractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm

func (*Record) GradeScaled added in v0.8.0

func (m *Record) GradeScaled() float64

GradeScaled return Grade in its scaled value. If Grade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Record) IsExpandedField added in v0.21.0

func (m *Record) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 5, 6, 19, 29, 73, 78, 108.

func (*Record) LeftPedalSmoothnessScaled added in v0.8.0

func (m *Record) LeftPedalSmoothnessScaled() float64

LeftPedalSmoothnessScaled return LeftPedalSmoothness in its scaled value. If LeftPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Record) LeftPowerPhasePeakScaled added in v0.8.0

func (m *Record) LeftPowerPhasePeakScaled() []float64

LeftPowerPhasePeakScaled return LeftPowerPhasePeak in its scaled value. If LeftPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) LeftPowerPhaseScaled added in v0.8.0

func (m *Record) LeftPowerPhaseScaled() []float64

LeftPowerPhaseScaled return LeftPowerPhase in its scaled value. If LeftPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase angles. Data value indexes defined by power_phase_type.

func (*Record) LeftTorqueEffectivenessScaled added in v0.8.0

func (m *Record) LeftTorqueEffectivenessScaled() float64

LeftTorqueEffectivenessScaled return LeftTorqueEffectiveness in its scaled value. If LeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Record) MarkAsExpandedField added in v0.21.0

func (m *Record) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 5, 6, 19, 29, 73, 78, 108.

func (*Record) NextStopDepthScaled added in v0.8.0

func (m *Record) NextStopDepthScaled() float64

NextStopDepthScaled return NextStopDepth in its scaled value. If NextStopDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Record) Po2Scaled added in v0.8.0

func (m *Record) Po2Scaled() float64

Po2Scaled return Po2 in its scaled value. If Po2 value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent; Current partial pressure of oxygen

func (*Record) PositionLatDegrees added in v0.15.0

func (m *Record) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*Record) PositionLongDegrees added in v0.15.0

func (m *Record) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*Record) PressureSacScaled added in v0.8.0

func (m *Record) PressureSacScaled() float64

PressureSacScaled return PressureSac in its scaled value. If PressureSac value is invalid, float64 invalid value will be returned.

Scale: 100; Units: bar/min; Pressure-based surface air consumption

func (*Record) RightPedalSmoothnessScaled added in v0.8.0

func (m *Record) RightPedalSmoothnessScaled() float64

RightPedalSmoothnessScaled return RightPedalSmoothness in its scaled value. If RightPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Record) RightPowerPhasePeakScaled added in v0.8.0

func (m *Record) RightPowerPhasePeakScaled() []float64

RightPowerPhasePeakScaled return RightPowerPhasePeak in its scaled value. If RightPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) RightPowerPhaseScaled added in v0.8.0

func (m *Record) RightPowerPhaseScaled() []float64

RightPowerPhaseScaled return RightPowerPhase in its scaled value. If RightPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase angles. Data value indexes defined by power_phase_type.

func (*Record) RightTorqueEffectivenessScaled added in v0.8.0

func (m *Record) RightTorqueEffectivenessScaled() float64

RightTorqueEffectivenessScaled return RightTorqueEffectiveness in its scaled value. If RightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Record) RmvScaled added in v0.8.0

func (m *Record) RmvScaled() float64

RmvScaled return Rmv in its scaled value. If Rmv value is invalid, float64 invalid value will be returned.

Scale: 100; Units: L/min; Respiratory minute volume

func (*Record) SaturatedHemoglobinPercentMaxScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentMaxScaled() float64

SaturatedHemoglobinPercentMaxScaled return SaturatedHemoglobinPercentMax in its scaled value. If SaturatedHemoglobinPercentMax value is invalid, float64 invalid value will be returned.

Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Record) SaturatedHemoglobinPercentMinScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentMinScaled() float64

SaturatedHemoglobinPercentMinScaled return SaturatedHemoglobinPercentMin in its scaled value. If SaturatedHemoglobinPercentMin value is invalid, float64 invalid value will be returned.

Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Record) SaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentScaled() float64

SaturatedHemoglobinPercentScaled return SaturatedHemoglobinPercent in its scaled value. If SaturatedHemoglobinPercent value is invalid, float64 invalid value will be returned.

Scale: 10; Units: %; Percentage of hemoglobin saturated with oxygen

func (*Record) SetAbsolutePressure added in v0.4.0

func (m *Record) SetAbsolutePressure(v uint32) *Record

SetAbsolutePressure sets AbsolutePressure value.

Units: Pa; Includes atmospheric pressure

func (*Record) SetAccumulatedPower added in v0.4.0

func (m *Record) SetAccumulatedPower(v uint32) *Record

SetAccumulatedPower sets AccumulatedPower value.

Units: watts

func (*Record) SetActivityType added in v0.4.0

func (m *Record) SetActivityType(v typedef.ActivityType) *Record

SetActivityType sets ActivityType value.

func (*Record) SetAirTimeRemaining added in v0.4.0

func (m *Record) SetAirTimeRemaining(v uint32) *Record

SetAirTimeRemaining sets AirTimeRemaining value.

Units: s

func (*Record) SetAltitude added in v0.4.0

func (m *Record) SetAltitude(v uint16) *Record

SetAltitude sets Altitude value.

Scale: 5; Offset: 500; Units: m

func (*Record) SetAltitudeScaled added in v0.17.2

func (m *Record) SetAltitudeScaled(v float64) *Record

SetAltitudeScaled is similar to SetAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Record) SetAscentRate added in v0.4.0

func (m *Record) SetAscentRate(v int32) *Record

SetAscentRate sets AscentRate value.

Scale: 1000; Units: m/s

func (*Record) SetAscentRateScaled added in v0.17.2

func (m *Record) SetAscentRateScaled(v float64) *Record

SetAscentRateScaled is similar to SetAscentRate except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Record) SetBallSpeed added in v0.4.0

func (m *Record) SetBallSpeed(v uint16) *Record

SetBallSpeed sets BallSpeed value.

Scale: 100; Units: m/s

func (*Record) SetBallSpeedScaled added in v0.17.2

func (m *Record) SetBallSpeedScaled(v float64) *Record

SetBallSpeedScaled is similar to SetBallSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m/s

func (*Record) SetBatterySoc added in v0.4.0

func (m *Record) SetBatterySoc(v uint8) *Record

SetBatterySoc sets BatterySoc value.

Scale: 2; Units: percent; lev battery state of charge

func (*Record) SetBatterySocScaled added in v0.17.2

func (m *Record) SetBatterySocScaled(v float64) *Record

SetBatterySocScaled is similar to SetBatterySoc except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent; lev battery state of charge

func (*Record) SetCadence added in v0.4.0

func (m *Record) SetCadence(v uint8) *Record

SetCadence sets Cadence value.

Units: rpm

func (*Record) SetCadence256 added in v0.4.0

func (m *Record) SetCadence256(v uint16) *Record

SetCadence256 sets Cadence256 value.

Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatibility

func (*Record) SetCadence256Scaled added in v0.17.2

func (m *Record) SetCadence256Scaled(v float64) *Record

SetCadence256Scaled is similar to SetCadence256 except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatibility

func (*Record) SetCalories added in v0.4.0

func (m *Record) SetCalories(v uint16) *Record

SetCalories sets Calories value.

Units: kcal

func (*Record) SetCnsLoad added in v0.4.0

func (m *Record) SetCnsLoad(v uint8) *Record

SetCnsLoad sets CnsLoad value.

Units: percent

func (*Record) SetCombinedPedalSmoothness added in v0.4.0

func (m *Record) SetCombinedPedalSmoothness(v uint8) *Record

SetCombinedPedalSmoothness sets CombinedPedalSmoothness value.

Scale: 2; Units: percent

func (*Record) SetCombinedPedalSmoothnessScaled added in v0.17.2

func (m *Record) SetCombinedPedalSmoothnessScaled(v float64) *Record

SetCombinedPedalSmoothnessScaled is similar to SetCombinedPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Record) SetCompressedAccumulatedPower added in v0.4.0

func (m *Record) SetCompressedAccumulatedPower(v uint16) *Record

SetCompressedAccumulatedPower sets CompressedAccumulatedPower value.

Units: watts

func (*Record) SetCompressedSpeedDistance added in v0.4.0

func (m *Record) SetCompressedSpeedDistance(v [3]byte) *Record

SetCompressedSpeedDistance sets CompressedSpeedDistance value.

Array: [3]; Units: m/s,m

func (*Record) SetCoreTemperature added in v0.4.0

func (m *Record) SetCoreTemperature(v uint16) *Record

SetCoreTemperature sets CoreTemperature value.

Scale: 100; Units: C

func (*Record) SetCoreTemperatureScaled added in v0.17.2

func (m *Record) SetCoreTemperatureScaled(v float64) *Record

SetCoreTemperatureScaled is similar to SetCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Record) SetCurrentStress added in v0.4.0

func (m *Record) SetCurrentStress(v uint16) *Record

SetCurrentStress sets CurrentStress value.

Scale: 100; Current Stress value

func (*Record) SetCurrentStressScaled added in v0.17.2

func (m *Record) SetCurrentStressScaled(v float64) *Record

SetCurrentStressScaled is similar to SetCurrentStress except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Current Stress value

func (*Record) SetCycleLength added in v0.4.0

func (m *Record) SetCycleLength(v uint8) *Record

SetCycleLength sets CycleLength value.

Scale: 100; Units: m

func (*Record) SetCycleLength16 added in v0.4.0

func (m *Record) SetCycleLength16(v uint16) *Record

SetCycleLength16 sets CycleLength16 value.

Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35

func (*Record) SetCycleLength16Scaled added in v0.17.2

func (m *Record) SetCycleLength16Scaled(v float64) *Record

SetCycleLength16Scaled is similar to SetCycleLength16 except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35

func (*Record) SetCycleLengthScaled added in v0.17.2

func (m *Record) SetCycleLengthScaled(v float64) *Record

SetCycleLengthScaled is similar to SetCycleLength except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Record) SetCycles added in v0.4.0

func (m *Record) SetCycles(v uint8) *Record

SetCycles sets Cycles value.

Units: cycles

func (*Record) SetDepth added in v0.4.0

func (m *Record) SetDepth(v uint32) *Record

SetDepth sets Depth value.

Scale: 1000; Units: m; 0 if above water

func (*Record) SetDepthScaled added in v0.17.2

func (m *Record) SetDepthScaled(v float64) *Record

SetDepthScaled is similar to SetDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Record) SetDeveloperFields added in v0.4.0

func (m *Record) SetDeveloperFields(developerFields ...proto.DeveloperField) *Record

SetDeveloperFields sets DeveloperFields.

func (*Record) SetDeviceIndex added in v0.4.0

func (m *Record) SetDeviceIndex(v typedef.DeviceIndex) *Record

SetDeviceIndex sets DeviceIndex value.

func (*Record) SetDistance added in v0.4.0

func (m *Record) SetDistance(v uint32) *Record

SetDistance sets Distance value.

Scale: 100; Units: m

func (*Record) SetDistanceScaled added in v0.17.2

func (m *Record) SetDistanceScaled(v float64) *Record

SetDistanceScaled is similar to SetDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Record) SetEbikeAssistLevelPercent added in v0.4.0

func (m *Record) SetEbikeAssistLevelPercent(v uint8) *Record

SetEbikeAssistLevelPercent sets EbikeAssistLevelPercent value.

Units: percent

func (*Record) SetEbikeAssistMode added in v0.4.0

func (m *Record) SetEbikeAssistMode(v uint8) *Record

SetEbikeAssistMode sets EbikeAssistMode value.

Units: depends on sensor

func (*Record) SetEbikeBatteryLevel added in v0.4.0

func (m *Record) SetEbikeBatteryLevel(v uint8) *Record

SetEbikeBatteryLevel sets EbikeBatteryLevel value.

Units: percent

func (*Record) SetEbikeTravelRange added in v0.4.0

func (m *Record) SetEbikeTravelRange(v uint16) *Record

SetEbikeTravelRange sets EbikeTravelRange value.

Units: km

func (*Record) SetEnhancedAltitude added in v0.4.0

func (m *Record) SetEnhancedAltitude(v uint32) *Record

SetEnhancedAltitude sets EnhancedAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Record) SetEnhancedAltitudeScaled added in v0.17.2

func (m *Record) SetEnhancedAltitudeScaled(v float64) *Record

SetEnhancedAltitudeScaled is similar to SetEnhancedAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Record) SetEnhancedRespirationRate added in v0.4.0

func (m *Record) SetEnhancedRespirationRate(v uint16) *Record

SetEnhancedRespirationRate sets EnhancedRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Record) SetEnhancedRespirationRateScaled added in v0.17.2

func (m *Record) SetEnhancedRespirationRateScaled(v float64) *Record

SetEnhancedRespirationRateScaled is similar to SetEnhancedRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Record) SetEnhancedSpeed added in v0.4.0

func (m *Record) SetEnhancedSpeed(v uint32) *Record

SetEnhancedSpeed sets EnhancedSpeed value.

Scale: 1000; Units: m/s

func (*Record) SetEnhancedSpeedScaled added in v0.17.2

func (m *Record) SetEnhancedSpeedScaled(v float64) *Record

SetEnhancedSpeedScaled is similar to SetEnhancedSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Record) SetFlow added in v0.4.0

func (m *Record) SetFlow(v float32) *Record

SetFlow sets Flow value.

The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*Record) SetFractionalCadence added in v0.4.0

func (m *Record) SetFractionalCadence(v uint8) *Record

SetFractionalCadence sets FractionalCadence value.

Scale: 128; Units: rpm

func (*Record) SetFractionalCadenceScaled added in v0.17.2

func (m *Record) SetFractionalCadenceScaled(v float64) *Record

SetFractionalCadenceScaled is similar to SetFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm

func (*Record) SetGpsAccuracy added in v0.4.0

func (m *Record) SetGpsAccuracy(v uint8) *Record

SetGpsAccuracy sets GpsAccuracy value.

Units: m

func (*Record) SetGrade added in v0.4.0

func (m *Record) SetGrade(v int16) *Record

SetGrade sets Grade value.

Scale: 100; Units: %

func (*Record) SetGradeScaled added in v0.17.2

func (m *Record) SetGradeScaled(v float64) *Record

SetGradeScaled is similar to SetGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Record) SetGrit added in v0.4.0

func (m *Record) SetGrit(v float32) *Record

SetGrit sets Grit value.

The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*Record) SetHeartRate added in v0.4.0

func (m *Record) SetHeartRate(v uint8) *Record

SetHeartRate sets HeartRate value.

Units: bpm

func (*Record) SetLeftPco added in v0.4.0

func (m *Record) SetLeftPco(v int8) *Record

SetLeftPco sets LeftPco value.

Units: mm; Left platform center offset

func (*Record) SetLeftPedalSmoothness added in v0.4.0

func (m *Record) SetLeftPedalSmoothness(v uint8) *Record

SetLeftPedalSmoothness sets LeftPedalSmoothness value.

Scale: 2; Units: percent

func (*Record) SetLeftPedalSmoothnessScaled added in v0.17.2

func (m *Record) SetLeftPedalSmoothnessScaled(v float64) *Record

SetLeftPedalSmoothnessScaled is similar to SetLeftPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Record) SetLeftPowerPhase added in v0.4.0

func (m *Record) SetLeftPowerPhase(v []uint8) *Record

SetLeftPowerPhase sets LeftPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase angles. Data value indexes defined by power_phase_type.

func (*Record) SetLeftPowerPhasePeak added in v0.4.0

func (m *Record) SetLeftPowerPhasePeak(v []uint8) *Record

SetLeftPowerPhasePeak sets LeftPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) SetLeftPowerPhasePeakScaled added in v0.17.2

func (m *Record) SetLeftPowerPhasePeakScaled(vs []float64) *Record

SetLeftPowerPhasePeakScaled is similar to SetLeftPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) SetLeftPowerPhaseScaled added in v0.17.2

func (m *Record) SetLeftPowerPhaseScaled(vs []float64) *Record

SetLeftPowerPhaseScaled is similar to SetLeftPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase angles. Data value indexes defined by power_phase_type.

func (*Record) SetLeftRightBalance added in v0.4.0

func (m *Record) SetLeftRightBalance(v typedef.LeftRightBalance) *Record

SetLeftRightBalance sets LeftRightBalance value.

func (*Record) SetLeftTorqueEffectiveness added in v0.4.0

func (m *Record) SetLeftTorqueEffectiveness(v uint8) *Record

SetLeftTorqueEffectiveness sets LeftTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Record) SetLeftTorqueEffectivenessScaled added in v0.17.2

func (m *Record) SetLeftTorqueEffectivenessScaled(v float64) *Record

SetLeftTorqueEffectivenessScaled is similar to SetLeftTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Record) SetMotorPower added in v0.4.0

func (m *Record) SetMotorPower(v uint16) *Record

SetMotorPower sets MotorPower value.

Units: watts; lev motor power

func (*Record) SetN2Load added in v0.4.0

func (m *Record) SetN2Load(v uint16) *Record

SetN2Load sets N2Load value.

Units: percent

func (*Record) SetNdlTime added in v0.4.0

func (m *Record) SetNdlTime(v uint32) *Record

SetNdlTime sets NdlTime value.

Units: s

func (*Record) SetNextStopDepth added in v0.4.0

func (m *Record) SetNextStopDepth(v uint32) *Record

SetNextStopDepth sets NextStopDepth value.

Scale: 1000; Units: m; 0 if above water

func (*Record) SetNextStopDepthScaled added in v0.17.2

func (m *Record) SetNextStopDepthScaled(v float64) *Record

SetNextStopDepthScaled is similar to SetNextStopDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Record) SetNextStopTime added in v0.4.0

func (m *Record) SetNextStopTime(v uint32) *Record

SetNextStopTime sets NextStopTime value.

Units: s

func (*Record) SetPo2 added in v0.4.0

func (m *Record) SetPo2(v uint8) *Record

SetPo2 sets Po2 value.

Scale: 100; Units: percent; Current partial pressure of oxygen

func (*Record) SetPo2Scaled added in v0.17.2

func (m *Record) SetPo2Scaled(v float64) *Record

SetPo2Scaled is similar to SetPo2 except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: percent; Current partial pressure of oxygen

func (*Record) SetPositionLat added in v0.4.0

func (m *Record) SetPositionLat(v int32) *Record

SetPositionLat sets PositionLat value.

Units: semicircles

func (*Record) SetPositionLatDegrees added in v0.17.2

func (m *Record) SetPositionLatDegrees(degrees float64) *Record

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Record) SetPositionLong added in v0.4.0

func (m *Record) SetPositionLong(v int32) *Record

SetPositionLong sets PositionLong value.

Units: semicircles

func (*Record) SetPositionLongDegrees added in v0.17.2

func (m *Record) SetPositionLongDegrees(degrees float64) *Record

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Record) SetPower added in v0.4.0

func (m *Record) SetPower(v uint16) *Record

SetPower sets Power value.

Units: watts

func (*Record) SetPressureSac added in v0.4.0

func (m *Record) SetPressureSac(v uint16) *Record

SetPressureSac sets PressureSac value.

Scale: 100; Units: bar/min; Pressure-based surface air consumption

func (*Record) SetPressureSacScaled added in v0.17.2

func (m *Record) SetPressureSacScaled(v float64) *Record

SetPressureSacScaled is similar to SetPressureSac except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: bar/min; Pressure-based surface air consumption

func (*Record) SetResistance added in v0.4.0

func (m *Record) SetResistance(v uint8) *Record

SetResistance sets Resistance value.

Relative. 0 is none 254 is Max.

func (*Record) SetRespirationRate added in v0.4.0

func (m *Record) SetRespirationRate(v uint8) *Record

SetRespirationRate sets RespirationRate value.

Units: s

func (*Record) SetRightPco added in v0.4.0

func (m *Record) SetRightPco(v int8) *Record

SetRightPco sets RightPco value.

Units: mm; Right platform center offset

func (*Record) SetRightPedalSmoothness added in v0.4.0

func (m *Record) SetRightPedalSmoothness(v uint8) *Record

SetRightPedalSmoothness sets RightPedalSmoothness value.

Scale: 2; Units: percent

func (*Record) SetRightPedalSmoothnessScaled added in v0.17.2

func (m *Record) SetRightPedalSmoothnessScaled(v float64) *Record

SetRightPedalSmoothnessScaled is similar to SetRightPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Record) SetRightPowerPhase added in v0.4.0

func (m *Record) SetRightPowerPhase(v []uint8) *Record

SetRightPowerPhase sets RightPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase angles. Data value indexes defined by power_phase_type.

func (*Record) SetRightPowerPhasePeak added in v0.4.0

func (m *Record) SetRightPowerPhasePeak(v []uint8) *Record

SetRightPowerPhasePeak sets RightPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) SetRightPowerPhasePeakScaled added in v0.17.2

func (m *Record) SetRightPowerPhasePeakScaled(vs []float64) *Record

SetRightPowerPhasePeakScaled is similar to SetRightPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak angles. Data value indexes defined by power_phase_type.

func (*Record) SetRightPowerPhaseScaled added in v0.17.2

func (m *Record) SetRightPowerPhaseScaled(vs []float64) *Record

SetRightPowerPhaseScaled is similar to SetRightPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase angles. Data value indexes defined by power_phase_type.

func (*Record) SetRightTorqueEffectiveness added in v0.4.0

func (m *Record) SetRightTorqueEffectiveness(v uint8) *Record

SetRightTorqueEffectiveness sets RightTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Record) SetRightTorqueEffectivenessScaled added in v0.17.2

func (m *Record) SetRightTorqueEffectivenessScaled(v float64) *Record

SetRightTorqueEffectivenessScaled is similar to SetRightTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Record) SetRmv added in v0.4.0

func (m *Record) SetRmv(v uint16) *Record

SetRmv sets Rmv value.

Scale: 100; Units: L/min; Respiratory minute volume

func (*Record) SetRmvScaled added in v0.17.2

func (m *Record) SetRmvScaled(v float64) *Record

SetRmvScaled is similar to SetRmv except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: L/min; Respiratory minute volume

func (*Record) SetSaturatedHemoglobinPercent added in v0.4.0

func (m *Record) SetSaturatedHemoglobinPercent(v uint16) *Record

SetSaturatedHemoglobinPercent sets SaturatedHemoglobinPercent value.

Scale: 10; Units: %; Percentage of hemoglobin saturated with oxygen

func (*Record) SetSaturatedHemoglobinPercentMax added in v0.4.0

func (m *Record) SetSaturatedHemoglobinPercentMax(v uint16) *Record

SetSaturatedHemoglobinPercentMax sets SaturatedHemoglobinPercentMax value.

Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Record) SetSaturatedHemoglobinPercentMaxScaled added in v0.17.2

func (m *Record) SetSaturatedHemoglobinPercentMaxScaled(v float64) *Record

SetSaturatedHemoglobinPercentMaxScaled is similar to SetSaturatedHemoglobinPercentMax except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Record) SetSaturatedHemoglobinPercentMin added in v0.4.0

func (m *Record) SetSaturatedHemoglobinPercentMin(v uint16) *Record

SetSaturatedHemoglobinPercentMin sets SaturatedHemoglobinPercentMin value.

Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Record) SetSaturatedHemoglobinPercentMinScaled added in v0.17.2

func (m *Record) SetSaturatedHemoglobinPercentMinScaled(v float64) *Record

SetSaturatedHemoglobinPercentMinScaled is similar to SetSaturatedHemoglobinPercentMin except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Record) SetSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Record) SetSaturatedHemoglobinPercentScaled(v float64) *Record

SetSaturatedHemoglobinPercentScaled is similar to SetSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: %; Percentage of hemoglobin saturated with oxygen

func (*Record) SetSpeed added in v0.4.0

func (m *Record) SetSpeed(v uint16) *Record

SetSpeed sets Speed value.

Scale: 1000; Units: m/s

func (*Record) SetSpeed1S added in v0.4.0

func (m *Record) SetSpeed1S(v []uint8) *Record

SetSpeed1S sets Speed1S value.

Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.

func (*Record) SetSpeed1SScaled added in v0.17.2

func (m *Record) SetSpeed1SScaled(vs []float64) *Record

SetSpeed1SScaled is similar to SetSpeed1S except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.

func (*Record) SetSpeedScaled added in v0.17.2

func (m *Record) SetSpeedScaled(v float64) *Record

SetSpeedScaled is similar to SetSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Record) SetStanceTime added in v0.4.0

func (m *Record) SetStanceTime(v uint16) *Record

SetStanceTime sets StanceTime value.

Scale: 10; Units: ms

func (*Record) SetStanceTimeBalance added in v0.4.0

func (m *Record) SetStanceTimeBalance(v uint16) *Record

SetStanceTimeBalance sets StanceTimeBalance value.

Scale: 100; Units: percent

func (*Record) SetStanceTimeBalanceScaled added in v0.17.2

func (m *Record) SetStanceTimeBalanceScaled(v float64) *Record

SetStanceTimeBalanceScaled is similar to SetStanceTimeBalance except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Record) SetStanceTimePercent added in v0.4.0

func (m *Record) SetStanceTimePercent(v uint16) *Record

SetStanceTimePercent sets StanceTimePercent value.

Scale: 100; Units: percent

func (*Record) SetStanceTimePercentScaled added in v0.17.2

func (m *Record) SetStanceTimePercentScaled(v float64) *Record

SetStanceTimePercentScaled is similar to SetStanceTimePercent except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Record) SetStanceTimeScaled added in v0.17.2

func (m *Record) SetStanceTimeScaled(v float64) *Record

SetStanceTimeScaled is similar to SetStanceTime except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: ms

func (*Record) SetStepLength added in v0.4.0

func (m *Record) SetStepLength(v uint16) *Record

SetStepLength sets StepLength value.

Scale: 10; Units: mm

func (*Record) SetStepLengthScaled added in v0.17.2

func (m *Record) SetStepLengthScaled(v float64) *Record

SetStepLengthScaled is similar to SetStepLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Record) SetStrokeType added in v0.4.0

func (m *Record) SetStrokeType(v typedef.StrokeType) *Record

SetStrokeType sets StrokeType value.

func (*Record) SetTemperature added in v0.4.0

func (m *Record) SetTemperature(v int8) *Record

SetTemperature sets Temperature value.

Units: C

func (*Record) SetTime128 added in v0.4.0

func (m *Record) SetTime128(v uint8) *Record

SetTime128 sets Time128 value.

Scale: 128; Units: s

func (*Record) SetTime128Scaled added in v0.17.2

func (m *Record) SetTime128Scaled(v float64) *Record

SetTime128Scaled is similar to SetTime128 except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: s

func (*Record) SetTimeFromCourse added in v0.4.0

func (m *Record) SetTimeFromCourse(v int32) *Record

SetTimeFromCourse sets TimeFromCourse value.

Scale: 1000; Units: s

func (*Record) SetTimeFromCourseScaled added in v0.17.2

func (m *Record) SetTimeFromCourseScaled(v float64) *Record

SetTimeFromCourseScaled is similar to SetTimeFromCourse except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Record) SetTimeToSurface added in v0.4.0

func (m *Record) SetTimeToSurface(v uint32) *Record

SetTimeToSurface sets TimeToSurface value.

Units: s

func (*Record) SetTimestamp added in v0.4.0

func (m *Record) SetTimestamp(v time.Time) *Record

SetTimestamp sets Timestamp value.

Units: s

func (*Record) SetTotalCycles added in v0.4.0

func (m *Record) SetTotalCycles(v uint32) *Record

SetTotalCycles sets TotalCycles value.

Units: cycles

func (*Record) SetTotalHemoglobinConc added in v0.4.0

func (m *Record) SetTotalHemoglobinConc(v uint16) *Record

SetTotalHemoglobinConc sets TotalHemoglobinConc value.

Scale: 100; Units: g/dL; Total saturated and unsaturated hemoglobin

func (*Record) SetTotalHemoglobinConcMax added in v0.4.0

func (m *Record) SetTotalHemoglobinConcMax(v uint16) *Record

SetTotalHemoglobinConcMax sets TotalHemoglobinConcMax value.

Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Record) SetTotalHemoglobinConcMaxScaled added in v0.17.2

func (m *Record) SetTotalHemoglobinConcMaxScaled(v float64) *Record

SetTotalHemoglobinConcMaxScaled is similar to SetTotalHemoglobinConcMax except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Record) SetTotalHemoglobinConcMin added in v0.4.0

func (m *Record) SetTotalHemoglobinConcMin(v uint16) *Record

SetTotalHemoglobinConcMin sets TotalHemoglobinConcMin value.

Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Record) SetTotalHemoglobinConcMinScaled added in v0.17.2

func (m *Record) SetTotalHemoglobinConcMinScaled(v float64) *Record

SetTotalHemoglobinConcMinScaled is similar to SetTotalHemoglobinConcMin except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Record) SetTotalHemoglobinConcScaled added in v0.17.2

func (m *Record) SetTotalHemoglobinConcScaled(v float64) *Record

SetTotalHemoglobinConcScaled is similar to SetTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: g/dL; Total saturated and unsaturated hemoglobin

func (*Record) SetUnknownFields added in v0.23.6

func (m *Record) SetUnknownFields(unknownFields ...proto.Field) *Record

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Record) SetVerticalOscillation added in v0.4.0

func (m *Record) SetVerticalOscillation(v uint16) *Record

SetVerticalOscillation sets VerticalOscillation value.

Scale: 10; Units: mm

func (*Record) SetVerticalOscillationScaled added in v0.17.2

func (m *Record) SetVerticalOscillationScaled(v float64) *Record

SetVerticalOscillationScaled is similar to SetVerticalOscillation except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Record) SetVerticalRatio added in v0.4.0

func (m *Record) SetVerticalRatio(v uint16) *Record

SetVerticalRatio sets VerticalRatio value.

Scale: 100; Units: percent

func (*Record) SetVerticalRatioScaled added in v0.17.2

func (m *Record) SetVerticalRatioScaled(v float64) *Record

SetVerticalRatioScaled is similar to SetVerticalRatio except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Record) SetVerticalSpeed added in v0.4.0

func (m *Record) SetVerticalSpeed(v int16) *Record

SetVerticalSpeed sets VerticalSpeed value.

Scale: 1000; Units: m/s

func (*Record) SetVerticalSpeedScaled added in v0.17.2

func (m *Record) SetVerticalSpeedScaled(v float64) *Record

SetVerticalSpeedScaled is similar to SetVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Record) SetVolumeSac added in v0.4.0

func (m *Record) SetVolumeSac(v uint16) *Record

SetVolumeSac sets VolumeSac value.

Scale: 100; Units: L/min; Volumetric surface air consumption

func (*Record) SetVolumeSacScaled added in v0.17.2

func (m *Record) SetVolumeSacScaled(v float64) *Record

SetVolumeSacScaled is similar to SetVolumeSac except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: L/min; Volumetric surface air consumption

func (*Record) SetZone added in v0.4.0

func (m *Record) SetZone(v uint8) *Record

SetZone sets Zone value.

func (*Record) Speed1SScaled added in v0.8.0

func (m *Record) Speed1SScaled() []float64

Speed1SScaled return Speed1S in its scaled value. If Speed1S value is invalid, nil will be returned.

Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.

func (*Record) SpeedScaled added in v0.8.0

func (m *Record) SpeedScaled() float64

SpeedScaled return Speed in its scaled value. If Speed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Record) StanceTimeBalanceScaled added in v0.8.0

func (m *Record) StanceTimeBalanceScaled() float64

StanceTimeBalanceScaled return StanceTimeBalance in its scaled value. If StanceTimeBalance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Record) StanceTimePercentScaled added in v0.8.0

func (m *Record) StanceTimePercentScaled() float64

StanceTimePercentScaled return StanceTimePercent in its scaled value. If StanceTimePercent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Record) StanceTimeScaled added in v0.8.0

func (m *Record) StanceTimeScaled() float64

StanceTimeScaled return StanceTime in its scaled value. If StanceTime value is invalid, float64 invalid value will be returned.

Scale: 10; Units: ms

func (*Record) StepLengthScaled added in v0.8.0

func (m *Record) StepLengthScaled() float64

StepLengthScaled return StepLength in its scaled value. If StepLength value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Record) Time128Scaled added in v0.8.0

func (m *Record) Time128Scaled() float64

Time128Scaled return Time128 in its scaled value. If Time128 value is invalid, float64 invalid value will be returned.

Scale: 128; Units: s

func (*Record) TimeFromCourseScaled added in v0.8.0

func (m *Record) TimeFromCourseScaled() float64

TimeFromCourseScaled return TimeFromCourse in its scaled value. If TimeFromCourse value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Record) TimestampUint32 added in v0.15.0

func (m *Record) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Record) ToMesg added in v0.3.0

func (m *Record) ToMesg(options *Options) proto.Message

ToMesg converts Record into proto.Message. If options is nil, default options will be used.

func (*Record) TotalHemoglobinConcMaxScaled added in v0.8.0

func (m *Record) TotalHemoglobinConcMaxScaled() float64

TotalHemoglobinConcMaxScaled return TotalHemoglobinConcMax in its scaled value. If TotalHemoglobinConcMax value is invalid, float64 invalid value will be returned.

Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Record) TotalHemoglobinConcMinScaled added in v0.8.0

func (m *Record) TotalHemoglobinConcMinScaled() float64

TotalHemoglobinConcMinScaled return TotalHemoglobinConcMin in its scaled value. If TotalHemoglobinConcMin value is invalid, float64 invalid value will be returned.

Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Record) TotalHemoglobinConcScaled added in v0.8.0

func (m *Record) TotalHemoglobinConcScaled() float64

TotalHemoglobinConcScaled return TotalHemoglobinConc in its scaled value. If TotalHemoglobinConc value is invalid, float64 invalid value will be returned.

Scale: 100; Units: g/dL; Total saturated and unsaturated hemoglobin

func (*Record) VerticalOscillationScaled added in v0.8.0

func (m *Record) VerticalOscillationScaled() float64

VerticalOscillationScaled return VerticalOscillation in its scaled value. If VerticalOscillation value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Record) VerticalRatioScaled added in v0.8.0

func (m *Record) VerticalRatioScaled() float64

VerticalRatioScaled return VerticalRatio in its scaled value. If VerticalRatio value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Record) VerticalSpeedScaled added in v0.8.0

func (m *Record) VerticalSpeedScaled() float64

VerticalSpeedScaled return VerticalSpeed in its scaled value. If VerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Record) VolumeSacScaled added in v0.8.0

func (m *Record) VolumeSacScaled() float64

VolumeSacScaled return VolumeSac in its scaled value. If VolumeSac value is invalid, float64 invalid value will be returned.

Scale: 100; Units: L/min; Volumetric surface air consumption

type RespirationRate

type RespirationRate struct {
	Timestamp       time.Time
	RespirationRate int16 // Scale: 100; Units: breaths/min; Breaths * 100 /min, -300 indicates invalid, -200 indicates large motion, -100 indicates off wrist

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

RespirationRate is a RespirationRate message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewRespirationRate

func NewRespirationRate(mesg *proto.Message) *RespirationRate

NewRespirationRate creates new RespirationRate struct based on given mesg. If mesg is nil, it will return RespirationRate with all fields being set to its corresponding invalid value.

func (*RespirationRate) RespirationRateScaled added in v0.8.0

func (m *RespirationRate) RespirationRateScaled() float64

RespirationRateScaled return RespirationRate in its scaled value. If RespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: breaths/min; Breaths * 100 /min, -300 indicates invalid, -200 indicates large motion, -100 indicates off wrist

func (*RespirationRate) SetDeveloperFields added in v0.4.0

func (m *RespirationRate) SetDeveloperFields(developerFields ...proto.DeveloperField) *RespirationRate

SetDeveloperFields sets DeveloperFields.

func (*RespirationRate) SetRespirationRate added in v0.4.0

func (m *RespirationRate) SetRespirationRate(v int16) *RespirationRate

SetRespirationRate sets RespirationRate value.

Scale: 100; Units: breaths/min; Breaths * 100 /min, -300 indicates invalid, -200 indicates large motion, -100 indicates off wrist

func (*RespirationRate) SetRespirationRateScaled added in v0.17.2

func (m *RespirationRate) SetRespirationRateScaled(v float64) *RespirationRate

SetRespirationRateScaled is similar to SetRespirationRate except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: breaths/min; Breaths * 100 /min, -300 indicates invalid, -200 indicates large motion, -100 indicates off wrist

func (*RespirationRate) SetTimestamp added in v0.4.0

func (m *RespirationRate) SetTimestamp(v time.Time) *RespirationRate

SetTimestamp sets Timestamp value.

func (*RespirationRate) SetUnknownFields added in v0.23.6

func (m *RespirationRate) SetUnknownFields(unknownFields ...proto.Field) *RespirationRate

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*RespirationRate) TimestampUint32 added in v0.15.0

func (m *RespirationRate) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*RespirationRate) ToMesg added in v0.3.0

func (m *RespirationRate) ToMesg(options *Options) proto.Message

ToMesg converts RespirationRate into proto.Message. If options is nil, default options will be used.

type Schedule

type Schedule struct {
	TimeCreated   time.Time // Corresponds to file_id of scheduled workout / course.
	ScheduledTime time.Time
	SerialNumber  uint32               // Base: uint32z; Corresponds to file_id of scheduled workout / course.
	Manufacturer  typedef.Manufacturer // Corresponds to file_id of scheduled workout / course.
	Product       uint16               // Corresponds to file_id of scheduled workout / course.
	Completed     typedef.Bool         // TRUE if this activity has been started
	Type          typedef.Schedule

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Schedule is a Schedule message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSchedule

func NewSchedule(mesg *proto.Message) *Schedule

NewSchedule creates new Schedule struct based on given mesg. If mesg is nil, it will return Schedule with all fields being set to its corresponding invalid value.

func (*Schedule) GetProduct added in v0.16.0

func (m *Schedule) GetProduct() (name string, value any)

GetProduct returns Dynamic Field interpretation of Product. Otherwise, returns the original value of Product.

Based on m.Manufacturer:

  • name: "favero_product", value: typedef.FaveroProduct(m.Product)
  • name: "garmin_product", value: typedef.GarminProduct(m.Product)

Otherwise:

  • name: "product", value: m.Product

func (*Schedule) ScheduledTimeUint32 added in v0.15.0

func (m *Schedule) ScheduledTimeUint32() uint32

ScheduledTimeUint32 returns ScheduledTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Schedule) SetCompleted added in v0.4.0

func (m *Schedule) SetCompleted(v typedef.Bool) *Schedule

SetCompleted sets Completed value.

TRUE if this activity has been started

func (*Schedule) SetDeveloperFields added in v0.4.0

func (m *Schedule) SetDeveloperFields(developerFields ...proto.DeveloperField) *Schedule

SetDeveloperFields sets DeveloperFields.

func (*Schedule) SetManufacturer added in v0.4.0

func (m *Schedule) SetManufacturer(v typedef.Manufacturer) *Schedule

SetManufacturer sets Manufacturer value.

Corresponds to file_id of scheduled workout / course.

func (*Schedule) SetProduct added in v0.4.0

func (m *Schedule) SetProduct(v uint16) *Schedule

SetProduct sets Product value.

Corresponds to file_id of scheduled workout / course.

func (*Schedule) SetScheduledTime added in v0.4.0

func (m *Schedule) SetScheduledTime(v time.Time) *Schedule

SetScheduledTime sets ScheduledTime value.

func (*Schedule) SetSerialNumber added in v0.4.0

func (m *Schedule) SetSerialNumber(v uint32) *Schedule

SetSerialNumber sets SerialNumber value.

Base: uint32z; Corresponds to file_id of scheduled workout / course.

func (*Schedule) SetTimeCreated added in v0.4.0

func (m *Schedule) SetTimeCreated(v time.Time) *Schedule

SetTimeCreated sets TimeCreated value.

Corresponds to file_id of scheduled workout / course.

func (*Schedule) SetType added in v0.4.0

func (m *Schedule) SetType(v typedef.Schedule) *Schedule

SetType sets Type value.

func (*Schedule) SetUnknownFields added in v0.23.6

func (m *Schedule) SetUnknownFields(unknownFields ...proto.Field) *Schedule

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Schedule) TimeCreatedUint32 added in v0.15.0

func (m *Schedule) TimeCreatedUint32() uint32

TimeCreatedUint32 returns TimeCreated in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Schedule) ToMesg added in v0.3.0

func (m *Schedule) ToMesg(options *Options) proto.Message

ToMesg converts Schedule into proto.Message. If options is nil, default options will be used.

type SdmProfile

type SdmProfile struct {
	Odometer          uint32 // Scale: 100; Units: m
	MessageIndex      typedef.MessageIndex
	SdmAntId          uint16 // Base: uint16z
	SdmCalFactor      uint16 // Scale: 10; Units: %
	Enabled           typedef.Bool
	SpeedSource       typedef.Bool // Use footpod for speed source instead of GPS
	SdmAntIdTransType uint8        // Base: uint8z
	OdometerRollover  uint8        // Rollover counter that can be used to extend the odometer

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SdmProfile is a SdmProfile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSdmProfile

func NewSdmProfile(mesg *proto.Message) *SdmProfile

NewSdmProfile creates new SdmProfile struct based on given mesg. If mesg is nil, it will return SdmProfile with all fields being set to its corresponding invalid value.

func (*SdmProfile) OdometerScaled added in v0.8.0

func (m *SdmProfile) OdometerScaled() float64

OdometerScaled return Odometer in its scaled value. If Odometer value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*SdmProfile) SdmCalFactorScaled added in v0.8.0

func (m *SdmProfile) SdmCalFactorScaled() float64

SdmCalFactorScaled return SdmCalFactor in its scaled value. If SdmCalFactor value is invalid, float64 invalid value will be returned.

Scale: 10; Units: %

func (*SdmProfile) SetDeveloperFields added in v0.4.0

func (m *SdmProfile) SetDeveloperFields(developerFields ...proto.DeveloperField) *SdmProfile

SetDeveloperFields sets DeveloperFields.

func (*SdmProfile) SetEnabled added in v0.4.0

func (m *SdmProfile) SetEnabled(v typedef.Bool) *SdmProfile

SetEnabled sets Enabled value.

func (*SdmProfile) SetMessageIndex added in v0.4.0

func (m *SdmProfile) SetMessageIndex(v typedef.MessageIndex) *SdmProfile

SetMessageIndex sets MessageIndex value.

func (*SdmProfile) SetOdometer added in v0.4.0

func (m *SdmProfile) SetOdometer(v uint32) *SdmProfile

SetOdometer sets Odometer value.

Scale: 100; Units: m

func (*SdmProfile) SetOdometerRollover added in v0.4.0

func (m *SdmProfile) SetOdometerRollover(v uint8) *SdmProfile

SetOdometerRollover sets OdometerRollover value.

Rollover counter that can be used to extend the odometer

func (*SdmProfile) SetOdometerScaled added in v0.17.2

func (m *SdmProfile) SetOdometerScaled(v float64) *SdmProfile

SetOdometerScaled is similar to SetOdometer except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*SdmProfile) SetSdmAntId added in v0.4.0

func (m *SdmProfile) SetSdmAntId(v uint16) *SdmProfile

SetSdmAntId sets SdmAntId value.

Base: uint16z

func (*SdmProfile) SetSdmAntIdTransType added in v0.4.0

func (m *SdmProfile) SetSdmAntIdTransType(v uint8) *SdmProfile

SetSdmAntIdTransType sets SdmAntIdTransType value.

Base: uint8z

func (*SdmProfile) SetSdmCalFactor added in v0.4.0

func (m *SdmProfile) SetSdmCalFactor(v uint16) *SdmProfile

SetSdmCalFactor sets SdmCalFactor value.

Scale: 10; Units: %

func (*SdmProfile) SetSdmCalFactorScaled added in v0.17.2

func (m *SdmProfile) SetSdmCalFactorScaled(v float64) *SdmProfile

SetSdmCalFactorScaled is similar to SetSdmCalFactor except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: %

func (*SdmProfile) SetSpeedSource added in v0.4.0

func (m *SdmProfile) SetSpeedSource(v typedef.Bool) *SdmProfile

SetSpeedSource sets SpeedSource value.

Use footpod for speed source instead of GPS

func (*SdmProfile) SetUnknownFields added in v0.23.6

func (m *SdmProfile) SetUnknownFields(unknownFields ...proto.Field) *SdmProfile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SdmProfile) ToMesg added in v0.3.0

func (m *SdmProfile) ToMesg(options *Options) proto.Message

ToMesg converts SdmProfile into proto.Message. If options is nil, default options will be used.

type SegmentFile

type SegmentFile struct {
	FileUuid               string                           // UUID of the segment file
	LeaderType             []typedef.SegmentLeaderboardType // Array: [N]; Leader type of each leader in the segment file
	LeaderGroupPrimaryKey  []uint32                         // Array: [N]; Group primary key of each leader in the segment file
	LeaderActivityId       []uint32                         // Array: [N]; Activity ID of each leader in the segment file
	LeaderActivityIdString []string                         // Array: [N]; String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal
	UserProfilePrimaryKey  uint32                           // Primary key of the user that created the segment file
	MessageIndex           typedef.MessageIndex
	Enabled                typedef.Bool // Enabled state of the segment file
	DefaultRaceLeader      uint8        // Index for the Leader Board entry selected as the default race participant

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SegmentFile is a SegmentFile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSegmentFile

func NewSegmentFile(mesg *proto.Message) *SegmentFile

NewSegmentFile creates new SegmentFile struct based on given mesg. If mesg is nil, it will return SegmentFile with all fields being set to its corresponding invalid value.

func (*SegmentFile) SetDefaultRaceLeader added in v0.4.0

func (m *SegmentFile) SetDefaultRaceLeader(v uint8) *SegmentFile

SetDefaultRaceLeader sets DefaultRaceLeader value.

Index for the Leader Board entry selected as the default race participant

func (*SegmentFile) SetDeveloperFields added in v0.4.0

func (m *SegmentFile) SetDeveloperFields(developerFields ...proto.DeveloperField) *SegmentFile

SetDeveloperFields sets DeveloperFields.

func (*SegmentFile) SetEnabled added in v0.4.0

func (m *SegmentFile) SetEnabled(v typedef.Bool) *SegmentFile

SetEnabled sets Enabled value.

Enabled state of the segment file

func (*SegmentFile) SetFileUuid added in v0.4.0

func (m *SegmentFile) SetFileUuid(v string) *SegmentFile

SetFileUuid sets FileUuid value.

UUID of the segment file

func (*SegmentFile) SetLeaderActivityId added in v0.4.0

func (m *SegmentFile) SetLeaderActivityId(v []uint32) *SegmentFile

SetLeaderActivityId sets LeaderActivityId value.

Array: [N]; Activity ID of each leader in the segment file

func (*SegmentFile) SetLeaderActivityIdString added in v0.4.0

func (m *SegmentFile) SetLeaderActivityIdString(v []string) *SegmentFile

SetLeaderActivityIdString sets LeaderActivityIdString value.

Array: [N]; String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal

func (*SegmentFile) SetLeaderGroupPrimaryKey added in v0.4.0

func (m *SegmentFile) SetLeaderGroupPrimaryKey(v []uint32) *SegmentFile

SetLeaderGroupPrimaryKey sets LeaderGroupPrimaryKey value.

Array: [N]; Group primary key of each leader in the segment file

func (*SegmentFile) SetLeaderType added in v0.4.0

func (m *SegmentFile) SetLeaderType(v []typedef.SegmentLeaderboardType) *SegmentFile

SetLeaderType sets LeaderType value.

Array: [N]; Leader type of each leader in the segment file

func (*SegmentFile) SetMessageIndex added in v0.4.0

func (m *SegmentFile) SetMessageIndex(v typedef.MessageIndex) *SegmentFile

SetMessageIndex sets MessageIndex value.

func (*SegmentFile) SetUnknownFields added in v0.23.6

func (m *SegmentFile) SetUnknownFields(unknownFields ...proto.Field) *SegmentFile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SegmentFile) SetUserProfilePrimaryKey added in v0.4.0

func (m *SegmentFile) SetUserProfilePrimaryKey(v uint32) *SegmentFile

SetUserProfilePrimaryKey sets UserProfilePrimaryKey value.

Primary key of the user that created the segment file

func (*SegmentFile) ToMesg added in v0.3.0

func (m *SegmentFile) ToMesg(options *Options) proto.Message

ToMesg converts SegmentFile into proto.Message. If options is nil, default options will be used.

type SegmentId

type SegmentId struct {
	Name                  string                       // Friendly name assigned to segment
	Uuid                  string                       // UUID of the segment
	UserProfilePrimaryKey uint32                       // Primary key of the user that created the segment
	DeviceId              uint32                       // ID of the device that created the segment
	Sport                 typedef.Sport                // Sport associated with the segment
	Enabled               typedef.Bool                 // Segment enabled for evaluation
	DefaultRaceLeader     uint8                        // Index for the Leader Board entry selected as the default race participant
	DeleteStatus          typedef.SegmentDeleteStatus  // Indicates if any segments should be deleted
	SelectionType         typedef.SegmentSelectionType // Indicates how the segment was selected to be sent to the device

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SegmentId is a SegmentId message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSegmentId

func NewSegmentId(mesg *proto.Message) *SegmentId

NewSegmentId creates new SegmentId struct based on given mesg. If mesg is nil, it will return SegmentId with all fields being set to its corresponding invalid value.

func (*SegmentId) SetDefaultRaceLeader added in v0.4.0

func (m *SegmentId) SetDefaultRaceLeader(v uint8) *SegmentId

SetDefaultRaceLeader sets DefaultRaceLeader value.

Index for the Leader Board entry selected as the default race participant

func (*SegmentId) SetDeleteStatus added in v0.4.0

func (m *SegmentId) SetDeleteStatus(v typedef.SegmentDeleteStatus) *SegmentId

SetDeleteStatus sets DeleteStatus value.

Indicates if any segments should be deleted

func (*SegmentId) SetDeveloperFields added in v0.4.0

func (m *SegmentId) SetDeveloperFields(developerFields ...proto.DeveloperField) *SegmentId

SetDeveloperFields sets DeveloperFields.

func (*SegmentId) SetDeviceId added in v0.4.0

func (m *SegmentId) SetDeviceId(v uint32) *SegmentId

SetDeviceId sets DeviceId value.

ID of the device that created the segment

func (*SegmentId) SetEnabled added in v0.4.0

func (m *SegmentId) SetEnabled(v typedef.Bool) *SegmentId

SetEnabled sets Enabled value.

Segment enabled for evaluation

func (*SegmentId) SetName added in v0.4.0

func (m *SegmentId) SetName(v string) *SegmentId

SetName sets Name value.

Friendly name assigned to segment

func (*SegmentId) SetSelectionType added in v0.4.0

func (m *SegmentId) SetSelectionType(v typedef.SegmentSelectionType) *SegmentId

SetSelectionType sets SelectionType value.

Indicates how the segment was selected to be sent to the device

func (*SegmentId) SetSport added in v0.4.0

func (m *SegmentId) SetSport(v typedef.Sport) *SegmentId

SetSport sets Sport value.

Sport associated with the segment

func (*SegmentId) SetUnknownFields added in v0.23.6

func (m *SegmentId) SetUnknownFields(unknownFields ...proto.Field) *SegmentId

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SegmentId) SetUserProfilePrimaryKey added in v0.4.0

func (m *SegmentId) SetUserProfilePrimaryKey(v uint32) *SegmentId

SetUserProfilePrimaryKey sets UserProfilePrimaryKey value.

Primary key of the user that created the segment

func (*SegmentId) SetUuid added in v0.4.0

func (m *SegmentId) SetUuid(v string) *SegmentId

SetUuid sets Uuid value.

UUID of the segment

func (*SegmentId) ToMesg added in v0.3.0

func (m *SegmentId) ToMesg(options *Options) proto.Message

ToMesg converts SegmentId into proto.Message. If options is nil, default options will be used.

type SegmentLap

type SegmentLap struct {
	Timestamp                   time.Time // Units: s; Lap end time.
	StartTime                   time.Time
	Name                        string
	TimeInHrZone                []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInSpeedZone             []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInCadenceZone           []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInPowerZone             []uint32 // Array: [N]; Scale: 1000; Units: s
	Uuid                        string
	AvgLeftPowerPhase           []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.
	AvgLeftPowerPhasePeak       []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhase          []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhasePeak      []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.
	AvgPowerPosition            []uint16 // Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.
	MaxPowerPosition            []uint16 // Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.
	AvgCadencePosition          []uint8  // Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.
	MaxCadencePosition          []uint8  // Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.
	StartPositionLat            int32    // Units: semicircles
	StartPositionLong           int32    // Units: semicircles
	EndPositionLat              int32    // Units: semicircles
	EndPositionLong             int32    // Units: semicircles
	TotalElapsedTime            uint32   // Scale: 1000; Units: s; Time (includes pauses)
	TotalTimerTime              uint32   // Scale: 1000; Units: s; Timer Time (excludes pauses)
	TotalDistance               uint32   // Scale: 100; Units: m
	TotalCycles                 uint32   // Units: cycles
	NecLat                      int32    // Units: semicircles; North east corner latitude.
	NecLong                     int32    // Units: semicircles; North east corner longitude.
	SwcLat                      int32    // Units: semicircles; South west corner latitude.
	SwcLong                     int32    // Units: semicircles; South west corner latitude.
	TotalWork                   uint32   // Units: J
	TotalMovingTime             uint32   // Scale: 1000; Units: s
	ActiveTime                  uint32   // Scale: 1000; Units: s
	TimeStanding                uint32   // Scale: 1000; Units: s; Total time spent in the standing position
	TotalGrit                   float32  // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	TotalFlow                   float32  // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	AvgGrit                     float32  // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	AvgFlow                     float32  // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	EnhancedAvgAltitude         uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMaxAltitude         uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMinAltitude         uint32   // Scale: 5; Offset: 500; Units: m
	MessageIndex                typedef.MessageIndex
	TotalCalories               uint16 // Units: kcal
	TotalFatCalories            uint16 // Units: kcal; If New Leaf
	AvgSpeed                    uint16 // Scale: 1000; Units: m/s
	MaxSpeed                    uint16 // Scale: 1000; Units: m/s
	AvgPower                    uint16 // Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
	MaxPower                    uint16 // Units: watts
	TotalAscent                 uint16 // Units: m
	TotalDescent                uint16 // Units: m
	NormalizedPower             uint16 // Units: watts
	LeftRightBalance            typedef.LeftRightBalance100
	AvgAltitude                 uint16 // Scale: 5; Offset: 500; Units: m
	MaxAltitude                 uint16 // Scale: 5; Offset: 500; Units: m
	AvgGrade                    int16  // Scale: 100; Units: %
	AvgPosGrade                 int16  // Scale: 100; Units: %
	AvgNegGrade                 int16  // Scale: 100; Units: %
	MaxPosGrade                 int16  // Scale: 100; Units: %
	MaxNegGrade                 int16  // Scale: 100; Units: %
	AvgPosVerticalSpeed         int16  // Scale: 1000; Units: m/s
	AvgNegVerticalSpeed         int16  // Scale: 1000; Units: m/s
	MaxPosVerticalSpeed         int16  // Scale: 1000; Units: m/s
	MaxNegVerticalSpeed         int16  // Scale: 1000; Units: m/s
	RepetitionNum               uint16
	MinAltitude                 uint16 // Scale: 5; Offset: 500; Units: m
	WktStepIndex                typedef.MessageIndex
	FrontGearShiftCount         uint16
	RearGearShiftCount          uint16
	StandCount                  uint16               // Number of transitions to the standing state
	Manufacturer                typedef.Manufacturer // Manufacturer that produced the segment
	Event                       typedef.Event
	EventType                   typedef.EventType
	AvgHeartRate                uint8 // Units: bpm
	MaxHeartRate                uint8 // Units: bpm
	AvgCadence                  uint8 // Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
	MaxCadence                  uint8 // Units: rpm
	Sport                       typedef.Sport
	EventGroup                  uint8
	SubSport                    typedef.SubSport
	GpsAccuracy                 uint8 // Units: m
	AvgTemperature              int8  // Units: C
	MaxTemperature              int8  // Units: C
	MinHeartRate                uint8 // Units: bpm
	SportEvent                  typedef.SportEvent
	AvgLeftTorqueEffectiveness  uint8 // Scale: 2; Units: percent
	AvgRightTorqueEffectiveness uint8 // Scale: 2; Units: percent
	AvgLeftPedalSmoothness      uint8 // Scale: 2; Units: percent
	AvgRightPedalSmoothness     uint8 // Scale: 2; Units: percent
	AvgCombinedPedalSmoothness  uint8 // Scale: 2; Units: percent
	Status                      typedef.SegmentLapStatus
	AvgFractionalCadence        uint8 // Scale: 128; Units: rpm; fractional part of the avg_cadence
	MaxFractionalCadence        uint8 // Scale: 128; Units: rpm; fractional part of the max_cadence
	TotalFractionalCycles       uint8 // Scale: 128; Units: cycles; fractional part of the total_cycles
	AvgLeftPco                  int8  // Units: mm; Average left platform center offset
	AvgRightPco                 int8  // Units: mm; Average right platform center offset
	TotalFractionalAscent       uint8 // Scale: 100; Units: m; fractional part of total_ascent
	TotalFractionalDescent      uint8 // Scale: 100; Units: m; fractional part of total_descent

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

SegmentLap is a SegmentLap message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSegmentLap

func NewSegmentLap(mesg *proto.Message) *SegmentLap

NewSegmentLap creates new SegmentLap struct based on given mesg. If mesg is nil, it will return SegmentLap with all fields being set to its corresponding invalid value.

func (*SegmentLap) ActiveTimeScaled added in v0.8.0

func (m *SegmentLap) ActiveTimeScaled() float64

ActiveTimeScaled return ActiveTime in its scaled value. If ActiveTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*SegmentLap) AvgAltitudeScaled added in v0.8.0

func (m *SegmentLap) AvgAltitudeScaled() float64

AvgAltitudeScaled return AvgAltitude in its scaled value. If AvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value. If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*SegmentLap) AvgFractionalCadenceScaled added in v0.8.0

func (m *SegmentLap) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value. If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*SegmentLap) AvgGradeScaled added in v0.8.0

func (m *SegmentLap) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value. If AvgGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*SegmentLap) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value. If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*SegmentLap) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value. If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value. If AvgLeftPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *SegmentLap) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value. If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*SegmentLap) AvgNegGradeScaled added in v0.8.0

func (m *SegmentLap) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value. If AvgNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*SegmentLap) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value. If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) AvgPosGradeScaled added in v0.8.0

func (m *SegmentLap) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value. If AvgPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*SegmentLap) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value. If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value. If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*SegmentLap) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *SegmentLap) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value. If AvgRightPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) AvgRightPowerPhaseScaled added in v0.8.0

func (m *SegmentLap) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value. If AvgRightPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *SegmentLap) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value. If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*SegmentLap) AvgSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) EndPositionLatDegrees added in v0.15.0

func (m *SegmentLap) EndPositionLatDegrees() float64

EndPositionLatDegrees returns EndPositionLat in degrees instead of semicircles. If EndPositionLat value is invalid, float64 invalid value will be returned.

func (*SegmentLap) EndPositionLongDegrees added in v0.15.0

func (m *SegmentLap) EndPositionLongDegrees() float64

EndPositionLongDegrees returns EndPositionLong in degrees instead of semicircles. If EndPositionLong value is invalid, float64 invalid value will be returned.

func (*SegmentLap) EnhancedAvgAltitudeScaled added in v0.8.0

func (m *SegmentLap) EnhancedAvgAltitudeScaled() float64

EnhancedAvgAltitudeScaled return EnhancedAvgAltitude in its scaled value. If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *SegmentLap) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value. If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) EnhancedMinAltitudeScaled added in v0.8.0

func (m *SegmentLap) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value. If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) GetTotalCycles added in v0.16.0

func (m *SegmentLap) GetTotalCycles() (name string, value any)

GetTotalCycles returns Dynamic Field interpretation of TotalCycles. Otherwise, returns the original value of TotalCycles.

Based on m.Sport:

  • name: "total_strokes", units: "strokes" , value: uint32(m.TotalCycles)

Otherwise:

  • name: "total_cycles", units: "cycles" , value: m.TotalCycles

func (*SegmentLap) IsExpandedField added in v0.21.0

func (m *SegmentLap) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 91, 92, 93.

func (*SegmentLap) MarkAsExpandedField added in v0.21.0

func (m *SegmentLap) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 91, 92, 93.

func (*SegmentLap) MaxAltitudeScaled added in v0.8.0

func (m *SegmentLap) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value. If MaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) MaxFractionalCadenceScaled added in v0.8.0

func (m *SegmentLap) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value. If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*SegmentLap) MaxNegGradeScaled added in v0.8.0

func (m *SegmentLap) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value. If MaxNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*SegmentLap) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value. If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) MaxPosGradeScaled added in v0.8.0

func (m *SegmentLap) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value. If MaxPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*SegmentLap) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value. If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) MaxSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SegmentLap) MinAltitudeScaled added in v0.8.0

func (m *SegmentLap) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value. If MinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) NecLatDegrees added in v0.15.0

func (m *SegmentLap) NecLatDegrees() float64

NecLatDegrees returns NecLat in degrees instead of semicircles. If NecLat value is invalid, float64 invalid value will be returned.

func (*SegmentLap) NecLongDegrees added in v0.15.0

func (m *SegmentLap) NecLongDegrees() float64

NecLongDegrees returns NecLong in degrees instead of semicircles. If NecLong value is invalid, float64 invalid value will be returned.

func (*SegmentLap) SetActiveTime added in v0.4.0

func (m *SegmentLap) SetActiveTime(v uint32) *SegmentLap

SetActiveTime sets ActiveTime value.

Scale: 1000; Units: s

func (*SegmentLap) SetActiveTimeScaled added in v0.17.2

func (m *SegmentLap) SetActiveTimeScaled(v float64) *SegmentLap

SetActiveTimeScaled is similar to SetActiveTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*SegmentLap) SetAvgAltitude added in v0.4.0

func (m *SegmentLap) SetAvgAltitude(v uint16) *SegmentLap

SetAvgAltitude sets AvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetAvgAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetAvgAltitudeScaled(v float64) *SegmentLap

SetAvgAltitudeScaled is similar to SetAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetAvgCadence added in v0.4.0

func (m *SegmentLap) SetAvgCadence(v uint8) *SegmentLap

SetAvgCadence sets AvgCadence value.

Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time

func (*SegmentLap) SetAvgCadencePosition added in v0.4.0

func (m *SegmentLap) SetAvgCadencePosition(v []uint8) *SegmentLap

SetAvgCadencePosition sets AvgCadencePosition value.

Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.

func (*SegmentLap) SetAvgCombinedPedalSmoothness added in v0.4.0

func (m *SegmentLap) SetAvgCombinedPedalSmoothness(v uint8) *SegmentLap

SetAvgCombinedPedalSmoothness sets AvgCombinedPedalSmoothness value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgCombinedPedalSmoothnessScaled added in v0.17.2

func (m *SegmentLap) SetAvgCombinedPedalSmoothnessScaled(v float64) *SegmentLap

SetAvgCombinedPedalSmoothnessScaled is similar to SetAvgCombinedPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgFlow added in v0.4.0

func (m *SegmentLap) SetAvgFlow(v float32) *SegmentLap

SetAvgFlow sets AvgFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*SegmentLap) SetAvgFractionalCadence added in v0.4.0

func (m *SegmentLap) SetAvgFractionalCadence(v uint8) *SegmentLap

SetAvgFractionalCadence sets AvgFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*SegmentLap) SetAvgFractionalCadenceScaled added in v0.17.2

func (m *SegmentLap) SetAvgFractionalCadenceScaled(v float64) *SegmentLap

SetAvgFractionalCadenceScaled is similar to SetAvgFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*SegmentLap) SetAvgGrade added in v0.4.0

func (m *SegmentLap) SetAvgGrade(v int16) *SegmentLap

SetAvgGrade sets AvgGrade value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgGradeScaled added in v0.17.2

func (m *SegmentLap) SetAvgGradeScaled(v float64) *SegmentLap

SetAvgGradeScaled is similar to SetAvgGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*SegmentLap) SetAvgGrit added in v0.4.0

func (m *SegmentLap) SetAvgGrit(v float32) *SegmentLap

SetAvgGrit sets AvgGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*SegmentLap) SetAvgHeartRate added in v0.4.0

func (m *SegmentLap) SetAvgHeartRate(v uint8) *SegmentLap

SetAvgHeartRate sets AvgHeartRate value.

Units: bpm

func (*SegmentLap) SetAvgLeftPco added in v0.4.0

func (m *SegmentLap) SetAvgLeftPco(v int8) *SegmentLap

SetAvgLeftPco sets AvgLeftPco value.

Units: mm; Average left platform center offset

func (*SegmentLap) SetAvgLeftPedalSmoothness added in v0.4.0

func (m *SegmentLap) SetAvgLeftPedalSmoothness(v uint8) *SegmentLap

SetAvgLeftPedalSmoothness sets AvgLeftPedalSmoothness value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgLeftPedalSmoothnessScaled added in v0.17.2

func (m *SegmentLap) SetAvgLeftPedalSmoothnessScaled(v float64) *SegmentLap

SetAvgLeftPedalSmoothnessScaled is similar to SetAvgLeftPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgLeftPowerPhase added in v0.4.0

func (m *SegmentLap) SetAvgLeftPowerPhase(v []uint8) *SegmentLap

SetAvgLeftPowerPhase sets AvgLeftPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgLeftPowerPhasePeak added in v0.4.0

func (m *SegmentLap) SetAvgLeftPowerPhasePeak(v []uint8) *SegmentLap

SetAvgLeftPowerPhasePeak sets AvgLeftPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgLeftPowerPhasePeakScaled added in v0.17.2

func (m *SegmentLap) SetAvgLeftPowerPhasePeakScaled(vs []float64) *SegmentLap

SetAvgLeftPowerPhasePeakScaled is similar to SetAvgLeftPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgLeftPowerPhaseScaled added in v0.17.2

func (m *SegmentLap) SetAvgLeftPowerPhaseScaled(vs []float64) *SegmentLap

SetAvgLeftPowerPhaseScaled is similar to SetAvgLeftPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgLeftTorqueEffectiveness added in v0.4.0

func (m *SegmentLap) SetAvgLeftTorqueEffectiveness(v uint8) *SegmentLap

SetAvgLeftTorqueEffectiveness sets AvgLeftTorqueEffectiveness value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgLeftTorqueEffectivenessScaled added in v0.17.2

func (m *SegmentLap) SetAvgLeftTorqueEffectivenessScaled(v float64) *SegmentLap

SetAvgLeftTorqueEffectivenessScaled is similar to SetAvgLeftTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgNegGrade added in v0.4.0

func (m *SegmentLap) SetAvgNegGrade(v int16) *SegmentLap

SetAvgNegGrade sets AvgNegGrade value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgNegGradeScaled added in v0.17.2

func (m *SegmentLap) SetAvgNegGradeScaled(v float64) *SegmentLap

SetAvgNegGradeScaled is similar to SetAvgNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*SegmentLap) SetAvgNegVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetAvgNegVerticalSpeed(v int16) *SegmentLap

SetAvgNegVerticalSpeed sets AvgNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgNegVerticalSpeedScaled added in v0.17.2

func (m *SegmentLap) SetAvgNegVerticalSpeedScaled(v float64) *SegmentLap

SetAvgNegVerticalSpeedScaled is similar to SetAvgNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgPosGrade added in v0.4.0

func (m *SegmentLap) SetAvgPosGrade(v int16) *SegmentLap

SetAvgPosGrade sets AvgPosGrade value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgPosGradeScaled added in v0.17.2

func (m *SegmentLap) SetAvgPosGradeScaled(v float64) *SegmentLap

SetAvgPosGradeScaled is similar to SetAvgPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*SegmentLap) SetAvgPosVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetAvgPosVerticalSpeed(v int16) *SegmentLap

SetAvgPosVerticalSpeed sets AvgPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgPosVerticalSpeedScaled added in v0.17.2

func (m *SegmentLap) SetAvgPosVerticalSpeedScaled(v float64) *SegmentLap

SetAvgPosVerticalSpeedScaled is similar to SetAvgPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgPower added in v0.4.0

func (m *SegmentLap) SetAvgPower(v uint16) *SegmentLap

SetAvgPower sets AvgPower value.

Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time

func (*SegmentLap) SetAvgPowerPosition added in v0.4.0

func (m *SegmentLap) SetAvgPowerPosition(v []uint16) *SegmentLap

SetAvgPowerPosition sets AvgPowerPosition value.

Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.

func (*SegmentLap) SetAvgRightPco added in v0.4.0

func (m *SegmentLap) SetAvgRightPco(v int8) *SegmentLap

SetAvgRightPco sets AvgRightPco value.

Units: mm; Average right platform center offset

func (*SegmentLap) SetAvgRightPedalSmoothness added in v0.4.0

func (m *SegmentLap) SetAvgRightPedalSmoothness(v uint8) *SegmentLap

SetAvgRightPedalSmoothness sets AvgRightPedalSmoothness value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgRightPedalSmoothnessScaled added in v0.17.2

func (m *SegmentLap) SetAvgRightPedalSmoothnessScaled(v float64) *SegmentLap

SetAvgRightPedalSmoothnessScaled is similar to SetAvgRightPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgRightPowerPhase added in v0.4.0

func (m *SegmentLap) SetAvgRightPowerPhase(v []uint8) *SegmentLap

SetAvgRightPowerPhase sets AvgRightPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgRightPowerPhasePeak added in v0.4.0

func (m *SegmentLap) SetAvgRightPowerPhasePeak(v []uint8) *SegmentLap

SetAvgRightPowerPhasePeak sets AvgRightPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgRightPowerPhasePeakScaled added in v0.17.2

func (m *SegmentLap) SetAvgRightPowerPhasePeakScaled(vs []float64) *SegmentLap

SetAvgRightPowerPhasePeakScaled is similar to SetAvgRightPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgRightPowerPhaseScaled added in v0.17.2

func (m *SegmentLap) SetAvgRightPowerPhaseScaled(vs []float64) *SegmentLap

SetAvgRightPowerPhaseScaled is similar to SetAvgRightPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*SegmentLap) SetAvgRightTorqueEffectiveness added in v0.4.0

func (m *SegmentLap) SetAvgRightTorqueEffectiveness(v uint8) *SegmentLap

SetAvgRightTorqueEffectiveness sets AvgRightTorqueEffectiveness value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgRightTorqueEffectivenessScaled added in v0.17.2

func (m *SegmentLap) SetAvgRightTorqueEffectivenessScaled(v float64) *SegmentLap

SetAvgRightTorqueEffectivenessScaled is similar to SetAvgRightTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgSpeed added in v0.4.0

func (m *SegmentLap) SetAvgSpeed(v uint16) *SegmentLap

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgSpeedScaled added in v0.17.2

func (m *SegmentLap) SetAvgSpeedScaled(v float64) *SegmentLap

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgTemperature added in v0.4.0

func (m *SegmentLap) SetAvgTemperature(v int8) *SegmentLap

SetAvgTemperature sets AvgTemperature value.

Units: C

func (*SegmentLap) SetDeveloperFields added in v0.4.0

func (m *SegmentLap) SetDeveloperFields(developerFields ...proto.DeveloperField) *SegmentLap

SetDeveloperFields sets DeveloperFields.

func (*SegmentLap) SetEndPositionLat added in v0.4.0

func (m *SegmentLap) SetEndPositionLat(v int32) *SegmentLap

SetEndPositionLat sets EndPositionLat value.

Units: semicircles

func (*SegmentLap) SetEndPositionLatDegrees added in v0.17.2

func (m *SegmentLap) SetEndPositionLatDegrees(degrees float64) *SegmentLap

SetEndPositionLatDegrees is similar to SetEndPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetEndPositionLong added in v0.4.0

func (m *SegmentLap) SetEndPositionLong(v int32) *SegmentLap

SetEndPositionLong sets EndPositionLong value.

Units: semicircles

func (*SegmentLap) SetEndPositionLongDegrees added in v0.17.2

func (m *SegmentLap) SetEndPositionLongDegrees(degrees float64) *SegmentLap

SetEndPositionLongDegrees is similar to SetEndPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetEnhancedAvgAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedAvgAltitude(v uint32) *SegmentLap

SetEnhancedAvgAltitude sets EnhancedAvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedAvgAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetEnhancedAvgAltitudeScaled(v float64) *SegmentLap

SetEnhancedAvgAltitudeScaled is similar to SetEnhancedAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMaxAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedMaxAltitude(v uint32) *SegmentLap

SetEnhancedMaxAltitude sets EnhancedMaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMaxAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetEnhancedMaxAltitudeScaled(v float64) *SegmentLap

SetEnhancedMaxAltitudeScaled is similar to SetEnhancedMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMinAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedMinAltitude(v uint32) *SegmentLap

SetEnhancedMinAltitude sets EnhancedMinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMinAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetEnhancedMinAltitudeScaled(v float64) *SegmentLap

SetEnhancedMinAltitudeScaled is similar to SetEnhancedMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEvent added in v0.4.0

func (m *SegmentLap) SetEvent(v typedef.Event) *SegmentLap

SetEvent sets Event value.

func (*SegmentLap) SetEventGroup added in v0.4.0

func (m *SegmentLap) SetEventGroup(v uint8) *SegmentLap

SetEventGroup sets EventGroup value.

func (*SegmentLap) SetEventType added in v0.4.0

func (m *SegmentLap) SetEventType(v typedef.EventType) *SegmentLap

SetEventType sets EventType value.

func (*SegmentLap) SetFrontGearShiftCount added in v0.4.0

func (m *SegmentLap) SetFrontGearShiftCount(v uint16) *SegmentLap

SetFrontGearShiftCount sets FrontGearShiftCount value.

func (*SegmentLap) SetGpsAccuracy added in v0.4.0

func (m *SegmentLap) SetGpsAccuracy(v uint8) *SegmentLap

SetGpsAccuracy sets GpsAccuracy value.

Units: m

func (*SegmentLap) SetLeftRightBalance added in v0.4.0

func (m *SegmentLap) SetLeftRightBalance(v typedef.LeftRightBalance100) *SegmentLap

SetLeftRightBalance sets LeftRightBalance value.

func (*SegmentLap) SetManufacturer added in v0.4.0

func (m *SegmentLap) SetManufacturer(v typedef.Manufacturer) *SegmentLap

SetManufacturer sets Manufacturer value.

Manufacturer that produced the segment

func (*SegmentLap) SetMaxAltitude added in v0.4.0

func (m *SegmentLap) SetMaxAltitude(v uint16) *SegmentLap

SetMaxAltitude sets MaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMaxAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetMaxAltitudeScaled(v float64) *SegmentLap

SetMaxAltitudeScaled is similar to SetMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMaxCadence added in v0.4.0

func (m *SegmentLap) SetMaxCadence(v uint8) *SegmentLap

SetMaxCadence sets MaxCadence value.

Units: rpm

func (*SegmentLap) SetMaxCadencePosition added in v0.4.0

func (m *SegmentLap) SetMaxCadencePosition(v []uint8) *SegmentLap

SetMaxCadencePosition sets MaxCadencePosition value.

Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.

func (*SegmentLap) SetMaxFractionalCadence added in v0.4.0

func (m *SegmentLap) SetMaxFractionalCadence(v uint8) *SegmentLap

SetMaxFractionalCadence sets MaxFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*SegmentLap) SetMaxFractionalCadenceScaled added in v0.17.2

func (m *SegmentLap) SetMaxFractionalCadenceScaled(v float64) *SegmentLap

SetMaxFractionalCadenceScaled is similar to SetMaxFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*SegmentLap) SetMaxHeartRate added in v0.4.0

func (m *SegmentLap) SetMaxHeartRate(v uint8) *SegmentLap

SetMaxHeartRate sets MaxHeartRate value.

Units: bpm

func (*SegmentLap) SetMaxNegGrade added in v0.4.0

func (m *SegmentLap) SetMaxNegGrade(v int16) *SegmentLap

SetMaxNegGrade sets MaxNegGrade value.

Scale: 100; Units: %

func (*SegmentLap) SetMaxNegGradeScaled added in v0.17.2

func (m *SegmentLap) SetMaxNegGradeScaled(v float64) *SegmentLap

SetMaxNegGradeScaled is similar to SetMaxNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*SegmentLap) SetMaxNegVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetMaxNegVerticalSpeed(v int16) *SegmentLap

SetMaxNegVerticalSpeed sets MaxNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxNegVerticalSpeedScaled added in v0.17.2

func (m *SegmentLap) SetMaxNegVerticalSpeedScaled(v float64) *SegmentLap

SetMaxNegVerticalSpeedScaled is similar to SetMaxNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxPosGrade added in v0.4.0

func (m *SegmentLap) SetMaxPosGrade(v int16) *SegmentLap

SetMaxPosGrade sets MaxPosGrade value.

Scale: 100; Units: %

func (*SegmentLap) SetMaxPosGradeScaled added in v0.17.2

func (m *SegmentLap) SetMaxPosGradeScaled(v float64) *SegmentLap

SetMaxPosGradeScaled is similar to SetMaxPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*SegmentLap) SetMaxPosVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetMaxPosVerticalSpeed(v int16) *SegmentLap

SetMaxPosVerticalSpeed sets MaxPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxPosVerticalSpeedScaled added in v0.17.2

func (m *SegmentLap) SetMaxPosVerticalSpeedScaled(v float64) *SegmentLap

SetMaxPosVerticalSpeedScaled is similar to SetMaxPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxPower added in v0.4.0

func (m *SegmentLap) SetMaxPower(v uint16) *SegmentLap

SetMaxPower sets MaxPower value.

Units: watts

func (*SegmentLap) SetMaxPowerPosition added in v0.4.0

func (m *SegmentLap) SetMaxPowerPosition(v []uint16) *SegmentLap

SetMaxPowerPosition sets MaxPowerPosition value.

Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.

func (*SegmentLap) SetMaxSpeed added in v0.4.0

func (m *SegmentLap) SetMaxSpeed(v uint16) *SegmentLap

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxSpeedScaled added in v0.17.2

func (m *SegmentLap) SetMaxSpeedScaled(v float64) *SegmentLap

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxTemperature added in v0.4.0

func (m *SegmentLap) SetMaxTemperature(v int8) *SegmentLap

SetMaxTemperature sets MaxTemperature value.

Units: C

func (*SegmentLap) SetMessageIndex added in v0.4.0

func (m *SegmentLap) SetMessageIndex(v typedef.MessageIndex) *SegmentLap

SetMessageIndex sets MessageIndex value.

func (*SegmentLap) SetMinAltitude added in v0.4.0

func (m *SegmentLap) SetMinAltitude(v uint16) *SegmentLap

SetMinAltitude sets MinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMinAltitudeScaled added in v0.17.2

func (m *SegmentLap) SetMinAltitudeScaled(v float64) *SegmentLap

SetMinAltitudeScaled is similar to SetMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMinHeartRate added in v0.4.0

func (m *SegmentLap) SetMinHeartRate(v uint8) *SegmentLap

SetMinHeartRate sets MinHeartRate value.

Units: bpm

func (*SegmentLap) SetName added in v0.4.0

func (m *SegmentLap) SetName(v string) *SegmentLap

SetName sets Name value.

func (*SegmentLap) SetNecLat added in v0.4.0

func (m *SegmentLap) SetNecLat(v int32) *SegmentLap

SetNecLat sets NecLat value.

Units: semicircles; North east corner latitude.

func (*SegmentLap) SetNecLatDegrees added in v0.17.2

func (m *SegmentLap) SetNecLatDegrees(degrees float64) *SegmentLap

SetNecLatDegrees is similar to SetNecLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetNecLong added in v0.4.0

func (m *SegmentLap) SetNecLong(v int32) *SegmentLap

SetNecLong sets NecLong value.

Units: semicircles; North east corner longitude.

func (*SegmentLap) SetNecLongDegrees added in v0.17.2

func (m *SegmentLap) SetNecLongDegrees(degrees float64) *SegmentLap

SetNecLongDegrees is similar to SetNecLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetNormalizedPower added in v0.4.0

func (m *SegmentLap) SetNormalizedPower(v uint16) *SegmentLap

SetNormalizedPower sets NormalizedPower value.

Units: watts

func (*SegmentLap) SetRearGearShiftCount added in v0.4.0

func (m *SegmentLap) SetRearGearShiftCount(v uint16) *SegmentLap

SetRearGearShiftCount sets RearGearShiftCount value.

func (*SegmentLap) SetRepetitionNum added in v0.4.0

func (m *SegmentLap) SetRepetitionNum(v uint16) *SegmentLap

SetRepetitionNum sets RepetitionNum value.

func (*SegmentLap) SetSport added in v0.4.0

func (m *SegmentLap) SetSport(v typedef.Sport) *SegmentLap

SetSport sets Sport value.

func (*SegmentLap) SetSportEvent added in v0.4.0

func (m *SegmentLap) SetSportEvent(v typedef.SportEvent) *SegmentLap

SetSportEvent sets SportEvent value.

func (*SegmentLap) SetStandCount added in v0.4.0

func (m *SegmentLap) SetStandCount(v uint16) *SegmentLap

SetStandCount sets StandCount value.

Number of transitions to the standing state

func (*SegmentLap) SetStartPositionLat added in v0.4.0

func (m *SegmentLap) SetStartPositionLat(v int32) *SegmentLap

SetStartPositionLat sets StartPositionLat value.

Units: semicircles

func (*SegmentLap) SetStartPositionLatDegrees added in v0.17.2

func (m *SegmentLap) SetStartPositionLatDegrees(degrees float64) *SegmentLap

SetStartPositionLatDegrees is similar to SetStartPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetStartPositionLong added in v0.4.0

func (m *SegmentLap) SetStartPositionLong(v int32) *SegmentLap

SetStartPositionLong sets StartPositionLong value.

Units: semicircles

func (*SegmentLap) SetStartPositionLongDegrees added in v0.17.2

func (m *SegmentLap) SetStartPositionLongDegrees(degrees float64) *SegmentLap

SetStartPositionLongDegrees is similar to SetStartPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetStartTime added in v0.4.0

func (m *SegmentLap) SetStartTime(v time.Time) *SegmentLap

SetStartTime sets StartTime value.

func (*SegmentLap) SetStatus added in v0.4.0

func (m *SegmentLap) SetStatus(v typedef.SegmentLapStatus) *SegmentLap

SetStatus sets Status value.

func (*SegmentLap) SetSubSport added in v0.4.0

func (m *SegmentLap) SetSubSport(v typedef.SubSport) *SegmentLap

SetSubSport sets SubSport value.

func (*SegmentLap) SetSwcLat added in v0.4.0

func (m *SegmentLap) SetSwcLat(v int32) *SegmentLap

SetSwcLat sets SwcLat value.

Units: semicircles; South west corner latitude.

func (*SegmentLap) SetSwcLatDegrees added in v0.17.2

func (m *SegmentLap) SetSwcLatDegrees(degrees float64) *SegmentLap

SetSwcLatDegrees is similar to SetSwcLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetSwcLong added in v0.4.0

func (m *SegmentLap) SetSwcLong(v int32) *SegmentLap

SetSwcLong sets SwcLong value.

Units: semicircles; South west corner latitude.

func (*SegmentLap) SetSwcLongDegrees added in v0.17.2

func (m *SegmentLap) SetSwcLongDegrees(degrees float64) *SegmentLap

SetSwcLongDegrees is similar to SetSwcLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentLap) SetTimeInCadenceZone added in v0.4.0

func (m *SegmentLap) SetTimeInCadenceZone(v []uint32) *SegmentLap

SetTimeInCadenceZone sets TimeInCadenceZone value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInCadenceZoneScaled added in v0.17.2

func (m *SegmentLap) SetTimeInCadenceZoneScaled(vs []float64) *SegmentLap

SetTimeInCadenceZoneScaled is similar to SetTimeInCadenceZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInHrZone added in v0.4.0

func (m *SegmentLap) SetTimeInHrZone(v []uint32) *SegmentLap

SetTimeInHrZone sets TimeInHrZone value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInHrZoneScaled added in v0.17.2

func (m *SegmentLap) SetTimeInHrZoneScaled(vs []float64) *SegmentLap

SetTimeInHrZoneScaled is similar to SetTimeInHrZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInPowerZone added in v0.4.0

func (m *SegmentLap) SetTimeInPowerZone(v []uint32) *SegmentLap

SetTimeInPowerZone sets TimeInPowerZone value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInPowerZoneScaled added in v0.17.2

func (m *SegmentLap) SetTimeInPowerZoneScaled(vs []float64) *SegmentLap

SetTimeInPowerZoneScaled is similar to SetTimeInPowerZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInSpeedZone added in v0.4.0

func (m *SegmentLap) SetTimeInSpeedZone(v []uint32) *SegmentLap

SetTimeInSpeedZone sets TimeInSpeedZone value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInSpeedZoneScaled added in v0.17.2

func (m *SegmentLap) SetTimeInSpeedZoneScaled(vs []float64) *SegmentLap

SetTimeInSpeedZoneScaled is similar to SetTimeInSpeedZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeStanding added in v0.4.0

func (m *SegmentLap) SetTimeStanding(v uint32) *SegmentLap

SetTimeStanding sets TimeStanding value.

Scale: 1000; Units: s; Total time spent in the standing position

func (*SegmentLap) SetTimeStandingScaled added in v0.17.2

func (m *SegmentLap) SetTimeStandingScaled(v float64) *SegmentLap

SetTimeStandingScaled is similar to SetTimeStanding except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Total time spent in the standing position

func (*SegmentLap) SetTimestamp added in v0.4.0

func (m *SegmentLap) SetTimestamp(v time.Time) *SegmentLap

SetTimestamp sets Timestamp value.

Units: s; Lap end time.

func (*SegmentLap) SetTotalAscent added in v0.4.0

func (m *SegmentLap) SetTotalAscent(v uint16) *SegmentLap

SetTotalAscent sets TotalAscent value.

Units: m

func (*SegmentLap) SetTotalCalories added in v0.4.0

func (m *SegmentLap) SetTotalCalories(v uint16) *SegmentLap

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*SegmentLap) SetTotalCycles added in v0.4.0

func (m *SegmentLap) SetTotalCycles(v uint32) *SegmentLap

SetTotalCycles sets TotalCycles value.

Units: cycles

func (*SegmentLap) SetTotalDescent added in v0.4.0

func (m *SegmentLap) SetTotalDescent(v uint16) *SegmentLap

SetTotalDescent sets TotalDescent value.

Units: m

func (*SegmentLap) SetTotalDistance added in v0.4.0

func (m *SegmentLap) SetTotalDistance(v uint32) *SegmentLap

SetTotalDistance sets TotalDistance value.

Scale: 100; Units: m

func (*SegmentLap) SetTotalDistanceScaled added in v0.17.2

func (m *SegmentLap) SetTotalDistanceScaled(v float64) *SegmentLap

SetTotalDistanceScaled is similar to SetTotalDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*SegmentLap) SetTotalElapsedTime added in v0.4.0

func (m *SegmentLap) SetTotalElapsedTime(v uint32) *SegmentLap

SetTotalElapsedTime sets TotalElapsedTime value.

Scale: 1000; Units: s; Time (includes pauses)

func (*SegmentLap) SetTotalElapsedTimeScaled added in v0.17.2

func (m *SegmentLap) SetTotalElapsedTimeScaled(v float64) *SegmentLap

SetTotalElapsedTimeScaled is similar to SetTotalElapsedTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time (includes pauses)

func (*SegmentLap) SetTotalFatCalories added in v0.4.0

func (m *SegmentLap) SetTotalFatCalories(v uint16) *SegmentLap

SetTotalFatCalories sets TotalFatCalories value.

Units: kcal; If New Leaf

func (*SegmentLap) SetTotalFlow added in v0.4.0

func (m *SegmentLap) SetTotalFlow(v float32) *SegmentLap

SetTotalFlow sets TotalFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*SegmentLap) SetTotalFractionalAscent added in v0.4.0

func (m *SegmentLap) SetTotalFractionalAscent(v uint8) *SegmentLap

SetTotalFractionalAscent sets TotalFractionalAscent value.

Scale: 100; Units: m; fractional part of total_ascent

func (*SegmentLap) SetTotalFractionalAscentScaled added in v0.17.2

func (m *SegmentLap) SetTotalFractionalAscentScaled(v float64) *SegmentLap

SetTotalFractionalAscentScaled is similar to SetTotalFractionalAscent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_ascent

func (*SegmentLap) SetTotalFractionalCycles added in v0.4.0

func (m *SegmentLap) SetTotalFractionalCycles(v uint8) *SegmentLap

SetTotalFractionalCycles sets TotalFractionalCycles value.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*SegmentLap) SetTotalFractionalCyclesScaled added in v0.17.2

func (m *SegmentLap) SetTotalFractionalCyclesScaled(v float64) *SegmentLap

SetTotalFractionalCyclesScaled is similar to SetTotalFractionalCycles except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*SegmentLap) SetTotalFractionalDescent added in v0.4.0

func (m *SegmentLap) SetTotalFractionalDescent(v uint8) *SegmentLap

SetTotalFractionalDescent sets TotalFractionalDescent value.

Scale: 100; Units: m; fractional part of total_descent

func (*SegmentLap) SetTotalFractionalDescentScaled added in v0.17.2

func (m *SegmentLap) SetTotalFractionalDescentScaled(v float64) *SegmentLap

SetTotalFractionalDescentScaled is similar to SetTotalFractionalDescent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_descent

func (*SegmentLap) SetTotalGrit added in v0.4.0

func (m *SegmentLap) SetTotalGrit(v float32) *SegmentLap

SetTotalGrit sets TotalGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*SegmentLap) SetTotalMovingTime added in v0.4.0

func (m *SegmentLap) SetTotalMovingTime(v uint32) *SegmentLap

SetTotalMovingTime sets TotalMovingTime value.

Scale: 1000; Units: s

func (*SegmentLap) SetTotalMovingTimeScaled added in v0.17.2

func (m *SegmentLap) SetTotalMovingTimeScaled(v float64) *SegmentLap

SetTotalMovingTimeScaled is similar to SetTotalMovingTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*SegmentLap) SetTotalTimerTime added in v0.4.0

func (m *SegmentLap) SetTotalTimerTime(v uint32) *SegmentLap

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*SegmentLap) SetTotalTimerTimeScaled added in v0.17.2

func (m *SegmentLap) SetTotalTimerTimeScaled(v float64) *SegmentLap

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*SegmentLap) SetTotalWork added in v0.4.0

func (m *SegmentLap) SetTotalWork(v uint32) *SegmentLap

SetTotalWork sets TotalWork value.

Units: J

func (*SegmentLap) SetUnknownFields added in v0.23.6

func (m *SegmentLap) SetUnknownFields(unknownFields ...proto.Field) *SegmentLap

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SegmentLap) SetUuid added in v0.4.0

func (m *SegmentLap) SetUuid(v string) *SegmentLap

SetUuid sets Uuid value.

func (*SegmentLap) SetWktStepIndex added in v0.4.0

func (m *SegmentLap) SetWktStepIndex(v typedef.MessageIndex) *SegmentLap

SetWktStepIndex sets WktStepIndex value.

func (*SegmentLap) StartPositionLatDegrees added in v0.15.0

func (m *SegmentLap) StartPositionLatDegrees() float64

StartPositionLatDegrees returns StartPositionLat in degrees instead of semicircles. If StartPositionLat value is invalid, float64 invalid value will be returned.

func (*SegmentLap) StartPositionLongDegrees added in v0.15.0

func (m *SegmentLap) StartPositionLongDegrees() float64

StartPositionLongDegrees returns StartPositionLong in degrees instead of semicircles. If StartPositionLong value is invalid, float64 invalid value will be returned.

func (*SegmentLap) StartTimeUint32 added in v0.15.0

func (m *SegmentLap) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*SegmentLap) SwcLatDegrees added in v0.15.0

func (m *SegmentLap) SwcLatDegrees() float64

SwcLatDegrees returns SwcLat in degrees instead of semicircles. If SwcLat value is invalid, float64 invalid value will be returned.

func (*SegmentLap) SwcLongDegrees added in v0.15.0

func (m *SegmentLap) SwcLongDegrees() float64

SwcLongDegrees returns SwcLong in degrees instead of semicircles. If SwcLong value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TimeInCadenceZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value. If TimeInCadenceZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) TimeInHrZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value. If TimeInHrZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) TimeInPowerZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value. If TimeInPowerZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) TimeInSpeedZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value. If TimeInSpeedZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) TimeStandingScaled added in v0.8.0

func (m *SegmentLap) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value. If TimeStanding value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Total time spent in the standing position

func (*SegmentLap) TimestampUint32 added in v0.15.0

func (m *SegmentLap) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*SegmentLap) ToMesg added in v0.3.0

func (m *SegmentLap) ToMesg(options *Options) proto.Message

ToMesg converts SegmentLap into proto.Message. If options is nil, default options will be used.

func (*SegmentLap) TotalDistanceScaled added in v0.8.0

func (m *SegmentLap) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value. If TotalDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*SegmentLap) TotalElapsedTimeScaled added in v0.8.0

func (m *SegmentLap) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value. If TotalElapsedTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time (includes pauses)

func (*SegmentLap) TotalFractionalAscentScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value. If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_ascent

func (*SegmentLap) TotalFractionalCyclesScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value. If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*SegmentLap) TotalFractionalDescentScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value. If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_descent

func (*SegmentLap) TotalMovingTimeScaled added in v0.8.0

func (m *SegmentLap) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value. If TotalMovingTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*SegmentLap) TotalTimerTimeScaled added in v0.8.0

func (m *SegmentLap) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Timer Time (excludes pauses)

type SegmentLeaderboardEntry

type SegmentLeaderboardEntry struct {
	Name             string // Friendly name assigned to leader
	ActivityIdString string // String version of the activity_id. 21 characters long, express in decimal
	GroupPrimaryKey  uint32 // Primary user ID of this leader
	ActivityId       uint32 // ID of the activity associated with this leader time
	SegmentTime      uint32 // Scale: 1000; Units: s; Segment Time (includes pauses)
	MessageIndex     typedef.MessageIndex
	Type             typedef.SegmentLeaderboardType // Leader classification

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SegmentLeaderboardEntry is a SegmentLeaderboardEntry message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSegmentLeaderboardEntry

func NewSegmentLeaderboardEntry(mesg *proto.Message) *SegmentLeaderboardEntry

NewSegmentLeaderboardEntry creates new SegmentLeaderboardEntry struct based on given mesg. If mesg is nil, it will return SegmentLeaderboardEntry with all fields being set to its corresponding invalid value.

func (*SegmentLeaderboardEntry) SegmentTimeScaled added in v0.8.0

func (m *SegmentLeaderboardEntry) SegmentTimeScaled() float64

SegmentTimeScaled return SegmentTime in its scaled value. If SegmentTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Segment Time (includes pauses)

func (*SegmentLeaderboardEntry) SetActivityId added in v0.4.0

SetActivityId sets ActivityId value.

ID of the activity associated with this leader time

func (*SegmentLeaderboardEntry) SetActivityIdString added in v0.4.0

func (m *SegmentLeaderboardEntry) SetActivityIdString(v string) *SegmentLeaderboardEntry

SetActivityIdString sets ActivityIdString value.

String version of the activity_id. 21 characters long, express in decimal

func (*SegmentLeaderboardEntry) SetDeveloperFields added in v0.4.0

func (m *SegmentLeaderboardEntry) SetDeveloperFields(developerFields ...proto.DeveloperField) *SegmentLeaderboardEntry

SetDeveloperFields sets DeveloperFields.

func (*SegmentLeaderboardEntry) SetGroupPrimaryKey added in v0.4.0

func (m *SegmentLeaderboardEntry) SetGroupPrimaryKey(v uint32) *SegmentLeaderboardEntry

SetGroupPrimaryKey sets GroupPrimaryKey value.

Primary user ID of this leader

func (*SegmentLeaderboardEntry) SetMessageIndex added in v0.4.0

SetMessageIndex sets MessageIndex value.

func (*SegmentLeaderboardEntry) SetName added in v0.4.0

SetName sets Name value.

Friendly name assigned to leader

func (*SegmentLeaderboardEntry) SetSegmentTime added in v0.4.0

SetSegmentTime sets SegmentTime value.

Scale: 1000; Units: s; Segment Time (includes pauses)

func (*SegmentLeaderboardEntry) SetSegmentTimeScaled added in v0.17.2

func (m *SegmentLeaderboardEntry) SetSegmentTimeScaled(v float64) *SegmentLeaderboardEntry

SetSegmentTimeScaled is similar to SetSegmentTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Segment Time (includes pauses)

func (*SegmentLeaderboardEntry) SetType added in v0.4.0

SetType sets Type value.

Leader classification

func (*SegmentLeaderboardEntry) SetUnknownFields added in v0.23.6

func (m *SegmentLeaderboardEntry) SetUnknownFields(unknownFields ...proto.Field) *SegmentLeaderboardEntry

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SegmentLeaderboardEntry) ToMesg added in v0.3.0

func (m *SegmentLeaderboardEntry) ToMesg(options *Options) proto.Message

ToMesg converts SegmentLeaderboardEntry into proto.Message. If options is nil, default options will be used.

type SegmentPoint

type SegmentPoint struct {
	LeaderTime       []uint32 // Array: [N]; Scale: 1000; Units: s; Accumualted time each leader board member required to reach the described point. This value is zero for all leader board members at the starting point of the segment.
	PositionLat      int32    // Units: semicircles
	PositionLong     int32    // Units: semicircles
	Distance         uint32   // Scale: 100; Units: m; Accumulated distance along the segment at the described point
	EnhancedAltitude uint32   // Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point
	MessageIndex     typedef.MessageIndex
	Altitude         uint16 // Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

SegmentPoint is a SegmentPoint message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSegmentPoint

func NewSegmentPoint(mesg *proto.Message) *SegmentPoint

NewSegmentPoint creates new SegmentPoint struct based on given mesg. If mesg is nil, it will return SegmentPoint with all fields being set to its corresponding invalid value.

func (*SegmentPoint) AltitudeScaled added in v0.8.0

func (m *SegmentPoint) AltitudeScaled() float64

AltitudeScaled return Altitude in its scaled value. If Altitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) DistanceScaled added in v0.8.0

func (m *SegmentPoint) DistanceScaled() float64

DistanceScaled return Distance in its scaled value. If Distance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; Accumulated distance along the segment at the described point

func (*SegmentPoint) EnhancedAltitudeScaled added in v0.8.0

func (m *SegmentPoint) EnhancedAltitudeScaled() float64

EnhancedAltitudeScaled return EnhancedAltitude in its scaled value. If EnhancedAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) IsExpandedField added in v0.21.0

func (m *SegmentPoint) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 6.

func (*SegmentPoint) LeaderTimeScaled added in v0.8.0

func (m *SegmentPoint) LeaderTimeScaled() []float64

LeaderTimeScaled return LeaderTime in its scaled value. If LeaderTime value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s; Accumualted time each leader board member required to reach the described point. This value is zero for all leader board members at the starting point of the segment.

func (*SegmentPoint) MarkAsExpandedField added in v0.21.0

func (m *SegmentPoint) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 6.

func (*SegmentPoint) PositionLatDegrees added in v0.15.0

func (m *SegmentPoint) PositionLatDegrees() float64

PositionLatDegrees returns PositionLat in degrees instead of semicircles. If PositionLat value is invalid, float64 invalid value will be returned.

func (*SegmentPoint) PositionLongDegrees added in v0.15.0

func (m *SegmentPoint) PositionLongDegrees() float64

PositionLongDegrees returns PositionLong in degrees instead of semicircles. If PositionLong value is invalid, float64 invalid value will be returned.

func (*SegmentPoint) SetAltitude added in v0.4.0

func (m *SegmentPoint) SetAltitude(v uint16) *SegmentPoint

SetAltitude sets Altitude value.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) SetAltitudeScaled added in v0.17.2

func (m *SegmentPoint) SetAltitudeScaled(v float64) *SegmentPoint

SetAltitudeScaled is similar to SetAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) SetDeveloperFields added in v0.4.0

func (m *SegmentPoint) SetDeveloperFields(developerFields ...proto.DeveloperField) *SegmentPoint

SetDeveloperFields sets DeveloperFields.

func (*SegmentPoint) SetDistance added in v0.4.0

func (m *SegmentPoint) SetDistance(v uint32) *SegmentPoint

SetDistance sets Distance value.

Scale: 100; Units: m; Accumulated distance along the segment at the described point

func (*SegmentPoint) SetDistanceScaled added in v0.17.2

func (m *SegmentPoint) SetDistanceScaled(v float64) *SegmentPoint

SetDistanceScaled is similar to SetDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m; Accumulated distance along the segment at the described point

func (*SegmentPoint) SetEnhancedAltitude added in v0.4.0

func (m *SegmentPoint) SetEnhancedAltitude(v uint32) *SegmentPoint

SetEnhancedAltitude sets EnhancedAltitude value.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) SetEnhancedAltitudeScaled added in v0.17.2

func (m *SegmentPoint) SetEnhancedAltitudeScaled(v float64) *SegmentPoint

SetEnhancedAltitudeScaled is similar to SetEnhancedAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

func (*SegmentPoint) SetLeaderTime added in v0.4.0

func (m *SegmentPoint) SetLeaderTime(v []uint32) *SegmentPoint

SetLeaderTime sets LeaderTime value.

Array: [N]; Scale: 1000; Units: s; Accumualted time each leader board member required to reach the described point. This value is zero for all leader board members at the starting point of the segment.

func (*SegmentPoint) SetLeaderTimeScaled added in v0.17.2

func (m *SegmentPoint) SetLeaderTimeScaled(vs []float64) *SegmentPoint

SetLeaderTimeScaled is similar to SetLeaderTime except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s; Accumualted time each leader board member required to reach the described point. This value is zero for all leader board members at the starting point of the segment.

func (*SegmentPoint) SetMessageIndex added in v0.4.0

func (m *SegmentPoint) SetMessageIndex(v typedef.MessageIndex) *SegmentPoint

SetMessageIndex sets MessageIndex value.

func (*SegmentPoint) SetPositionLat added in v0.4.0

func (m *SegmentPoint) SetPositionLat(v int32) *SegmentPoint

SetPositionLat sets PositionLat value.

Units: semicircles

func (*SegmentPoint) SetPositionLatDegrees added in v0.17.2

func (m *SegmentPoint) SetPositionLatDegrees(degrees float64) *SegmentPoint

SetPositionLatDegrees is similar to SetPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentPoint) SetPositionLong added in v0.4.0

func (m *SegmentPoint) SetPositionLong(v int32) *SegmentPoint

SetPositionLong sets PositionLong value.

Units: semicircles

func (*SegmentPoint) SetPositionLongDegrees added in v0.17.2

func (m *SegmentPoint) SetPositionLongDegrees(degrees float64) *SegmentPoint

SetPositionLongDegrees is similar to SetPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*SegmentPoint) SetUnknownFields added in v0.23.6

func (m *SegmentPoint) SetUnknownFields(unknownFields ...proto.Field) *SegmentPoint

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SegmentPoint) ToMesg added in v0.3.0

func (m *SegmentPoint) ToMesg(options *Options) proto.Message

ToMesg converts SegmentPoint into proto.Message. If options is nil, default options will be used.

type Session

type Session struct {
	Timestamp                     time.Time // Units: s; Sesson end time.
	StartTime                     time.Time
	TimeInHrZone                  []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInSpeedZone               []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInCadenceZone             []uint32 // Array: [N]; Scale: 1000; Units: s
	TimeInPowerZone               []uint32 // Array: [N]; Scale: 1000; Units: s
	OpponentName                  string
	StrokeCount                   []uint16 // Array: [N]; Units: counts; stroke_type enum used as the index
	ZoneCount                     []uint16 // Array: [N]; Units: counts; zone number used as the index
	AvgTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin
	MinTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin
	MaxTotalHemoglobinConc        []uint16 // Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin
	AvgSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen
	MinSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen
	MaxSaturatedHemoglobinPercent []uint16 // Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen
	SportProfileName              string   // Sport name from associated sport mesg
	AvgLeftPowerPhase             []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Indexes defined by power_phase_type.
	AvgLeftPowerPhasePeak         []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhase            []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.
	AvgRightPowerPhasePeak        []uint8  // Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles data value indexes defined by power_phase_type.
	AvgPowerPosition              []uint16 // Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.
	MaxPowerPosition              []uint16 // Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.
	AvgCadencePosition            []uint8  // Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.
	MaxCadencePosition            []uint8  // Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.
	StartPositionLat              int32    // Units: semicircles
	StartPositionLong             int32    // Units: semicircles
	TotalElapsedTime              uint32   // Scale: 1000; Units: s; Time (includes pauses)
	TotalTimerTime                uint32   // Scale: 1000; Units: s; Timer Time (excludes pauses)
	TotalDistance                 uint32   // Scale: 100; Units: m
	TotalCycles                   uint32   // Units: cycles
	NecLat                        int32    // Units: semicircles; North east corner latitude
	NecLong                       int32    // Units: semicircles; North east corner longitude
	SwcLat                        int32    // Units: semicircles; South west corner latitude
	SwcLong                       int32    // Units: semicircles; South west corner longitude
	EndPositionLat                int32    // Units: semicircles
	EndPositionLong               int32    // Units: semicircles
	AvgStrokeCount                uint32   // Scale: 10; Units: strokes/lap
	TotalWork                     uint32   // Units: J
	TotalMovingTime               uint32   // Scale: 1000; Units: s
	AvgLapTime                    uint32   // Scale: 1000; Units: s
	TimeStanding                  uint32   // Scale: 1000; Units: s; Total time spend in the standing position
	EnhancedAvgSpeed              uint32   // Scale: 1000; Units: m/s; total_distance / total_timer_time
	EnhancedMaxSpeed              uint32   // Scale: 1000; Units: m/s
	EnhancedAvgAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMinAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	EnhancedMaxAltitude           uint32   // Scale: 5; Offset: 500; Units: m
	AvgDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	MaxDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	SurfaceInterval               uint32   // Units: s; Time since end of last dive
	DiveNumber                    uint32
	TrainingLoadPeak              int32                // Scale: 65536
	TotalGrit                     float32              // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	TotalFlow                     float32              // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	AvgGrit                       float32              // Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.
	AvgFlow                       float32              // Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.
	MessageIndex                  typedef.MessageIndex // Selected bit is set for the current session.
	TotalCalories                 uint16               // Units: kcal
	TotalFatCalories              uint16               // Units: kcal
	AvgSpeed                      uint16               // Scale: 1000; Units: m/s; total_distance / total_timer_time
	MaxSpeed                      uint16               // Scale: 1000; Units: m/s
	AvgPower                      uint16               // Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
	MaxPower                      uint16               // Units: watts
	TotalAscent                   uint16               // Units: m
	TotalDescent                  uint16               // Units: m
	FirstLapIndex                 uint16
	NumLaps                       uint16
	NumLengths                    uint16 // Units: lengths; # of lengths of swim pool
	NormalizedPower               uint16 // Units: watts
	TrainingStressScore           uint16 // Scale: 10; Units: tss
	IntensityFactor               uint16 // Scale: 1000; Units: if
	LeftRightBalance              typedef.LeftRightBalance100
	AvgStrokeDistance             uint16 // Scale: 100; Units: m
	PoolLength                    uint16 // Scale: 100; Units: m
	ThresholdPower                uint16 // Units: watts
	NumActiveLengths              uint16 // Units: lengths; # of active lengths of swim pool
	AvgAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	MaxAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	AvgGrade                      int16  // Scale: 100; Units: %
	AvgPosGrade                   int16  // Scale: 100; Units: %
	AvgNegGrade                   int16  // Scale: 100; Units: %
	MaxPosGrade                   int16  // Scale: 100; Units: %
	MaxNegGrade                   int16  // Scale: 100; Units: %
	AvgPosVerticalSpeed           int16  // Scale: 1000; Units: m/s
	AvgNegVerticalSpeed           int16  // Scale: 1000; Units: m/s
	MaxPosVerticalSpeed           int16  // Scale: 1000; Units: m/s
	MaxNegVerticalSpeed           int16  // Scale: 1000; Units: m/s
	BestLapIndex                  uint16
	MinAltitude                   uint16 // Scale: 5; Offset: 500; Units: m
	PlayerScore                   uint16
	OpponentScore                 uint16
	MaxBallSpeed                  uint16 // Scale: 100; Units: m/s
	AvgBallSpeed                  uint16 // Scale: 100; Units: m/s
	AvgVerticalOscillation        uint16 // Scale: 10; Units: mm
	AvgStanceTimePercent          uint16 // Scale: 100; Units: percent
	AvgStanceTime                 uint16 // Scale: 10; Units: ms
	StandCount                    uint16 // Number of transitions to the standing state
	AvgLevMotorPower              uint16 // Units: watts; lev average motor power during session
	MaxLevMotorPower              uint16 // Units: watts; lev maximum motor power during session
	AvgVerticalRatio              uint16 // Scale: 100; Units: percent
	AvgStanceTimeBalance          uint16 // Scale: 100; Units: percent
	AvgStepLength                 uint16 // Scale: 10; Units: mm
	AvgVam                        uint16 // Scale: 1000; Units: m/s
	StartN2                       uint16 // Units: percent
	EndN2                         uint16 // Units: percent
	O2Toxicity                    uint16 // Units: OTUs
	EnhancedAvgRespirationRate    uint16 // Scale: 100; Units: Breaths/min
	EnhancedMaxRespirationRate    uint16 // Scale: 100; Units: Breaths/min
	EnhancedMinRespirationRate    uint16 // Scale: 100
	JumpCount                     uint16
	AvgCoreTemperature            uint16            // Scale: 100; Units: C
	MinCoreTemperature            uint16            // Scale: 100; Units: C
	MaxCoreTemperature            uint16            // Scale: 100; Units: C
	Event                         typedef.Event     // session
	EventType                     typedef.EventType // stop
	Sport                         typedef.Sport
	SubSport                      typedef.SubSport
	AvgHeartRate                  uint8 // Units: bpm; average heart rate (excludes pause time)
	MaxHeartRate                  uint8 // Units: bpm
	AvgCadence                    uint8 // Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
	MaxCadence                    uint8 // Units: rpm
	TotalTrainingEffect           uint8 // Scale: 10
	EventGroup                    uint8
	Trigger                       typedef.SessionTrigger
	SwimStroke                    typedef.SwimStroke // Units: swim_stroke
	PoolLengthUnit                typedef.DisplayMeasure
	GpsAccuracy                   uint8 // Units: m
	AvgTemperature                int8  // Units: C
	MaxTemperature                int8  // Units: C
	MinHeartRate                  uint8 // Units: bpm
	AvgFractionalCadence          uint8 // Scale: 128; Units: rpm; fractional part of the avg_cadence
	MaxFractionalCadence          uint8 // Scale: 128; Units: rpm; fractional part of the max_cadence
	TotalFractionalCycles         uint8 // Scale: 128; Units: cycles; fractional part of the total_cycles
	AvgLeftTorqueEffectiveness    uint8 // Scale: 2; Units: percent
	AvgRightTorqueEffectiveness   uint8 // Scale: 2; Units: percent
	AvgLeftPedalSmoothness        uint8 // Scale: 2; Units: percent
	AvgRightPedalSmoothness       uint8 // Scale: 2; Units: percent
	AvgCombinedPedalSmoothness    uint8 // Scale: 2; Units: percent
	SportIndex                    uint8
	AvgLeftPco                    int8  // Units: mm; Average platform center offset Left
	AvgRightPco                   int8  // Units: mm; Average platform center offset Right
	LevBatteryConsumption         uint8 // Scale: 2; Units: percent; lev battery consumption during session
	TotalAnaerobicTrainingEffect  uint8 // Scale: 10
	StartCns                      uint8 // Units: percent
	EndCns                        uint8 // Units: percent
	AvgRespirationRate            uint8
	MaxRespirationRate            uint8
	MinRespirationRate            uint8
	MinTemperature                int8  // Units: C
	WorkoutFeel                   uint8 // A 0-100 scale representing how a user felt while performing a workout. Low values are considered feeling bad, while high values are good.
	WorkoutRpe                    uint8 // Common Borg CR10 / 0-10 RPE scale, multiplied 10x.. Aggregate score for all workouts in a single session.
	AvgSpo2                       uint8 // Units: percent; Average SPO2 for the monitoring session
	AvgStress                     uint8 // Units: percent; Average stress for the monitoring session
	SdrrHrv                       uint8 // Units: mS; Standard deviation of R-R interval (SDRR) - Heart rate variability measure most useful for wellness users.
	RmssdHrv                      uint8 // Units: mS; Root mean square successive difference (RMSSD) - Heart rate variability measure most useful for athletes
	TotalFractionalAscent         uint8 // Scale: 100; Units: m; fractional part of total_ascent
	TotalFractionalDescent        uint8 // Scale: 100; Units: m; fractional part of total_descent

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
	// contains filtered or unexported fields
}

Session is a Session message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSession

func NewSession(mesg *proto.Message) *Session

NewSession creates new Session struct based on given mesg. If mesg is nil, it will return Session with all fields being set to its corresponding invalid value.

func (*Session) AvgAltitudeScaled added in v0.8.0

func (m *Session) AvgAltitudeScaled() float64

AvgAltitudeScaled return AvgAltitude in its scaled value. If AvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) AvgBallSpeedScaled added in v0.8.0

func (m *Session) AvgBallSpeedScaled() float64

AvgBallSpeedScaled return AvgBallSpeed in its scaled value. If AvgBallSpeed value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m/s

func (*Session) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value. If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Session) AvgCoreTemperatureScaled added in v0.8.0

func (m *Session) AvgCoreTemperatureScaled() float64

AvgCoreTemperatureScaled return AvgCoreTemperature in its scaled value. If AvgCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Session) AvgDepthScaled added in v0.8.0

func (m *Session) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value. If AvgDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Session) AvgFractionalCadenceScaled added in v0.8.0

func (m *Session) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value. If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Session) AvgGradeScaled added in v0.8.0

func (m *Session) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value. If AvgGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Session) AvgLapTimeScaled added in v0.8.0

func (m *Session) AvgLapTimeScaled() float64

AvgLapTimeScaled return AvgLapTime in its scaled value. If AvgLapTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Session) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value. If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Session) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *Session) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value. If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Session) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *Session) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value. If AvgLeftPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Indexes defined by power_phase_type.

func (*Session) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *Session) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value. If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Session) AvgNegGradeScaled added in v0.8.0

func (m *Session) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value. If AvgNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Session) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *Session) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value. If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) AvgPosGradeScaled added in v0.8.0

func (m *Session) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value. If AvgPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Session) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *Session) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value. If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value. If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Session) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *Session) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value. If AvgRightPowerPhasePeak value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles data value indexes defined by power_phase_type.

func (*Session) AvgRightPowerPhaseScaled added in v0.8.0

func (m *Session) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value. If AvgRightPowerPhase value is invalid, nil will be returned.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Session) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *Session) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value. If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent

func (*Session) AvgSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) AvgSaturatedHemoglobinPercentScaled() []float64

AvgSaturatedHemoglobinPercentScaled return AvgSaturatedHemoglobinPercent in its scaled value. If AvgSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Session) AvgSpeedScaled added in v0.8.0

func (m *Session) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) AvgStanceTimeBalanceScaled added in v0.8.0

func (m *Session) AvgStanceTimeBalanceScaled() float64

AvgStanceTimeBalanceScaled return AvgStanceTimeBalance in its scaled value. If AvgStanceTimeBalance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Session) AvgStanceTimePercentScaled added in v0.8.0

func (m *Session) AvgStanceTimePercentScaled() float64

AvgStanceTimePercentScaled return AvgStanceTimePercent in its scaled value. If AvgStanceTimePercent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Session) AvgStanceTimeScaled added in v0.8.0

func (m *Session) AvgStanceTimeScaled() float64

AvgStanceTimeScaled return AvgStanceTime in its scaled value. If AvgStanceTime value is invalid, float64 invalid value will be returned.

Scale: 10; Units: ms

func (*Session) AvgStepLengthScaled added in v0.8.0

func (m *Session) AvgStepLengthScaled() float64

AvgStepLengthScaled return AvgStepLength in its scaled value. If AvgStepLength value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Session) AvgStrokeCountScaled added in v0.8.0

func (m *Session) AvgStrokeCountScaled() float64

AvgStrokeCountScaled return AvgStrokeCount in its scaled value. If AvgStrokeCount value is invalid, float64 invalid value will be returned.

Scale: 10; Units: strokes/lap

func (*Session) AvgStrokeDistanceScaled added in v0.8.0

func (m *Session) AvgStrokeDistanceScaled() float64

AvgStrokeDistanceScaled return AvgStrokeDistance in its scaled value. If AvgStrokeDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Session) AvgTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) AvgTotalHemoglobinConcScaled() []float64

AvgTotalHemoglobinConcScaled return AvgTotalHemoglobinConc in its scaled value. If AvgTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Session) AvgVamScaled added in v0.8.0

func (m *Session) AvgVamScaled() float64

AvgVamScaled return AvgVam in its scaled value. If AvgVam value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) AvgVerticalOscillationScaled added in v0.8.0

func (m *Session) AvgVerticalOscillationScaled() float64

AvgVerticalOscillationScaled return AvgVerticalOscillation in its scaled value. If AvgVerticalOscillation value is invalid, float64 invalid value will be returned.

Scale: 10; Units: mm

func (*Session) AvgVerticalRatioScaled added in v0.8.0

func (m *Session) AvgVerticalRatioScaled() float64

AvgVerticalRatioScaled return AvgVerticalRatio in its scaled value. If AvgVerticalRatio value is invalid, float64 invalid value will be returned.

Scale: 100; Units: percent

func (*Session) EndPositionLatDegrees added in v0.15.0

func (m *Session) EndPositionLatDegrees() float64

EndPositionLatDegrees returns EndPositionLat in degrees instead of semicircles. If EndPositionLat value is invalid, float64 invalid value will be returned.

func (*Session) EndPositionLongDegrees added in v0.15.0

func (m *Session) EndPositionLongDegrees() float64

EndPositionLongDegrees returns EndPositionLong in degrees instead of semicircles. If EndPositionLong value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedAvgAltitudeScaled added in v0.8.0

func (m *Session) EnhancedAvgAltitudeScaled() float64

EnhancedAvgAltitudeScaled return EnhancedAvgAltitude in its scaled value. If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value. If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Session) EnhancedAvgSpeedScaled added in v0.8.0

func (m *Session) EnhancedAvgSpeedScaled() float64

EnhancedAvgSpeedScaled return EnhancedAvgSpeed in its scaled value. If EnhancedAvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *Session) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value. If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value. If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100; Units: Breaths/min

func (*Session) EnhancedMaxSpeedScaled added in v0.8.0

func (m *Session) EnhancedMaxSpeedScaled() float64

EnhancedMaxSpeedScaled return EnhancedMaxSpeed in its scaled value. If EnhancedMaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) EnhancedMinAltitudeScaled added in v0.8.0

func (m *Session) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value. If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) EnhancedMinRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedMinRespirationRateScaled() float64

EnhancedMinRespirationRateScaled return EnhancedMinRespirationRate in its scaled value. If EnhancedMinRespirationRate value is invalid, float64 invalid value will be returned.

Scale: 100

func (*Session) GetAvgCadence added in v0.16.0

func (m *Session) GetAvgCadence() (name string, value any)

GetAvgCadence returns Dynamic Field interpretation of AvgCadence. Otherwise, returns the original value of AvgCadence.

Based on m.Sport:

  • name: "avg_running_cadence", units: "strides/min" , value: uint8(m.AvgCadence)

Otherwise:

  • name: "avg_cadence", units: "rpm" , value: m.AvgCadence

func (*Session) GetMaxCadence added in v0.16.0

func (m *Session) GetMaxCadence() (name string, value any)

GetMaxCadence returns Dynamic Field interpretation of MaxCadence. Otherwise, returns the original value of MaxCadence.

Based on m.Sport:

  • name: "max_running_cadence", units: "strides/min" , value: uint8(m.MaxCadence)

Otherwise:

  • name: "max_cadence", units: "rpm" , value: m.MaxCadence

func (*Session) GetTotalCycles added in v0.16.0

func (m *Session) GetTotalCycles() (name string, value any)

GetTotalCycles returns Dynamic Field interpretation of TotalCycles. Otherwise, returns the original value of TotalCycles.

Based on m.Sport:

  • name: "total_strides", units: "strides" , value: uint32(m.TotalCycles)
  • name: "total_strokes", units: "strokes" , value: uint32(m.TotalCycles)

Otherwise:

  • name: "total_cycles", units: "cycles" , value: m.TotalCycles

func (*Session) IntensityFactorScaled added in v0.8.0

func (m *Session) IntensityFactorScaled() float64

IntensityFactorScaled return IntensityFactor in its scaled value. If IntensityFactor value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: if

func (*Session) IsExpandedField added in v0.21.0

func (m *Session) IsExpandedField(fieldNum byte) bool

IsExpandedField checks whether given fieldNum is a field generated through a component expansion. Eligible for field number: 124, 125, 126, 127, 128, 169, 170, 180.

func (*Session) LevBatteryConsumptionScaled added in v0.8.0

func (m *Session) LevBatteryConsumptionScaled() float64

LevBatteryConsumptionScaled return LevBatteryConsumption in its scaled value. If LevBatteryConsumption value is invalid, float64 invalid value will be returned.

Scale: 2; Units: percent; lev battery consumption during session

func (*Session) MarkAsExpandedField added in v0.21.0

func (m *Session) MarkAsExpandedField(fieldNum byte, flag bool) (ok bool)

MarkAsExpandedField marks whether given fieldNum is an expanded field (field that being generated through a component expansion). Eligible for field number: 124, 125, 126, 127, 128, 169, 170, 180.

func (*Session) MaxAltitudeScaled added in v0.8.0

func (m *Session) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value. If MaxAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) MaxBallSpeedScaled added in v0.8.0

func (m *Session) MaxBallSpeedScaled() float64

MaxBallSpeedScaled return MaxBallSpeed in its scaled value. If MaxBallSpeed value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m/s

func (*Session) MaxCoreTemperatureScaled added in v0.8.0

func (m *Session) MaxCoreTemperatureScaled() float64

MaxCoreTemperatureScaled return MaxCoreTemperature in its scaled value. If MaxCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Session) MaxDepthScaled added in v0.8.0

func (m *Session) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value. If MaxDepth value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; 0 if above water

func (*Session) MaxFractionalCadenceScaled added in v0.8.0

func (m *Session) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value. If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Session) MaxNegGradeScaled added in v0.8.0

func (m *Session) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value. If MaxNegGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Session) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *Session) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value. If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) MaxPosGradeScaled added in v0.8.0

func (m *Session) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value. If MaxPosGrade value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*Session) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *Session) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value. If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) MaxSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) MaxSaturatedHemoglobinPercentScaled() []float64

MaxSaturatedHemoglobinPercentScaled return MaxSaturatedHemoglobinPercent in its scaled value. If MaxSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Session) MaxSpeedScaled added in v0.8.0

func (m *Session) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Session) MaxTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) MaxTotalHemoglobinConcScaled() []float64

MaxTotalHemoglobinConcScaled return MaxTotalHemoglobinConc in its scaled value. If MaxTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Session) MinAltitudeScaled added in v0.8.0

func (m *Session) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value. If MinAltitude value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Session) MinCoreTemperatureScaled added in v0.8.0

func (m *Session) MinCoreTemperatureScaled() float64

MinCoreTemperatureScaled return MinCoreTemperature in its scaled value. If MinCoreTemperature value is invalid, float64 invalid value will be returned.

Scale: 100; Units: C

func (*Session) MinSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) MinSaturatedHemoglobinPercentScaled() []float64

MinSaturatedHemoglobinPercentScaled return MinSaturatedHemoglobinPercent in its scaled value. If MinSaturatedHemoglobinPercent value is invalid, nil will be returned.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Session) MinTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) MinTotalHemoglobinConcScaled() []float64

MinTotalHemoglobinConcScaled return MinTotalHemoglobinConc in its scaled value. If MinTotalHemoglobinConc value is invalid, nil will be returned.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Session) NecLatDegrees added in v0.15.0

func (m *Session) NecLatDegrees() float64

NecLatDegrees returns NecLat in degrees instead of semicircles. If NecLat value is invalid, float64 invalid value will be returned.

func (*Session) NecLongDegrees added in v0.15.0

func (m *Session) NecLongDegrees() float64

NecLongDegrees returns NecLong in degrees instead of semicircles. If NecLong value is invalid, float64 invalid value will be returned.

func (*Session) PoolLengthScaled added in v0.8.0

func (m *Session) PoolLengthScaled() float64

PoolLengthScaled return PoolLength in its scaled value. If PoolLength value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Session) SetAvgAltitude added in v0.4.0

func (m *Session) SetAvgAltitude(v uint16) *Session

SetAvgAltitude sets AvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetAvgAltitudeScaled added in v0.17.2

func (m *Session) SetAvgAltitudeScaled(v float64) *Session

SetAvgAltitudeScaled is similar to SetAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetAvgBallSpeed added in v0.4.0

func (m *Session) SetAvgBallSpeed(v uint16) *Session

SetAvgBallSpeed sets AvgBallSpeed value.

Scale: 100; Units: m/s

func (*Session) SetAvgBallSpeedScaled added in v0.17.2

func (m *Session) SetAvgBallSpeedScaled(v float64) *Session

SetAvgBallSpeedScaled is similar to SetAvgBallSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m/s

func (*Session) SetAvgCadence added in v0.4.0

func (m *Session) SetAvgCadence(v uint8) *Session

SetAvgCadence sets AvgCadence value.

Units: rpm; total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time

func (*Session) SetAvgCadencePosition added in v0.4.0

func (m *Session) SetAvgCadencePosition(v []uint8) *Session

SetAvgCadencePosition sets AvgCadencePosition value.

Array: [N]; Units: rpm; Average cadence by position. Data value indexes defined by rider_position_type.

func (*Session) SetAvgCombinedPedalSmoothness added in v0.4.0

func (m *Session) SetAvgCombinedPedalSmoothness(v uint8) *Session

SetAvgCombinedPedalSmoothness sets AvgCombinedPedalSmoothness value.

Scale: 2; Units: percent

func (*Session) SetAvgCombinedPedalSmoothnessScaled added in v0.17.2

func (m *Session) SetAvgCombinedPedalSmoothnessScaled(v float64) *Session

SetAvgCombinedPedalSmoothnessScaled is similar to SetAvgCombinedPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Session) SetAvgCoreTemperature added in v0.4.0

func (m *Session) SetAvgCoreTemperature(v uint16) *Session

SetAvgCoreTemperature sets AvgCoreTemperature value.

Scale: 100; Units: C

func (*Session) SetAvgCoreTemperatureScaled added in v0.17.2

func (m *Session) SetAvgCoreTemperatureScaled(v float64) *Session

SetAvgCoreTemperatureScaled is similar to SetAvgCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Session) SetAvgDepth added in v0.4.0

func (m *Session) SetAvgDepth(v uint32) *Session

SetAvgDepth sets AvgDepth value.

Scale: 1000; Units: m; 0 if above water

func (*Session) SetAvgDepthScaled added in v0.17.2

func (m *Session) SetAvgDepthScaled(v float64) *Session

SetAvgDepthScaled is similar to SetAvgDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Session) SetAvgFlow added in v0.4.0

func (m *Session) SetAvgFlow(v float32) *Session

SetAvgFlow sets AvgFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*Session) SetAvgFractionalCadence added in v0.4.0

func (m *Session) SetAvgFractionalCadence(v uint8) *Session

SetAvgFractionalCadence sets AvgFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Session) SetAvgFractionalCadenceScaled added in v0.17.2

func (m *Session) SetAvgFractionalCadenceScaled(v float64) *Session

SetAvgFractionalCadenceScaled is similar to SetAvgFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the avg_cadence

func (*Session) SetAvgGrade added in v0.4.0

func (m *Session) SetAvgGrade(v int16) *Session

SetAvgGrade sets AvgGrade value.

Scale: 100; Units: %

func (*Session) SetAvgGradeScaled added in v0.17.2

func (m *Session) SetAvgGradeScaled(v float64) *Session

SetAvgGradeScaled is similar to SetAvgGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Session) SetAvgGrit added in v0.4.0

func (m *Session) SetAvgGrit(v float32) *Session

SetAvgGrit sets AvgGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*Session) SetAvgHeartRate added in v0.4.0

func (m *Session) SetAvgHeartRate(v uint8) *Session

SetAvgHeartRate sets AvgHeartRate value.

Units: bpm; average heart rate (excludes pause time)

func (*Session) SetAvgLapTime added in v0.4.0

func (m *Session) SetAvgLapTime(v uint32) *Session

SetAvgLapTime sets AvgLapTime value.

Scale: 1000; Units: s

func (*Session) SetAvgLapTimeScaled added in v0.17.2

func (m *Session) SetAvgLapTimeScaled(v float64) *Session

SetAvgLapTimeScaled is similar to SetAvgLapTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Session) SetAvgLeftPco added in v0.4.0

func (m *Session) SetAvgLeftPco(v int8) *Session

SetAvgLeftPco sets AvgLeftPco value.

Units: mm; Average platform center offset Left

func (*Session) SetAvgLeftPedalSmoothness added in v0.4.0

func (m *Session) SetAvgLeftPedalSmoothness(v uint8) *Session

SetAvgLeftPedalSmoothness sets AvgLeftPedalSmoothness value.

Scale: 2; Units: percent

func (*Session) SetAvgLeftPedalSmoothnessScaled added in v0.17.2

func (m *Session) SetAvgLeftPedalSmoothnessScaled(v float64) *Session

SetAvgLeftPedalSmoothnessScaled is similar to SetAvgLeftPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Session) SetAvgLeftPowerPhase added in v0.4.0

func (m *Session) SetAvgLeftPowerPhase(v []uint8) *Session

SetAvgLeftPowerPhase sets AvgLeftPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Indexes defined by power_phase_type.

func (*Session) SetAvgLeftPowerPhasePeak added in v0.4.0

func (m *Session) SetAvgLeftPowerPhasePeak(v []uint8) *Session

SetAvgLeftPowerPhasePeak sets AvgLeftPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Session) SetAvgLeftPowerPhasePeakScaled added in v0.17.2

func (m *Session) SetAvgLeftPowerPhasePeakScaled(vs []float64) *Session

SetAvgLeftPowerPhasePeakScaled is similar to SetAvgLeftPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Session) SetAvgLeftPowerPhaseScaled added in v0.17.2

func (m *Session) SetAvgLeftPowerPhaseScaled(vs []float64) *Session

SetAvgLeftPowerPhaseScaled is similar to SetAvgLeftPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Indexes defined by power_phase_type.

func (*Session) SetAvgLeftTorqueEffectiveness added in v0.4.0

func (m *Session) SetAvgLeftTorqueEffectiveness(v uint8) *Session

SetAvgLeftTorqueEffectiveness sets AvgLeftTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Session) SetAvgLeftTorqueEffectivenessScaled added in v0.17.2

func (m *Session) SetAvgLeftTorqueEffectivenessScaled(v float64) *Session

SetAvgLeftTorqueEffectivenessScaled is similar to SetAvgLeftTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Session) SetAvgLevMotorPower added in v0.4.0

func (m *Session) SetAvgLevMotorPower(v uint16) *Session

SetAvgLevMotorPower sets AvgLevMotorPower value.

Units: watts; lev average motor power during session

func (*Session) SetAvgNegGrade added in v0.4.0

func (m *Session) SetAvgNegGrade(v int16) *Session

SetAvgNegGrade sets AvgNegGrade value.

Scale: 100; Units: %

func (*Session) SetAvgNegGradeScaled added in v0.17.2

func (m *Session) SetAvgNegGradeScaled(v float64) *Session

SetAvgNegGradeScaled is similar to SetAvgNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Session) SetAvgNegVerticalSpeed added in v0.4.0

func (m *Session) SetAvgNegVerticalSpeed(v int16) *Session

SetAvgNegVerticalSpeed sets AvgNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetAvgNegVerticalSpeedScaled added in v0.17.2

func (m *Session) SetAvgNegVerticalSpeedScaled(v float64) *Session

SetAvgNegVerticalSpeedScaled is similar to SetAvgNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetAvgPosGrade added in v0.4.0

func (m *Session) SetAvgPosGrade(v int16) *Session

SetAvgPosGrade sets AvgPosGrade value.

Scale: 100; Units: %

func (*Session) SetAvgPosGradeScaled added in v0.17.2

func (m *Session) SetAvgPosGradeScaled(v float64) *Session

SetAvgPosGradeScaled is similar to SetAvgPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Session) SetAvgPosVerticalSpeed added in v0.4.0

func (m *Session) SetAvgPosVerticalSpeed(v int16) *Session

SetAvgPosVerticalSpeed sets AvgPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetAvgPosVerticalSpeedScaled added in v0.17.2

func (m *Session) SetAvgPosVerticalSpeedScaled(v float64) *Session

SetAvgPosVerticalSpeedScaled is similar to SetAvgPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetAvgPower added in v0.4.0

func (m *Session) SetAvgPower(v uint16) *Session

SetAvgPower sets AvgPower value.

Units: watts; total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time

func (*Session) SetAvgPowerPosition added in v0.4.0

func (m *Session) SetAvgPowerPosition(v []uint16) *Session

SetAvgPowerPosition sets AvgPowerPosition value.

Array: [N]; Units: watts; Average power by position. Data value indexes defined by rider_position_type.

func (*Session) SetAvgRespirationRate added in v0.4.0

func (m *Session) SetAvgRespirationRate(v uint8) *Session

SetAvgRespirationRate sets AvgRespirationRate value.

func (*Session) SetAvgRightPco added in v0.4.0

func (m *Session) SetAvgRightPco(v int8) *Session

SetAvgRightPco sets AvgRightPco value.

Units: mm; Average platform center offset Right

func (*Session) SetAvgRightPedalSmoothness added in v0.4.0

func (m *Session) SetAvgRightPedalSmoothness(v uint8) *Session

SetAvgRightPedalSmoothness sets AvgRightPedalSmoothness value.

Scale: 2; Units: percent

func (*Session) SetAvgRightPedalSmoothnessScaled added in v0.17.2

func (m *Session) SetAvgRightPedalSmoothnessScaled(v float64) *Session

SetAvgRightPedalSmoothnessScaled is similar to SetAvgRightPedalSmoothness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Session) SetAvgRightPowerPhase added in v0.4.0

func (m *Session) SetAvgRightPowerPhase(v []uint8) *Session

SetAvgRightPowerPhase sets AvgRightPowerPhase value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Session) SetAvgRightPowerPhasePeak added in v0.4.0

func (m *Session) SetAvgRightPowerPhasePeak(v []uint8) *Session

SetAvgRightPowerPhasePeak sets AvgRightPowerPhasePeak value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles data value indexes defined by power_phase_type.

func (*Session) SetAvgRightPowerPhasePeakScaled added in v0.17.2

func (m *Session) SetAvgRightPowerPhasePeakScaled(vs []float64) *Session

SetAvgRightPowerPhasePeakScaled is similar to SetAvgRightPowerPhasePeak except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles data value indexes defined by power_phase_type.

func (*Session) SetAvgRightPowerPhaseScaled added in v0.17.2

func (m *Session) SetAvgRightPowerPhaseScaled(vs []float64) *Session

SetAvgRightPowerPhaseScaled is similar to SetAvgRightPowerPhase except it accepts a scaled value. This method automatically converts the given value to its []uint8 form, discarding any applied scale and offset.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.

func (*Session) SetAvgRightTorqueEffectiveness added in v0.4.0

func (m *Session) SetAvgRightTorqueEffectiveness(v uint8) *Session

SetAvgRightTorqueEffectiveness sets AvgRightTorqueEffectiveness value.

Scale: 2; Units: percent

func (*Session) SetAvgRightTorqueEffectivenessScaled added in v0.17.2

func (m *Session) SetAvgRightTorqueEffectivenessScaled(v float64) *Session

SetAvgRightTorqueEffectivenessScaled is similar to SetAvgRightTorqueEffectiveness except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent

func (*Session) SetAvgSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetAvgSaturatedHemoglobinPercent(v []uint16) *Session

SetAvgSaturatedHemoglobinPercent sets AvgSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Session) SetAvgSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Session) SetAvgSaturatedHemoglobinPercentScaled(vs []float64) *Session

SetAvgSaturatedHemoglobinPercentScaled is similar to SetAvgSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen

func (*Session) SetAvgSpeed added in v0.4.0

func (m *Session) SetAvgSpeed(v uint16) *Session

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) SetAvgSpeedScaled added in v0.17.2

func (m *Session) SetAvgSpeedScaled(v float64) *Session

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) SetAvgSpo2 added in v0.4.0

func (m *Session) SetAvgSpo2(v uint8) *Session

SetAvgSpo2 sets AvgSpo2 value.

Units: percent; Average SPO2 for the monitoring session

func (*Session) SetAvgStanceTime added in v0.4.0

func (m *Session) SetAvgStanceTime(v uint16) *Session

SetAvgStanceTime sets AvgStanceTime value.

Scale: 10; Units: ms

func (*Session) SetAvgStanceTimeBalance added in v0.4.0

func (m *Session) SetAvgStanceTimeBalance(v uint16) *Session

SetAvgStanceTimeBalance sets AvgStanceTimeBalance value.

Scale: 100; Units: percent

func (*Session) SetAvgStanceTimeBalanceScaled added in v0.17.2

func (m *Session) SetAvgStanceTimeBalanceScaled(v float64) *Session

SetAvgStanceTimeBalanceScaled is similar to SetAvgStanceTimeBalance except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Session) SetAvgStanceTimePercent added in v0.4.0

func (m *Session) SetAvgStanceTimePercent(v uint16) *Session

SetAvgStanceTimePercent sets AvgStanceTimePercent value.

Scale: 100; Units: percent

func (*Session) SetAvgStanceTimePercentScaled added in v0.17.2

func (m *Session) SetAvgStanceTimePercentScaled(v float64) *Session

SetAvgStanceTimePercentScaled is similar to SetAvgStanceTimePercent except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Session) SetAvgStanceTimeScaled added in v0.17.2

func (m *Session) SetAvgStanceTimeScaled(v float64) *Session

SetAvgStanceTimeScaled is similar to SetAvgStanceTime except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: ms

func (*Session) SetAvgStepLength added in v0.4.0

func (m *Session) SetAvgStepLength(v uint16) *Session

SetAvgStepLength sets AvgStepLength value.

Scale: 10; Units: mm

func (*Session) SetAvgStepLengthScaled added in v0.17.2

func (m *Session) SetAvgStepLengthScaled(v float64) *Session

SetAvgStepLengthScaled is similar to SetAvgStepLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Session) SetAvgStress added in v0.4.0

func (m *Session) SetAvgStress(v uint8) *Session

SetAvgStress sets AvgStress value.

Units: percent; Average stress for the monitoring session

func (*Session) SetAvgStrokeCount added in v0.4.0

func (m *Session) SetAvgStrokeCount(v uint32) *Session

SetAvgStrokeCount sets AvgStrokeCount value.

Scale: 10; Units: strokes/lap

func (*Session) SetAvgStrokeCountScaled added in v0.17.2

func (m *Session) SetAvgStrokeCountScaled(v float64) *Session

SetAvgStrokeCountScaled is similar to SetAvgStrokeCount except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 10; Units: strokes/lap

func (*Session) SetAvgStrokeDistance added in v0.4.0

func (m *Session) SetAvgStrokeDistance(v uint16) *Session

SetAvgStrokeDistance sets AvgStrokeDistance value.

Scale: 100; Units: m

func (*Session) SetAvgStrokeDistanceScaled added in v0.17.2

func (m *Session) SetAvgStrokeDistanceScaled(v float64) *Session

SetAvgStrokeDistanceScaled is similar to SetAvgStrokeDistance except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Session) SetAvgTemperature added in v0.4.0

func (m *Session) SetAvgTemperature(v int8) *Session

SetAvgTemperature sets AvgTemperature value.

Units: C

func (*Session) SetAvgTotalHemoglobinConc added in v0.4.0

func (m *Session) SetAvgTotalHemoglobinConc(v []uint16) *Session

SetAvgTotalHemoglobinConc sets AvgTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Session) SetAvgTotalHemoglobinConcScaled added in v0.17.2

func (m *Session) SetAvgTotalHemoglobinConcScaled(vs []float64) *Session

SetAvgTotalHemoglobinConcScaled is similar to SetAvgTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin

func (*Session) SetAvgVam added in v0.4.0

func (m *Session) SetAvgVam(v uint16) *Session

SetAvgVam sets AvgVam value.

Scale: 1000; Units: m/s

func (*Session) SetAvgVamScaled added in v0.17.2

func (m *Session) SetAvgVamScaled(v float64) *Session

SetAvgVamScaled is similar to SetAvgVam except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetAvgVerticalOscillation added in v0.4.0

func (m *Session) SetAvgVerticalOscillation(v uint16) *Session

SetAvgVerticalOscillation sets AvgVerticalOscillation value.

Scale: 10; Units: mm

func (*Session) SetAvgVerticalOscillationScaled added in v0.17.2

func (m *Session) SetAvgVerticalOscillationScaled(v float64) *Session

SetAvgVerticalOscillationScaled is similar to SetAvgVerticalOscillation except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: mm

func (*Session) SetAvgVerticalRatio added in v0.4.0

func (m *Session) SetAvgVerticalRatio(v uint16) *Session

SetAvgVerticalRatio sets AvgVerticalRatio value.

Scale: 100; Units: percent

func (*Session) SetAvgVerticalRatioScaled added in v0.17.2

func (m *Session) SetAvgVerticalRatioScaled(v float64) *Session

SetAvgVerticalRatioScaled is similar to SetAvgVerticalRatio except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: percent

func (*Session) SetBestLapIndex added in v0.4.0

func (m *Session) SetBestLapIndex(v uint16) *Session

SetBestLapIndex sets BestLapIndex value.

func (*Session) SetDeveloperFields added in v0.4.0

func (m *Session) SetDeveloperFields(developerFields ...proto.DeveloperField) *Session

SetDeveloperFields sets DeveloperFields.

func (*Session) SetDiveNumber added in v0.4.0

func (m *Session) SetDiveNumber(v uint32) *Session

SetDiveNumber sets DiveNumber value.

func (*Session) SetEndCns added in v0.4.0

func (m *Session) SetEndCns(v uint8) *Session

SetEndCns sets EndCns value.

Units: percent

func (*Session) SetEndN2 added in v0.4.0

func (m *Session) SetEndN2(v uint16) *Session

SetEndN2 sets EndN2 value.

Units: percent

func (*Session) SetEndPositionLat added in v0.4.0

func (m *Session) SetEndPositionLat(v int32) *Session

SetEndPositionLat sets EndPositionLat value.

Units: semicircles

func (*Session) SetEndPositionLatDegrees added in v0.17.2

func (m *Session) SetEndPositionLatDegrees(degrees float64) *Session

SetEndPositionLatDegrees is similar to SetEndPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetEndPositionLong added in v0.4.0

func (m *Session) SetEndPositionLong(v int32) *Session

SetEndPositionLong sets EndPositionLong value.

Units: semicircles

func (*Session) SetEndPositionLongDegrees added in v0.17.2

func (m *Session) SetEndPositionLongDegrees(degrees float64) *Session

SetEndPositionLongDegrees is similar to SetEndPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetEnhancedAvgAltitude added in v0.4.0

func (m *Session) SetEnhancedAvgAltitude(v uint32) *Session

SetEnhancedAvgAltitude sets EnhancedAvgAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedAvgAltitudeScaled added in v0.17.2

func (m *Session) SetEnhancedAvgAltitudeScaled(v float64) *Session

SetEnhancedAvgAltitudeScaled is similar to SetEnhancedAvgAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Session) SetEnhancedAvgRespirationRate(v uint16) *Session

SetEnhancedAvgRespirationRate sets EnhancedAvgRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedAvgRespirationRateScaled added in v0.17.2

func (m *Session) SetEnhancedAvgRespirationRateScaled(v float64) *Session

SetEnhancedAvgRespirationRateScaled is similar to SetEnhancedAvgRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedAvgSpeed added in v0.4.0

func (m *Session) SetEnhancedAvgSpeed(v uint32) *Session

SetEnhancedAvgSpeed sets EnhancedAvgSpeed value.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) SetEnhancedAvgSpeedScaled added in v0.17.2

func (m *Session) SetEnhancedAvgSpeedScaled(v float64) *Session

SetEnhancedAvgSpeedScaled is similar to SetEnhancedAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s; total_distance / total_timer_time

func (*Session) SetEnhancedMaxAltitude added in v0.4.0

func (m *Session) SetEnhancedMaxAltitude(v uint32) *Session

SetEnhancedMaxAltitude sets EnhancedMaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMaxAltitudeScaled added in v0.17.2

func (m *Session) SetEnhancedMaxAltitudeScaled(v float64) *Session

SetEnhancedMaxAltitudeScaled is similar to SetEnhancedMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Session) SetEnhancedMaxRespirationRate(v uint16) *Session

SetEnhancedMaxRespirationRate sets EnhancedMaxRespirationRate value.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedMaxRespirationRateScaled added in v0.17.2

func (m *Session) SetEnhancedMaxRespirationRateScaled(v float64) *Session

SetEnhancedMaxRespirationRateScaled is similar to SetEnhancedMaxRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedMaxSpeed added in v0.4.0

func (m *Session) SetEnhancedMaxSpeed(v uint32) *Session

SetEnhancedMaxSpeed sets EnhancedMaxSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetEnhancedMaxSpeedScaled added in v0.17.2

func (m *Session) SetEnhancedMaxSpeedScaled(v float64) *Session

SetEnhancedMaxSpeedScaled is similar to SetEnhancedMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetEnhancedMinAltitude added in v0.4.0

func (m *Session) SetEnhancedMinAltitude(v uint32) *Session

SetEnhancedMinAltitude sets EnhancedMinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMinAltitudeScaled added in v0.17.2

func (m *Session) SetEnhancedMinAltitudeScaled(v float64) *Session

SetEnhancedMinAltitudeScaled is similar to SetEnhancedMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMinRespirationRate added in v0.4.0

func (m *Session) SetEnhancedMinRespirationRate(v uint16) *Session

SetEnhancedMinRespirationRate sets EnhancedMinRespirationRate value.

Scale: 100

func (*Session) SetEnhancedMinRespirationRateScaled added in v0.17.2

func (m *Session) SetEnhancedMinRespirationRateScaled(v float64) *Session

SetEnhancedMinRespirationRateScaled is similar to SetEnhancedMinRespirationRate except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100

func (*Session) SetEvent added in v0.4.0

func (m *Session) SetEvent(v typedef.Event) *Session

SetEvent sets Event value.

session

func (*Session) SetEventGroup added in v0.4.0

func (m *Session) SetEventGroup(v uint8) *Session

SetEventGroup sets EventGroup value.

func (*Session) SetEventType added in v0.4.0

func (m *Session) SetEventType(v typedef.EventType) *Session

SetEventType sets EventType value.

stop

func (*Session) SetFirstLapIndex added in v0.4.0

func (m *Session) SetFirstLapIndex(v uint16) *Session

SetFirstLapIndex sets FirstLapIndex value.

func (*Session) SetGpsAccuracy added in v0.4.0

func (m *Session) SetGpsAccuracy(v uint8) *Session

SetGpsAccuracy sets GpsAccuracy value.

Units: m

func (*Session) SetIntensityFactor added in v0.4.0

func (m *Session) SetIntensityFactor(v uint16) *Session

SetIntensityFactor sets IntensityFactor value.

Scale: 1000; Units: if

func (*Session) SetIntensityFactorScaled added in v0.17.2

func (m *Session) SetIntensityFactorScaled(v float64) *Session

SetIntensityFactorScaled is similar to SetIntensityFactor except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: if

func (*Session) SetJumpCount added in v0.4.0

func (m *Session) SetJumpCount(v uint16) *Session

SetJumpCount sets JumpCount value.

func (*Session) SetLeftRightBalance added in v0.4.0

func (m *Session) SetLeftRightBalance(v typedef.LeftRightBalance100) *Session

SetLeftRightBalance sets LeftRightBalance value.

func (*Session) SetLevBatteryConsumption added in v0.4.0

func (m *Session) SetLevBatteryConsumption(v uint8) *Session

SetLevBatteryConsumption sets LevBatteryConsumption value.

Scale: 2; Units: percent; lev battery consumption during session

func (*Session) SetLevBatteryConsumptionScaled added in v0.17.2

func (m *Session) SetLevBatteryConsumptionScaled(v float64) *Session

SetLevBatteryConsumptionScaled is similar to SetLevBatteryConsumption except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 2; Units: percent; lev battery consumption during session

func (*Session) SetMaxAltitude added in v0.4.0

func (m *Session) SetMaxAltitude(v uint16) *Session

SetMaxAltitude sets MaxAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMaxAltitudeScaled added in v0.17.2

func (m *Session) SetMaxAltitudeScaled(v float64) *Session

SetMaxAltitudeScaled is similar to SetMaxAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMaxBallSpeed added in v0.4.0

func (m *Session) SetMaxBallSpeed(v uint16) *Session

SetMaxBallSpeed sets MaxBallSpeed value.

Scale: 100; Units: m/s

func (*Session) SetMaxBallSpeedScaled added in v0.17.2

func (m *Session) SetMaxBallSpeedScaled(v float64) *Session

SetMaxBallSpeedScaled is similar to SetMaxBallSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m/s

func (*Session) SetMaxCadence added in v0.4.0

func (m *Session) SetMaxCadence(v uint8) *Session

SetMaxCadence sets MaxCadence value.

Units: rpm

func (*Session) SetMaxCadencePosition added in v0.4.0

func (m *Session) SetMaxCadencePosition(v []uint8) *Session

SetMaxCadencePosition sets MaxCadencePosition value.

Array: [N]; Units: rpm; Maximum cadence by position. Data value indexes defined by rider_position_type.

func (*Session) SetMaxCoreTemperature added in v0.4.0

func (m *Session) SetMaxCoreTemperature(v uint16) *Session

SetMaxCoreTemperature sets MaxCoreTemperature value.

Scale: 100; Units: C

func (*Session) SetMaxCoreTemperatureScaled added in v0.17.2

func (m *Session) SetMaxCoreTemperatureScaled(v float64) *Session

SetMaxCoreTemperatureScaled is similar to SetMaxCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Session) SetMaxDepth added in v0.4.0

func (m *Session) SetMaxDepth(v uint32) *Session

SetMaxDepth sets MaxDepth value.

Scale: 1000; Units: m; 0 if above water

func (*Session) SetMaxDepthScaled added in v0.17.2

func (m *Session) SetMaxDepthScaled(v float64) *Session

SetMaxDepthScaled is similar to SetMaxDepth except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m; 0 if above water

func (*Session) SetMaxFractionalCadence added in v0.4.0

func (m *Session) SetMaxFractionalCadence(v uint8) *Session

SetMaxFractionalCadence sets MaxFractionalCadence value.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Session) SetMaxFractionalCadenceScaled added in v0.17.2

func (m *Session) SetMaxFractionalCadenceScaled(v float64) *Session

SetMaxFractionalCadenceScaled is similar to SetMaxFractionalCadence except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: rpm; fractional part of the max_cadence

func (*Session) SetMaxHeartRate added in v0.4.0

func (m *Session) SetMaxHeartRate(v uint8) *Session

SetMaxHeartRate sets MaxHeartRate value.

Units: bpm

func (*Session) SetMaxLevMotorPower added in v0.4.0

func (m *Session) SetMaxLevMotorPower(v uint16) *Session

SetMaxLevMotorPower sets MaxLevMotorPower value.

Units: watts; lev maximum motor power during session

func (*Session) SetMaxNegGrade added in v0.4.0

func (m *Session) SetMaxNegGrade(v int16) *Session

SetMaxNegGrade sets MaxNegGrade value.

Scale: 100; Units: %

func (*Session) SetMaxNegGradeScaled added in v0.17.2

func (m *Session) SetMaxNegGradeScaled(v float64) *Session

SetMaxNegGradeScaled is similar to SetMaxNegGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Session) SetMaxNegVerticalSpeed added in v0.4.0

func (m *Session) SetMaxNegVerticalSpeed(v int16) *Session

SetMaxNegVerticalSpeed sets MaxNegVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetMaxNegVerticalSpeedScaled added in v0.17.2

func (m *Session) SetMaxNegVerticalSpeedScaled(v float64) *Session

SetMaxNegVerticalSpeedScaled is similar to SetMaxNegVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetMaxPosGrade added in v0.4.0

func (m *Session) SetMaxPosGrade(v int16) *Session

SetMaxPosGrade sets MaxPosGrade value.

Scale: 100; Units: %

func (*Session) SetMaxPosGradeScaled added in v0.17.2

func (m *Session) SetMaxPosGradeScaled(v float64) *Session

SetMaxPosGradeScaled is similar to SetMaxPosGrade except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*Session) SetMaxPosVerticalSpeed added in v0.4.0

func (m *Session) SetMaxPosVerticalSpeed(v int16) *Session

SetMaxPosVerticalSpeed sets MaxPosVerticalSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetMaxPosVerticalSpeedScaled added in v0.17.2

func (m *Session) SetMaxPosVerticalSpeedScaled(v float64) *Session

SetMaxPosVerticalSpeedScaled is similar to SetMaxPosVerticalSpeed except it accepts a scaled value. This method automatically converts the given value to its int16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetMaxPower added in v0.4.0

func (m *Session) SetMaxPower(v uint16) *Session

SetMaxPower sets MaxPower value.

Units: watts

func (*Session) SetMaxPowerPosition added in v0.4.0

func (m *Session) SetMaxPowerPosition(v []uint16) *Session

SetMaxPowerPosition sets MaxPowerPosition value.

Array: [N]; Units: watts; Maximum power by position. Data value indexes defined by rider_position_type.

func (*Session) SetMaxRespirationRate added in v0.4.0

func (m *Session) SetMaxRespirationRate(v uint8) *Session

SetMaxRespirationRate sets MaxRespirationRate value.

func (*Session) SetMaxSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetMaxSaturatedHemoglobinPercent(v []uint16) *Session

SetMaxSaturatedHemoglobinPercent sets MaxSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Session) SetMaxSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Session) SetMaxSaturatedHemoglobinPercentScaled(vs []float64) *Session

SetMaxSaturatedHemoglobinPercentScaled is similar to SetMaxSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen

func (*Session) SetMaxSpeed added in v0.4.0

func (m *Session) SetMaxSpeed(v uint16) *Session

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*Session) SetMaxSpeedScaled added in v0.17.2

func (m *Session) SetMaxSpeedScaled(v float64) *Session

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Session) SetMaxTemperature added in v0.4.0

func (m *Session) SetMaxTemperature(v int8) *Session

SetMaxTemperature sets MaxTemperature value.

Units: C

func (*Session) SetMaxTotalHemoglobinConc added in v0.4.0

func (m *Session) SetMaxTotalHemoglobinConc(v []uint16) *Session

SetMaxTotalHemoglobinConc sets MaxTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Session) SetMaxTotalHemoglobinConcScaled added in v0.17.2

func (m *Session) SetMaxTotalHemoglobinConcScaled(vs []float64) *Session

SetMaxTotalHemoglobinConcScaled is similar to SetMaxTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin

func (*Session) SetMessageIndex added in v0.4.0

func (m *Session) SetMessageIndex(v typedef.MessageIndex) *Session

SetMessageIndex sets MessageIndex value.

Selected bit is set for the current session.

func (*Session) SetMinAltitude added in v0.4.0

func (m *Session) SetMinAltitude(v uint16) *Session

SetMinAltitude sets MinAltitude value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMinAltitudeScaled added in v0.17.2

func (m *Session) SetMinAltitudeScaled(v float64) *Session

SetMinAltitudeScaled is similar to SetMinAltitude except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMinCoreTemperature added in v0.4.0

func (m *Session) SetMinCoreTemperature(v uint16) *Session

SetMinCoreTemperature sets MinCoreTemperature value.

Scale: 100; Units: C

func (*Session) SetMinCoreTemperatureScaled added in v0.17.2

func (m *Session) SetMinCoreTemperatureScaled(v float64) *Session

SetMinCoreTemperatureScaled is similar to SetMinCoreTemperature except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: C

func (*Session) SetMinHeartRate added in v0.4.0

func (m *Session) SetMinHeartRate(v uint8) *Session

SetMinHeartRate sets MinHeartRate value.

Units: bpm

func (*Session) SetMinRespirationRate added in v0.4.0

func (m *Session) SetMinRespirationRate(v uint8) *Session

SetMinRespirationRate sets MinRespirationRate value.

func (*Session) SetMinSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetMinSaturatedHemoglobinPercent(v []uint16) *Session

SetMinSaturatedHemoglobinPercent sets MinSaturatedHemoglobinPercent value.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Session) SetMinSaturatedHemoglobinPercentScaled added in v0.17.2

func (m *Session) SetMinSaturatedHemoglobinPercentScaled(vs []float64) *Session

SetMinSaturatedHemoglobinPercentScaled is similar to SetMinSaturatedHemoglobinPercent except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Session) SetMinTemperature added in v0.4.0

func (m *Session) SetMinTemperature(v int8) *Session

SetMinTemperature sets MinTemperature value.

Units: C

func (*Session) SetMinTotalHemoglobinConc added in v0.4.0

func (m *Session) SetMinTotalHemoglobinConc(v []uint16) *Session

SetMinTotalHemoglobinConc sets MinTotalHemoglobinConc value.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Session) SetMinTotalHemoglobinConcScaled added in v0.17.2

func (m *Session) SetMinTotalHemoglobinConcScaled(vs []float64) *Session

SetMinTotalHemoglobinConcScaled is similar to SetMinTotalHemoglobinConc except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Session) SetNecLat added in v0.4.0

func (m *Session) SetNecLat(v int32) *Session

SetNecLat sets NecLat value.

Units: semicircles; North east corner latitude

func (*Session) SetNecLatDegrees added in v0.17.2

func (m *Session) SetNecLatDegrees(degrees float64) *Session

SetNecLatDegrees is similar to SetNecLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetNecLong added in v0.4.0

func (m *Session) SetNecLong(v int32) *Session

SetNecLong sets NecLong value.

Units: semicircles; North east corner longitude

func (*Session) SetNecLongDegrees added in v0.17.2

func (m *Session) SetNecLongDegrees(degrees float64) *Session

SetNecLongDegrees is similar to SetNecLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetNormalizedPower added in v0.4.0

func (m *Session) SetNormalizedPower(v uint16) *Session

SetNormalizedPower sets NormalizedPower value.

Units: watts

func (*Session) SetNumActiveLengths added in v0.4.0

func (m *Session) SetNumActiveLengths(v uint16) *Session

SetNumActiveLengths sets NumActiveLengths value.

Units: lengths; # of active lengths of swim pool

func (*Session) SetNumLaps added in v0.4.0

func (m *Session) SetNumLaps(v uint16) *Session

SetNumLaps sets NumLaps value.

func (*Session) SetNumLengths added in v0.4.0

func (m *Session) SetNumLengths(v uint16) *Session

SetNumLengths sets NumLengths value.

Units: lengths; # of lengths of swim pool

func (*Session) SetO2Toxicity added in v0.4.0

func (m *Session) SetO2Toxicity(v uint16) *Session

SetO2Toxicity sets O2Toxicity value.

Units: OTUs

func (*Session) SetOpponentName added in v0.4.0

func (m *Session) SetOpponentName(v string) *Session

SetOpponentName sets OpponentName value.

func (*Session) SetOpponentScore added in v0.4.0

func (m *Session) SetOpponentScore(v uint16) *Session

SetOpponentScore sets OpponentScore value.

func (*Session) SetPlayerScore added in v0.4.0

func (m *Session) SetPlayerScore(v uint16) *Session

SetPlayerScore sets PlayerScore value.

func (*Session) SetPoolLength added in v0.4.0

func (m *Session) SetPoolLength(v uint16) *Session

SetPoolLength sets PoolLength value.

Scale: 100; Units: m

func (*Session) SetPoolLengthScaled added in v0.17.2

func (m *Session) SetPoolLengthScaled(v float64) *Session

SetPoolLengthScaled is similar to SetPoolLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Session) SetPoolLengthUnit added in v0.4.0

func (m *Session) SetPoolLengthUnit(v typedef.DisplayMeasure) *Session

SetPoolLengthUnit sets PoolLengthUnit value.

func (*Session) SetRmssdHrv added in v0.4.0

func (m *Session) SetRmssdHrv(v uint8) *Session

SetRmssdHrv sets RmssdHrv value.

Units: mS; Root mean square successive difference (RMSSD) - Heart rate variability measure most useful for athletes

func (*Session) SetSdrrHrv added in v0.4.0

func (m *Session) SetSdrrHrv(v uint8) *Session

SetSdrrHrv sets SdrrHrv value.

Units: mS; Standard deviation of R-R interval (SDRR) - Heart rate variability measure most useful for wellness users.

func (*Session) SetSport added in v0.4.0

func (m *Session) SetSport(v typedef.Sport) *Session

SetSport sets Sport value.

func (*Session) SetSportIndex added in v0.4.0

func (m *Session) SetSportIndex(v uint8) *Session

SetSportIndex sets SportIndex value.

func (*Session) SetSportProfileName added in v0.4.0

func (m *Session) SetSportProfileName(v string) *Session

SetSportProfileName sets SportProfileName value.

Sport name from associated sport mesg

func (*Session) SetStandCount added in v0.4.0

func (m *Session) SetStandCount(v uint16) *Session

SetStandCount sets StandCount value.

Number of transitions to the standing state

func (*Session) SetStartCns added in v0.4.0

func (m *Session) SetStartCns(v uint8) *Session

SetStartCns sets StartCns value.

Units: percent

func (*Session) SetStartN2 added in v0.4.0

func (m *Session) SetStartN2(v uint16) *Session

SetStartN2 sets StartN2 value.

Units: percent

func (*Session) SetStartPositionLat added in v0.4.0

func (m *Session) SetStartPositionLat(v int32) *Session

SetStartPositionLat sets StartPositionLat value.

Units: semicircles

func (*Session) SetStartPositionLatDegrees added in v0.17.2

func (m *Session) SetStartPositionLatDegrees(degrees float64) *Session

SetStartPositionLatDegrees is similar to SetStartPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetStartPositionLong added in v0.4.0

func (m *Session) SetStartPositionLong(v int32) *Session

SetStartPositionLong sets StartPositionLong value.

Units: semicircles

func (*Session) SetStartPositionLongDegrees added in v0.17.2

func (m *Session) SetStartPositionLongDegrees(degrees float64) *Session

SetStartPositionLongDegrees is similar to SetStartPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetStartTime added in v0.4.0

func (m *Session) SetStartTime(v time.Time) *Session

SetStartTime sets StartTime value.

func (*Session) SetStrokeCount added in v0.4.0

func (m *Session) SetStrokeCount(v []uint16) *Session

SetStrokeCount sets StrokeCount value.

Array: [N]; Units: counts; stroke_type enum used as the index

func (*Session) SetSubSport added in v0.4.0

func (m *Session) SetSubSport(v typedef.SubSport) *Session

SetSubSport sets SubSport value.

func (*Session) SetSurfaceInterval added in v0.4.0

func (m *Session) SetSurfaceInterval(v uint32) *Session

SetSurfaceInterval sets SurfaceInterval value.

Units: s; Time since end of last dive

func (*Session) SetSwcLat added in v0.4.0

func (m *Session) SetSwcLat(v int32) *Session

SetSwcLat sets SwcLat value.

Units: semicircles; South west corner latitude

func (*Session) SetSwcLatDegrees added in v0.17.2

func (m *Session) SetSwcLatDegrees(degrees float64) *Session

SetSwcLatDegrees is similar to SetSwcLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetSwcLong added in v0.4.0

func (m *Session) SetSwcLong(v int32) *Session

SetSwcLong sets SwcLong value.

Units: semicircles; South west corner longitude

func (*Session) SetSwcLongDegrees added in v0.17.2

func (m *Session) SetSwcLongDegrees(degrees float64) *Session

SetSwcLongDegrees is similar to SetSwcLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Session) SetSwimStroke added in v0.4.0

func (m *Session) SetSwimStroke(v typedef.SwimStroke) *Session

SetSwimStroke sets SwimStroke value.

Units: swim_stroke

func (*Session) SetThresholdPower added in v0.4.0

func (m *Session) SetThresholdPower(v uint16) *Session

SetThresholdPower sets ThresholdPower value.

Units: watts

func (*Session) SetTimeInCadenceZone added in v0.4.0

func (m *Session) SetTimeInCadenceZone(v []uint32) *Session

SetTimeInCadenceZone sets TimeInCadenceZone value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInCadenceZoneScaled added in v0.17.2

func (m *Session) SetTimeInCadenceZoneScaled(vs []float64) *Session

SetTimeInCadenceZoneScaled is similar to SetTimeInCadenceZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInHrZone added in v0.4.0

func (m *Session) SetTimeInHrZone(v []uint32) *Session

SetTimeInHrZone sets TimeInHrZone value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInHrZoneScaled added in v0.17.2

func (m *Session) SetTimeInHrZoneScaled(vs []float64) *Session

SetTimeInHrZoneScaled is similar to SetTimeInHrZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInPowerZone added in v0.4.0

func (m *Session) SetTimeInPowerZone(v []uint32) *Session

SetTimeInPowerZone sets TimeInPowerZone value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInPowerZoneScaled added in v0.17.2

func (m *Session) SetTimeInPowerZoneScaled(vs []float64) *Session

SetTimeInPowerZoneScaled is similar to SetTimeInPowerZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInSpeedZone added in v0.4.0

func (m *Session) SetTimeInSpeedZone(v []uint32) *Session

SetTimeInSpeedZone sets TimeInSpeedZone value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInSpeedZoneScaled added in v0.17.2

func (m *Session) SetTimeInSpeedZoneScaled(vs []float64) *Session

SetTimeInSpeedZoneScaled is similar to SetTimeInSpeedZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeStanding added in v0.4.0

func (m *Session) SetTimeStanding(v uint32) *Session

SetTimeStanding sets TimeStanding value.

Scale: 1000; Units: s; Total time spend in the standing position

func (*Session) SetTimeStandingScaled added in v0.17.2

func (m *Session) SetTimeStandingScaled(v float64) *Session

SetTimeStandingScaled is similar to SetTimeStanding except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Total time spend in the standing position

func (*Session) SetTimestamp added in v0.4.0

func (m *Session) SetTimestamp(v time.Time) *Session

SetTimestamp sets Timestamp value.

Units: s; Sesson end time.

func (*Session) SetTotalAnaerobicTrainingEffect added in v0.4.0

func (m *Session) SetTotalAnaerobicTrainingEffect(v uint8) *Session

SetTotalAnaerobicTrainingEffect sets TotalAnaerobicTrainingEffect value.

Scale: 10

func (*Session) SetTotalAnaerobicTrainingEffectScaled added in v0.17.2

func (m *Session) SetTotalAnaerobicTrainingEffectScaled(v float64) *Session

SetTotalAnaerobicTrainingEffectScaled is similar to SetTotalAnaerobicTrainingEffect except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10

func (*Session) SetTotalAscent added in v0.4.0

func (m *Session) SetTotalAscent(v uint16) *Session

SetTotalAscent sets TotalAscent value.

Units: m

func (*Session) SetTotalCalories added in v0.4.0

func (m *Session) SetTotalCalories(v uint16) *Session

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*Session) SetTotalCycles added in v0.4.0

func (m *Session) SetTotalCycles(v uint32) *Session

SetTotalCycles sets TotalCycles value.

Units: cycles

func (*Session) SetTotalDescent added in v0.4.0

func (m *Session) SetTotalDescent(v uint16) *Session

SetTotalDescent sets TotalDescent value.

Units: m

func (*Session) SetTotalDistance added in v0.4.0

func (m *Session) SetTotalDistance(v uint32) *Session

SetTotalDistance sets TotalDistance value.

Scale: 100; Units: m

func (*Session) SetTotalDistanceScaled added in v0.17.2

func (m *Session) SetTotalDistanceScaled(v float64) *Session

SetTotalDistanceScaled is similar to SetTotalDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Session) SetTotalElapsedTime added in v0.4.0

func (m *Session) SetTotalElapsedTime(v uint32) *Session

SetTotalElapsedTime sets TotalElapsedTime value.

Scale: 1000; Units: s; Time (includes pauses)

func (*Session) SetTotalElapsedTimeScaled added in v0.17.2

func (m *Session) SetTotalElapsedTimeScaled(v float64) *Session

SetTotalElapsedTimeScaled is similar to SetTotalElapsedTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Time (includes pauses)

func (*Session) SetTotalFatCalories added in v0.4.0

func (m *Session) SetTotalFatCalories(v uint16) *Session

SetTotalFatCalories sets TotalFatCalories value.

Units: kcal

func (*Session) SetTotalFlow added in v0.4.0

func (m *Session) SetTotalFlow(v float32) *Session

SetTotalFlow sets TotalFlow value.

Units: Flow; The flow score estimates how long distance wise a cyclist deaccelerates over intervals where deacceleration is unnecessary such as smooth turns or small grade angle intervals.

func (*Session) SetTotalFractionalAscent added in v0.4.0

func (m *Session) SetTotalFractionalAscent(v uint8) *Session

SetTotalFractionalAscent sets TotalFractionalAscent value.

Scale: 100; Units: m; fractional part of total_ascent

func (*Session) SetTotalFractionalAscentScaled added in v0.17.2

func (m *Session) SetTotalFractionalAscentScaled(v float64) *Session

SetTotalFractionalAscentScaled is similar to SetTotalFractionalAscent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_ascent

func (*Session) SetTotalFractionalCycles added in v0.4.0

func (m *Session) SetTotalFractionalCycles(v uint8) *Session

SetTotalFractionalCycles sets TotalFractionalCycles value.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Session) SetTotalFractionalCyclesScaled added in v0.17.2

func (m *Session) SetTotalFractionalCyclesScaled(v float64) *Session

SetTotalFractionalCyclesScaled is similar to SetTotalFractionalCycles except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Session) SetTotalFractionalDescent added in v0.4.0

func (m *Session) SetTotalFractionalDescent(v uint8) *Session

SetTotalFractionalDescent sets TotalFractionalDescent value.

Scale: 100; Units: m; fractional part of total_descent

func (*Session) SetTotalFractionalDescentScaled added in v0.17.2

func (m *Session) SetTotalFractionalDescentScaled(v float64) *Session

SetTotalFractionalDescentScaled is similar to SetTotalFractionalDescent except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m; fractional part of total_descent

func (*Session) SetTotalGrit added in v0.4.0

func (m *Session) SetTotalGrit(v float32) *Session

SetTotalGrit sets TotalGrit value.

Units: kGrit; The grit score estimates how challenging a route could be for a cyclist in terms of time spent going over sharp turns or large grade slopes.

func (*Session) SetTotalMovingTime added in v0.4.0

func (m *Session) SetTotalMovingTime(v uint32) *Session

SetTotalMovingTime sets TotalMovingTime value.

Scale: 1000; Units: s

func (*Session) SetTotalMovingTimeScaled added in v0.17.2

func (m *Session) SetTotalMovingTimeScaled(v float64) *Session

SetTotalMovingTimeScaled is similar to SetTotalMovingTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Session) SetTotalTimerTime added in v0.4.0

func (m *Session) SetTotalTimerTime(v uint32) *Session

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*Session) SetTotalTimerTimeScaled added in v0.17.2

func (m *Session) SetTotalTimerTimeScaled(v float64) *Session

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*Session) SetTotalTrainingEffect added in v0.4.0

func (m *Session) SetTotalTrainingEffect(v uint8) *Session

SetTotalTrainingEffect sets TotalTrainingEffect value.

Scale: 10

func (*Session) SetTotalTrainingEffectScaled added in v0.17.2

func (m *Session) SetTotalTrainingEffectScaled(v float64) *Session

SetTotalTrainingEffectScaled is similar to SetTotalTrainingEffect except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 10

func (*Session) SetTotalWork added in v0.4.0

func (m *Session) SetTotalWork(v uint32) *Session

SetTotalWork sets TotalWork value.

Units: J

func (*Session) SetTrainingLoadPeak added in v0.4.0

func (m *Session) SetTrainingLoadPeak(v int32) *Session

SetTrainingLoadPeak sets TrainingLoadPeak value.

Scale: 65536

func (*Session) SetTrainingLoadPeakScaled added in v0.17.2

func (m *Session) SetTrainingLoadPeakScaled(v float64) *Session

SetTrainingLoadPeakScaled is similar to SetTrainingLoadPeak except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 65536

func (*Session) SetTrainingStressScore added in v0.4.0

func (m *Session) SetTrainingStressScore(v uint16) *Session

SetTrainingStressScore sets TrainingStressScore value.

Scale: 10; Units: tss

func (*Session) SetTrainingStressScoreScaled added in v0.17.2

func (m *Session) SetTrainingStressScoreScaled(v float64) *Session

SetTrainingStressScoreScaled is similar to SetTrainingStressScore except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: tss

func (*Session) SetTrigger added in v0.4.0

func (m *Session) SetTrigger(v typedef.SessionTrigger) *Session

SetTrigger sets Trigger value.

func (*Session) SetUnknownFields added in v0.23.6

func (m *Session) SetUnknownFields(unknownFields ...proto.Field) *Session

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Session) SetWorkoutFeel added in v0.18.0

func (m *Session) SetWorkoutFeel(v uint8) *Session

SetWorkoutFeel sets WorkoutFeel value.

A 0-100 scale representing how a user felt while performing a workout. Low values are considered feeling bad, while high values are good.

func (*Session) SetWorkoutRpe added in v0.18.0

func (m *Session) SetWorkoutRpe(v uint8) *Session

SetWorkoutRpe sets WorkoutRpe value.

Common Borg CR10 / 0-10 RPE scale, multiplied 10x.. Aggregate score for all workouts in a single session.

func (*Session) SetZoneCount added in v0.4.0

func (m *Session) SetZoneCount(v []uint16) *Session

SetZoneCount sets ZoneCount value.

Array: [N]; Units: counts; zone number used as the index

func (*Session) StartPositionLatDegrees added in v0.15.0

func (m *Session) StartPositionLatDegrees() float64

StartPositionLatDegrees returns StartPositionLat in degrees instead of semicircles. If StartPositionLat value is invalid, float64 invalid value will be returned.

func (*Session) StartPositionLongDegrees added in v0.15.0

func (m *Session) StartPositionLongDegrees() float64

StartPositionLongDegrees returns StartPositionLong in degrees instead of semicircles. If StartPositionLong value is invalid, float64 invalid value will be returned.

func (*Session) StartTimeUint32 added in v0.15.0

func (m *Session) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Session) SwcLatDegrees added in v0.15.0

func (m *Session) SwcLatDegrees() float64

SwcLatDegrees returns SwcLat in degrees instead of semicircles. If SwcLat value is invalid, float64 invalid value will be returned.

func (*Session) SwcLongDegrees added in v0.15.0

func (m *Session) SwcLongDegrees() float64

SwcLongDegrees returns SwcLong in degrees instead of semicircles. If SwcLong value is invalid, float64 invalid value will be returned.

func (*Session) TimeInCadenceZoneScaled added in v0.8.0

func (m *Session) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value. If TimeInCadenceZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Session) TimeInHrZoneScaled added in v0.8.0

func (m *Session) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value. If TimeInHrZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Session) TimeInPowerZoneScaled added in v0.8.0

func (m *Session) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value. If TimeInPowerZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Session) TimeInSpeedZoneScaled added in v0.8.0

func (m *Session) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value. If TimeInSpeedZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*Session) TimeStandingScaled added in v0.8.0

func (m *Session) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value. If TimeStanding value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Total time spend in the standing position

func (*Session) TimestampUint32 added in v0.15.0

func (m *Session) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Session) ToMesg added in v0.3.0

func (m *Session) ToMesg(options *Options) proto.Message

ToMesg converts Session into proto.Message. If options is nil, default options will be used.

func (*Session) TotalAnaerobicTrainingEffectScaled added in v0.8.0

func (m *Session) TotalAnaerobicTrainingEffectScaled() float64

TotalAnaerobicTrainingEffectScaled return TotalAnaerobicTrainingEffect in its scaled value. If TotalAnaerobicTrainingEffect value is invalid, float64 invalid value will be returned.

Scale: 10

func (*Session) TotalDistanceScaled added in v0.8.0

func (m *Session) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value. If TotalDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Session) TotalElapsedTimeScaled added in v0.8.0

func (m *Session) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value. If TotalElapsedTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Time (includes pauses)

func (*Session) TotalFractionalAscentScaled added in v0.8.0

func (m *Session) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value. If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_ascent

func (*Session) TotalFractionalCyclesScaled added in v0.8.0

func (m *Session) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value. If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

Scale: 128; Units: cycles; fractional part of the total_cycles

func (*Session) TotalFractionalDescentScaled added in v0.8.0

func (m *Session) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value. If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m; fractional part of total_descent

func (*Session) TotalMovingTimeScaled added in v0.8.0

func (m *Session) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value. If TotalMovingTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Session) TotalTimerTimeScaled added in v0.8.0

func (m *Session) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s; Timer Time (excludes pauses)

func (*Session) TotalTrainingEffectScaled added in v0.8.0

func (m *Session) TotalTrainingEffectScaled() float64

TotalTrainingEffectScaled return TotalTrainingEffect in its scaled value. If TotalTrainingEffect value is invalid, float64 invalid value will be returned.

Scale: 10

func (*Session) TrainingLoadPeakScaled added in v0.8.0

func (m *Session) TrainingLoadPeakScaled() float64

TrainingLoadPeakScaled return TrainingLoadPeak in its scaled value. If TrainingLoadPeak value is invalid, float64 invalid value will be returned.

Scale: 65536

func (*Session) TrainingStressScoreScaled added in v0.8.0

func (m *Session) TrainingStressScoreScaled() float64

TrainingStressScoreScaled return TrainingStressScore in its scaled value. If TrainingStressScore value is invalid, float64 invalid value will be returned.

Scale: 10; Units: tss

type Set

type Set struct {
	Timestamp         time.Time                  // Timestamp of the set
	StartTime         time.Time                  // Start time of the set
	Category          []typedef.ExerciseCategory // Array: [N]
	CategorySubtype   []uint16                   // Array: [N]; Based on the associated category, see [category]_exercise_names
	Duration          uint32                     // Scale: 1000; Units: s
	Repetitions       uint16                     // # of repitions of the movement
	Weight            uint16                     // Scale: 16; Units: kg; Amount of weight applied for the set
	WeightDisplayUnit typedef.FitBaseUnit
	MessageIndex      typedef.MessageIndex
	WktStepIndex      typedef.MessageIndex
	SetType           typedef.SetType

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Set is a Set message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSet

func NewSet(mesg *proto.Message) *Set

NewSet creates new Set struct based on given mesg. If mesg is nil, it will return Set with all fields being set to its corresponding invalid value.

func (*Set) DurationScaled added in v0.8.0

func (m *Set) DurationScaled() float64

DurationScaled return Duration in its scaled value. If Duration value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Set) SetCategory added in v0.4.0

func (m *Set) SetCategory(v []typedef.ExerciseCategory) *Set

SetCategory sets Category value.

Array: [N]

func (*Set) SetCategorySubtype added in v0.4.0

func (m *Set) SetCategorySubtype(v []uint16) *Set

SetCategorySubtype sets CategorySubtype value.

Array: [N]; Based on the associated category, see [category]_exercise_names

func (*Set) SetDeveloperFields added in v0.4.0

func (m *Set) SetDeveloperFields(developerFields ...proto.DeveloperField) *Set

SetDeveloperFields sets DeveloperFields.

func (*Set) SetDuration added in v0.4.0

func (m *Set) SetDuration(v uint32) *Set

SetDuration sets Duration value.

Scale: 1000; Units: s

func (*Set) SetDurationScaled added in v0.17.2

func (m *Set) SetDurationScaled(v float64) *Set

SetDurationScaled is similar to SetDuration except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Set) SetMessageIndex added in v0.4.0

func (m *Set) SetMessageIndex(v typedef.MessageIndex) *Set

SetMessageIndex sets MessageIndex value.

func (*Set) SetRepetitions added in v0.4.0

func (m *Set) SetRepetitions(v uint16) *Set

SetRepetitions sets Repetitions value.

of repitions of the movement

func (*Set) SetSetType added in v0.4.0

func (m *Set) SetSetType(v typedef.SetType) *Set

SetSetType sets SetType value.

func (*Set) SetStartTime added in v0.4.0

func (m *Set) SetStartTime(v time.Time) *Set

SetStartTime sets StartTime value.

Start time of the set

func (*Set) SetTimestamp added in v0.4.0

func (m *Set) SetTimestamp(v time.Time) *Set

SetTimestamp sets Timestamp value.

Timestamp of the set

func (*Set) SetUnknownFields added in v0.23.6

func (m *Set) SetUnknownFields(unknownFields ...proto.Field) *Set

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Set) SetWeight added in v0.4.0

func (m *Set) SetWeight(v uint16) *Set

SetWeight sets Weight value.

Scale: 16; Units: kg; Amount of weight applied for the set

func (*Set) SetWeightDisplayUnit added in v0.4.0

func (m *Set) SetWeightDisplayUnit(v typedef.FitBaseUnit) *Set

SetWeightDisplayUnit sets WeightDisplayUnit value.

func (*Set) SetWeightScaled added in v0.17.2

func (m *Set) SetWeightScaled(v float64) *Set

SetWeightScaled is similar to SetWeight except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 16; Units: kg; Amount of weight applied for the set

func (*Set) SetWktStepIndex added in v0.4.0

func (m *Set) SetWktStepIndex(v typedef.MessageIndex) *Set

SetWktStepIndex sets WktStepIndex value.

func (*Set) StartTimeUint32 added in v0.15.0

func (m *Set) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Set) TimestampUint32 added in v0.15.0

func (m *Set) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Set) ToMesg added in v0.3.0

func (m *Set) ToMesg(options *Options) proto.Message

ToMesg converts Set into proto.Message. If options is nil, default options will be used.

func (*Set) WeightScaled added in v0.8.0

func (m *Set) WeightScaled() float64

WeightScaled return Weight in its scaled value. If Weight value is invalid, float64 invalid value will be returned.

Scale: 16; Units: kg; Amount of weight applied for the set

type SkinTempOvernight added in v0.18.0

type SkinTempOvernight struct {
	Timestamp            time.Time
	LocalTimestamp       time.Time
	AverageDeviation     float32 // The average overnight deviation from baseline temperature in degrees C
	Average7DayDeviation float32 // The average 7 day overnight deviation from baseline temperature in degrees C
	NightlyValue         float32 // Final overnight temperature value

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SkinTempOvernight is a SkinTempOvernight message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSkinTempOvernight added in v0.18.0

func NewSkinTempOvernight(mesg *proto.Message) *SkinTempOvernight

NewSkinTempOvernight creates new SkinTempOvernight struct based on given mesg. If mesg is nil, it will return SkinTempOvernight with all fields being set to its corresponding invalid value.

func (*SkinTempOvernight) LocalTimestampUint32 added in v0.18.0

func (m *SkinTempOvernight) LocalTimestampUint32() uint32

LocalTimestampUint32 returns LocalTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*SkinTempOvernight) SetAverage7DayDeviation added in v0.18.0

func (m *SkinTempOvernight) SetAverage7DayDeviation(v float32) *SkinTempOvernight

SetAverage7DayDeviation sets Average7DayDeviation value.

The average 7 day overnight deviation from baseline temperature in degrees C

func (*SkinTempOvernight) SetAverageDeviation added in v0.18.0

func (m *SkinTempOvernight) SetAverageDeviation(v float32) *SkinTempOvernight

SetAverageDeviation sets AverageDeviation value.

The average overnight deviation from baseline temperature in degrees C

func (*SkinTempOvernight) SetDeveloperFields added in v0.18.0

func (m *SkinTempOvernight) SetDeveloperFields(developerFields ...proto.DeveloperField) *SkinTempOvernight

SetDeveloperFields sets DeveloperFields.

func (*SkinTempOvernight) SetLocalTimestamp added in v0.18.0

func (m *SkinTempOvernight) SetLocalTimestamp(v time.Time) *SkinTempOvernight

SetLocalTimestamp sets LocalTimestamp value.

func (*SkinTempOvernight) SetNightlyValue added in v0.18.0

func (m *SkinTempOvernight) SetNightlyValue(v float32) *SkinTempOvernight

SetNightlyValue sets NightlyValue value.

Final overnight temperature value

func (*SkinTempOvernight) SetTimestamp added in v0.18.0

func (m *SkinTempOvernight) SetTimestamp(v time.Time) *SkinTempOvernight

SetTimestamp sets Timestamp value.

func (*SkinTempOvernight) SetUnknownFields added in v0.23.6

func (m *SkinTempOvernight) SetUnknownFields(unknownFields ...proto.Field) *SkinTempOvernight

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SkinTempOvernight) TimestampUint32 added in v0.18.0

func (m *SkinTempOvernight) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*SkinTempOvernight) ToMesg added in v0.18.0

func (m *SkinTempOvernight) ToMesg(options *Options) proto.Message

ToMesg converts SkinTempOvernight into proto.Message. If options is nil, default options will be used.

type SlaveDevice

type SlaveDevice struct {
	Manufacturer typedef.Manufacturer
	Product      uint16

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SlaveDevice is a SlaveDevice message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSlaveDevice

func NewSlaveDevice(mesg *proto.Message) *SlaveDevice

NewSlaveDevice creates new SlaveDevice struct based on given mesg. If mesg is nil, it will return SlaveDevice with all fields being set to its corresponding invalid value.

func (*SlaveDevice) GetProduct added in v0.16.0

func (m *SlaveDevice) GetProduct() (name string, value any)

GetProduct returns Dynamic Field interpretation of Product. Otherwise, returns the original value of Product.

Based on m.Manufacturer:

  • name: "favero_product", value: typedef.FaveroProduct(m.Product)
  • name: "garmin_product", value: typedef.GarminProduct(m.Product)

Otherwise:

  • name: "product", value: m.Product

func (*SlaveDevice) SetDeveloperFields added in v0.4.0

func (m *SlaveDevice) SetDeveloperFields(developerFields ...proto.DeveloperField) *SlaveDevice

SetDeveloperFields sets DeveloperFields.

func (*SlaveDevice) SetManufacturer added in v0.4.0

func (m *SlaveDevice) SetManufacturer(v typedef.Manufacturer) *SlaveDevice

SetManufacturer sets Manufacturer value.

func (*SlaveDevice) SetProduct added in v0.4.0

func (m *SlaveDevice) SetProduct(v uint16) *SlaveDevice

SetProduct sets Product value.

func (*SlaveDevice) SetUnknownFields added in v0.23.6

func (m *SlaveDevice) SetUnknownFields(unknownFields ...proto.Field) *SlaveDevice

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SlaveDevice) ToMesg added in v0.3.0

func (m *SlaveDevice) ToMesg(options *Options) proto.Message

ToMesg converts SlaveDevice into proto.Message. If options is nil, default options will be used.

type SleepAssessment

type SleepAssessment struct {
	AverageStressDuringSleep uint16 // Scale: 100; Excludes stress during awake periods in the sleep window
	CombinedAwakeScore       uint8  // Average of awake_time_score and awakenings_count_score. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	AwakeTimeScore           uint8  // Score that evaluates the total time spent awake between sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	AwakeningsCountScore     uint8  // Score that evaluates the number of awakenings that interrupt sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	DeepSleepScore           uint8  // Score that evaluates the amount of deep sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	SleepDurationScore       uint8  // Score that evaluates the quality of sleep based on sleep stages, heart-rate variability and possible awakenings during the night. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	LightSleepScore          uint8  // Score that evaluates the amount of light sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	OverallSleepScore        uint8  // Total score that summarizes the overall quality of sleep, combining sleep duration and quality. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	SleepQualityScore        uint8  // Score that evaluates the quality of sleep based on sleep stages, heart-rate variability and possible awakenings during the night. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	SleepRecoveryScore       uint8  // Score that evaluates stress and recovery during sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	RemSleepScore            uint8  // Score that evaluates the amount of REM sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	SleepRestlessnessScore   uint8  // Score that evaluates the amount of restlessness during sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.
	AwakeningsCount          uint8  // The number of awakenings during sleep.
	InterruptionsScore       uint8  // Score that evaluates the sleep interruptions. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SleepAssessment is a SleepAssessment message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSleepAssessment

func NewSleepAssessment(mesg *proto.Message) *SleepAssessment

NewSleepAssessment creates new SleepAssessment struct based on given mesg. If mesg is nil, it will return SleepAssessment with all fields being set to its corresponding invalid value.

func (*SleepAssessment) AverageStressDuringSleepScaled added in v0.8.0

func (m *SleepAssessment) AverageStressDuringSleepScaled() float64

AverageStressDuringSleepScaled return AverageStressDuringSleep in its scaled value. If AverageStressDuringSleep value is invalid, float64 invalid value will be returned.

Scale: 100; Excludes stress during awake periods in the sleep window

func (*SleepAssessment) SetAverageStressDuringSleep added in v0.4.0

func (m *SleepAssessment) SetAverageStressDuringSleep(v uint16) *SleepAssessment

SetAverageStressDuringSleep sets AverageStressDuringSleep value.

Scale: 100; Excludes stress during awake periods in the sleep window

func (*SleepAssessment) SetAverageStressDuringSleepScaled added in v0.17.2

func (m *SleepAssessment) SetAverageStressDuringSleepScaled(v float64) *SleepAssessment

SetAverageStressDuringSleepScaled is similar to SetAverageStressDuringSleep except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Excludes stress during awake periods in the sleep window

func (*SleepAssessment) SetAwakeTimeScore added in v0.4.0

func (m *SleepAssessment) SetAwakeTimeScore(v uint8) *SleepAssessment

SetAwakeTimeScore sets AwakeTimeScore value.

Score that evaluates the total time spent awake between sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetAwakeningsCount added in v0.4.0

func (m *SleepAssessment) SetAwakeningsCount(v uint8) *SleepAssessment

SetAwakeningsCount sets AwakeningsCount value.

The number of awakenings during sleep.

func (*SleepAssessment) SetAwakeningsCountScore added in v0.4.0

func (m *SleepAssessment) SetAwakeningsCountScore(v uint8) *SleepAssessment

SetAwakeningsCountScore sets AwakeningsCountScore value.

Score that evaluates the number of awakenings that interrupt sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetCombinedAwakeScore added in v0.4.0

func (m *SleepAssessment) SetCombinedAwakeScore(v uint8) *SleepAssessment

SetCombinedAwakeScore sets CombinedAwakeScore value.

Average of awake_time_score and awakenings_count_score. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetDeepSleepScore added in v0.4.0

func (m *SleepAssessment) SetDeepSleepScore(v uint8) *SleepAssessment

SetDeepSleepScore sets DeepSleepScore value.

Score that evaluates the amount of deep sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetDeveloperFields added in v0.4.0

func (m *SleepAssessment) SetDeveloperFields(developerFields ...proto.DeveloperField) *SleepAssessment

SetDeveloperFields sets DeveloperFields.

func (*SleepAssessment) SetInterruptionsScore added in v0.4.0

func (m *SleepAssessment) SetInterruptionsScore(v uint8) *SleepAssessment

SetInterruptionsScore sets InterruptionsScore value.

Score that evaluates the sleep interruptions. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetLightSleepScore added in v0.4.0

func (m *SleepAssessment) SetLightSleepScore(v uint8) *SleepAssessment

SetLightSleepScore sets LightSleepScore value.

Score that evaluates the amount of light sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetOverallSleepScore added in v0.4.0

func (m *SleepAssessment) SetOverallSleepScore(v uint8) *SleepAssessment

SetOverallSleepScore sets OverallSleepScore value.

Total score that summarizes the overall quality of sleep, combining sleep duration and quality. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetRemSleepScore added in v0.4.0

func (m *SleepAssessment) SetRemSleepScore(v uint8) *SleepAssessment

SetRemSleepScore sets RemSleepScore value.

Score that evaluates the amount of REM sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetSleepDurationScore added in v0.4.0

func (m *SleepAssessment) SetSleepDurationScore(v uint8) *SleepAssessment

SetSleepDurationScore sets SleepDurationScore value.

Score that evaluates the quality of sleep based on sleep stages, heart-rate variability and possible awakenings during the night. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetSleepQualityScore added in v0.4.0

func (m *SleepAssessment) SetSleepQualityScore(v uint8) *SleepAssessment

SetSleepQualityScore sets SleepQualityScore value.

Score that evaluates the quality of sleep based on sleep stages, heart-rate variability and possible awakenings during the night. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetSleepRecoveryScore added in v0.4.0

func (m *SleepAssessment) SetSleepRecoveryScore(v uint8) *SleepAssessment

SetSleepRecoveryScore sets SleepRecoveryScore value.

Score that evaluates stress and recovery during sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetSleepRestlessnessScore added in v0.4.0

func (m *SleepAssessment) SetSleepRestlessnessScore(v uint8) *SleepAssessment

SetSleepRestlessnessScore sets SleepRestlessnessScore value.

Score that evaluates the amount of restlessness during sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

func (*SleepAssessment) SetUnknownFields added in v0.23.6

func (m *SleepAssessment) SetUnknownFields(unknownFields ...proto.Field) *SleepAssessment

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SleepAssessment) ToMesg added in v0.3.0

func (m *SleepAssessment) ToMesg(options *Options) proto.Message

ToMesg converts SleepAssessment into proto.Message. If options is nil, default options will be used.

type SleepLevel

type SleepLevel struct {
	Timestamp  time.Time // Units: s
	SleepLevel typedef.SleepLevel

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SleepLevel is a SleepLevel message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSleepLevel

func NewSleepLevel(mesg *proto.Message) *SleepLevel

NewSleepLevel creates new SleepLevel struct based on given mesg. If mesg is nil, it will return SleepLevel with all fields being set to its corresponding invalid value.

func (*SleepLevel) SetDeveloperFields added in v0.4.0

func (m *SleepLevel) SetDeveloperFields(developerFields ...proto.DeveloperField) *SleepLevel

SetDeveloperFields sets DeveloperFields.

func (*SleepLevel) SetSleepLevel added in v0.4.0

func (m *SleepLevel) SetSleepLevel(v typedef.SleepLevel) *SleepLevel

SetSleepLevel sets SleepLevel value.

func (*SleepLevel) SetTimestamp added in v0.4.0

func (m *SleepLevel) SetTimestamp(v time.Time) *SleepLevel

SetTimestamp sets Timestamp value.

Units: s

func (*SleepLevel) SetUnknownFields added in v0.23.6

func (m *SleepLevel) SetUnknownFields(unknownFields ...proto.Field) *SleepLevel

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SleepLevel) TimestampUint32 added in v0.15.0

func (m *SleepLevel) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*SleepLevel) ToMesg added in v0.3.0

func (m *SleepLevel) ToMesg(options *Options) proto.Message

ToMesg converts SleepLevel into proto.Message. If options is nil, default options will be used.

type Software

type Software struct {
	PartNumber   string
	MessageIndex typedef.MessageIndex
	Version      uint16 // Scale: 100

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Software is a Software message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSoftware

func NewSoftware(mesg *proto.Message) *Software

NewSoftware creates new Software struct based on given mesg. If mesg is nil, it will return Software with all fields being set to its corresponding invalid value.

func (*Software) SetDeveloperFields added in v0.4.0

func (m *Software) SetDeveloperFields(developerFields ...proto.DeveloperField) *Software

SetDeveloperFields sets DeveloperFields.

func (*Software) SetMessageIndex added in v0.4.0

func (m *Software) SetMessageIndex(v typedef.MessageIndex) *Software

SetMessageIndex sets MessageIndex value.

func (*Software) SetPartNumber added in v0.4.0

func (m *Software) SetPartNumber(v string) *Software

SetPartNumber sets PartNumber value.

func (*Software) SetUnknownFields added in v0.23.6

func (m *Software) SetUnknownFields(unknownFields ...proto.Field) *Software

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Software) SetVersion added in v0.4.0

func (m *Software) SetVersion(v uint16) *Software

SetVersion sets Version value.

Scale: 100

func (*Software) SetVersionScaled added in v0.17.2

func (m *Software) SetVersionScaled(v float64) *Software

SetVersionScaled is similar to SetVersion except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100

func (*Software) ToMesg added in v0.3.0

func (m *Software) ToMesg(options *Options) proto.Message

ToMesg converts Software into proto.Message. If options is nil, default options will be used.

func (*Software) VersionScaled added in v0.8.0

func (m *Software) VersionScaled() float64

VersionScaled return Version in its scaled value. If Version value is invalid, float64 invalid value will be returned.

Scale: 100

type SpeedZone

type SpeedZone struct {
	Name         string
	MessageIndex typedef.MessageIndex
	HighValue    uint16 // Scale: 1000; Units: m/s

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SpeedZone is a SpeedZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSpeedZone

func NewSpeedZone(mesg *proto.Message) *SpeedZone

NewSpeedZone creates new SpeedZone struct based on given mesg. If mesg is nil, it will return SpeedZone with all fields being set to its corresponding invalid value.

func (*SpeedZone) HighValueScaled added in v0.8.0

func (m *SpeedZone) HighValueScaled() float64

HighValueScaled return HighValue in its scaled value. If HighValue value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SpeedZone) SetDeveloperFields added in v0.4.0

func (m *SpeedZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *SpeedZone

SetDeveloperFields sets DeveloperFields.

func (*SpeedZone) SetHighValue added in v0.4.0

func (m *SpeedZone) SetHighValue(v uint16) *SpeedZone

SetHighValue sets HighValue value.

Scale: 1000; Units: m/s

func (*SpeedZone) SetHighValueScaled added in v0.17.2

func (m *SpeedZone) SetHighValueScaled(v float64) *SpeedZone

SetHighValueScaled is similar to SetHighValue except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SpeedZone) SetMessageIndex added in v0.4.0

func (m *SpeedZone) SetMessageIndex(v typedef.MessageIndex) *SpeedZone

SetMessageIndex sets MessageIndex value.

func (*SpeedZone) SetName added in v0.4.0

func (m *SpeedZone) SetName(v string) *SpeedZone

SetName sets Name value.

func (*SpeedZone) SetUnknownFields added in v0.23.6

func (m *SpeedZone) SetUnknownFields(unknownFields ...proto.Field) *SpeedZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SpeedZone) ToMesg added in v0.3.0

func (m *SpeedZone) ToMesg(options *Options) proto.Message

ToMesg converts SpeedZone into proto.Message. If options is nil, default options will be used.

type Split

type Split struct {
	StartTime         time.Time
	EndTime           time.Time
	TotalElapsedTime  uint32 // Scale: 1000; Units: s
	TotalTimerTime    uint32 // Scale: 1000; Units: s
	TotalDistance     uint32 // Scale: 100; Units: m
	AvgSpeed          uint32 // Scale: 1000; Units: m/s
	StartPositionLat  int32  // Units: semicircles
	StartPositionLong int32  // Units: semicircles
	EndPositionLat    int32  // Units: semicircles
	EndPositionLong   int32  // Units: semicircles
	MaxSpeed          uint32 // Scale: 1000; Units: m/s
	AvgVertSpeed      int32  // Scale: 1000; Units: m/s
	TotalCalories     uint32 // Units: kcal
	StartElevation    uint32 // Scale: 5; Offset: 500; Units: m
	TotalMovingTime   uint32 // Scale: 1000; Units: s
	MessageIndex      typedef.MessageIndex
	TotalAscent       uint16 // Units: m
	TotalDescent      uint16 // Units: m
	SplitType         typedef.SplitType

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Split is a Split message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSplit

func NewSplit(mesg *proto.Message) *Split

NewSplit creates new Split struct based on given mesg. If mesg is nil, it will return Split with all fields being set to its corresponding invalid value.

func (*Split) AvgSpeedScaled added in v0.8.0

func (m *Split) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Split) AvgVertSpeedScaled added in v0.8.0

func (m *Split) AvgVertSpeedScaled() float64

AvgVertSpeedScaled return AvgVertSpeed in its scaled value. If AvgVertSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Split) EndPositionLatDegrees added in v0.15.0

func (m *Split) EndPositionLatDegrees() float64

EndPositionLatDegrees returns EndPositionLat in degrees instead of semicircles. If EndPositionLat value is invalid, float64 invalid value will be returned.

func (*Split) EndPositionLongDegrees added in v0.15.0

func (m *Split) EndPositionLongDegrees() float64

EndPositionLongDegrees returns EndPositionLong in degrees instead of semicircles. If EndPositionLong value is invalid, float64 invalid value will be returned.

func (*Split) EndTimeUint32 added in v0.15.0

func (m *Split) EndTimeUint32() uint32

EndTimeUint32 returns EndTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Split) MaxSpeedScaled added in v0.8.0

func (m *Split) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*Split) SetAvgSpeed added in v0.4.0

func (m *Split) SetAvgSpeed(v uint32) *Split

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*Split) SetAvgSpeedScaled added in v0.17.2

func (m *Split) SetAvgSpeedScaled(v float64) *Split

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Split) SetAvgVertSpeed added in v0.4.0

func (m *Split) SetAvgVertSpeed(v int32) *Split

SetAvgVertSpeed sets AvgVertSpeed value.

Scale: 1000; Units: m/s

func (*Split) SetAvgVertSpeedScaled added in v0.17.2

func (m *Split) SetAvgVertSpeedScaled(v float64) *Split

SetAvgVertSpeedScaled is similar to SetAvgVertSpeed except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Split) SetDeveloperFields added in v0.4.0

func (m *Split) SetDeveloperFields(developerFields ...proto.DeveloperField) *Split

SetDeveloperFields sets DeveloperFields.

func (*Split) SetEndPositionLat added in v0.4.0

func (m *Split) SetEndPositionLat(v int32) *Split

SetEndPositionLat sets EndPositionLat value.

Units: semicircles

func (*Split) SetEndPositionLatDegrees added in v0.17.2

func (m *Split) SetEndPositionLatDegrees(degrees float64) *Split

SetEndPositionLatDegrees is similar to SetEndPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Split) SetEndPositionLong added in v0.4.0

func (m *Split) SetEndPositionLong(v int32) *Split

SetEndPositionLong sets EndPositionLong value.

Units: semicircles

func (*Split) SetEndPositionLongDegrees added in v0.17.2

func (m *Split) SetEndPositionLongDegrees(degrees float64) *Split

SetEndPositionLongDegrees is similar to SetEndPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Split) SetEndTime added in v0.4.0

func (m *Split) SetEndTime(v time.Time) *Split

SetEndTime sets EndTime value.

func (*Split) SetMaxSpeed added in v0.4.0

func (m *Split) SetMaxSpeed(v uint32) *Split

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*Split) SetMaxSpeedScaled added in v0.17.2

func (m *Split) SetMaxSpeedScaled(v float64) *Split

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*Split) SetMessageIndex added in v0.4.0

func (m *Split) SetMessageIndex(v typedef.MessageIndex) *Split

SetMessageIndex sets MessageIndex value.

func (*Split) SetSplitType added in v0.4.0

func (m *Split) SetSplitType(v typedef.SplitType) *Split

SetSplitType sets SplitType value.

func (*Split) SetStartElevation added in v0.4.0

func (m *Split) SetStartElevation(v uint32) *Split

SetStartElevation sets StartElevation value.

Scale: 5; Offset: 500; Units: m

func (*Split) SetStartElevationScaled added in v0.17.2

func (m *Split) SetStartElevationScaled(v float64) *Split

SetStartElevationScaled is similar to SetStartElevation except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 5; Offset: 500; Units: m

func (*Split) SetStartPositionLat added in v0.4.0

func (m *Split) SetStartPositionLat(v int32) *Split

SetStartPositionLat sets StartPositionLat value.

Units: semicircles

func (*Split) SetStartPositionLatDegrees added in v0.17.2

func (m *Split) SetStartPositionLatDegrees(degrees float64) *Split

SetStartPositionLatDegrees is similar to SetStartPositionLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Split) SetStartPositionLong added in v0.4.0

func (m *Split) SetStartPositionLong(v int32) *Split

SetStartPositionLong sets StartPositionLong value.

Units: semicircles

func (*Split) SetStartPositionLongDegrees added in v0.17.2

func (m *Split) SetStartPositionLongDegrees(degrees float64) *Split

SetStartPositionLongDegrees is similar to SetStartPositionLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*Split) SetStartTime added in v0.4.0

func (m *Split) SetStartTime(v time.Time) *Split

SetStartTime sets StartTime value.

func (*Split) SetTotalAscent added in v0.4.0

func (m *Split) SetTotalAscent(v uint16) *Split

SetTotalAscent sets TotalAscent value.

Units: m

func (*Split) SetTotalCalories added in v0.4.0

func (m *Split) SetTotalCalories(v uint32) *Split

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*Split) SetTotalDescent added in v0.4.0

func (m *Split) SetTotalDescent(v uint16) *Split

SetTotalDescent sets TotalDescent value.

Units: m

func (*Split) SetTotalDistance added in v0.4.0

func (m *Split) SetTotalDistance(v uint32) *Split

SetTotalDistance sets TotalDistance value.

Scale: 100; Units: m

func (*Split) SetTotalDistanceScaled added in v0.17.2

func (m *Split) SetTotalDistanceScaled(v float64) *Split

SetTotalDistanceScaled is similar to SetTotalDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Split) SetTotalElapsedTime added in v0.4.0

func (m *Split) SetTotalElapsedTime(v uint32) *Split

SetTotalElapsedTime sets TotalElapsedTime value.

Scale: 1000; Units: s

func (*Split) SetTotalElapsedTimeScaled added in v0.17.2

func (m *Split) SetTotalElapsedTimeScaled(v float64) *Split

SetTotalElapsedTimeScaled is similar to SetTotalElapsedTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Split) SetTotalMovingTime added in v0.4.0

func (m *Split) SetTotalMovingTime(v uint32) *Split

SetTotalMovingTime sets TotalMovingTime value.

Scale: 1000; Units: s

func (*Split) SetTotalMovingTimeScaled added in v0.17.2

func (m *Split) SetTotalMovingTimeScaled(v float64) *Split

SetTotalMovingTimeScaled is similar to SetTotalMovingTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Split) SetTotalTimerTime added in v0.4.0

func (m *Split) SetTotalTimerTime(v uint32) *Split

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s

func (*Split) SetTotalTimerTimeScaled added in v0.17.2

func (m *Split) SetTotalTimerTimeScaled(v float64) *Split

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*Split) SetUnknownFields added in v0.23.6

func (m *Split) SetUnknownFields(unknownFields ...proto.Field) *Split

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Split) StartElevationScaled added in v0.8.0

func (m *Split) StartElevationScaled() float64

StartElevationScaled return StartElevation in its scaled value. If StartElevation value is invalid, float64 invalid value will be returned.

Scale: 5; Offset: 500; Units: m

func (*Split) StartPositionLatDegrees added in v0.15.0

func (m *Split) StartPositionLatDegrees() float64

StartPositionLatDegrees returns StartPositionLat in degrees instead of semicircles. If StartPositionLat value is invalid, float64 invalid value will be returned.

func (*Split) StartPositionLongDegrees added in v0.15.0

func (m *Split) StartPositionLongDegrees() float64

StartPositionLongDegrees returns StartPositionLong in degrees instead of semicircles. If StartPositionLong value is invalid, float64 invalid value will be returned.

func (*Split) StartTimeUint32 added in v0.15.0

func (m *Split) StartTimeUint32() uint32

StartTimeUint32 returns StartTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Split) ToMesg added in v0.3.0

func (m *Split) ToMesg(options *Options) proto.Message

ToMesg converts Split into proto.Message. If options is nil, default options will be used.

func (*Split) TotalDistanceScaled added in v0.8.0

func (m *Split) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value. If TotalDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Split) TotalElapsedTimeScaled added in v0.8.0

func (m *Split) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value. If TotalElapsedTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Split) TotalMovingTimeScaled added in v0.8.0

func (m *Split) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value. If TotalMovingTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*Split) TotalTimerTimeScaled added in v0.8.0

func (m *Split) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

type SplitSummary added in v0.1.6

type SplitSummary struct {
	TotalTimerTime  uint32 // Scale: 1000; Units: s
	TotalDistance   uint32 // Scale: 100; Units: m
	AvgSpeed        uint32 // Scale: 1000; Units: m/s
	MaxSpeed        uint32 // Scale: 1000; Units: m/s
	AvgVertSpeed    int32  // Scale: 1000; Units: m/s
	TotalCalories   uint32 // Units: kcal
	TotalMovingTime uint32 // Scale: 1000; Units: s
	MessageIndex    typedef.MessageIndex
	NumSplits       uint16
	TotalAscent     uint16 // Units: m
	TotalDescent    uint16 // Units: m
	SplitType       typedef.SplitType
	AvgHeartRate    uint8 // Units: bpm
	MaxHeartRate    uint8 // Units: bpm

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

SplitSummary is a SplitSummary message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSplitSummary added in v0.1.6

func NewSplitSummary(mesg *proto.Message) *SplitSummary

NewSplitSummary creates new SplitSummary struct based on given mesg. If mesg is nil, it will return SplitSummary with all fields being set to its corresponding invalid value.

func (*SplitSummary) AvgSpeedScaled added in v0.8.0

func (m *SplitSummary) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value. If AvgSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SplitSummary) AvgVertSpeedScaled added in v0.8.0

func (m *SplitSummary) AvgVertSpeedScaled() float64

AvgVertSpeedScaled return AvgVertSpeed in its scaled value. If AvgVertSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SplitSummary) MaxSpeedScaled added in v0.8.0

func (m *SplitSummary) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value. If MaxSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

func (*SplitSummary) SetAvgHeartRate added in v0.4.0

func (m *SplitSummary) SetAvgHeartRate(v uint8) *SplitSummary

SetAvgHeartRate sets AvgHeartRate value.

Units: bpm

func (*SplitSummary) SetAvgSpeed added in v0.4.0

func (m *SplitSummary) SetAvgSpeed(v uint32) *SplitSummary

SetAvgSpeed sets AvgSpeed value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetAvgSpeedScaled added in v0.17.2

func (m *SplitSummary) SetAvgSpeedScaled(v float64) *SplitSummary

SetAvgSpeedScaled is similar to SetAvgSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SplitSummary) SetAvgVertSpeed added in v0.4.0

func (m *SplitSummary) SetAvgVertSpeed(v int32) *SplitSummary

SetAvgVertSpeed sets AvgVertSpeed value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetAvgVertSpeedScaled added in v0.17.2

func (m *SplitSummary) SetAvgVertSpeedScaled(v float64) *SplitSummary

SetAvgVertSpeedScaled is similar to SetAvgVertSpeed except it accepts a scaled value. This method automatically converts the given value to its int32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SplitSummary) SetDeveloperFields added in v0.4.0

func (m *SplitSummary) SetDeveloperFields(developerFields ...proto.DeveloperField) *SplitSummary

SetDeveloperFields sets DeveloperFields.

func (*SplitSummary) SetMaxHeartRate added in v0.4.0

func (m *SplitSummary) SetMaxHeartRate(v uint8) *SplitSummary

SetMaxHeartRate sets MaxHeartRate value.

Units: bpm

func (*SplitSummary) SetMaxSpeed added in v0.4.0

func (m *SplitSummary) SetMaxSpeed(v uint32) *SplitSummary

SetMaxSpeed sets MaxSpeed value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetMaxSpeedScaled added in v0.17.2

func (m *SplitSummary) SetMaxSpeedScaled(v float64) *SplitSummary

SetMaxSpeedScaled is similar to SetMaxSpeed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*SplitSummary) SetMessageIndex added in v0.4.0

func (m *SplitSummary) SetMessageIndex(v typedef.MessageIndex) *SplitSummary

SetMessageIndex sets MessageIndex value.

func (*SplitSummary) SetNumSplits added in v0.4.0

func (m *SplitSummary) SetNumSplits(v uint16) *SplitSummary

SetNumSplits sets NumSplits value.

func (*SplitSummary) SetSplitType added in v0.4.0

func (m *SplitSummary) SetSplitType(v typedef.SplitType) *SplitSummary

SetSplitType sets SplitType value.

func (*SplitSummary) SetTotalAscent added in v0.4.0

func (m *SplitSummary) SetTotalAscent(v uint16) *SplitSummary

SetTotalAscent sets TotalAscent value.

Units: m

func (*SplitSummary) SetTotalCalories added in v0.4.0

func (m *SplitSummary) SetTotalCalories(v uint32) *SplitSummary

SetTotalCalories sets TotalCalories value.

Units: kcal

func (*SplitSummary) SetTotalDescent added in v0.4.0

func (m *SplitSummary) SetTotalDescent(v uint16) *SplitSummary

SetTotalDescent sets TotalDescent value.

Units: m

func (*SplitSummary) SetTotalDistance added in v0.4.0

func (m *SplitSummary) SetTotalDistance(v uint32) *SplitSummary

SetTotalDistance sets TotalDistance value.

Scale: 100; Units: m

func (*SplitSummary) SetTotalDistanceScaled added in v0.17.2

func (m *SplitSummary) SetTotalDistanceScaled(v float64) *SplitSummary

SetTotalDistanceScaled is similar to SetTotalDistance except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*SplitSummary) SetTotalMovingTime added in v0.4.0

func (m *SplitSummary) SetTotalMovingTime(v uint32) *SplitSummary

SetTotalMovingTime sets TotalMovingTime value.

Scale: 1000; Units: s

func (*SplitSummary) SetTotalMovingTimeScaled added in v0.17.2

func (m *SplitSummary) SetTotalMovingTimeScaled(v float64) *SplitSummary

SetTotalMovingTimeScaled is similar to SetTotalMovingTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*SplitSummary) SetTotalTimerTime added in v0.4.0

func (m *SplitSummary) SetTotalTimerTime(v uint32) *SplitSummary

SetTotalTimerTime sets TotalTimerTime value.

Scale: 1000; Units: s

func (*SplitSummary) SetTotalTimerTimeScaled added in v0.17.2

func (m *SplitSummary) SetTotalTimerTimeScaled(v float64) *SplitSummary

SetTotalTimerTimeScaled is similar to SetTotalTimerTime except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 1000; Units: s

func (*SplitSummary) SetUnknownFields added in v0.23.6

func (m *SplitSummary) SetUnknownFields(unknownFields ...proto.Field) *SplitSummary

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*SplitSummary) ToMesg added in v0.3.0

func (m *SplitSummary) ToMesg(options *Options) proto.Message

ToMesg converts SplitSummary into proto.Message. If options is nil, default options will be used.

func (*SplitSummary) TotalDistanceScaled added in v0.8.0

func (m *SplitSummary) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value. If TotalDistance value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*SplitSummary) TotalMovingTimeScaled added in v0.8.0

func (m *SplitSummary) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value. If TotalMovingTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

func (*SplitSummary) TotalTimerTimeScaled added in v0.8.0

func (m *SplitSummary) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value. If TotalTimerTime value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: s

type Spo2Data

type Spo2Data struct {
	Timestamp         time.Time // Units: s
	ReadingSpo2       uint8     // Units: percent
	ReadingConfidence uint8
	Mode              typedef.Spo2MeasurementType // Mode when data was captured

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Spo2Data is a Spo2Data message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSpo2Data

func NewSpo2Data(mesg *proto.Message) *Spo2Data

NewSpo2Data creates new Spo2Data struct based on given mesg. If mesg is nil, it will return Spo2Data with all fields being set to its corresponding invalid value.

func (*Spo2Data) SetDeveloperFields added in v0.4.0

func (m *Spo2Data) SetDeveloperFields(developerFields ...proto.DeveloperField) *Spo2Data

SetDeveloperFields sets DeveloperFields.

func (*Spo2Data) SetMode added in v0.4.0

SetMode sets Mode value.

Mode when data was captured

func (*Spo2Data) SetReadingConfidence added in v0.4.0

func (m *Spo2Data) SetReadingConfidence(v uint8) *Spo2Data

SetReadingConfidence sets ReadingConfidence value.

func (*Spo2Data) SetReadingSpo2 added in v0.4.0

func (m *Spo2Data) SetReadingSpo2(v uint8) *Spo2Data

SetReadingSpo2 sets ReadingSpo2 value.

Units: percent

func (*Spo2Data) SetTimestamp added in v0.4.0

func (m *Spo2Data) SetTimestamp(v time.Time) *Spo2Data

SetTimestamp sets Timestamp value.

Units: s

func (*Spo2Data) SetUnknownFields added in v0.23.6

func (m *Spo2Data) SetUnknownFields(unknownFields ...proto.Field) *Spo2Data

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Spo2Data) TimestampUint32 added in v0.15.0

func (m *Spo2Data) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Spo2Data) ToMesg added in v0.3.0

func (m *Spo2Data) ToMesg(options *Options) proto.Message

ToMesg converts Spo2Data into proto.Message. If options is nil, default options will be used.

type Sport

type Sport struct {
	Name     string
	Sport    typedef.Sport
	SubSport typedef.SubSport

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Sport is a Sport message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewSport

func NewSport(mesg *proto.Message) *Sport

NewSport creates new Sport struct based on given mesg. If mesg is nil, it will return Sport with all fields being set to its corresponding invalid value.

func (*Sport) SetDeveloperFields added in v0.4.0

func (m *Sport) SetDeveloperFields(developerFields ...proto.DeveloperField) *Sport

SetDeveloperFields sets DeveloperFields.

func (*Sport) SetName added in v0.4.0

func (m *Sport) SetName(v string) *Sport

SetName sets Name value.

func (*Sport) SetSport added in v0.4.0

func (m *Sport) SetSport(v typedef.Sport) *Sport

SetSport sets Sport value.

func (*Sport) SetSubSport added in v0.4.0

func (m *Sport) SetSubSport(v typedef.SubSport) *Sport

SetSubSport sets SubSport value.

func (*Sport) SetUnknownFields added in v0.23.6

func (m *Sport) SetUnknownFields(unknownFields ...proto.Field) *Sport

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Sport) ToMesg added in v0.3.0

func (m *Sport) ToMesg(options *Options) proto.Message

ToMesg converts Sport into proto.Message. If options is nil, default options will be used.

type StressLevel

type StressLevel struct {
	StressLevelTime  time.Time // Units: s; Time stress score was calculated
	StressLevelValue int16

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

StressLevel is a StressLevel message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewStressLevel

func NewStressLevel(mesg *proto.Message) *StressLevel

NewStressLevel creates new StressLevel struct based on given mesg. If mesg is nil, it will return StressLevel with all fields being set to its corresponding invalid value.

func (*StressLevel) SetDeveloperFields added in v0.4.0

func (m *StressLevel) SetDeveloperFields(developerFields ...proto.DeveloperField) *StressLevel

SetDeveloperFields sets DeveloperFields.

func (*StressLevel) SetStressLevelTime added in v0.4.0

func (m *StressLevel) SetStressLevelTime(v time.Time) *StressLevel

SetStressLevelTime sets StressLevelTime value.

Units: s; Time stress score was calculated

func (*StressLevel) SetStressLevelValue added in v0.4.0

func (m *StressLevel) SetStressLevelValue(v int16) *StressLevel

SetStressLevelValue sets StressLevelValue value.

func (*StressLevel) SetUnknownFields added in v0.23.6

func (m *StressLevel) SetUnknownFields(unknownFields ...proto.Field) *StressLevel

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*StressLevel) StressLevelTimeUint32 added in v0.15.0

func (m *StressLevel) StressLevelTimeUint32() uint32

StressLevelTimeUint32 returns StressLevelTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*StressLevel) ToMesg added in v0.3.0

func (m *StressLevel) ToMesg(options *Options) proto.Message

ToMesg converts StressLevel into proto.Message. If options is nil, default options will be used.

type TankSummary

type TankSummary struct {
	Timestamp     time.Time            // Units: s
	Sensor        typedef.AntChannelId // Base: uint32z
	VolumeUsed    uint32               // Scale: 100; Units: L
	StartPressure uint16               // Scale: 100; Units: bar
	EndPressure   uint16               // Scale: 100; Units: bar

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

TankSummary is a TankSummary message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTankSummary

func NewTankSummary(mesg *proto.Message) *TankSummary

NewTankSummary creates new TankSummary struct based on given mesg. If mesg is nil, it will return TankSummary with all fields being set to its corresponding invalid value.

func (*TankSummary) EndPressureScaled added in v0.8.0

func (m *TankSummary) EndPressureScaled() float64

EndPressureScaled return EndPressure in its scaled value. If EndPressure value is invalid, float64 invalid value will be returned.

Scale: 100; Units: bar

func (*TankSummary) SetDeveloperFields added in v0.4.0

func (m *TankSummary) SetDeveloperFields(developerFields ...proto.DeveloperField) *TankSummary

SetDeveloperFields sets DeveloperFields.

func (*TankSummary) SetEndPressure added in v0.4.0

func (m *TankSummary) SetEndPressure(v uint16) *TankSummary

SetEndPressure sets EndPressure value.

Scale: 100; Units: bar

func (*TankSummary) SetEndPressureScaled added in v0.17.2

func (m *TankSummary) SetEndPressureScaled(v float64) *TankSummary

SetEndPressureScaled is similar to SetEndPressure except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: bar

func (*TankSummary) SetSensor added in v0.4.0

func (m *TankSummary) SetSensor(v typedef.AntChannelId) *TankSummary

SetSensor sets Sensor value.

Base: uint32z

func (*TankSummary) SetStartPressure added in v0.4.0

func (m *TankSummary) SetStartPressure(v uint16) *TankSummary

SetStartPressure sets StartPressure value.

Scale: 100; Units: bar

func (*TankSummary) SetStartPressureScaled added in v0.17.2

func (m *TankSummary) SetStartPressureScaled(v float64) *TankSummary

SetStartPressureScaled is similar to SetStartPressure except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: bar

func (*TankSummary) SetTimestamp added in v0.4.0

func (m *TankSummary) SetTimestamp(v time.Time) *TankSummary

SetTimestamp sets Timestamp value.

Units: s

func (*TankSummary) SetUnknownFields added in v0.23.6

func (m *TankSummary) SetUnknownFields(unknownFields ...proto.Field) *TankSummary

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*TankSummary) SetVolumeUsed added in v0.4.0

func (m *TankSummary) SetVolumeUsed(v uint32) *TankSummary

SetVolumeUsed sets VolumeUsed value.

Scale: 100; Units: L

func (*TankSummary) SetVolumeUsedScaled added in v0.17.2

func (m *TankSummary) SetVolumeUsedScaled(v float64) *TankSummary

SetVolumeUsedScaled is similar to SetVolumeUsed except it accepts a scaled value. This method automatically converts the given value to its uint32 form, discarding any applied scale and offset.

Scale: 100; Units: L

func (*TankSummary) StartPressureScaled added in v0.8.0

func (m *TankSummary) StartPressureScaled() float64

StartPressureScaled return StartPressure in its scaled value. If StartPressure value is invalid, float64 invalid value will be returned.

Scale: 100; Units: bar

func (*TankSummary) TimestampUint32 added in v0.15.0

func (m *TankSummary) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TankSummary) ToMesg added in v0.3.0

func (m *TankSummary) ToMesg(options *Options) proto.Message

ToMesg converts TankSummary into proto.Message. If options is nil, default options will be used.

func (*TankSummary) VolumeUsedScaled added in v0.8.0

func (m *TankSummary) VolumeUsedScaled() float64

VolumeUsedScaled return VolumeUsed in its scaled value. If VolumeUsed value is invalid, float64 invalid value will be returned.

Scale: 100; Units: L

type TankUpdate

type TankUpdate struct {
	Timestamp time.Time            // Units: s
	Sensor    typedef.AntChannelId // Base: uint32z
	Pressure  uint16               // Scale: 100; Units: bar

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

TankUpdate is a TankUpdate message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTankUpdate

func NewTankUpdate(mesg *proto.Message) *TankUpdate

NewTankUpdate creates new TankUpdate struct based on given mesg. If mesg is nil, it will return TankUpdate with all fields being set to its corresponding invalid value.

func (*TankUpdate) PressureScaled added in v0.8.0

func (m *TankUpdate) PressureScaled() float64

PressureScaled return Pressure in its scaled value. If Pressure value is invalid, float64 invalid value will be returned.

Scale: 100; Units: bar

func (*TankUpdate) SetDeveloperFields added in v0.4.0

func (m *TankUpdate) SetDeveloperFields(developerFields ...proto.DeveloperField) *TankUpdate

SetDeveloperFields sets DeveloperFields.

func (*TankUpdate) SetPressure added in v0.4.0

func (m *TankUpdate) SetPressure(v uint16) *TankUpdate

SetPressure sets Pressure value.

Scale: 100; Units: bar

func (*TankUpdate) SetPressureScaled added in v0.17.2

func (m *TankUpdate) SetPressureScaled(v float64) *TankUpdate

SetPressureScaled is similar to SetPressure except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: bar

func (*TankUpdate) SetSensor added in v0.4.0

func (m *TankUpdate) SetSensor(v typedef.AntChannelId) *TankUpdate

SetSensor sets Sensor value.

Base: uint32z

func (*TankUpdate) SetTimestamp added in v0.4.0

func (m *TankUpdate) SetTimestamp(v time.Time) *TankUpdate

SetTimestamp sets Timestamp value.

Units: s

func (*TankUpdate) SetUnknownFields added in v0.23.6

func (m *TankUpdate) SetUnknownFields(unknownFields ...proto.Field) *TankUpdate

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*TankUpdate) TimestampUint32 added in v0.15.0

func (m *TankUpdate) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TankUpdate) ToMesg added in v0.3.0

func (m *TankUpdate) ToMesg(options *Options) proto.Message

ToMesg converts TankUpdate into proto.Message. If options is nil, default options will be used.

type ThreeDSensorCalibration

type ThreeDSensorCalibration struct {
	Timestamp          time.Time          // Units: s; Whole second part of the timestamp
	OffsetCal          [3]int32           // Array: [3]; Internal calibration factors, one for each: xy, yx, zx
	OrientationMatrix  [9]int32           // Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)
	CalibrationFactor  uint32             // Calibration factor used to convert from raw ADC value to degrees, g, etc.
	CalibrationDivisor uint32             // Units: counts; Calibration factor divisor
	LevelShift         uint32             // Level shift value used to shift the ADC value back into range
	SensorType         typedef.SensorType // Indicates which sensor the calibration is for

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ThreeDSensorCalibration is a ThreeDSensorCalibration message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewThreeDSensorCalibration

func NewThreeDSensorCalibration(mesg *proto.Message) *ThreeDSensorCalibration

NewThreeDSensorCalibration creates new ThreeDSensorCalibration struct based on given mesg. If mesg is nil, it will return ThreeDSensorCalibration with all fields being set to its corresponding invalid value.

func (*ThreeDSensorCalibration) GetCalibrationFactor added in v0.16.0

func (m *ThreeDSensorCalibration) GetCalibrationFactor() (name string, value any)

GetCalibrationFactor returns Dynamic Field interpretation of CalibrationFactor. Otherwise, returns the original value of CalibrationFactor.

Based on m.SensorType:

  • name: "accel_cal_factor", units: "g" , value: uint32(m.CalibrationFactor)
  • name: "gyro_cal_factor", units: "deg/s" , value: uint32(m.CalibrationFactor)

Otherwise:

  • name: "calibration_factor", value: m.CalibrationFactor

func (*ThreeDSensorCalibration) OrientationMatrixScaled added in v0.8.0

func (m *ThreeDSensorCalibration) OrientationMatrixScaled() [9]float64

OrientationMatrixScaled return OrientationMatrix in its scaled value. If OrientationMatrix value is invalid, nil will be returned.

Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)

func (*ThreeDSensorCalibration) SetCalibrationDivisor added in v0.4.0

func (m *ThreeDSensorCalibration) SetCalibrationDivisor(v uint32) *ThreeDSensorCalibration

SetCalibrationDivisor sets CalibrationDivisor value.

Units: counts; Calibration factor divisor

func (*ThreeDSensorCalibration) SetCalibrationFactor added in v0.4.0

func (m *ThreeDSensorCalibration) SetCalibrationFactor(v uint32) *ThreeDSensorCalibration

SetCalibrationFactor sets CalibrationFactor value.

Calibration factor used to convert from raw ADC value to degrees, g, etc.

func (*ThreeDSensorCalibration) SetDeveloperFields added in v0.4.0

func (m *ThreeDSensorCalibration) SetDeveloperFields(developerFields ...proto.DeveloperField) *ThreeDSensorCalibration

SetDeveloperFields sets DeveloperFields.

func (*ThreeDSensorCalibration) SetLevelShift added in v0.4.0

SetLevelShift sets LevelShift value.

Level shift value used to shift the ADC value back into range

func (*ThreeDSensorCalibration) SetOffsetCal added in v0.4.0

func (m *ThreeDSensorCalibration) SetOffsetCal(v [3]int32) *ThreeDSensorCalibration

SetOffsetCal sets OffsetCal value.

Array: [3]; Internal calibration factors, one for each: xy, yx, zx

func (*ThreeDSensorCalibration) SetOrientationMatrix added in v0.4.0

func (m *ThreeDSensorCalibration) SetOrientationMatrix(v [9]int32) *ThreeDSensorCalibration

SetOrientationMatrix sets OrientationMatrix value.

Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)

func (*ThreeDSensorCalibration) SetOrientationMatrixScaled added in v0.17.2

func (m *ThreeDSensorCalibration) SetOrientationMatrixScaled(vs [9]float64) *ThreeDSensorCalibration

SetOrientationMatrixScaled is similar to SetOrientationMatrix except it accepts a scaled value. This method automatically converts the given value to its [9]int32 form, discarding any applied scale and offset.

Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)

func (*ThreeDSensorCalibration) SetSensorType added in v0.4.0

SetSensorType sets SensorType value.

Indicates which sensor the calibration is for

func (*ThreeDSensorCalibration) SetTimestamp added in v0.4.0

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*ThreeDSensorCalibration) SetUnknownFields added in v0.23.6

func (m *ThreeDSensorCalibration) SetUnknownFields(unknownFields ...proto.Field) *ThreeDSensorCalibration

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ThreeDSensorCalibration) TimestampUint32 added in v0.15.0

func (m *ThreeDSensorCalibration) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*ThreeDSensorCalibration) ToMesg added in v0.3.0

func (m *ThreeDSensorCalibration) ToMesg(options *Options) proto.Message

ToMesg converts ThreeDSensorCalibration into proto.Message. If options is nil, default options will be used.

type TimeInZone

type TimeInZone struct {
	Timestamp                time.Time // Units: s
	TimeInHrZone             []uint32  // Array: [N]; Scale: 1000; Units: s
	TimeInSpeedZone          []uint32  // Array: [N]; Scale: 1000; Units: s
	TimeInCadenceZone        []uint32  // Array: [N]; Scale: 1000; Units: s
	TimeInPowerZone          []uint32  // Array: [N]; Scale: 1000; Units: s
	HrZoneHighBoundary       []uint8   // Array: [N]; Units: bpm
	SpeedZoneHighBoundary    []uint16  // Array: [N]; Scale: 1000; Units: m/s
	CadenceZoneHighBoundary  []uint8   // Array: [N]; Units: rpm
	PowerZoneHighBoundary    []uint16  // Array: [N]; Units: watts
	ReferenceMesg            typedef.MesgNum
	ReferenceIndex           typedef.MessageIndex
	FunctionalThresholdPower uint16
	HrCalcType               typedef.HrZoneCalc
	MaxHeartRate             uint8
	RestingHeartRate         uint8
	ThresholdHeartRate       uint8
	PwrCalcType              typedef.PwrZoneCalc

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

TimeInZone is a TimeInZone message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTimeInZone

func NewTimeInZone(mesg *proto.Message) *TimeInZone

NewTimeInZone creates new TimeInZone struct based on given mesg. If mesg is nil, it will return TimeInZone with all fields being set to its corresponding invalid value.

func (*TimeInZone) SetCadenceZoneHighBoundary added in v0.17.0

func (m *TimeInZone) SetCadenceZoneHighBoundary(v []uint8) *TimeInZone

SetCadenceZoneHighBoundary sets CadenceZoneHighBoundary value.

Array: [N]; Units: rpm

func (*TimeInZone) SetDeveloperFields added in v0.4.0

func (m *TimeInZone) SetDeveloperFields(developerFields ...proto.DeveloperField) *TimeInZone

SetDeveloperFields sets DeveloperFields.

func (*TimeInZone) SetFunctionalThresholdPower added in v0.4.0

func (m *TimeInZone) SetFunctionalThresholdPower(v uint16) *TimeInZone

SetFunctionalThresholdPower sets FunctionalThresholdPower value.

func (*TimeInZone) SetHrCalcType added in v0.4.0

func (m *TimeInZone) SetHrCalcType(v typedef.HrZoneCalc) *TimeInZone

SetHrCalcType sets HrCalcType value.

func (*TimeInZone) SetHrZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetHrZoneHighBoundary(v []uint8) *TimeInZone

SetHrZoneHighBoundary sets HrZoneHighBoundary value.

Array: [N]; Units: bpm

func (*TimeInZone) SetMaxHeartRate added in v0.4.0

func (m *TimeInZone) SetMaxHeartRate(v uint8) *TimeInZone

SetMaxHeartRate sets MaxHeartRate value.

func (*TimeInZone) SetPowerZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetPowerZoneHighBoundary(v []uint16) *TimeInZone

SetPowerZoneHighBoundary sets PowerZoneHighBoundary value.

Array: [N]; Units: watts

func (*TimeInZone) SetPwrCalcType added in v0.4.0

func (m *TimeInZone) SetPwrCalcType(v typedef.PwrZoneCalc) *TimeInZone

SetPwrCalcType sets PwrCalcType value.

func (*TimeInZone) SetReferenceIndex added in v0.4.0

func (m *TimeInZone) SetReferenceIndex(v typedef.MessageIndex) *TimeInZone

SetReferenceIndex sets ReferenceIndex value.

func (*TimeInZone) SetReferenceMesg added in v0.4.0

func (m *TimeInZone) SetReferenceMesg(v typedef.MesgNum) *TimeInZone

SetReferenceMesg sets ReferenceMesg value.

func (*TimeInZone) SetRestingHeartRate added in v0.4.0

func (m *TimeInZone) SetRestingHeartRate(v uint8) *TimeInZone

SetRestingHeartRate sets RestingHeartRate value.

func (*TimeInZone) SetSpeedZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetSpeedZoneHighBoundary(v []uint16) *TimeInZone

SetSpeedZoneHighBoundary sets SpeedZoneHighBoundary value.

Array: [N]; Scale: 1000; Units: m/s

func (*TimeInZone) SetSpeedZoneHighBoundaryScaled added in v0.17.2

func (m *TimeInZone) SetSpeedZoneHighBoundaryScaled(vs []float64) *TimeInZone

SetSpeedZoneHighBoundaryScaled is similar to SetSpeedZoneHighBoundary except it accepts a scaled value. This method automatically converts the given value to its []uint16 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: m/s

func (*TimeInZone) SetThresholdHeartRate added in v0.4.0

func (m *TimeInZone) SetThresholdHeartRate(v uint8) *TimeInZone

SetThresholdHeartRate sets ThresholdHeartRate value.

func (*TimeInZone) SetTimeInCadenceZone added in v0.4.0

func (m *TimeInZone) SetTimeInCadenceZone(v []uint32) *TimeInZone

SetTimeInCadenceZone sets TimeInCadenceZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInCadenceZoneScaled added in v0.17.2

func (m *TimeInZone) SetTimeInCadenceZoneScaled(vs []float64) *TimeInZone

SetTimeInCadenceZoneScaled is similar to SetTimeInCadenceZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInHrZone added in v0.4.0

func (m *TimeInZone) SetTimeInHrZone(v []uint32) *TimeInZone

SetTimeInHrZone sets TimeInHrZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInHrZoneScaled added in v0.17.2

func (m *TimeInZone) SetTimeInHrZoneScaled(vs []float64) *TimeInZone

SetTimeInHrZoneScaled is similar to SetTimeInHrZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInPowerZone added in v0.4.0

func (m *TimeInZone) SetTimeInPowerZone(v []uint32) *TimeInZone

SetTimeInPowerZone sets TimeInPowerZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInPowerZoneScaled added in v0.17.2

func (m *TimeInZone) SetTimeInPowerZoneScaled(vs []float64) *TimeInZone

SetTimeInPowerZoneScaled is similar to SetTimeInPowerZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInSpeedZone added in v0.4.0

func (m *TimeInZone) SetTimeInSpeedZone(v []uint32) *TimeInZone

SetTimeInSpeedZone sets TimeInSpeedZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInSpeedZoneScaled added in v0.17.2

func (m *TimeInZone) SetTimeInSpeedZoneScaled(vs []float64) *TimeInZone

SetTimeInSpeedZoneScaled is similar to SetTimeInSpeedZone except it accepts a scaled value. This method automatically converts the given value to its []uint32 form, discarding any applied scale and offset.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimestamp added in v0.4.0

func (m *TimeInZone) SetTimestamp(v time.Time) *TimeInZone

SetTimestamp sets Timestamp value.

Units: s

func (*TimeInZone) SetUnknownFields added in v0.23.6

func (m *TimeInZone) SetUnknownFields(unknownFields ...proto.Field) *TimeInZone

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*TimeInZone) SpeedZoneHighBoundaryScaled added in v0.8.0

func (m *TimeInZone) SpeedZoneHighBoundaryScaled() []float64

SpeedZoneHighBoundaryScaled return SpeedZoneHighBoundary in its scaled value. If SpeedZoneHighBoundary value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: m/s

func (*TimeInZone) TimeInCadenceZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value. If TimeInCadenceZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) TimeInHrZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value. If TimeInHrZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) TimeInPowerZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value. If TimeInPowerZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) TimeInSpeedZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value. If TimeInSpeedZone value is invalid, nil will be returned.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) TimestampUint32 added in v0.15.0

func (m *TimeInZone) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TimeInZone) ToMesg added in v0.3.0

func (m *TimeInZone) ToMesg(options *Options) proto.Message

ToMesg converts TimeInZone into proto.Message. If options is nil, default options will be used.

type TimestampCorrelation

type TimestampCorrelation struct {
	Timestamp                 time.Time // Units: s; Whole second part of UTC timestamp at the time the system timestamp was recorded.
	SystemTimestamp           time.Time // Units: s; Whole second part of the system timestamp
	LocalTimestamp            time.Time // Units: s; timestamp epoch expressed in local time used to convert timestamps to local time
	FractionalTimestamp       uint16    // Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.
	FractionalSystemTimestamp uint16    // Scale: 32768; Units: s; Fractional part of the system timestamp
	TimestampMs               uint16    // Units: ms; Millisecond part of the UTC timestamp at the time the system timestamp was recorded.
	SystemTimestampMs         uint16    // Units: ms; Millisecond part of the system timestamp

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

TimestampCorrelation is a TimestampCorrelation message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTimestampCorrelation

func NewTimestampCorrelation(mesg *proto.Message) *TimestampCorrelation

NewTimestampCorrelation creates new TimestampCorrelation struct based on given mesg. If mesg is nil, it will return TimestampCorrelation with all fields being set to its corresponding invalid value.

func (*TimestampCorrelation) FractionalSystemTimestampScaled added in v0.8.0

func (m *TimestampCorrelation) FractionalSystemTimestampScaled() float64

FractionalSystemTimestampScaled return FractionalSystemTimestamp in its scaled value. If FractionalSystemTimestamp value is invalid, float64 invalid value will be returned.

Scale: 32768; Units: s; Fractional part of the system timestamp

func (*TimestampCorrelation) FractionalTimestampScaled added in v0.8.0

func (m *TimestampCorrelation) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value. If FractionalTimestamp value is invalid, float64 invalid value will be returned.

Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.

func (*TimestampCorrelation) LocalTimestampUint32 added in v0.15.0

func (m *TimestampCorrelation) LocalTimestampUint32() uint32

LocalTimestampUint32 returns LocalTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TimestampCorrelation) SetDeveloperFields added in v0.4.0

func (m *TimestampCorrelation) SetDeveloperFields(developerFields ...proto.DeveloperField) *TimestampCorrelation

SetDeveloperFields sets DeveloperFields.

func (*TimestampCorrelation) SetFractionalSystemTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetFractionalSystemTimestamp(v uint16) *TimestampCorrelation

SetFractionalSystemTimestamp sets FractionalSystemTimestamp value.

Scale: 32768; Units: s; Fractional part of the system timestamp

func (*TimestampCorrelation) SetFractionalSystemTimestampScaled added in v0.17.2

func (m *TimestampCorrelation) SetFractionalSystemTimestampScaled(v float64) *TimestampCorrelation

SetFractionalSystemTimestampScaled is similar to SetFractionalSystemTimestamp except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 32768; Units: s; Fractional part of the system timestamp

func (*TimestampCorrelation) SetFractionalTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetFractionalTimestamp(v uint16) *TimestampCorrelation

SetFractionalTimestamp sets FractionalTimestamp value.

Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.

func (*TimestampCorrelation) SetFractionalTimestampScaled added in v0.17.2

func (m *TimestampCorrelation) SetFractionalTimestampScaled(v float64) *TimestampCorrelation

SetFractionalTimestampScaled is similar to SetFractionalTimestamp except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.

func (*TimestampCorrelation) SetLocalTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetLocalTimestamp(v time.Time) *TimestampCorrelation

SetLocalTimestamp sets LocalTimestamp value.

Units: s; timestamp epoch expressed in local time used to convert timestamps to local time

func (*TimestampCorrelation) SetSystemTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetSystemTimestamp(v time.Time) *TimestampCorrelation

SetSystemTimestamp sets SystemTimestamp value.

Units: s; Whole second part of the system timestamp

func (*TimestampCorrelation) SetSystemTimestampMs added in v0.4.0

func (m *TimestampCorrelation) SetSystemTimestampMs(v uint16) *TimestampCorrelation

SetSystemTimestampMs sets SystemTimestampMs value.

Units: ms; Millisecond part of the system timestamp

func (*TimestampCorrelation) SetTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetTimestamp(v time.Time) *TimestampCorrelation

SetTimestamp sets Timestamp value.

Units: s; Whole second part of UTC timestamp at the time the system timestamp was recorded.

func (*TimestampCorrelation) SetTimestampMs added in v0.4.0

func (m *TimestampCorrelation) SetTimestampMs(v uint16) *TimestampCorrelation

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the UTC timestamp at the time the system timestamp was recorded.

func (*TimestampCorrelation) SetUnknownFields added in v0.23.6

func (m *TimestampCorrelation) SetUnknownFields(unknownFields ...proto.Field) *TimestampCorrelation

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*TimestampCorrelation) SystemTimestampUint32 added in v0.15.0

func (m *TimestampCorrelation) SystemTimestampUint32() uint32

SystemTimestampUint32 returns SystemTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TimestampCorrelation) TimestampUint32 added in v0.15.0

func (m *TimestampCorrelation) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TimestampCorrelation) ToMesg added in v0.3.0

func (m *TimestampCorrelation) ToMesg(options *Options) proto.Message

ToMesg converts TimestampCorrelation into proto.Message. If options is nil, default options will be used.

type Totals

type Totals struct {
	Timestamp    time.Time // Units: s
	TimerTime    uint32    // Units: s; Excludes pauses
	Distance     uint32    // Units: m
	Calories     uint32    // Units: kcal
	ElapsedTime  uint32    // Units: s; Includes pauses
	ActiveTime   uint32    // Units: s
	MessageIndex typedef.MessageIndex
	Sessions     uint16
	Sport        typedef.Sport
	SportIndex   uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Totals is a Totals message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTotals

func NewTotals(mesg *proto.Message) *Totals

NewTotals creates new Totals struct based on given mesg. If mesg is nil, it will return Totals with all fields being set to its corresponding invalid value.

func (*Totals) SetActiveTime added in v0.4.0

func (m *Totals) SetActiveTime(v uint32) *Totals

SetActiveTime sets ActiveTime value.

Units: s

func (*Totals) SetCalories added in v0.4.0

func (m *Totals) SetCalories(v uint32) *Totals

SetCalories sets Calories value.

Units: kcal

func (*Totals) SetDeveloperFields added in v0.4.0

func (m *Totals) SetDeveloperFields(developerFields ...proto.DeveloperField) *Totals

SetDeveloperFields sets DeveloperFields.

func (*Totals) SetDistance added in v0.4.0

func (m *Totals) SetDistance(v uint32) *Totals

SetDistance sets Distance value.

Units: m

func (*Totals) SetElapsedTime added in v0.4.0

func (m *Totals) SetElapsedTime(v uint32) *Totals

SetElapsedTime sets ElapsedTime value.

Units: s; Includes pauses

func (*Totals) SetMessageIndex added in v0.4.0

func (m *Totals) SetMessageIndex(v typedef.MessageIndex) *Totals

SetMessageIndex sets MessageIndex value.

func (*Totals) SetSessions added in v0.4.0

func (m *Totals) SetSessions(v uint16) *Totals

SetSessions sets Sessions value.

func (*Totals) SetSport added in v0.4.0

func (m *Totals) SetSport(v typedef.Sport) *Totals

SetSport sets Sport value.

func (*Totals) SetSportIndex added in v0.4.0

func (m *Totals) SetSportIndex(v uint8) *Totals

SetSportIndex sets SportIndex value.

func (*Totals) SetTimerTime added in v0.4.0

func (m *Totals) SetTimerTime(v uint32) *Totals

SetTimerTime sets TimerTime value.

Units: s; Excludes pauses

func (*Totals) SetTimestamp added in v0.4.0

func (m *Totals) SetTimestamp(v time.Time) *Totals

SetTimestamp sets Timestamp value.

Units: s

func (*Totals) SetUnknownFields added in v0.23.6

func (m *Totals) SetUnknownFields(unknownFields ...proto.Field) *Totals

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Totals) TimestampUint32 added in v0.15.0

func (m *Totals) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*Totals) ToMesg added in v0.3.0

func (m *Totals) ToMesg(options *Options) proto.Message

ToMesg converts Totals into proto.Message. If options is nil, default options will be used.

type TrainingFile

type TrainingFile struct {
	Timestamp    time.Time
	TimeCreated  time.Time
	SerialNumber uint32 // Base: uint32z
	Manufacturer typedef.Manufacturer
	Product      uint16
	Type         typedef.File

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

TrainingFile is a TrainingFile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewTrainingFile

func NewTrainingFile(mesg *proto.Message) *TrainingFile

NewTrainingFile creates new TrainingFile struct based on given mesg. If mesg is nil, it will return TrainingFile with all fields being set to its corresponding invalid value.

func (*TrainingFile) GetProduct added in v0.16.0

func (m *TrainingFile) GetProduct() (name string, value any)

GetProduct returns Dynamic Field interpretation of Product. Otherwise, returns the original value of Product.

Based on m.Manufacturer:

  • name: "favero_product", value: typedef.FaveroProduct(m.Product)
  • name: "garmin_product", value: typedef.GarminProduct(m.Product)

Otherwise:

  • name: "product", value: m.Product

func (*TrainingFile) SetDeveloperFields added in v0.4.0

func (m *TrainingFile) SetDeveloperFields(developerFields ...proto.DeveloperField) *TrainingFile

SetDeveloperFields sets DeveloperFields.

func (*TrainingFile) SetManufacturer added in v0.4.0

func (m *TrainingFile) SetManufacturer(v typedef.Manufacturer) *TrainingFile

SetManufacturer sets Manufacturer value.

func (*TrainingFile) SetProduct added in v0.4.0

func (m *TrainingFile) SetProduct(v uint16) *TrainingFile

SetProduct sets Product value.

func (*TrainingFile) SetSerialNumber added in v0.4.0

func (m *TrainingFile) SetSerialNumber(v uint32) *TrainingFile

SetSerialNumber sets SerialNumber value.

Base: uint32z

func (*TrainingFile) SetTimeCreated added in v0.4.0

func (m *TrainingFile) SetTimeCreated(v time.Time) *TrainingFile

SetTimeCreated sets TimeCreated value.

func (*TrainingFile) SetTimestamp added in v0.4.0

func (m *TrainingFile) SetTimestamp(v time.Time) *TrainingFile

SetTimestamp sets Timestamp value.

func (*TrainingFile) SetType added in v0.4.0

func (m *TrainingFile) SetType(v typedef.File) *TrainingFile

SetType sets Type value.

func (*TrainingFile) SetUnknownFields added in v0.23.6

func (m *TrainingFile) SetUnknownFields(unknownFields ...proto.Field) *TrainingFile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*TrainingFile) TimeCreatedUint32 added in v0.15.0

func (m *TrainingFile) TimeCreatedUint32() uint32

TimeCreatedUint32 returns TimeCreated in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TrainingFile) TimestampUint32 added in v0.15.0

func (m *TrainingFile) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*TrainingFile) ToMesg added in v0.3.0

func (m *TrainingFile) ToMesg(options *Options) proto.Message

ToMesg converts TrainingFile into proto.Message. If options is nil, default options will be used.

type UserProfile

type UserProfile struct {
	FriendlyName               string                   // Used for Morning Report greeting
	WakeTime                   typedef.LocaltimeIntoDay // Typical wake time
	SleepTime                  typedef.LocaltimeIntoDay // Typical bed time
	DiveCount                  uint32
	GlobalId                   [6]byte // Array: [6]
	MessageIndex               typedef.MessageIndex
	Weight                     uint16 // Scale: 10; Units: kg
	LocalId                    typedef.UserLocalId
	UserRunningStepLength      uint16 // Scale: 1000; Units: m; User defined running step length set to 0 for auto length
	UserWalkingStepLength      uint16 // Scale: 1000; Units: m; User defined walking step length set to 0 for auto length
	Gender                     typedef.Gender
	Age                        uint8 // Units: years
	Height                     uint8 // Scale: 100; Units: m
	Language                   typedef.Language
	ElevSetting                typedef.DisplayMeasure
	WeightSetting              typedef.DisplayMeasure
	RestingHeartRate           uint8 // Units: bpm
	DefaultMaxRunningHeartRate uint8 // Units: bpm
	DefaultMaxBikingHeartRate  uint8 // Units: bpm
	DefaultMaxHeartRate        uint8 // Units: bpm
	HrSetting                  typedef.DisplayHeart
	SpeedSetting               typedef.DisplayMeasure
	DistSetting                typedef.DisplayMeasure
	PowerSetting               typedef.DisplayPower
	ActivityClass              typedef.ActivityClass
	PositionSetting            typedef.DisplayPosition
	TemperatureSetting         typedef.DisplayMeasure
	HeightSetting              typedef.DisplayMeasure
	DepthSetting               typedef.DisplayMeasure

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

UserProfile is a UserProfile message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewUserProfile

func NewUserProfile(mesg *proto.Message) *UserProfile

NewUserProfile creates new UserProfile struct based on given mesg. If mesg is nil, it will return UserProfile with all fields being set to its corresponding invalid value.

func (*UserProfile) HeightScaled added in v0.8.0

func (m *UserProfile) HeightScaled() float64

HeightScaled return Height in its scaled value. If Height value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*UserProfile) SetActivityClass added in v0.4.0

func (m *UserProfile) SetActivityClass(v typedef.ActivityClass) *UserProfile

SetActivityClass sets ActivityClass value.

func (*UserProfile) SetAge added in v0.4.0

func (m *UserProfile) SetAge(v uint8) *UserProfile

SetAge sets Age value.

Units: years

func (*UserProfile) SetDefaultMaxBikingHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxBikingHeartRate(v uint8) *UserProfile

SetDefaultMaxBikingHeartRate sets DefaultMaxBikingHeartRate value.

Units: bpm

func (*UserProfile) SetDefaultMaxHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxHeartRate(v uint8) *UserProfile

SetDefaultMaxHeartRate sets DefaultMaxHeartRate value.

Units: bpm

func (*UserProfile) SetDefaultMaxRunningHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxRunningHeartRate(v uint8) *UserProfile

SetDefaultMaxRunningHeartRate sets DefaultMaxRunningHeartRate value.

Units: bpm

func (*UserProfile) SetDepthSetting added in v0.4.0

func (m *UserProfile) SetDepthSetting(v typedef.DisplayMeasure) *UserProfile

SetDepthSetting sets DepthSetting value.

func (*UserProfile) SetDeveloperFields added in v0.4.0

func (m *UserProfile) SetDeveloperFields(developerFields ...proto.DeveloperField) *UserProfile

SetDeveloperFields sets DeveloperFields.

func (*UserProfile) SetDistSetting added in v0.4.0

func (m *UserProfile) SetDistSetting(v typedef.DisplayMeasure) *UserProfile

SetDistSetting sets DistSetting value.

func (*UserProfile) SetDiveCount added in v0.4.0

func (m *UserProfile) SetDiveCount(v uint32) *UserProfile

SetDiveCount sets DiveCount value.

func (*UserProfile) SetElevSetting added in v0.4.0

func (m *UserProfile) SetElevSetting(v typedef.DisplayMeasure) *UserProfile

SetElevSetting sets ElevSetting value.

func (*UserProfile) SetFriendlyName added in v0.4.0

func (m *UserProfile) SetFriendlyName(v string) *UserProfile

SetFriendlyName sets FriendlyName value.

Used for Morning Report greeting

func (*UserProfile) SetGender added in v0.4.0

func (m *UserProfile) SetGender(v typedef.Gender) *UserProfile

SetGender sets Gender value.

func (*UserProfile) SetGlobalId added in v0.4.0

func (m *UserProfile) SetGlobalId(v [6]byte) *UserProfile

SetGlobalId sets GlobalId value.

Array: [6]

func (*UserProfile) SetHeight added in v0.4.0

func (m *UserProfile) SetHeight(v uint8) *UserProfile

SetHeight sets Height value.

Scale: 100; Units: m

func (*UserProfile) SetHeightScaled added in v0.17.2

func (m *UserProfile) SetHeightScaled(v float64) *UserProfile

SetHeightScaled is similar to SetHeight except it accepts a scaled value. This method automatically converts the given value to its uint8 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*UserProfile) SetHeightSetting added in v0.4.0

func (m *UserProfile) SetHeightSetting(v typedef.DisplayMeasure) *UserProfile

SetHeightSetting sets HeightSetting value.

func (*UserProfile) SetHrSetting added in v0.4.0

func (m *UserProfile) SetHrSetting(v typedef.DisplayHeart) *UserProfile

SetHrSetting sets HrSetting value.

func (*UserProfile) SetLanguage added in v0.4.0

func (m *UserProfile) SetLanguage(v typedef.Language) *UserProfile

SetLanguage sets Language value.

func (*UserProfile) SetLocalId added in v0.4.0

func (m *UserProfile) SetLocalId(v typedef.UserLocalId) *UserProfile

SetLocalId sets LocalId value.

func (*UserProfile) SetMessageIndex added in v0.4.0

func (m *UserProfile) SetMessageIndex(v typedef.MessageIndex) *UserProfile

SetMessageIndex sets MessageIndex value.

func (*UserProfile) SetPositionSetting added in v0.4.0

func (m *UserProfile) SetPositionSetting(v typedef.DisplayPosition) *UserProfile

SetPositionSetting sets PositionSetting value.

func (*UserProfile) SetPowerSetting added in v0.4.0

func (m *UserProfile) SetPowerSetting(v typedef.DisplayPower) *UserProfile

SetPowerSetting sets PowerSetting value.

func (*UserProfile) SetRestingHeartRate added in v0.4.0

func (m *UserProfile) SetRestingHeartRate(v uint8) *UserProfile

SetRestingHeartRate sets RestingHeartRate value.

Units: bpm

func (*UserProfile) SetSleepTime added in v0.4.0

func (m *UserProfile) SetSleepTime(v typedef.LocaltimeIntoDay) *UserProfile

SetSleepTime sets SleepTime value.

Typical bed time

func (*UserProfile) SetSpeedSetting added in v0.4.0

func (m *UserProfile) SetSpeedSetting(v typedef.DisplayMeasure) *UserProfile

SetSpeedSetting sets SpeedSetting value.

func (*UserProfile) SetTemperatureSetting added in v0.4.0

func (m *UserProfile) SetTemperatureSetting(v typedef.DisplayMeasure) *UserProfile

SetTemperatureSetting sets TemperatureSetting value.

func (*UserProfile) SetUnknownFields added in v0.23.6

func (m *UserProfile) SetUnknownFields(unknownFields ...proto.Field) *UserProfile

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*UserProfile) SetUserRunningStepLength added in v0.4.0

func (m *UserProfile) SetUserRunningStepLength(v uint16) *UserProfile

SetUserRunningStepLength sets UserRunningStepLength value.

Scale: 1000; Units: m; User defined running step length set to 0 for auto length

func (*UserProfile) SetUserRunningStepLengthScaled added in v0.17.2

func (m *UserProfile) SetUserRunningStepLengthScaled(v float64) *UserProfile

SetUserRunningStepLengthScaled is similar to SetUserRunningStepLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m; User defined running step length set to 0 for auto length

func (*UserProfile) SetUserWalkingStepLength added in v0.4.0

func (m *UserProfile) SetUserWalkingStepLength(v uint16) *UserProfile

SetUserWalkingStepLength sets UserWalkingStepLength value.

Scale: 1000; Units: m; User defined walking step length set to 0 for auto length

func (*UserProfile) SetUserWalkingStepLengthScaled added in v0.17.2

func (m *UserProfile) SetUserWalkingStepLengthScaled(v float64) *UserProfile

SetUserWalkingStepLengthScaled is similar to SetUserWalkingStepLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m; User defined walking step length set to 0 for auto length

func (*UserProfile) SetWakeTime added in v0.4.0

func (m *UserProfile) SetWakeTime(v typedef.LocaltimeIntoDay) *UserProfile

SetWakeTime sets WakeTime value.

Typical wake time

func (*UserProfile) SetWeight added in v0.4.0

func (m *UserProfile) SetWeight(v uint16) *UserProfile

SetWeight sets Weight value.

Scale: 10; Units: kg

func (*UserProfile) SetWeightScaled added in v0.17.2

func (m *UserProfile) SetWeightScaled(v float64) *UserProfile

SetWeightScaled is similar to SetWeight except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: kg

func (*UserProfile) SetWeightSetting added in v0.4.0

func (m *UserProfile) SetWeightSetting(v typedef.DisplayMeasure) *UserProfile

SetWeightSetting sets WeightSetting value.

func (*UserProfile) ToMesg added in v0.3.0

func (m *UserProfile) ToMesg(options *Options) proto.Message

ToMesg converts UserProfile into proto.Message. If options is nil, default options will be used.

func (*UserProfile) UserRunningStepLengthScaled added in v0.8.0

func (m *UserProfile) UserRunningStepLengthScaled() float64

UserRunningStepLengthScaled return UserRunningStepLength in its scaled value. If UserRunningStepLength value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; User defined running step length set to 0 for auto length

func (*UserProfile) UserWalkingStepLengthScaled added in v0.8.0

func (m *UserProfile) UserWalkingStepLengthScaled() float64

UserWalkingStepLengthScaled return UserWalkingStepLength in its scaled value. If UserWalkingStepLength value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m; User defined walking step length set to 0 for auto length

func (*UserProfile) WeightScaled added in v0.8.0

func (m *UserProfile) WeightScaled() float64

WeightScaled return Weight in its scaled value. If Weight value is invalid, float64 invalid value will be returned.

Scale: 10; Units: kg

type Video

type Video struct {
	Url             string
	HostingProvider string
	Duration        uint32 // Units: ms; Playback time of video

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Video is a Video message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewVideo

func NewVideo(mesg *proto.Message) *Video

NewVideo creates new Video struct based on given mesg. If mesg is nil, it will return Video with all fields being set to its corresponding invalid value.

func (*Video) SetDeveloperFields added in v0.4.0

func (m *Video) SetDeveloperFields(developerFields ...proto.DeveloperField) *Video

SetDeveloperFields sets DeveloperFields.

func (*Video) SetDuration added in v0.4.0

func (m *Video) SetDuration(v uint32) *Video

SetDuration sets Duration value.

Units: ms; Playback time of video

func (*Video) SetHostingProvider added in v0.4.0

func (m *Video) SetHostingProvider(v string) *Video

SetHostingProvider sets HostingProvider value.

func (*Video) SetUnknownFields added in v0.23.6

func (m *Video) SetUnknownFields(unknownFields ...proto.Field) *Video

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Video) SetUrl added in v0.4.0

func (m *Video) SetUrl(v string) *Video

SetUrl sets Url value.

func (*Video) ToMesg added in v0.3.0

func (m *Video) ToMesg(options *Options) proto.Message

ToMesg converts Video into proto.Message. If options is nil, default options will be used.

type VideoClip

type VideoClip struct {
	StartTimestamp   time.Time
	EndTimestamp     time.Time
	ClipStart        uint32 // Units: ms; Start of clip in video time
	ClipEnd          uint32 // Units: ms; End of clip in video time
	ClipNumber       uint16
	StartTimestampMs uint16
	EndTimestampMs   uint16

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

VideoClip is a VideoClip message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewVideoClip

func NewVideoClip(mesg *proto.Message) *VideoClip

NewVideoClip creates new VideoClip struct based on given mesg. If mesg is nil, it will return VideoClip with all fields being set to its corresponding invalid value.

func (*VideoClip) EndTimestampUint32 added in v0.15.0

func (m *VideoClip) EndTimestampUint32() uint32

EndTimestampUint32 returns EndTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*VideoClip) SetClipEnd added in v0.4.0

func (m *VideoClip) SetClipEnd(v uint32) *VideoClip

SetClipEnd sets ClipEnd value.

Units: ms; End of clip in video time

func (*VideoClip) SetClipNumber added in v0.4.0

func (m *VideoClip) SetClipNumber(v uint16) *VideoClip

SetClipNumber sets ClipNumber value.

func (*VideoClip) SetClipStart added in v0.4.0

func (m *VideoClip) SetClipStart(v uint32) *VideoClip

SetClipStart sets ClipStart value.

Units: ms; Start of clip in video time

func (*VideoClip) SetDeveloperFields added in v0.4.0

func (m *VideoClip) SetDeveloperFields(developerFields ...proto.DeveloperField) *VideoClip

SetDeveloperFields sets DeveloperFields.

func (*VideoClip) SetEndTimestamp added in v0.4.0

func (m *VideoClip) SetEndTimestamp(v time.Time) *VideoClip

SetEndTimestamp sets EndTimestamp value.

func (*VideoClip) SetEndTimestampMs added in v0.4.0

func (m *VideoClip) SetEndTimestampMs(v uint16) *VideoClip

SetEndTimestampMs sets EndTimestampMs value.

func (*VideoClip) SetStartTimestamp added in v0.4.0

func (m *VideoClip) SetStartTimestamp(v time.Time) *VideoClip

SetStartTimestamp sets StartTimestamp value.

func (*VideoClip) SetStartTimestampMs added in v0.4.0

func (m *VideoClip) SetStartTimestampMs(v uint16) *VideoClip

SetStartTimestampMs sets StartTimestampMs value.

func (*VideoClip) SetUnknownFields added in v0.23.6

func (m *VideoClip) SetUnknownFields(unknownFields ...proto.Field) *VideoClip

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*VideoClip) StartTimestampUint32 added in v0.15.0

func (m *VideoClip) StartTimestampUint32() uint32

StartTimestampUint32 returns StartTimestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*VideoClip) ToMesg added in v0.3.0

func (m *VideoClip) ToMesg(options *Options) proto.Message

ToMesg converts VideoClip into proto.Message. If options is nil, default options will be used.

type VideoDescription

type VideoDescription struct {
	Text         string
	MessageIndex typedef.MessageIndex // Long descriptions will be split into multiple parts
	MessageCount uint16               // Total number of description parts

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

VideoDescription is a VideoDescription message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewVideoDescription

func NewVideoDescription(mesg *proto.Message) *VideoDescription

NewVideoDescription creates new VideoDescription struct based on given mesg. If mesg is nil, it will return VideoDescription with all fields being set to its corresponding invalid value.

func (*VideoDescription) SetDeveloperFields added in v0.4.0

func (m *VideoDescription) SetDeveloperFields(developerFields ...proto.DeveloperField) *VideoDescription

SetDeveloperFields sets DeveloperFields.

func (*VideoDescription) SetMessageCount added in v0.4.0

func (m *VideoDescription) SetMessageCount(v uint16) *VideoDescription

SetMessageCount sets MessageCount value.

Total number of description parts

func (*VideoDescription) SetMessageIndex added in v0.4.0

func (m *VideoDescription) SetMessageIndex(v typedef.MessageIndex) *VideoDescription

SetMessageIndex sets MessageIndex value.

Long descriptions will be split into multiple parts

func (*VideoDescription) SetText added in v0.4.0

func (m *VideoDescription) SetText(v string) *VideoDescription

SetText sets Text value.

func (*VideoDescription) SetUnknownFields added in v0.23.6

func (m *VideoDescription) SetUnknownFields(unknownFields ...proto.Field) *VideoDescription

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*VideoDescription) ToMesg added in v0.3.0

func (m *VideoDescription) ToMesg(options *Options) proto.Message

ToMesg converts VideoDescription into proto.Message. If options is nil, default options will be used.

type VideoFrame

type VideoFrame struct {
	Timestamp   time.Time // Units: s; Whole second part of the timestamp
	FrameNumber uint32    // Number of the frame that the timestamp and timestamp_ms correlate to
	TimestampMs uint16    // Units: ms; Millisecond part of the timestamp.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

VideoFrame is a VideoFrame message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewVideoFrame

func NewVideoFrame(mesg *proto.Message) *VideoFrame

NewVideoFrame creates new VideoFrame struct based on given mesg. If mesg is nil, it will return VideoFrame with all fields being set to its corresponding invalid value.

func (*VideoFrame) SetDeveloperFields added in v0.4.0

func (m *VideoFrame) SetDeveloperFields(developerFields ...proto.DeveloperField) *VideoFrame

SetDeveloperFields sets DeveloperFields.

func (*VideoFrame) SetFrameNumber added in v0.4.0

func (m *VideoFrame) SetFrameNumber(v uint32) *VideoFrame

SetFrameNumber sets FrameNumber value.

Number of the frame that the timestamp and timestamp_ms correlate to

func (*VideoFrame) SetTimestamp added in v0.4.0

func (m *VideoFrame) SetTimestamp(v time.Time) *VideoFrame

SetTimestamp sets Timestamp value.

Units: s; Whole second part of the timestamp

func (*VideoFrame) SetTimestampMs added in v0.4.0

func (m *VideoFrame) SetTimestampMs(v uint16) *VideoFrame

SetTimestampMs sets TimestampMs value.

Units: ms; Millisecond part of the timestamp.

func (*VideoFrame) SetUnknownFields added in v0.23.6

func (m *VideoFrame) SetUnknownFields(unknownFields ...proto.Field) *VideoFrame

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*VideoFrame) TimestampUint32 added in v0.15.0

func (m *VideoFrame) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*VideoFrame) ToMesg added in v0.3.0

func (m *VideoFrame) ToMesg(options *Options) proto.Message

ToMesg converts VideoFrame into proto.Message. If options is nil, default options will be used.

type VideoTitle

type VideoTitle struct {
	Text         string
	MessageIndex typedef.MessageIndex // Long titles will be split into multiple parts
	MessageCount uint16               // Total number of title parts

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

VideoTitle is a VideoTitle message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewVideoTitle

func NewVideoTitle(mesg *proto.Message) *VideoTitle

NewVideoTitle creates new VideoTitle struct based on given mesg. If mesg is nil, it will return VideoTitle with all fields being set to its corresponding invalid value.

func (*VideoTitle) SetDeveloperFields added in v0.4.0

func (m *VideoTitle) SetDeveloperFields(developerFields ...proto.DeveloperField) *VideoTitle

SetDeveloperFields sets DeveloperFields.

func (*VideoTitle) SetMessageCount added in v0.4.0

func (m *VideoTitle) SetMessageCount(v uint16) *VideoTitle

SetMessageCount sets MessageCount value.

Total number of title parts

func (*VideoTitle) SetMessageIndex added in v0.4.0

func (m *VideoTitle) SetMessageIndex(v typedef.MessageIndex) *VideoTitle

SetMessageIndex sets MessageIndex value.

Long titles will be split into multiple parts

func (*VideoTitle) SetText added in v0.4.0

func (m *VideoTitle) SetText(v string) *VideoTitle

SetText sets Text value.

func (*VideoTitle) SetUnknownFields added in v0.23.6

func (m *VideoTitle) SetUnknownFields(unknownFields ...proto.Field) *VideoTitle

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*VideoTitle) ToMesg added in v0.3.0

func (m *VideoTitle) ToMesg(options *Options) proto.Message

ToMesg converts VideoTitle into proto.Message. If options is nil, default options will be used.

type WatchfaceSettings

type WatchfaceSettings struct {
	MessageIndex typedef.MessageIndex
	Mode         typedef.WatchfaceMode
	Layout       byte

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WatchfaceSettings is a WatchfaceSettings message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWatchfaceSettings

func NewWatchfaceSettings(mesg *proto.Message) *WatchfaceSettings

NewWatchfaceSettings creates new WatchfaceSettings struct based on given mesg. If mesg is nil, it will return WatchfaceSettings with all fields being set to its corresponding invalid value.

func (*WatchfaceSettings) GetLayout added in v0.16.0

func (m *WatchfaceSettings) GetLayout() (name string, value any)

GetLayout returns Dynamic Field interpretation of Layout. Otherwise, returns the original value of Layout.

Based on m.Mode:

  • name: "digital_layout", value: typedef.DigitalWatchfaceLayout(m.Layout)
  • name: "analog_layout", value: typedef.AnalogWatchfaceLayout(m.Layout)

Otherwise:

  • name: "layout", value: m.Layout

func (*WatchfaceSettings) SetDeveloperFields added in v0.4.0

func (m *WatchfaceSettings) SetDeveloperFields(developerFields ...proto.DeveloperField) *WatchfaceSettings

SetDeveloperFields sets DeveloperFields.

func (*WatchfaceSettings) SetLayout added in v0.4.0

func (m *WatchfaceSettings) SetLayout(v byte) *WatchfaceSettings

SetLayout sets Layout value.

func (*WatchfaceSettings) SetMessageIndex added in v0.4.0

SetMessageIndex sets MessageIndex value.

func (*WatchfaceSettings) SetMode added in v0.4.0

SetMode sets Mode value.

func (*WatchfaceSettings) SetUnknownFields added in v0.23.6

func (m *WatchfaceSettings) SetUnknownFields(unknownFields ...proto.Field) *WatchfaceSettings

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WatchfaceSettings) ToMesg added in v0.3.0

func (m *WatchfaceSettings) ToMesg(options *Options) proto.Message

ToMesg converts WatchfaceSettings into proto.Message. If options is nil, default options will be used.

type WeatherAlert

type WeatherAlert struct {
	Timestamp  time.Time
	ReportId   string                    // Unique identifier from GCS report ID string, length is 12
	IssueTime  time.Time                 // Time alert was issued
	ExpireTime time.Time                 // Time alert expires
	Severity   typedef.WeatherSeverity   // Warning, Watch, Advisory, Statement
	Type       typedef.WeatherSevereType // Tornado, Severe Thunderstorm, etc.

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WeatherAlert is a WeatherAlert message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWeatherAlert

func NewWeatherAlert(mesg *proto.Message) *WeatherAlert

NewWeatherAlert creates new WeatherAlert struct based on given mesg. If mesg is nil, it will return WeatherAlert with all fields being set to its corresponding invalid value.

func (*WeatherAlert) ExpireTimeUint32 added in v0.15.0

func (m *WeatherAlert) ExpireTimeUint32() uint32

ExpireTimeUint32 returns ExpireTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeatherAlert) IssueTimeUint32 added in v0.15.0

func (m *WeatherAlert) IssueTimeUint32() uint32

IssueTimeUint32 returns IssueTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeatherAlert) SetDeveloperFields added in v0.4.0

func (m *WeatherAlert) SetDeveloperFields(developerFields ...proto.DeveloperField) *WeatherAlert

SetDeveloperFields sets DeveloperFields.

func (*WeatherAlert) SetExpireTime added in v0.4.0

func (m *WeatherAlert) SetExpireTime(v time.Time) *WeatherAlert

SetExpireTime sets ExpireTime value.

Time alert expires

func (*WeatherAlert) SetIssueTime added in v0.4.0

func (m *WeatherAlert) SetIssueTime(v time.Time) *WeatherAlert

SetIssueTime sets IssueTime value.

Time alert was issued

func (*WeatherAlert) SetReportId added in v0.4.0

func (m *WeatherAlert) SetReportId(v string) *WeatherAlert

SetReportId sets ReportId value.

Unique identifier from GCS report ID string, length is 12

func (*WeatherAlert) SetSeverity added in v0.4.0

func (m *WeatherAlert) SetSeverity(v typedef.WeatherSeverity) *WeatherAlert

SetSeverity sets Severity value.

Warning, Watch, Advisory, Statement

func (*WeatherAlert) SetTimestamp added in v0.4.0

func (m *WeatherAlert) SetTimestamp(v time.Time) *WeatherAlert

SetTimestamp sets Timestamp value.

func (*WeatherAlert) SetType added in v0.4.0

SetType sets Type value.

Tornado, Severe Thunderstorm, etc.

func (*WeatherAlert) SetUnknownFields added in v0.23.6

func (m *WeatherAlert) SetUnknownFields(unknownFields ...proto.Field) *WeatherAlert

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WeatherAlert) TimestampUint32 added in v0.15.0

func (m *WeatherAlert) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeatherAlert) ToMesg added in v0.3.0

func (m *WeatherAlert) ToMesg(options *Options) proto.Message

ToMesg converts WeatherAlert into proto.Message. If options is nil, default options will be used.

type WeatherConditions

type WeatherConditions struct {
	Timestamp                time.Time // time of update for current conditions, else forecast time
	Location                 string    // string corresponding to GCS response location string
	ObservedAtTime           time.Time
	ObservedLocationLat      int32                 // Units: semicircles
	ObservedLocationLong     int32                 // Units: semicircles
	WindDirection            uint16                // Units: degrees
	WindSpeed                uint16                // Scale: 1000; Units: m/s
	WeatherReport            typedef.WeatherReport // Current or forecast
	Temperature              int8                  // Units: C
	Condition                typedef.WeatherStatus // Corresponds to GSC Response weatherIcon field
	PrecipitationProbability uint8                 // range 0-100
	TemperatureFeelsLike     int8                  // Units: C; Heat Index if GCS heatIdx above or equal to 90F or wind chill if GCS windChill below or equal to 32F
	RelativeHumidity         uint8
	DayOfWeek                typedef.DayOfWeek
	HighTemperature          int8 // Units: C
	LowTemperature           int8 // Units: C

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WeatherConditions is a WeatherConditions message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWeatherConditions

func NewWeatherConditions(mesg *proto.Message) *WeatherConditions

NewWeatherConditions creates new WeatherConditions struct based on given mesg. If mesg is nil, it will return WeatherConditions with all fields being set to its corresponding invalid value.

func (*WeatherConditions) ObservedAtTimeUint32 added in v0.15.0

func (m *WeatherConditions) ObservedAtTimeUint32() uint32

ObservedAtTimeUint32 returns ObservedAtTime in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeatherConditions) ObservedLocationLatDegrees added in v0.15.0

func (m *WeatherConditions) ObservedLocationLatDegrees() float64

ObservedLocationLatDegrees returns ObservedLocationLat in degrees instead of semicircles. If ObservedLocationLat value is invalid, float64 invalid value will be returned.

func (*WeatherConditions) ObservedLocationLongDegrees added in v0.15.0

func (m *WeatherConditions) ObservedLocationLongDegrees() float64

ObservedLocationLongDegrees returns ObservedLocationLong in degrees instead of semicircles. If ObservedLocationLong value is invalid, float64 invalid value will be returned.

func (*WeatherConditions) SetCondition added in v0.4.0

SetCondition sets Condition value.

Corresponds to GSC Response weatherIcon field

func (*WeatherConditions) SetDayOfWeek added in v0.4.0

SetDayOfWeek sets DayOfWeek value.

func (*WeatherConditions) SetDeveloperFields added in v0.4.0

func (m *WeatherConditions) SetDeveloperFields(developerFields ...proto.DeveloperField) *WeatherConditions

SetDeveloperFields sets DeveloperFields.

func (*WeatherConditions) SetHighTemperature added in v0.4.0

func (m *WeatherConditions) SetHighTemperature(v int8) *WeatherConditions

SetHighTemperature sets HighTemperature value.

Units: C

func (*WeatherConditions) SetLocation added in v0.4.0

func (m *WeatherConditions) SetLocation(v string) *WeatherConditions

SetLocation sets Location value.

string corresponding to GCS response location string

func (*WeatherConditions) SetLowTemperature added in v0.4.0

func (m *WeatherConditions) SetLowTemperature(v int8) *WeatherConditions

SetLowTemperature sets LowTemperature value.

Units: C

func (*WeatherConditions) SetObservedAtTime added in v0.4.0

func (m *WeatherConditions) SetObservedAtTime(v time.Time) *WeatherConditions

SetObservedAtTime sets ObservedAtTime value.

func (*WeatherConditions) SetObservedLocationLat added in v0.4.0

func (m *WeatherConditions) SetObservedLocationLat(v int32) *WeatherConditions

SetObservedLocationLat sets ObservedLocationLat value.

Units: semicircles

func (*WeatherConditions) SetObservedLocationLatDegrees added in v0.17.2

func (m *WeatherConditions) SetObservedLocationLatDegrees(degrees float64) *WeatherConditions

SetObservedLocationLatDegrees is similar to SetObservedLocationLat except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*WeatherConditions) SetObservedLocationLong added in v0.4.0

func (m *WeatherConditions) SetObservedLocationLong(v int32) *WeatherConditions

SetObservedLocationLong sets ObservedLocationLong value.

Units: semicircles

func (*WeatherConditions) SetObservedLocationLongDegrees added in v0.17.2

func (m *WeatherConditions) SetObservedLocationLongDegrees(degrees float64) *WeatherConditions

SetObservedLocationLongDegrees is similar to SetObservedLocationLong except it accepts a value in degrees. This method will automatically convert given degrees value to semicircles (int32) form.

func (*WeatherConditions) SetPrecipitationProbability added in v0.4.0

func (m *WeatherConditions) SetPrecipitationProbability(v uint8) *WeatherConditions

SetPrecipitationProbability sets PrecipitationProbability value.

range 0-100

func (*WeatherConditions) SetRelativeHumidity added in v0.4.0

func (m *WeatherConditions) SetRelativeHumidity(v uint8) *WeatherConditions

SetRelativeHumidity sets RelativeHumidity value.

func (*WeatherConditions) SetTemperature added in v0.4.0

func (m *WeatherConditions) SetTemperature(v int8) *WeatherConditions

SetTemperature sets Temperature value.

Units: C

func (*WeatherConditions) SetTemperatureFeelsLike added in v0.4.0

func (m *WeatherConditions) SetTemperatureFeelsLike(v int8) *WeatherConditions

SetTemperatureFeelsLike sets TemperatureFeelsLike value.

Units: C; Heat Index if GCS heatIdx above or equal to 90F or wind chill if GCS windChill below or equal to 32F

func (*WeatherConditions) SetTimestamp added in v0.4.0

func (m *WeatherConditions) SetTimestamp(v time.Time) *WeatherConditions

SetTimestamp sets Timestamp value.

time of update for current conditions, else forecast time

func (*WeatherConditions) SetUnknownFields added in v0.23.6

func (m *WeatherConditions) SetUnknownFields(unknownFields ...proto.Field) *WeatherConditions

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WeatherConditions) SetWeatherReport added in v0.4.0

func (m *WeatherConditions) SetWeatherReport(v typedef.WeatherReport) *WeatherConditions

SetWeatherReport sets WeatherReport value.

Current or forecast

func (*WeatherConditions) SetWindDirection added in v0.4.0

func (m *WeatherConditions) SetWindDirection(v uint16) *WeatherConditions

SetWindDirection sets WindDirection value.

Units: degrees

func (*WeatherConditions) SetWindSpeed added in v0.4.0

func (m *WeatherConditions) SetWindSpeed(v uint16) *WeatherConditions

SetWindSpeed sets WindSpeed value.

Scale: 1000; Units: m/s

func (*WeatherConditions) SetWindSpeedScaled added in v0.17.2

func (m *WeatherConditions) SetWindSpeedScaled(v float64) *WeatherConditions

SetWindSpeedScaled is similar to SetWindSpeed except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 1000; Units: m/s

func (*WeatherConditions) TimestampUint32 added in v0.15.0

func (m *WeatherConditions) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeatherConditions) ToMesg added in v0.3.0

func (m *WeatherConditions) ToMesg(options *Options) proto.Message

ToMesg converts WeatherConditions into proto.Message. If options is nil, default options will be used.

func (*WeatherConditions) WindSpeedScaled added in v0.8.0

func (m *WeatherConditions) WindSpeedScaled() float64

WindSpeedScaled return WindSpeed in its scaled value. If WindSpeed value is invalid, float64 invalid value will be returned.

Scale: 1000; Units: m/s

type WeightScale

type WeightScale struct {
	Timestamp         time.Time            // Units: s
	Weight            typedef.Weight       // Scale: 100; Units: kg
	PercentFat        uint16               // Scale: 100; Units: %
	PercentHydration  uint16               // Scale: 100; Units: %
	VisceralFatMass   uint16               // Scale: 100; Units: kg
	BoneMass          uint16               // Scale: 100; Units: kg
	MuscleMass        uint16               // Scale: 100; Units: kg
	BasalMet          uint16               // Scale: 4; Units: kcal/day
	ActiveMet         uint16               // Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal
	UserProfileIndex  typedef.MessageIndex // Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.
	Bmi               uint16               // Scale: 10; Units: kg/m^2
	PhysiqueRating    uint8
	MetabolicAge      uint8 // Units: years
	VisceralFatRating uint8

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WeightScale is a WeightScale message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWeightScale

func NewWeightScale(mesg *proto.Message) *WeightScale

NewWeightScale creates new WeightScale struct based on given mesg. If mesg is nil, it will return WeightScale with all fields being set to its corresponding invalid value.

func (*WeightScale) ActiveMetScaled added in v0.8.0

func (m *WeightScale) ActiveMetScaled() float64

ActiveMetScaled return ActiveMet in its scaled value. If ActiveMet value is invalid, float64 invalid value will be returned.

Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal

func (*WeightScale) BasalMetScaled added in v0.8.0

func (m *WeightScale) BasalMetScaled() float64

BasalMetScaled return BasalMet in its scaled value. If BasalMet value is invalid, float64 invalid value will be returned.

Scale: 4; Units: kcal/day

func (*WeightScale) BmiScaled added in v0.8.0

func (m *WeightScale) BmiScaled() float64

BmiScaled return Bmi in its scaled value. If Bmi value is invalid, float64 invalid value will be returned.

Scale: 10; Units: kg/m^2

func (*WeightScale) BoneMassScaled added in v0.8.0

func (m *WeightScale) BoneMassScaled() float64

BoneMassScaled return BoneMass in its scaled value. If BoneMass value is invalid, float64 invalid value will be returned.

Scale: 100; Units: kg

func (*WeightScale) MuscleMassScaled added in v0.8.0

func (m *WeightScale) MuscleMassScaled() float64

MuscleMassScaled return MuscleMass in its scaled value. If MuscleMass value is invalid, float64 invalid value will be returned.

Scale: 100; Units: kg

func (*WeightScale) PercentFatScaled added in v0.8.0

func (m *WeightScale) PercentFatScaled() float64

PercentFatScaled return PercentFat in its scaled value. If PercentFat value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*WeightScale) PercentHydrationScaled added in v0.8.0

func (m *WeightScale) PercentHydrationScaled() float64

PercentHydrationScaled return PercentHydration in its scaled value. If PercentHydration value is invalid, float64 invalid value will be returned.

Scale: 100; Units: %

func (*WeightScale) SetActiveMet added in v0.4.0

func (m *WeightScale) SetActiveMet(v uint16) *WeightScale

SetActiveMet sets ActiveMet value.

Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal

func (*WeightScale) SetActiveMetScaled added in v0.17.2

func (m *WeightScale) SetActiveMetScaled(v float64) *WeightScale

SetActiveMetScaled is similar to SetActiveMet except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal

func (*WeightScale) SetBasalMet added in v0.4.0

func (m *WeightScale) SetBasalMet(v uint16) *WeightScale

SetBasalMet sets BasalMet value.

Scale: 4; Units: kcal/day

func (*WeightScale) SetBasalMetScaled added in v0.17.2

func (m *WeightScale) SetBasalMetScaled(v float64) *WeightScale

SetBasalMetScaled is similar to SetBasalMet except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 4; Units: kcal/day

func (*WeightScale) SetBmi added in v0.4.0

func (m *WeightScale) SetBmi(v uint16) *WeightScale

SetBmi sets Bmi value.

Scale: 10; Units: kg/m^2

func (*WeightScale) SetBmiScaled added in v0.17.2

func (m *WeightScale) SetBmiScaled(v float64) *WeightScale

SetBmiScaled is similar to SetBmi except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 10; Units: kg/m^2

func (*WeightScale) SetBoneMass added in v0.4.0

func (m *WeightScale) SetBoneMass(v uint16) *WeightScale

SetBoneMass sets BoneMass value.

Scale: 100; Units: kg

func (*WeightScale) SetBoneMassScaled added in v0.17.2

func (m *WeightScale) SetBoneMassScaled(v float64) *WeightScale

SetBoneMassScaled is similar to SetBoneMass except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: kg

func (*WeightScale) SetDeveloperFields added in v0.4.0

func (m *WeightScale) SetDeveloperFields(developerFields ...proto.DeveloperField) *WeightScale

SetDeveloperFields sets DeveloperFields.

func (*WeightScale) SetMetabolicAge added in v0.4.0

func (m *WeightScale) SetMetabolicAge(v uint8) *WeightScale

SetMetabolicAge sets MetabolicAge value.

Units: years

func (*WeightScale) SetMuscleMass added in v0.4.0

func (m *WeightScale) SetMuscleMass(v uint16) *WeightScale

SetMuscleMass sets MuscleMass value.

Scale: 100; Units: kg

func (*WeightScale) SetMuscleMassScaled added in v0.17.2

func (m *WeightScale) SetMuscleMassScaled(v float64) *WeightScale

SetMuscleMassScaled is similar to SetMuscleMass except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: kg

func (*WeightScale) SetPercentFat added in v0.4.0

func (m *WeightScale) SetPercentFat(v uint16) *WeightScale

SetPercentFat sets PercentFat value.

Scale: 100; Units: %

func (*WeightScale) SetPercentFatScaled added in v0.17.2

func (m *WeightScale) SetPercentFatScaled(v float64) *WeightScale

SetPercentFatScaled is similar to SetPercentFat except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*WeightScale) SetPercentHydration added in v0.4.0

func (m *WeightScale) SetPercentHydration(v uint16) *WeightScale

SetPercentHydration sets PercentHydration value.

Scale: 100; Units: %

func (*WeightScale) SetPercentHydrationScaled added in v0.17.2

func (m *WeightScale) SetPercentHydrationScaled(v float64) *WeightScale

SetPercentHydrationScaled is similar to SetPercentHydration except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: %

func (*WeightScale) SetPhysiqueRating added in v0.4.0

func (m *WeightScale) SetPhysiqueRating(v uint8) *WeightScale

SetPhysiqueRating sets PhysiqueRating value.

func (*WeightScale) SetTimestamp added in v0.4.0

func (m *WeightScale) SetTimestamp(v time.Time) *WeightScale

SetTimestamp sets Timestamp value.

Units: s

func (*WeightScale) SetUnknownFields added in v0.23.6

func (m *WeightScale) SetUnknownFields(unknownFields ...proto.Field) *WeightScale

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WeightScale) SetUserProfileIndex added in v0.4.0

func (m *WeightScale) SetUserProfileIndex(v typedef.MessageIndex) *WeightScale

SetUserProfileIndex sets UserProfileIndex value.

Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.

func (*WeightScale) SetVisceralFatMass added in v0.4.0

func (m *WeightScale) SetVisceralFatMass(v uint16) *WeightScale

SetVisceralFatMass sets VisceralFatMass value.

Scale: 100; Units: kg

func (*WeightScale) SetVisceralFatMassScaled added in v0.17.2

func (m *WeightScale) SetVisceralFatMassScaled(v float64) *WeightScale

SetVisceralFatMassScaled is similar to SetVisceralFatMass except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: kg

func (*WeightScale) SetVisceralFatRating added in v0.4.0

func (m *WeightScale) SetVisceralFatRating(v uint8) *WeightScale

SetVisceralFatRating sets VisceralFatRating value.

func (*WeightScale) SetWeight added in v0.4.0

func (m *WeightScale) SetWeight(v typedef.Weight) *WeightScale

SetWeight sets Weight value.

Scale: 100; Units: kg

func (*WeightScale) SetWeightScaled added in v0.17.2

func (m *WeightScale) SetWeightScaled(v float64) *WeightScale

SetWeightScaled is similar to SetWeight except it accepts a scaled value. This method automatically converts the given value to its typedef.Weight form, discarding any applied scale and offset.

Scale: 100; Units: kg

func (*WeightScale) TimestampUint32 added in v0.15.0

func (m *WeightScale) TimestampUint32() uint32

TimestampUint32 returns Timestamp in uint32 (seconds since FIT's epoch) instead of time.Time.

func (*WeightScale) ToMesg added in v0.3.0

func (m *WeightScale) ToMesg(options *Options) proto.Message

ToMesg converts WeightScale into proto.Message. If options is nil, default options will be used.

func (*WeightScale) VisceralFatMassScaled added in v0.8.0

func (m *WeightScale) VisceralFatMassScaled() float64

VisceralFatMassScaled return VisceralFatMass in its scaled value. If VisceralFatMass value is invalid, float64 invalid value will be returned.

Scale: 100; Units: kg

func (*WeightScale) WeightScaled added in v0.8.0

func (m *WeightScale) WeightScaled() float64

WeightScaled return Weight in its scaled value. If Weight value is invalid, float64 invalid value will be returned.

Scale: 100; Units: kg

type Workout

type Workout struct {
	WktName        string
	WktDescription string                      // Description of the workout
	Capabilities   typedef.WorkoutCapabilities // Base: uint32z
	MessageIndex   typedef.MessageIndex
	NumValidSteps  uint16 // number of valid steps
	PoolLength     uint16 // Scale: 100; Units: m
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	PoolLengthUnit typedef.DisplayMeasure

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

Workout is a Workout message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWorkout

func NewWorkout(mesg *proto.Message) *Workout

NewWorkout creates new Workout struct based on given mesg. If mesg is nil, it will return Workout with all fields being set to its corresponding invalid value.

func (*Workout) PoolLengthScaled added in v0.8.0

func (m *Workout) PoolLengthScaled() float64

PoolLengthScaled return PoolLength in its scaled value. If PoolLength value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*Workout) SetCapabilities added in v0.4.0

func (m *Workout) SetCapabilities(v typedef.WorkoutCapabilities) *Workout

SetCapabilities sets Capabilities value.

Base: uint32z

func (*Workout) SetDeveloperFields added in v0.4.0

func (m *Workout) SetDeveloperFields(developerFields ...proto.DeveloperField) *Workout

SetDeveloperFields sets DeveloperFields.

func (*Workout) SetMessageIndex added in v0.4.0

func (m *Workout) SetMessageIndex(v typedef.MessageIndex) *Workout

SetMessageIndex sets MessageIndex value.

func (*Workout) SetNumValidSteps added in v0.4.0

func (m *Workout) SetNumValidSteps(v uint16) *Workout

SetNumValidSteps sets NumValidSteps value.

number of valid steps

func (*Workout) SetPoolLength added in v0.4.0

func (m *Workout) SetPoolLength(v uint16) *Workout

SetPoolLength sets PoolLength value.

Scale: 100; Units: m

func (*Workout) SetPoolLengthScaled added in v0.17.2

func (m *Workout) SetPoolLengthScaled(v float64) *Workout

SetPoolLengthScaled is similar to SetPoolLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*Workout) SetPoolLengthUnit added in v0.4.0

func (m *Workout) SetPoolLengthUnit(v typedef.DisplayMeasure) *Workout

SetPoolLengthUnit sets PoolLengthUnit value.

func (*Workout) SetSport added in v0.4.0

func (m *Workout) SetSport(v typedef.Sport) *Workout

SetSport sets Sport value.

func (*Workout) SetSubSport added in v0.4.0

func (m *Workout) SetSubSport(v typedef.SubSport) *Workout

SetSubSport sets SubSport value.

func (*Workout) SetUnknownFields added in v0.23.6

func (m *Workout) SetUnknownFields(unknownFields ...proto.Field) *Workout

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*Workout) SetWktDescription added in v0.24.4

func (m *Workout) SetWktDescription(v string) *Workout

SetWktDescription sets WktDescription value.

Description of the workout

func (*Workout) SetWktName added in v0.4.0

func (m *Workout) SetWktName(v string) *Workout

SetWktName sets WktName value.

func (*Workout) ToMesg added in v0.3.0

func (m *Workout) ToMesg(options *Options) proto.Message

ToMesg converts Workout into proto.Message. If options is nil, default options will be used.

type WorkoutSession

type WorkoutSession struct {
	MessageIndex   typedef.MessageIndex
	NumValidSteps  uint16
	FirstStepIndex uint16
	PoolLength     uint16 // Scale: 100; Units: m
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	PoolLengthUnit typedef.DisplayMeasure

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WorkoutSession is a WorkoutSession message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWorkoutSession

func NewWorkoutSession(mesg *proto.Message) *WorkoutSession

NewWorkoutSession creates new WorkoutSession struct based on given mesg. If mesg is nil, it will return WorkoutSession with all fields being set to its corresponding invalid value.

func (*WorkoutSession) PoolLengthScaled added in v0.8.0

func (m *WorkoutSession) PoolLengthScaled() float64

PoolLengthScaled return PoolLength in its scaled value. If PoolLength value is invalid, float64 invalid value will be returned.

Scale: 100; Units: m

func (*WorkoutSession) SetDeveloperFields added in v0.4.0

func (m *WorkoutSession) SetDeveloperFields(developerFields ...proto.DeveloperField) *WorkoutSession

SetDeveloperFields sets DeveloperFields.

func (*WorkoutSession) SetFirstStepIndex added in v0.4.0

func (m *WorkoutSession) SetFirstStepIndex(v uint16) *WorkoutSession

SetFirstStepIndex sets FirstStepIndex value.

func (*WorkoutSession) SetMessageIndex added in v0.4.0

func (m *WorkoutSession) SetMessageIndex(v typedef.MessageIndex) *WorkoutSession

SetMessageIndex sets MessageIndex value.

func (*WorkoutSession) SetNumValidSteps added in v0.4.0

func (m *WorkoutSession) SetNumValidSteps(v uint16) *WorkoutSession

SetNumValidSteps sets NumValidSteps value.

func (*WorkoutSession) SetPoolLength added in v0.4.0

func (m *WorkoutSession) SetPoolLength(v uint16) *WorkoutSession

SetPoolLength sets PoolLength value.

Scale: 100; Units: m

func (*WorkoutSession) SetPoolLengthScaled added in v0.17.2

func (m *WorkoutSession) SetPoolLengthScaled(v float64) *WorkoutSession

SetPoolLengthScaled is similar to SetPoolLength except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: m

func (*WorkoutSession) SetPoolLengthUnit added in v0.4.0

func (m *WorkoutSession) SetPoolLengthUnit(v typedef.DisplayMeasure) *WorkoutSession

SetPoolLengthUnit sets PoolLengthUnit value.

func (*WorkoutSession) SetSport added in v0.4.0

func (m *WorkoutSession) SetSport(v typedef.Sport) *WorkoutSession

SetSport sets Sport value.

func (*WorkoutSession) SetSubSport added in v0.4.0

func (m *WorkoutSession) SetSubSport(v typedef.SubSport) *WorkoutSession

SetSubSport sets SubSport value.

func (*WorkoutSession) SetUnknownFields added in v0.23.6

func (m *WorkoutSession) SetUnknownFields(unknownFields ...proto.Field) *WorkoutSession

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WorkoutSession) ToMesg added in v0.3.0

func (m *WorkoutSession) ToMesg(options *Options) proto.Message

ToMesg converts WorkoutSession into proto.Message. If options is nil, default options will be used.

type WorkoutStep

type WorkoutStep struct {
	WktStepName                    string
	Notes                          string
	DurationValue                  uint32
	TargetValue                    uint32
	CustomTargetValueLow           uint32
	CustomTargetValueHigh          uint32
	SecondaryTargetValue           uint32
	SecondaryCustomTargetValueLow  uint32
	SecondaryCustomTargetValueHigh uint32
	MessageIndex                   typedef.MessageIndex
	ExerciseCategory               typedef.ExerciseCategory
	ExerciseName                   uint16
	ExerciseWeight                 uint16 // Scale: 100; Units: kg
	WeightDisplayUnit              typedef.FitBaseUnit
	DurationType                   typedef.WktStepDuration
	TargetType                     typedef.WktStepTarget
	Intensity                      typedef.Intensity
	Equipment                      typedef.WorkoutEquipment
	SecondaryTargetType            typedef.WktStepTarget

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

WorkoutStep is a WorkoutStep message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewWorkoutStep

func NewWorkoutStep(mesg *proto.Message) *WorkoutStep

NewWorkoutStep creates new WorkoutStep struct based on given mesg. If mesg is nil, it will return WorkoutStep with all fields being set to its corresponding invalid value.

func (*WorkoutStep) ExerciseWeightScaled added in v0.8.0

func (m *WorkoutStep) ExerciseWeightScaled() float64

ExerciseWeightScaled return ExerciseWeight in its scaled value. If ExerciseWeight value is invalid, float64 invalid value will be returned.

Scale: 100; Units: kg

func (*WorkoutStep) GetCustomTargetValueHigh added in v0.16.0

func (m *WorkoutStep) GetCustomTargetValueHigh() (name string, value any)

GetCustomTargetValueHigh returns Dynamic Field interpretation of CustomTargetValueHigh. Otherwise, returns the original value of CustomTargetValueHigh.

Based on m.TargetType:

  • name: "custom_target_speed_high", units: "m/s" , value: (float64(m.CustomTargetValueHigh) * 1000) - 0
  • name: "custom_target_heart_rate_high", units: "% or bpm" , value: typedef.WorkoutHr(m.CustomTargetValueHigh)
  • name: "custom_target_cadence_high", units: "rpm" , value: uint32(m.CustomTargetValueHigh)
  • name: "custom_target_power_high", units: "% or watts" , value: typedef.WorkoutPower(m.CustomTargetValueHigh)

Otherwise:

  • name: "custom_target_value_high", value: m.CustomTargetValueHigh

func (*WorkoutStep) GetCustomTargetValueLow added in v0.16.0

func (m *WorkoutStep) GetCustomTargetValueLow() (name string, value any)

GetCustomTargetValueLow returns Dynamic Field interpretation of CustomTargetValueLow. Otherwise, returns the original value of CustomTargetValueLow.

Based on m.TargetType:

  • name: "custom_target_speed_low", units: "m/s" , value: (float64(m.CustomTargetValueLow) * 1000) - 0
  • name: "custom_target_heart_rate_low", units: "% or bpm" , value: typedef.WorkoutHr(m.CustomTargetValueLow)
  • name: "custom_target_cadence_low", units: "rpm" , value: uint32(m.CustomTargetValueLow)
  • name: "custom_target_power_low", units: "% or watts" , value: typedef.WorkoutPower(m.CustomTargetValueLow)

Otherwise:

  • name: "custom_target_value_low", value: m.CustomTargetValueLow

func (*WorkoutStep) GetDurationValue added in v0.16.0

func (m *WorkoutStep) GetDurationValue() (name string, value any)

GetDurationValue returns Dynamic Field interpretation of DurationValue. Otherwise, returns the original value of DurationValue.

Based on m.DurationType:

  • name: "duration_time", units: "s" , value: (float64(m.DurationValue) * 1000) - 0
  • name: "duration_distance", units: "m" , value: (float64(m.DurationValue) * 100) - 0
  • name: "duration_hr", units: "% or bpm" , value: typedef.WorkoutHr(m.DurationValue)
  • name: "duration_calories", units: "calories" , value: uint32(m.DurationValue)
  • name: "duration_step", value: uint32(m.DurationValue)
  • name: "duration_power", units: "% or watts" , value: typedef.WorkoutPower(m.DurationValue)
  • name: "duration_reps", value: uint32(m.DurationValue)

Otherwise:

  • name: "duration_value", value: m.DurationValue

func (*WorkoutStep) GetSecondaryCustomTargetValueHigh added in v0.16.0

func (m *WorkoutStep) GetSecondaryCustomTargetValueHigh() (name string, value any)

GetSecondaryCustomTargetValueHigh returns Dynamic Field interpretation of SecondaryCustomTargetValueHigh. Otherwise, returns the original value of SecondaryCustomTargetValueHigh.

Based on m.SecondaryTargetType:

  • name: "secondary_custom_target_speed_high", units: "m/s" , value: (float64(m.SecondaryCustomTargetValueHigh) * 1000) - 0
  • name: "secondary_custom_target_heart_rate_high", units: "% or bpm" , value: typedef.WorkoutHr(m.SecondaryCustomTargetValueHigh)
  • name: "secondary_custom_target_cadence_high", units: "rpm" , value: uint32(m.SecondaryCustomTargetValueHigh)
  • name: "secondary_custom_target_power_high", units: "% or watts" , value: typedef.WorkoutPower(m.SecondaryCustomTargetValueHigh)

Otherwise:

  • name: "secondary_custom_target_value_high", value: m.SecondaryCustomTargetValueHigh

func (*WorkoutStep) GetSecondaryCustomTargetValueLow added in v0.16.0

func (m *WorkoutStep) GetSecondaryCustomTargetValueLow() (name string, value any)

GetSecondaryCustomTargetValueLow returns Dynamic Field interpretation of SecondaryCustomTargetValueLow. Otherwise, returns the original value of SecondaryCustomTargetValueLow.

Based on m.SecondaryTargetType:

  • name: "secondary_custom_target_speed_low", units: "m/s" , value: (float64(m.SecondaryCustomTargetValueLow) * 1000) - 0
  • name: "secondary_custom_target_heart_rate_low", units: "% or bpm" , value: typedef.WorkoutHr(m.SecondaryCustomTargetValueLow)
  • name: "secondary_custom_target_cadence_low", units: "rpm" , value: uint32(m.SecondaryCustomTargetValueLow)
  • name: "secondary_custom_target_power_low", units: "% or watts" , value: typedef.WorkoutPower(m.SecondaryCustomTargetValueLow)

Otherwise:

  • name: "secondary_custom_target_value_low", value: m.SecondaryCustomTargetValueLow

func (*WorkoutStep) GetSecondaryTargetValue added in v0.16.0

func (m *WorkoutStep) GetSecondaryTargetValue() (name string, value any)

GetSecondaryTargetValue returns Dynamic Field interpretation of SecondaryTargetValue. Otherwise, returns the original value of SecondaryTargetValue.

Based on m.SecondaryTargetType:

  • name: "secondary_target_speed_zone", value: uint32(m.SecondaryTargetValue)
  • name: "secondary_target_hr_zone", value: uint32(m.SecondaryTargetValue)
  • name: "secondary_target_cadence_zone", value: uint32(m.SecondaryTargetValue)
  • name: "secondary_target_power_zone", value: uint32(m.SecondaryTargetValue)
  • name: "secondary_target_stroke_type", value: typedef.SwimStroke(m.SecondaryTargetValue)

Otherwise:

  • name: "secondary_target_value", value: m.SecondaryTargetValue

func (*WorkoutStep) GetTargetValue added in v0.16.0

func (m *WorkoutStep) GetTargetValue() (name string, value any)

GetTargetValue returns Dynamic Field interpretation of TargetValue. Otherwise, returns the original value of TargetValue.

Based on m.TargetType:

  • name: "target_speed_zone", value: uint32(m.TargetValue)
  • name: "target_hr_zone", value: uint32(m.TargetValue)
  • name: "target_cadence_zone", value: uint32(m.TargetValue)
  • name: "target_power_zone", value: uint32(m.TargetValue)
  • name: "target_stroke_type", value: typedef.SwimStroke(m.TargetValue)

Based on m.DurationType:

  • name: "repeat_steps", value: uint32(m.TargetValue)
  • name: "repeat_time", units: "s" , value: (float64(m.TargetValue) * 1000) - 0
  • name: "repeat_distance", units: "m" , value: (float64(m.TargetValue) * 100) - 0
  • name: "repeat_calories", units: "calories" , value: uint32(m.TargetValue)
  • name: "repeat_hr", units: "% or bpm" , value: typedef.WorkoutHr(m.TargetValue)
  • name: "repeat_power", units: "% or watts" , value: typedef.WorkoutPower(m.TargetValue)

Otherwise:

  • name: "target_value", value: m.TargetValue

func (*WorkoutStep) SetCustomTargetValueHigh added in v0.4.0

func (m *WorkoutStep) SetCustomTargetValueHigh(v uint32) *WorkoutStep

SetCustomTargetValueHigh sets CustomTargetValueHigh value.

func (*WorkoutStep) SetCustomTargetValueLow added in v0.4.0

func (m *WorkoutStep) SetCustomTargetValueLow(v uint32) *WorkoutStep

SetCustomTargetValueLow sets CustomTargetValueLow value.

func (*WorkoutStep) SetDeveloperFields added in v0.4.0

func (m *WorkoutStep) SetDeveloperFields(developerFields ...proto.DeveloperField) *WorkoutStep

SetDeveloperFields sets DeveloperFields.

func (*WorkoutStep) SetDurationType added in v0.4.0

func (m *WorkoutStep) SetDurationType(v typedef.WktStepDuration) *WorkoutStep

SetDurationType sets DurationType value.

func (*WorkoutStep) SetDurationValue added in v0.4.0

func (m *WorkoutStep) SetDurationValue(v uint32) *WorkoutStep

SetDurationValue sets DurationValue value.

func (*WorkoutStep) SetEquipment added in v0.4.0

func (m *WorkoutStep) SetEquipment(v typedef.WorkoutEquipment) *WorkoutStep

SetEquipment sets Equipment value.

func (*WorkoutStep) SetExerciseCategory added in v0.4.0

func (m *WorkoutStep) SetExerciseCategory(v typedef.ExerciseCategory) *WorkoutStep

SetExerciseCategory sets ExerciseCategory value.

func (*WorkoutStep) SetExerciseName added in v0.4.0

func (m *WorkoutStep) SetExerciseName(v uint16) *WorkoutStep

SetExerciseName sets ExerciseName value.

func (*WorkoutStep) SetExerciseWeight added in v0.4.0

func (m *WorkoutStep) SetExerciseWeight(v uint16) *WorkoutStep

SetExerciseWeight sets ExerciseWeight value.

Scale: 100; Units: kg

func (*WorkoutStep) SetExerciseWeightScaled added in v0.17.2

func (m *WorkoutStep) SetExerciseWeightScaled(v float64) *WorkoutStep

SetExerciseWeightScaled is similar to SetExerciseWeight except it accepts a scaled value. This method automatically converts the given value to its uint16 form, discarding any applied scale and offset.

Scale: 100; Units: kg

func (*WorkoutStep) SetIntensity added in v0.4.0

func (m *WorkoutStep) SetIntensity(v typedef.Intensity) *WorkoutStep

SetIntensity sets Intensity value.

func (*WorkoutStep) SetMessageIndex added in v0.4.0

func (m *WorkoutStep) SetMessageIndex(v typedef.MessageIndex) *WorkoutStep

SetMessageIndex sets MessageIndex value.

func (*WorkoutStep) SetNotes added in v0.4.0

func (m *WorkoutStep) SetNotes(v string) *WorkoutStep

SetNotes sets Notes value.

func (*WorkoutStep) SetSecondaryCustomTargetValueHigh added in v0.4.0

func (m *WorkoutStep) SetSecondaryCustomTargetValueHigh(v uint32) *WorkoutStep

SetSecondaryCustomTargetValueHigh sets SecondaryCustomTargetValueHigh value.

func (*WorkoutStep) SetSecondaryCustomTargetValueLow added in v0.4.0

func (m *WorkoutStep) SetSecondaryCustomTargetValueLow(v uint32) *WorkoutStep

SetSecondaryCustomTargetValueLow sets SecondaryCustomTargetValueLow value.

func (*WorkoutStep) SetSecondaryTargetType added in v0.4.0

func (m *WorkoutStep) SetSecondaryTargetType(v typedef.WktStepTarget) *WorkoutStep

SetSecondaryTargetType sets SecondaryTargetType value.

func (*WorkoutStep) SetSecondaryTargetValue added in v0.4.0

func (m *WorkoutStep) SetSecondaryTargetValue(v uint32) *WorkoutStep

SetSecondaryTargetValue sets SecondaryTargetValue value.

func (*WorkoutStep) SetTargetType added in v0.4.0

func (m *WorkoutStep) SetTargetType(v typedef.WktStepTarget) *WorkoutStep

SetTargetType sets TargetType value.

func (*WorkoutStep) SetTargetValue added in v0.4.0

func (m *WorkoutStep) SetTargetValue(v uint32) *WorkoutStep

SetTargetValue sets TargetValue value.

func (*WorkoutStep) SetUnknownFields added in v0.23.6

func (m *WorkoutStep) SetUnknownFields(unknownFields ...proto.Field) *WorkoutStep

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*WorkoutStep) SetWeightDisplayUnit added in v0.4.0

func (m *WorkoutStep) SetWeightDisplayUnit(v typedef.FitBaseUnit) *WorkoutStep

SetWeightDisplayUnit sets WeightDisplayUnit value.

func (*WorkoutStep) SetWktStepName added in v0.4.0

func (m *WorkoutStep) SetWktStepName(v string) *WorkoutStep

SetWktStepName sets WktStepName value.

func (*WorkoutStep) ToMesg added in v0.3.0

func (m *WorkoutStep) ToMesg(options *Options) proto.Message

ToMesg converts WorkoutStep into proto.Message. If options is nil, default options will be used.

type ZonesTarget

type ZonesTarget struct {
	FunctionalThresholdPower uint16
	MaxHeartRate             uint8
	ThresholdHeartRate       uint8
	HrCalcType               typedef.HrZoneCalc
	PwrCalcType              typedef.PwrZoneCalc

	UnknownFields   []proto.Field          // UnknownFields are fields that are exist but they are not defined in Profile.xlsx
	DeveloperFields []proto.DeveloperField // DeveloperFields are custom data fields [Added since protocol version 2.0]
}

ZonesTarget is a ZonesTarget message.

Note: The order of the fields is optimized using a memory alignment algorithm. Do not rely on field indices, such as when using reflection.

func NewZonesTarget

func NewZonesTarget(mesg *proto.Message) *ZonesTarget

NewZonesTarget creates new ZonesTarget struct based on given mesg. If mesg is nil, it will return ZonesTarget with all fields being set to its corresponding invalid value.

func (*ZonesTarget) SetDeveloperFields added in v0.4.0

func (m *ZonesTarget) SetDeveloperFields(developerFields ...proto.DeveloperField) *ZonesTarget

SetDeveloperFields sets DeveloperFields.

func (*ZonesTarget) SetFunctionalThresholdPower added in v0.4.0

func (m *ZonesTarget) SetFunctionalThresholdPower(v uint16) *ZonesTarget

SetFunctionalThresholdPower sets FunctionalThresholdPower value.

func (*ZonesTarget) SetHrCalcType added in v0.4.0

func (m *ZonesTarget) SetHrCalcType(v typedef.HrZoneCalc) *ZonesTarget

SetHrCalcType sets HrCalcType value.

func (*ZonesTarget) SetMaxHeartRate added in v0.4.0

func (m *ZonesTarget) SetMaxHeartRate(v uint8) *ZonesTarget

SetMaxHeartRate sets MaxHeartRate value.

func (*ZonesTarget) SetPwrCalcType added in v0.4.0

func (m *ZonesTarget) SetPwrCalcType(v typedef.PwrZoneCalc) *ZonesTarget

SetPwrCalcType sets PwrCalcType value.

func (*ZonesTarget) SetThresholdHeartRate added in v0.4.0

func (m *ZonesTarget) SetThresholdHeartRate(v uint8) *ZonesTarget

SetThresholdHeartRate sets ThresholdHeartRate value.

func (*ZonesTarget) SetUnknownFields added in v0.23.6

func (m *ZonesTarget) SetUnknownFields(unknownFields ...proto.Field) *ZonesTarget

SetUnknownFields sets UnknownFields (fields that are exist but they are not defined in Profile.xlsx)

func (*ZonesTarget) ToMesg added in v0.3.0

func (m *ZonesTarget) ToMesg(options *Options) proto.Message

ToMesg converts ZonesTarget into proto.Message. If options is nil, default options will be used.

Source Files

Jump to

Keyboard shortcuts

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