mesgdef

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AadAccelFeatures is a AadAccelFeatures message.

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 AadAccelFeatures's DeveloperFields.

func (*AadAccelFeatures) SetEnergyTotal added in v0.10.0

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

SetEnergyTotal sets AadAccelFeatures value.

Total accelerometer energy in the interval

func (*AadAccelFeatures) SetInstance added in v0.10.0

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

SetInstance sets AadAccelFeatures value.

Instance ID of zero crossing algorithm

func (*AadAccelFeatures) SetTime added in v0.10.0

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

SetTime sets AadAccelFeatures 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 AadAccelFeatures value.

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 AadAccelFeatures value.

func (*AadAccelFeatures) SetZeroCrossCnt added in v0.10.0

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

SetZeroCrossCnt sets AadAccelFeatures 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 [Scale: 25; Units: s; Total accelerometer time above threshold in the interval].

If TimeAboveThreshold value is invalid, float64 invalid value will be returned.

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 corrosponding 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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AccelerometerData is a AccelerometerData message.

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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData 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 AccelerometerData's DeveloperFields.

func (*AccelerometerData) SetSampleTimeOffset added in v0.4.0

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

SetSampleTimeOffset sets AccelerometerData value.

Array: [N]; Units: ms; Each time in the array describes the time at which the accelerometer sample with the corrosponding 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 AccelerometerData 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 AccelerometerData value.

Units: ms; Millisecond part of the timestamp.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Activity is a Activity message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Activity's DeveloperFields.

func (*Activity) SetEvent added in v0.4.0

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

SetEvent sets Activity value.

func (*Activity) SetEventGroup added in v0.4.0

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

SetEventGroup sets Activity value.

func (*Activity) SetEventType added in v0.4.0

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

SetEventType sets Activity value.

func (*Activity) SetLocalTimestamp added in v0.4.0

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

SetLocalTimestamp sets Activity 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 Activity value.

func (*Activity) SetTimestamp added in v0.4.0

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

SetTimestamp sets Activity value.

func (*Activity) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets Activity value.

Scale: 1000; Units: s; Exclude pauses

func (*Activity) SetType added in v0.4.0

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

SetType sets Activity value.

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 [Scale: 1000; Units: s; Exclude pauses].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

type AntChannelId

type AntChannelId struct {
	DeviceNumber     uint16
	ChannelNumber    uint8
	DeviceType       uint8
	TransmissionType uint8
	DeviceIndex      typedef.DeviceIndex

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AntChannelId is a AntChannelId message.

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 AntChannelId value.

func (*AntChannelId) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields AntChannelId's DeveloperFields.

func (*AntChannelId) SetDeviceIndex added in v0.4.0

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

SetDeviceIndex sets AntChannelId value.

func (*AntChannelId) SetDeviceNumber added in v0.4.0

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

SetDeviceNumber sets AntChannelId value.

func (*AntChannelId) SetDeviceType added in v0.4.0

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

SetDeviceType sets AntChannelId value.

func (*AntChannelId) SetTransmissionType added in v0.4.0

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

SetTransmissionType sets AntChannelId value.

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

	IsExpandedFields [5]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AntRx is a AntRx message.

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 [Scale: 32768; Units: s].

If FractionalTimestamp value is invalid, float64 invalid value will be returned.

func (*AntRx) SetChannelNumber added in v0.4.0

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

SetChannelNumber sets AntRx value.

func (*AntRx) SetData added in v0.4.0

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

SetData sets AntRx value.

Array: [N]

func (*AntRx) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields AntRx's DeveloperFields.

func (*AntRx) SetFractionalTimestamp added in v0.4.0

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

SetFractionalTimestamp sets AntRx value.

Scale: 32768; Units: s

func (*AntRx) SetMesgData added in v0.4.0

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

SetMesgData sets AntRx value.

Array: [N]

func (*AntRx) SetMesgId added in v0.4.0

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

SetMesgId sets AntRx value.

func (*AntRx) SetTimestamp added in v0.4.0

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

SetTimestamp sets AntRx value.

Units: s

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

	IsExpandedFields [5]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AntTx is a AntTx message.

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 [Scale: 32768; Units: s].

If FractionalTimestamp value is invalid, float64 invalid value will be returned.

func (*AntTx) SetChannelNumber added in v0.4.0

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

SetChannelNumber sets AntTx value.

func (*AntTx) SetData added in v0.4.0

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

SetData sets AntTx value.

Array: [N]

func (*AntTx) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields AntTx's DeveloperFields.

func (*AntTx) SetFractionalTimestamp added in v0.4.0

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

SetFractionalTimestamp sets AntTx value.

Scale: 32768; Units: s

func (*AntTx) SetMesgData added in v0.4.0

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

SetMesgData sets AntTx value.

Array: [N]

func (*AntTx) SetMesgId added in v0.4.0

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

SetMesgId sets AntTx value.

func (*AntTx) SetTimestamp added in v0.4.0

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

SetTimestamp sets AntTx value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

AviationAttitude is a AviationAttitude message.

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 [Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)].

If AccelLateral value is invalid, nil will be returned.

func (*AviationAttitude) AccelNormalScaled added in v0.8.0

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

AccelNormalScaled return AccelNormal in its scaled value [Array: [N]; Scale: 100; Units: m/s^2; Range -78.4 to +78.4 (-8 Gs to 8 Gs)].

If AccelNormal value is invalid, nil will be returned.

func (*AviationAttitude) PitchScaled added in v0.8.0

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

PitchScaled return Pitch in its scaled value [Array: [N]; Scale: 10430.38; Units: radians; Range -PI/2 to +PI/2].

If Pitch value is invalid, nil will be returned.

func (*AviationAttitude) RollScaled added in v0.8.0

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

RollScaled return Roll in its scaled value [Array: [N]; Scale: 10430.38; Units: radians; Range -PI to +PI].

If Roll value is invalid, nil will be returned.

func (*AviationAttitude) SetAccelLateral added in v0.4.0

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

SetAccelLateral sets AviationAttitude value.

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 AviationAttitude value.

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 AviationAttitude 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 AviationAttitude's DeveloperFields.

func (*AviationAttitude) SetPitch added in v0.4.0

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

SetPitch sets AviationAttitude value.

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 AviationAttitude value.

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

func (*AviationAttitude) SetStage added in v0.4.0

SetStage sets AviationAttitude value.

Array: [N]

func (*AviationAttitude) SetSystemTime added in v0.4.0

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

SetSystemTime sets AviationAttitude 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 AviationAttitude value.

Units: s; Timestamp message was output

func (*AviationAttitude) SetTimestampMs added in v0.4.0

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

SetTimestampMs sets AviationAttitude 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 AviationAttitude value.

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 AviationAttitude value.

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

func (*AviationAttitude) SetValidity added in v0.4.0

SetValidity sets AviationAttitude value.

Array: [N]

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 [Array: [N]; Scale: 10430.38; Units: radians; Track Angle/Heading Range 0 - 2pi].

If Track value is invalid, nil will be returned.

func (*AviationAttitude) TurnRateScaled added in v0.8.0

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

TurnRateScaled return TurnRate in its scaled value [Array: [N]; Scale: 1024; Units: radians/second; Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)].

If TurnRate value is invalid, nil will be returned.

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 corrosponding 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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

BarometerData is a BarometerData message.

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 BarometerData 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 BarometerData's DeveloperFields.

func (*BarometerData) SetSampleTimeOffset added in v0.4.0

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

SetSampleTimeOffset sets BarometerData value.

Array: [N]; Units: ms; Each time in the array describes the time at which the barometer sample with the corrosponding 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 BarometerData 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 BarometerData value.

Units: ms; Millisecond part of the timestamp.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

BeatIntervals is a BeatIntervals message.

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 BeatIntervals's DeveloperFields.

func (*BeatIntervals) SetTime added in v0.4.0

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

SetTime sets BeatIntervals 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 BeatIntervals value.

func (*BeatIntervals) SetTimestampMs added in v0.4.0

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

SetTimestampMs sets BeatIntervals value.

Units: ms; Milliseconds past date_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 // Array: [N]; Number of teeth on each gear 0 is innermost
	RearGear                 []uint8 // Array: [N]; Number of teeth on each gear 0 is innermost
	Odometer                 uint32  // Scale: 100; Units: m
	MessageIndex             typedef.MessageIndex
	BikeSpdAntId             uint16
	BikeCadAntId             uint16
	BikeSpdcadAntId          uint16
	BikePowerAntId           uint16
	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
	Id                       uint8
	CrankLength              uint8 // Scale: 2; Offset: -110; Units: mm
	BikeSpdAntIdTransType    uint8
	BikeCadAntIdTransType    uint8
	BikeSpdcadAntIdTransType uint8
	BikePowerAntIdTransType  uint8
	OdometerRollover         uint8 // Rollover counter that can be used to extend the odometer
	FrontGearNum             uint8 // Number of front gears
	RearGearNum              uint8 // Number of rear gears
	AutoWheelCal             bool
	AutoPowerZero            bool
	SpdEnabled               bool
	CadEnabled               bool
	SpdcadEnabled            bool
	PowerEnabled             bool
	Enabled                  bool
	ShimanoDi2Enabled        bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

BikeProfile is a BikeProfile message.

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 [Scale: 1000; Units: m].

If AutoWheelsize value is invalid, float64 invalid value will be returned.

func (*BikeProfile) BikeWeightScaled added in v0.8.0

func (m *BikeProfile) BikeWeightScaled() float64

BikeWeightScaled return BikeWeight in its scaled value [Scale: 10; Units: kg].

If BikeWeight value is invalid, float64 invalid value will be returned.

func (*BikeProfile) CrankLengthScaled added in v0.8.0

func (m *BikeProfile) CrankLengthScaled() float64

CrankLengthScaled return CrankLength in its scaled value [Scale: 2; Offset: -110; Units: mm].

If CrankLength value is invalid, float64 invalid value will be returned.

func (*BikeProfile) CustomWheelsizeScaled added in v0.8.0

func (m *BikeProfile) CustomWheelsizeScaled() float64

CustomWheelsizeScaled return CustomWheelsize in its scaled value [Scale: 1000; Units: m].

If CustomWheelsize value is invalid, float64 invalid value will be returned.

func (*BikeProfile) OdometerScaled added in v0.8.0

func (m *BikeProfile) OdometerScaled() float64

OdometerScaled return Odometer in its scaled value [Scale: 100; Units: m].

If Odometer value is invalid, float64 invalid value will be returned.

func (*BikeProfile) PowerCalFactorScaled added in v0.8.0

func (m *BikeProfile) PowerCalFactorScaled() float64

PowerCalFactorScaled return PowerCalFactor in its scaled value [Scale: 10; Units: %].

If PowerCalFactor value is invalid, float64 invalid value will be returned.

func (*BikeProfile) SetAutoPowerZero added in v0.4.0

func (m *BikeProfile) SetAutoPowerZero(v bool) *BikeProfile

SetAutoPowerZero sets BikeProfile value.

func (*BikeProfile) SetAutoWheelCal added in v0.4.0

func (m *BikeProfile) SetAutoWheelCal(v bool) *BikeProfile

SetAutoWheelCal sets BikeProfile value.

func (*BikeProfile) SetAutoWheelsize added in v0.4.0

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

SetAutoWheelsize sets BikeProfile value.

Scale: 1000; Units: m

func (*BikeProfile) SetBikeCadAntId added in v0.4.0

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

SetBikeCadAntId sets BikeProfile value.

func (*BikeProfile) SetBikeCadAntIdTransType added in v0.4.0

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

SetBikeCadAntIdTransType sets BikeProfile value.

func (*BikeProfile) SetBikePowerAntId added in v0.4.0

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

SetBikePowerAntId sets BikeProfile value.

func (*BikeProfile) SetBikePowerAntIdTransType added in v0.4.0

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

SetBikePowerAntIdTransType sets BikeProfile value.

func (*BikeProfile) SetBikeSpdAntId added in v0.4.0

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

SetBikeSpdAntId sets BikeProfile value.

func (*BikeProfile) SetBikeSpdAntIdTransType added in v0.4.0

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

SetBikeSpdAntIdTransType sets BikeProfile value.

func (*BikeProfile) SetBikeSpdcadAntId added in v0.4.0

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

SetBikeSpdcadAntId sets BikeProfile value.

func (*BikeProfile) SetBikeSpdcadAntIdTransType added in v0.4.0

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

SetBikeSpdcadAntIdTransType sets BikeProfile value.

func (*BikeProfile) SetBikeWeight added in v0.4.0

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

SetBikeWeight sets BikeProfile value.

Scale: 10; Units: kg

func (*BikeProfile) SetCadEnabled added in v0.4.0

func (m *BikeProfile) SetCadEnabled(v bool) *BikeProfile

SetCadEnabled sets BikeProfile value.

func (*BikeProfile) SetCrankLength added in v0.4.0

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

SetCrankLength sets BikeProfile value.

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

func (*BikeProfile) SetCustomWheelsize added in v0.4.0

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

SetCustomWheelsize sets BikeProfile value.

Scale: 1000; Units: m

func (*BikeProfile) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields BikeProfile's DeveloperFields.

func (*BikeProfile) SetEnabled added in v0.4.0

func (m *BikeProfile) SetEnabled(v bool) *BikeProfile

SetEnabled sets BikeProfile value.

func (*BikeProfile) SetFrontGear added in v0.4.0

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

SetFrontGear sets BikeProfile value.

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 BikeProfile value.

Number of front gears

func (*BikeProfile) SetId added in v0.4.0

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

SetId sets BikeProfile value.

func (*BikeProfile) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets BikeProfile value.

func (*BikeProfile) SetName added in v0.4.0

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

SetName sets BikeProfile value.

func (*BikeProfile) SetOdometer added in v0.4.0

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

SetOdometer sets BikeProfile value.

Scale: 100; Units: m

func (*BikeProfile) SetOdometerRollover added in v0.4.0

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

SetOdometerRollover sets BikeProfile value.

Rollover counter that can be used to extend the odometer

func (*BikeProfile) SetPowerCalFactor added in v0.4.0

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

SetPowerCalFactor sets BikeProfile value.

Scale: 10; Units: %

func (*BikeProfile) SetPowerEnabled added in v0.4.0

func (m *BikeProfile) SetPowerEnabled(v bool) *BikeProfile

SetPowerEnabled sets BikeProfile value.

func (*BikeProfile) SetRearGear added in v0.4.0

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

SetRearGear sets BikeProfile value.

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 BikeProfile value.

Number of rear gears

func (*BikeProfile) SetShimanoDi2Enabled added in v0.4.0

func (m *BikeProfile) SetShimanoDi2Enabled(v bool) *BikeProfile

SetShimanoDi2Enabled sets BikeProfile value.

func (*BikeProfile) SetSpdEnabled added in v0.4.0

func (m *BikeProfile) SetSpdEnabled(v bool) *BikeProfile

SetSpdEnabled sets BikeProfile value.

func (*BikeProfile) SetSpdcadEnabled added in v0.4.0

func (m *BikeProfile) SetSpdcadEnabled(v bool) *BikeProfile

SetSpdcadEnabled sets BikeProfile value.

func (*BikeProfile) SetSport added in v0.4.0

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

SetSport sets BikeProfile value.

func (*BikeProfile) SetSubSport added in v0.4.0

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

SetSubSport sets BikeProfile value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

BloodPressure is a BloodPressure message.

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 BloodPressure's DeveloperFields.

func (*BloodPressure) SetDiastolicPressure added in v0.4.0

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

SetDiastolicPressure sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetHeartRate added in v0.4.0

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

SetHeartRate sets BloodPressure value.

Units: bpm

func (*BloodPressure) SetHeartRateType added in v0.4.0

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

SetHeartRateType sets BloodPressure value.

func (*BloodPressure) SetMap3SampleMean added in v0.4.0

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

SetMap3SampleMean sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetMapEveningValues added in v0.4.0

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

SetMapEveningValues sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetMapMorningValues added in v0.4.0

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

SetMapMorningValues sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetMeanArterialPressure added in v0.4.0

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

SetMeanArterialPressure sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetStatus added in v0.4.0

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

SetStatus sets BloodPressure value.

func (*BloodPressure) SetSystolicPressure added in v0.4.0

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

SetSystolicPressure sets BloodPressure value.

Units: mmHg

func (*BloodPressure) SetTimestamp added in v0.4.0

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

SetTimestamp sets BloodPressure value.

Units: s

func (*BloodPressure) SetUserProfileIndex added in v0.4.0

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

SetUserProfileIndex sets BloodPressure 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) 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

CadenceZone is a CadenceZone message.

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 CadenceZone's DeveloperFields.

func (*CadenceZone) SetHighValue added in v0.4.0

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

SetHighValue sets CadenceZone value.

Units: rpm

func (*CadenceZone) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets CadenceZone value.

func (*CadenceZone) SetName added in v0.4.0

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

SetName sets CadenceZone value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

CameraEvent is a CameraEvent message.

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 CameraEvent value.

func (*CameraEvent) SetCameraFileUuid added in v0.4.0

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

SetCameraFileUuid sets CameraEvent value.

func (*CameraEvent) SetCameraOrientation added in v0.4.0

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

SetCameraOrientation sets CameraEvent value.

func (*CameraEvent) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields CameraEvent's DeveloperFields.

func (*CameraEvent) SetTimestamp added in v0.4.0

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

SetTimestamp sets CameraEvent 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 CameraEvent value.

Units: ms; Millisecond part of the timestamp.

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              // Array: [N]; Use language_bits_x types where x is index of array.
	Sports                []typedef.SportBits0 // Array: [N]; Use sport_bits_x types where x is index of array.
	WorkoutsSupported     typedef.WorkoutCapabilities
	ConnectivitySupported typedef.ConnectivityCapabilities

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Capabilities is a Capabilities message.

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 Capabilities value.

func (*Capabilities) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Capabilities's DeveloperFields.

func (*Capabilities) SetLanguages added in v0.4.0

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

SetLanguages sets Capabilities value.

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 Capabilities value.

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

func (*Capabilities) SetWorkoutsSupported added in v0.4.0

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

SetWorkoutsSupported sets Capabilities value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ChronoShotData is a ChronoShotData message.

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 ChronoShotData's DeveloperFields.

func (*ChronoShotData) SetShotNum added in v0.10.0

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

SetShotNum sets ChronoShotData value.

func (*ChronoShotData) SetShotSpeed added in v0.10.0

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

SetShotSpeed sets ChronoShotData value.

Scale: 1000; Units: m/s

func (*ChronoShotData) SetTimestamp added in v0.10.0

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

SetTimestamp sets ChronoShotData value.

func (*ChronoShotData) ShotSpeedScaled added in v0.10.0

func (m *ChronoShotData) ShotSpeedScaled() float64

ShotSpeedScaled return ShotSpeed in its scaled value [Scale: 1000; Units: m/s].

If ShotSpeed value is invalid, float64 invalid value will be returned.

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
	ShotCount      uint16
	ProjectileType typedef.ProjectileType

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ChronoShotSession is a ChronoShotSession message.

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 [Scale: 1000; Units: m/s].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*ChronoShotSession) GrainWeightScaled added in v0.10.0

func (m *ChronoShotSession) GrainWeightScaled() float64

GrainWeightScaled return GrainWeight in its scaled value [Scale: 10; Units: gr].

If GrainWeight value is invalid, float64 invalid value will be returned.

func (*ChronoShotSession) MaxSpeedScaled added in v0.10.0

func (m *ChronoShotSession) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*ChronoShotSession) MinSpeedScaled added in v0.10.0

func (m *ChronoShotSession) MinSpeedScaled() float64

MinSpeedScaled return MinSpeed in its scaled value [Scale: 1000; Units: m/s].

If MinSpeed value is invalid, float64 invalid value will be returned.

func (*ChronoShotSession) SetAvgSpeed added in v0.10.0

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

SetAvgSpeed sets ChronoShotSession value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields ChronoShotSession's DeveloperFields.

func (*ChronoShotSession) SetGrainWeight added in v0.10.0

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

SetGrainWeight sets ChronoShotSession value.

Scale: 10; Units: gr

func (*ChronoShotSession) SetMaxSpeed added in v0.10.0

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

SetMaxSpeed sets ChronoShotSession value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetMinSpeed added in v0.10.0

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

SetMinSpeed sets ChronoShotSession value.

Scale: 1000; Units: m/s

func (*ChronoShotSession) SetProjectileType added in v0.10.0

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

SetProjectileType sets ChronoShotSession value.

func (*ChronoShotSession) SetShotCount added in v0.10.0

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

SetShotCount sets ChronoShotSession value.

func (*ChronoShotSession) SetTimestamp added in v0.10.0

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

SetTimestamp sets ChronoShotSession value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ClimbPro is a ClimbPro message.

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) SetClimbCategory added in v0.4.0

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

SetClimbCategory sets ClimbPro value.

func (*ClimbPro) SetClimbNumber added in v0.4.0

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

SetClimbNumber sets ClimbPro value.

func (*ClimbPro) SetClimbProEvent added in v0.4.0

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

SetClimbProEvent sets ClimbPro value.

func (*ClimbPro) SetCurrentDist added in v0.4.0

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

SetCurrentDist sets ClimbPro value.

Units: m

func (*ClimbPro) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields ClimbPro's DeveloperFields.

func (*ClimbPro) SetPositionLat added in v0.4.0

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

SetPositionLat sets ClimbPro value.

Units: semicircles

func (*ClimbPro) SetPositionLong added in v0.4.0

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

SetPositionLong sets ClimbPro value.

Units: semicircles

func (*ClimbPro) SetTimestamp added in v0.4.0

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

SetTimestamp sets ClimbPro value.

Units: s

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            bool // Use Bluetooth for connectivity features
	BluetoothLeEnabled          bool // Use Bluetooth Low Energy for connectivity features
	AntEnabled                  bool // Use ANT for connectivity features
	LiveTrackingEnabled         bool
	WeatherConditionsEnabled    bool
	WeatherAlertsEnabled        bool
	AutoActivityUploadEnabled   bool
	CourseDownloadEnabled       bool
	WorkoutDownloadEnabled      bool
	GpsEphemerisDownloadEnabled bool
	IncidentDetectionEnabled    bool
	GrouptrackEnabled           bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Connectivity is a Connectivity message.

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 bool) *Connectivity

SetAntEnabled sets Connectivity value.

Use ANT for connectivity features

func (*Connectivity) SetAutoActivityUploadEnabled added in v0.4.0

func (m *Connectivity) SetAutoActivityUploadEnabled(v bool) *Connectivity

SetAutoActivityUploadEnabled sets Connectivity value.

func (*Connectivity) SetBluetoothEnabled added in v0.4.0

func (m *Connectivity) SetBluetoothEnabled(v bool) *Connectivity

SetBluetoothEnabled sets Connectivity value.

Use Bluetooth for connectivity features

func (*Connectivity) SetBluetoothLeEnabled added in v0.4.0

func (m *Connectivity) SetBluetoothLeEnabled(v bool) *Connectivity

SetBluetoothLeEnabled sets Connectivity value.

Use Bluetooth Low Energy for connectivity features

func (*Connectivity) SetCourseDownloadEnabled added in v0.4.0

func (m *Connectivity) SetCourseDownloadEnabled(v bool) *Connectivity

SetCourseDownloadEnabled sets Connectivity value.

func (*Connectivity) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Connectivity's DeveloperFields.

func (*Connectivity) SetGpsEphemerisDownloadEnabled added in v0.4.0

func (m *Connectivity) SetGpsEphemerisDownloadEnabled(v bool) *Connectivity

SetGpsEphemerisDownloadEnabled sets Connectivity value.

func (*Connectivity) SetGrouptrackEnabled added in v0.4.0

func (m *Connectivity) SetGrouptrackEnabled(v bool) *Connectivity

SetGrouptrackEnabled sets Connectivity value.

func (*Connectivity) SetIncidentDetectionEnabled added in v0.4.0

func (m *Connectivity) SetIncidentDetectionEnabled(v bool) *Connectivity

SetIncidentDetectionEnabled sets Connectivity value.

func (*Connectivity) SetLiveTrackingEnabled added in v0.4.0

func (m *Connectivity) SetLiveTrackingEnabled(v bool) *Connectivity

SetLiveTrackingEnabled sets Connectivity value.

func (*Connectivity) SetName added in v0.4.0

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

SetName sets Connectivity value.

func (*Connectivity) SetWeatherAlertsEnabled added in v0.4.0

func (m *Connectivity) SetWeatherAlertsEnabled(v bool) *Connectivity

SetWeatherAlertsEnabled sets Connectivity value.

func (*Connectivity) SetWeatherConditionsEnabled added in v0.4.0

func (m *Connectivity) SetWeatherConditionsEnabled(v bool) *Connectivity

SetWeatherConditionsEnabled sets Connectivity value.

func (*Connectivity) SetWorkoutDownloadEnabled added in v0.4.0

func (m *Connectivity) SetWorkoutDownloadEnabled(v bool) *Connectivity

SetWorkoutDownloadEnabled sets Connectivity 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
	Sport        typedef.Sport
	SubSport     typedef.SubSport

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Course is a Course message.

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 Course value.

func (*Course) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Course's DeveloperFields.

func (*Course) SetName added in v0.4.0

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

SetName sets Course value.

func (*Course) SetSport added in v0.4.0

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

SetSport sets Course value.

func (*Course) SetSubSport added in v0.4.0

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

SetSubSport sets Course value.

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     bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

CoursePoint is a CoursePoint message.

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 [Scale: 100; Units: m].

If Distance 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 CoursePoint's DeveloperFields.

func (*CoursePoint) SetDistance added in v0.4.0

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

SetDistance sets CoursePoint value.

Scale: 100; Units: m

func (*CoursePoint) SetFavorite added in v0.4.0

func (m *CoursePoint) SetFavorite(v bool) *CoursePoint

SetFavorite sets CoursePoint value.

func (*CoursePoint) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets CoursePoint value.

func (*CoursePoint) SetName added in v0.4.0

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

SetName sets CoursePoint value.

func (*CoursePoint) SetPositionLat added in v0.4.0

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

SetPositionLat sets CoursePoint value.

Units: semicircles

func (*CoursePoint) SetPositionLong added in v0.4.0

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

SetPositionLong sets CoursePoint value.

Units: semicircles

func (*CoursePoint) SetTimestamp added in v0.4.0

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

SetTimestamp sets CoursePoint value.

func (*CoursePoint) SetType added in v0.4.0

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

SetType sets CoursePoint value.

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
}

DeveloperDataId is a DeveloperDataId message.

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 DeveloperDataId value.

Array: [N]

func (*DeveloperDataId) SetApplicationVersion added in v0.4.0

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

SetApplicationVersion sets DeveloperDataId value.

func (*DeveloperDataId) SetDeveloperDataIndex added in v0.4.0

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

SetDeveloperDataIndex sets DeveloperDataId value.

func (*DeveloperDataId) SetDeveloperId added in v0.4.0

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

SetDeveloperId sets DeveloperDataId value.

Array: [N]

func (*DeveloperDataId) SetManufacturerId added in v0.4.0

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

SetManufacturerId sets DeveloperDataId value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DeviceAuxBatteryInfo is a DeviceAuxBatteryInfo message.

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 [Scale: 256; Units: V].

If BatteryVoltage value is invalid, float64 invalid value will be returned.

func (*DeviceAuxBatteryInfo) SetBatteryIdentifier added in v0.4.0

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

SetBatteryIdentifier sets DeviceAuxBatteryInfo value.

func (*DeviceAuxBatteryInfo) SetBatteryStatus added in v0.4.0

SetBatteryStatus sets DeviceAuxBatteryInfo value.

func (*DeviceAuxBatteryInfo) SetBatteryVoltage added in v0.4.0

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

SetBatteryVoltage sets DeviceAuxBatteryInfo value.

Scale: 256; Units: V

func (*DeviceAuxBatteryInfo) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields DeviceAuxBatteryInfo's DeveloperFields.

func (*DeviceAuxBatteryInfo) SetDeviceIndex added in v0.4.0

SetDeviceIndex sets DeviceAuxBatteryInfo value.

func (*DeviceAuxBatteryInfo) SetTimestamp added in v0.4.0

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

SetTimestamp sets DeviceAuxBatteryInfo value.

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
	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
	DeviceIndex         typedef.DeviceIndex
	DeviceType          uint8
	HardwareVersion     uint8
	BatteryStatus       typedef.BatteryStatus
	SensorPosition      typedef.BodyLocation // Indicates the location of the sensor
	AntTransmissionType uint8
	AntNetwork          typedef.AntNetwork
	SourceType          typedef.SourceType
	BatteryLevel        uint8 // Units: %

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DeviceInfo is a DeviceInfo message.

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 [Scale: 256; Units: V].

If BatteryVoltage value is invalid, float64 invalid value will be returned.

func (*DeviceInfo) SetAntDeviceNumber added in v0.4.0

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

SetAntDeviceNumber sets DeviceInfo value.

func (*DeviceInfo) SetAntNetwork added in v0.4.0

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

SetAntNetwork sets DeviceInfo value.

func (*DeviceInfo) SetAntTransmissionType added in v0.4.0

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

SetAntTransmissionType sets DeviceInfo value.

func (*DeviceInfo) SetBatteryLevel added in v0.4.0

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

SetBatteryLevel sets DeviceInfo value.

Units: %

func (*DeviceInfo) SetBatteryStatus added in v0.4.0

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

SetBatteryStatus sets DeviceInfo value.

func (*DeviceInfo) SetBatteryVoltage added in v0.4.0

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

SetBatteryVoltage sets DeviceInfo value.

Scale: 256; Units: V

func (*DeviceInfo) SetCumOperatingTime added in v0.4.0

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

SetCumOperatingTime sets DeviceInfo 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 DeviceInfo 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 DeviceInfo's DeveloperFields.

func (*DeviceInfo) SetDeviceIndex added in v0.4.0

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

SetDeviceIndex sets DeviceInfo value.

func (*DeviceInfo) SetDeviceType added in v0.4.0

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

SetDeviceType sets DeviceInfo value.

func (*DeviceInfo) SetHardwareVersion added in v0.4.0

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

SetHardwareVersion sets DeviceInfo value.

func (*DeviceInfo) SetManufacturer added in v0.4.0

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

SetManufacturer sets DeviceInfo value.

func (*DeviceInfo) SetProduct added in v0.4.0

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

SetProduct sets DeviceInfo value.

func (*DeviceInfo) SetProductName added in v0.4.0

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

SetProductName sets DeviceInfo 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 DeviceInfo value.

Indicates the location of the sensor

func (*DeviceInfo) SetSerialNumber added in v0.4.0

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

SetSerialNumber sets DeviceInfo value.

func (*DeviceInfo) SetSoftwareVersion added in v0.4.0

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

SetSoftwareVersion sets DeviceInfo value.

Scale: 100

func (*DeviceInfo) SetSourceType added in v0.4.0

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

SetSourceType sets DeviceInfo value.

func (*DeviceInfo) SetTimestamp added in v0.4.0

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

SetTimestamp sets DeviceInfo value.

Units: s

func (*DeviceInfo) SoftwareVersionScaled added in v0.8.0

func (m *DeviceInfo) SoftwareVersionScaled() float64

SoftwareVersionScaled return SoftwareVersion in its scaled value [Scale: 100].

If SoftwareVersion value is invalid, float64 invalid value will be returned.

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
	DateMode                            typedef.DateMode           // Display mode for the date
	DisplayOrientation                  typedef.DisplayOrientation
	MountingSide                        typedef.Side
	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
	ActivityTrackerEnabled              bool                   // Enabled state of the activity tracker functionality
	MoveAlertEnabled                    bool                   // Enabled state of the move alert
	LactateThresholdAutodetectEnabled   bool                   // Enable auto-detect setting for the lactate threshold feature.
	BleAutoUploadEnabled                bool                   // Automatically upload using BLE

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DeviceSettings is a DeviceSettings message.

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) SetActiveTimeZone added in v0.4.0

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

SetActiveTimeZone sets DeviceSettings value.

Index into time zone arrays.

func (*DeviceSettings) SetActivityTrackerEnabled added in v0.4.0

func (m *DeviceSettings) SetActivityTrackerEnabled(v bool) *DeviceSettings

SetActivityTrackerEnabled sets DeviceSettings 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 DeviceSettings 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 DeviceSettings 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 DeviceSettings 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 DeviceSettings 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 DeviceSettings value.

Mode for backlight

func (*DeviceSettings) SetBleAutoUploadEnabled added in v0.4.0

func (m *DeviceSettings) SetBleAutoUploadEnabled(v bool) *DeviceSettings

SetBleAutoUploadEnabled sets DeviceSettings value.

Automatically upload using BLE

func (*DeviceSettings) SetClockTime added in v0.4.0

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

SetClockTime sets DeviceSettings 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 DeviceSettings value.

Display mode for the date

func (*DeviceSettings) SetDefaultPage added in v0.4.0

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

SetDefaultPage sets DeviceSettings 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 DeviceSettings's DeveloperFields.

func (*DeviceSettings) SetDisplayOrientation added in v0.4.0

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

SetDisplayOrientation sets DeviceSettings value.

func (*DeviceSettings) SetLactateThresholdAutodetectEnabled added in v0.4.0

func (m *DeviceSettings) SetLactateThresholdAutodetectEnabled(v bool) *DeviceSettings

SetLactateThresholdAutodetectEnabled sets DeviceSettings 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 DeviceSettings value.

func (*DeviceSettings) SetMoveAlertEnabled added in v0.4.0

func (m *DeviceSettings) SetMoveAlertEnabled(v bool) *DeviceSettings

SetMoveAlertEnabled sets DeviceSettings value.

Enabled state of the move alert

func (*DeviceSettings) SetNumberOfScreens added in v0.4.0

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

SetNumberOfScreens sets DeviceSettings value.

Number of screens configured to display

func (*DeviceSettings) SetPagesEnabled added in v0.4.0

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

SetPagesEnabled sets DeviceSettings 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 DeviceSettings value.

Smart Notification display orientation

func (*DeviceSettings) SetTapInterface added in v0.4.0

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

SetTapInterface sets DeviceSettings value.

func (*DeviceSettings) SetTapSensitivity added in v0.4.0

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

SetTapSensitivity sets DeviceSettings 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 DeviceSettings 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 DeviceSettings 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 DeviceSettings value.

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

func (*DeviceSettings) SetUtcOffset added in v0.4.0

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

SetUtcOffset sets DeviceSettings 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 [Array: [N]; Scale: 4; Units: hr; timezone offset in 1/4 hour increments].

If TimeZoneOffset value is invalid, nil will be returned.

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
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm
	Enabled          bool                  // Enablement flag
	PopupEnabled     bool                  // Show a visible pop-up for this alarm
	TriggerOnDescent bool                  // Trigger the alarm on descent
	TriggerOnAscent  bool                  // Trigger the alarm on ascent
	Repeating        bool                  // Repeat alarm each time threshold is crossed?

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DiveAlarm is a DiveAlarm message.

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 [Scale: 1000; Units: m; Depth setting (m) for depth type alarms].

If Depth value is invalid, float64 invalid value will be returned.

func (*DiveAlarm) SetAlarmType added in v0.4.0

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

SetAlarmType sets DiveAlarm value.

Alarm type setting

func (*DiveAlarm) SetDepth added in v0.4.0

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

SetDepth sets DiveAlarm value.

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 DiveAlarm's DeveloperFields.

func (*DiveAlarm) SetDiveTypes added in v0.4.0

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

SetDiveTypes sets DiveAlarm value.

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

func (*DiveAlarm) SetEnabled added in v0.4.0

func (m *DiveAlarm) SetEnabled(v bool) *DiveAlarm

SetEnabled sets DiveAlarm value.

Enablement flag

func (*DiveAlarm) SetId added in v0.4.0

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

SetId sets DiveAlarm value.

Alarm ID

func (*DiveAlarm) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets DiveAlarm value.

Index of the alarm

func (*DiveAlarm) SetPopupEnabled added in v0.4.0

func (m *DiveAlarm) SetPopupEnabled(v bool) *DiveAlarm

SetPopupEnabled sets DiveAlarm value.

Show a visible pop-up for this alarm

func (*DiveAlarm) SetRepeating added in v0.4.0

func (m *DiveAlarm) SetRepeating(v bool) *DiveAlarm

SetRepeating sets DiveAlarm 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 DiveAlarm 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 DiveAlarm value.

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 DiveAlarm value.

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

func (*DiveAlarm) SetTriggerOnAscent added in v0.4.0

func (m *DiveAlarm) SetTriggerOnAscent(v bool) *DiveAlarm

SetTriggerOnAscent sets DiveAlarm value.

Trigger the alarm on ascent

func (*DiveAlarm) SetTriggerOnDescent added in v0.4.0

func (m *DiveAlarm) SetTriggerOnDescent(v bool) *DiveAlarm

SetTriggerOnDescent sets DiveAlarm value.

Trigger the alarm on descent

func (*DiveAlarm) SpeedScaled added in v0.8.0

func (m *DiveAlarm) SpeedScaled() float64

SpeedScaled return Speed in its scaled value [Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms].

If Speed value is invalid, float64 invalid value will be returned.

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
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm.
	Enabled          bool                  // Enablement flag
	PopupEnabled     bool                  // Show a visible pop-up for this alarm
	TriggerOnDescent bool                  // Trigger the alarm on descent
	TriggerOnAscent  bool                  // Trigger the alarm on ascent
	Repeating        bool                  // Repeat alarm each time threshold is crossed?

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DiveApneaAlarm is a DiveApneaAlarm message.

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 [Scale: 1000; Units: m; Depth setting (m) for depth type alarms].

If Depth value is invalid, float64 invalid value will be returned.

func (*DiveApneaAlarm) SetAlarmType added in v0.4.0

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

SetAlarmType sets DiveApneaAlarm value.

Alarm type setting

func (*DiveApneaAlarm) SetDepth added in v0.4.0

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

SetDepth sets DiveApneaAlarm value.

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 DiveApneaAlarm's DeveloperFields.

func (*DiveApneaAlarm) SetDiveTypes added in v0.4.0

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

SetDiveTypes sets DiveApneaAlarm value.

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

func (*DiveApneaAlarm) SetEnabled added in v0.4.0

func (m *DiveApneaAlarm) SetEnabled(v bool) *DiveApneaAlarm

SetEnabled sets DiveApneaAlarm value.

Enablement flag

func (*DiveApneaAlarm) SetId added in v0.4.0

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

SetId sets DiveApneaAlarm value.

Alarm ID

func (*DiveApneaAlarm) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets DiveApneaAlarm value.

Index of the alarm

func (*DiveApneaAlarm) SetPopupEnabled added in v0.4.0

func (m *DiveApneaAlarm) SetPopupEnabled(v bool) *DiveApneaAlarm

SetPopupEnabled sets DiveApneaAlarm value.

Show a visible pop-up for this alarm

func (*DiveApneaAlarm) SetRepeating added in v0.4.0

func (m *DiveApneaAlarm) SetRepeating(v bool) *DiveApneaAlarm

SetRepeating sets DiveApneaAlarm 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 DiveApneaAlarm 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 DiveApneaAlarm value.

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 DiveApneaAlarm value.

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

func (*DiveApneaAlarm) SetTriggerOnAscent added in v0.4.0

func (m *DiveApneaAlarm) SetTriggerOnAscent(v bool) *DiveApneaAlarm

SetTriggerOnAscent sets DiveApneaAlarm value.

Trigger the alarm on ascent

func (*DiveApneaAlarm) SetTriggerOnDescent added in v0.4.0

func (m *DiveApneaAlarm) SetTriggerOnDescent(v bool) *DiveApneaAlarm

SetTriggerOnDescent sets DiveApneaAlarm value.

Trigger the alarm on descent

func (*DiveApneaAlarm) SpeedScaled added in v0.8.0

func (m *DiveApneaAlarm) SpeedScaled() float64

SpeedScaled return Speed in its scaled value [Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms].

If Speed value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DiveGas is a DiveGas message.

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 DiveGas's DeveloperFields.

func (*DiveGas) SetHeliumContent added in v0.4.0

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

SetHeliumContent sets DiveGas value.

Units: percent

func (*DiveGas) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets DiveGas value.

func (*DiveGas) SetMode added in v0.4.0

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

SetMode sets DiveGas value.

func (*DiveGas) SetOxygenContent added in v0.4.0

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

SetOxygenContent sets DiveGas value.

Units: percent

func (*DiveGas) SetStatus added in v0.4.0

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

SetStatus sets DiveGas value.

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
	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.
	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.
	SafetyStopEnabled         bool
	ApneaCountdownEnabled     bool
	UpKeyEnabled              bool // Indicates whether the up key is enabled during dives

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DiveSettings is a DiveSettings message.

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 [Scale: 1000; Units: m; Depth to switch to high setpoint in automatic mode].

If CcrHighSetpointDepth value is invalid, float64 invalid value will be returned.

func (*DiveSettings) CcrHighSetpointScaled added in v0.8.0

func (m *DiveSettings) CcrHighSetpointScaled() float64

CcrHighSetpointScaled return CcrHighSetpoint in its scaled value [Scale: 100; Units: percent; Target PO2 when using high setpoint].

If CcrHighSetpoint value is invalid, float64 invalid value will be returned.

func (*DiveSettings) CcrLowSetpointDepthScaled added in v0.8.0

func (m *DiveSettings) CcrLowSetpointDepthScaled() float64

CcrLowSetpointDepthScaled return CcrLowSetpointDepth in its scaled value [Scale: 1000; Units: m; Depth to switch to low setpoint in automatic mode].

If CcrLowSetpointDepth value is invalid, float64 invalid value will be returned.

func (*DiveSettings) CcrLowSetpointScaled added in v0.8.0

func (m *DiveSettings) CcrLowSetpointScaled() float64

CcrLowSetpointScaled return CcrLowSetpoint in its scaled value [Scale: 100; Units: percent; Target PO2 when using low setpoint].

If CcrLowSetpoint value is invalid, float64 invalid value will be returned.

func (*DiveSettings) LastStopMultipleScaled added in v0.8.0

func (m *DiveSettings) LastStopMultipleScaled() float64

LastStopMultipleScaled return LastStopMultiple in its scaled value [Scale: 10; Usually 1.0/1.5/2.0 representing 3/4.5/6m or 10/15/20ft].

If LastStopMultiple value is invalid, float64 invalid value will be returned.

func (*DiveSettings) Po2CriticalScaled added in v0.8.0

func (m *DiveSettings) Po2CriticalScaled() float64

Po2CriticalScaled return Po2Critical in its scaled value [Scale: 100; Units: percent; Typically 1.60].

If Po2Critical value is invalid, float64 invalid value will be returned.

func (*DiveSettings) Po2DecoScaled added in v0.8.0

func (m *DiveSettings) Po2DecoScaled() float64

Po2DecoScaled return Po2Deco in its scaled value [Scale: 100; Units: percent].

If Po2Deco value is invalid, float64 invalid value will be returned.

func (*DiveSettings) Po2WarnScaled added in v0.8.0

func (m *DiveSettings) Po2WarnScaled() float64

Po2WarnScaled return Po2Warn in its scaled value [Scale: 100; Units: percent; Typically 1.40].

If Po2Warn value is invalid, float64 invalid value will be returned.

func (*DiveSettings) SetApneaCountdownEnabled added in v0.4.0

func (m *DiveSettings) SetApneaCountdownEnabled(v bool) *DiveSettings

SetApneaCountdownEnabled sets DiveSettings value.

func (*DiveSettings) SetApneaCountdownTime added in v0.4.0

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

SetApneaCountdownTime sets DiveSettings value.

func (*DiveSettings) SetBacklightBrightness added in v0.4.0

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

SetBacklightBrightness sets DiveSettings value.

func (*DiveSettings) SetBacklightMode added in v0.4.0

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

SetBacklightMode sets DiveSettings value.

func (*DiveSettings) SetBacklightTimeout added in v0.4.0

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

SetBacklightTimeout sets DiveSettings value.

func (*DiveSettings) SetBottomDepth added in v0.4.0

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

SetBottomDepth sets DiveSettings value.

func (*DiveSettings) SetBottomTime added in v0.4.0

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

SetBottomTime sets DiveSettings value.

func (*DiveSettings) SetCcrHighSetpoint added in v0.4.0

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

SetCcrHighSetpoint sets DiveSettings 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 DiveSettings value.

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

func (*DiveSettings) SetCcrHighSetpointSwitchMode added in v0.4.0

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

SetCcrHighSetpointSwitchMode sets DiveSettings 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 DiveSettings 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 DiveSettings value.

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

func (*DiveSettings) SetCcrLowSetpointSwitchMode added in v0.4.0

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

SetCcrLowSetpointSwitchMode sets DiveSettings 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 DiveSettings's DeveloperFields.

func (*DiveSettings) SetDiveSounds added in v0.4.0

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

SetDiveSounds sets DiveSettings 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 DiveSettings 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 DiveSettings value.

Units: percent

func (*DiveSettings) SetGfLow added in v0.4.0

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

SetGfLow sets DiveSettings value.

Units: percent

func (*DiveSettings) SetHeartRateSource added in v0.4.0

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

SetHeartRateSource sets DiveSettings value.

func (*DiveSettings) SetHeartRateSourceType added in v0.4.0

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

SetHeartRateSourceType sets DiveSettings value.

func (*DiveSettings) SetLastStopMultiple added in v0.4.0

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

SetLastStopMultiple sets DiveSettings value.

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 DiveSettings value.

func (*DiveSettings) SetModel added in v0.4.0

SetModel sets DiveSettings value.

func (*DiveSettings) SetName added in v0.4.0

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

SetName sets DiveSettings value.

func (*DiveSettings) SetNoFlyTimeMode added in v0.4.0

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

SetNoFlyTimeMode sets DiveSettings 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 DiveSettings value.

Scale: 100; Units: percent; Typically 1.60

func (*DiveSettings) SetPo2Deco added in v0.4.0

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

SetPo2Deco sets DiveSettings value.

Scale: 100; Units: percent

func (*DiveSettings) SetPo2Warn added in v0.4.0

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

SetPo2Warn sets DiveSettings value.

Scale: 100; Units: percent; Typically 1.40

func (*DiveSettings) SetRepeatDiveInterval added in v0.4.0

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

SetRepeatDiveInterval sets DiveSettings value.

Units: s; Time between surfacing and ending the activity

func (*DiveSettings) SetSafetyStopEnabled added in v0.4.0

func (m *DiveSettings) SetSafetyStopEnabled(v bool) *DiveSettings

SetSafetyStopEnabled sets DiveSettings value.

func (*DiveSettings) SetSafetyStopTime added in v0.4.0

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

SetSafetyStopTime sets DiveSettings 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 DiveSettings value.

func (*DiveSettings) SetTravelGas added in v0.4.0

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

SetTravelGas sets DiveSettings value.

Index of travel dive_gas message

func (*DiveSettings) SetUpKeyEnabled added in v0.4.0

func (m *DiveSettings) SetUpKeyEnabled(v bool) *DiveSettings

SetUpKeyEnabled sets DiveSettings 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 DiveSettings 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 DiveSettings value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

DiveSummary is a DiveSummary message.

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 [Scale: 1000; Units: s; Time after leaving bottom until reaching surface].

If AscentTime value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgAscentRateScaled added in v0.8.0

func (m *DiveSummary) AvgAscentRateScaled() float64

AvgAscentRateScaled return AvgAscentRate in its scaled value [Scale: 1000; Units: m/s; Average ascent rate, not including descents or stops].

If AvgAscentRate value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgDepthScaled added in v0.8.0

func (m *DiveSummary) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If AvgDepth value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgDescentRateScaled added in v0.8.0

func (m *DiveSummary) AvgDescentRateScaled() float64

AvgDescentRateScaled return AvgDescentRate in its scaled value [Scale: 1000; Units: m/s; Average descent rate, not including ascents or stops].

If AvgDescentRate value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgPressureSacScaled added in v0.8.0

func (m *DiveSummary) AvgPressureSacScaled() float64

AvgPressureSacScaled return AvgPressureSac in its scaled value [Scale: 100; Units: bar/min; Average pressure-based surface air consumption].

If AvgPressureSac value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgRmvScaled added in v0.8.0

func (m *DiveSummary) AvgRmvScaled() float64

AvgRmvScaled return AvgRmv in its scaled value [Scale: 100; Units: L/min; Average respiratory minute volume].

If AvgRmv value is invalid, float64 invalid value will be returned.

func (*DiveSummary) AvgVolumeSacScaled added in v0.8.0

func (m *DiveSummary) AvgVolumeSacScaled() float64

AvgVolumeSacScaled return AvgVolumeSac in its scaled value [Scale: 100; Units: L/min; Average volumetric surface air consumption].

If AvgVolumeSac value is invalid, float64 invalid value will be returned.

func (*DiveSummary) BottomTimeScaled added in v0.8.0

func (m *DiveSummary) BottomTimeScaled() float64

BottomTimeScaled return BottomTime in its scaled value [Scale: 1000; Units: s].

If BottomTime value is invalid, float64 invalid value will be returned.

func (*DiveSummary) DescentTimeScaled added in v0.8.0

func (m *DiveSummary) DescentTimeScaled() float64

DescentTimeScaled return DescentTime in its scaled value [Scale: 1000; Units: s; Time to reach deepest level stop].

If DescentTime value is invalid, float64 invalid value will be returned.

func (*DiveSummary) HangTimeScaled added in v0.8.0

func (m *DiveSummary) HangTimeScaled() float64

HangTimeScaled return HangTime in its scaled value [Scale: 1000; Units: s; Time spent neither ascending nor descending].

If HangTime value is invalid, float64 invalid value will be returned.

func (*DiveSummary) MaxAscentRateScaled added in v0.8.0

func (m *DiveSummary) MaxAscentRateScaled() float64

MaxAscentRateScaled return MaxAscentRate in its scaled value [Scale: 1000; Units: m/s; Maximum ascent rate].

If MaxAscentRate value is invalid, float64 invalid value will be returned.

func (*DiveSummary) MaxDepthScaled added in v0.8.0

func (m *DiveSummary) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If MaxDepth value is invalid, float64 invalid value will be returned.

func (*DiveSummary) MaxDescentRateScaled added in v0.8.0

func (m *DiveSummary) MaxDescentRateScaled() float64

MaxDescentRateScaled return MaxDescentRate in its scaled value [Scale: 1000; Units: m/s; Maximum descent rate].

If MaxDescentRate value is invalid, float64 invalid value will be returned.

func (*DiveSummary) SetAscentTime added in v0.4.0

func (m *DiveSummary) SetAscentTime(v uint32) *DiveSummary

SetAscentTime sets DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

Scale: 1000; Units: s

func (*DiveSummary) SetDescentTime added in v0.4.0

func (m *DiveSummary) SetDescentTime(v uint32) *DiveSummary

SetDescentTime sets DiveSummary value.

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 DiveSummary's DeveloperFields.

func (*DiveSummary) SetDiveNumber added in v0.4.0

func (m *DiveSummary) SetDiveNumber(v uint32) *DiveSummary

SetDiveNumber sets DiveSummary value.

func (*DiveSummary) SetEndCns added in v0.4.0

func (m *DiveSummary) SetEndCns(v uint8) *DiveSummary

SetEndCns sets DiveSummary value.

Units: percent

func (*DiveSummary) SetEndN2 added in v0.4.0

func (m *DiveSummary) SetEndN2(v uint16) *DiveSummary

SetEndN2 sets DiveSummary value.

Units: percent

func (*DiveSummary) SetHangTime added in v0.4.0

func (m *DiveSummary) SetHangTime(v uint32) *DiveSummary

SetHangTime sets DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

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 DiveSummary value.

Units: OTUs

func (*DiveSummary) SetReferenceIndex added in v0.4.0

func (m *DiveSummary) SetReferenceIndex(v typedef.MessageIndex) *DiveSummary

SetReferenceIndex sets DiveSummary value.

func (*DiveSummary) SetReferenceMesg added in v0.4.0

func (m *DiveSummary) SetReferenceMesg(v typedef.MesgNum) *DiveSummary

SetReferenceMesg sets DiveSummary value.

func (*DiveSummary) SetStartCns added in v0.4.0

func (m *DiveSummary) SetStartCns(v uint8) *DiveSummary

SetStartCns sets DiveSummary value.

Units: percent

func (*DiveSummary) SetStartN2 added in v0.4.0

func (m *DiveSummary) SetStartN2(v uint16) *DiveSummary

SetStartN2 sets DiveSummary value.

Units: percent

func (*DiveSummary) SetSurfaceInterval added in v0.4.0

func (m *DiveSummary) SetSurfaceInterval(v uint32) *DiveSummary

SetSurfaceInterval sets DiveSummary 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 DiveSummary value.

Units: s

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 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Front gear number. 1 is innermost.
	FrontGear                   uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of front teeth.
	RearGearNum                 uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Rear gear number. 1 is innermost.
	RearGear                    uint8 // 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

	IsExpandedFields [25]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Event is a Event message.

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) RadarThreatAvgApproachSpeedScaled added in v0.8.0

func (m *Event) RadarThreatAvgApproachSpeedScaled() float64

RadarThreatAvgApproachSpeedScaled return RadarThreatAvgApproachSpeed in its scaled value [Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components].

If RadarThreatAvgApproachSpeed value is invalid, float64 invalid value will be returned.

func (*Event) RadarThreatMaxApproachSpeedScaled added in v0.8.0

func (m *Event) RadarThreatMaxApproachSpeedScaled() float64

RadarThreatMaxApproachSpeedScaled return RadarThreatMaxApproachSpeed in its scaled value [Scale: 10; Units: m/s; Do not populate directly. Autogenerated by decoder for radar_threat_alert subfield components].

If RadarThreatMaxApproachSpeed value is invalid, float64 invalid value will be returned.

func (*Event) SetActivityType added in v0.4.0

func (m *Event) SetActivityType(v typedef.ActivityType) *Event

SetActivityType sets Event 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 Event value.

func (*Event) SetData16 added in v0.4.0

func (m *Event) SetData16(v uint16) *Event

SetData16 sets Event value.

func (*Event) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Event's DeveloperFields.

func (*Event) SetDeviceIndex added in v0.4.0

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

SetDeviceIndex sets Event 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 Event value.

func (*Event) SetEventType added in v0.4.0

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

SetEventType sets Event value.

func (*Event) SetFrontGear added in v0.4.0

func (m *Event) SetFrontGear(v uint8) *Event

SetFrontGear sets Event value.

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 Event value.

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 Event 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 Event value.

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 Event 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 Event 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 Event value.

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 Event value.

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 Event value.

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 Event 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 Event 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 Event value.

Units: s

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     bool

	IsExpandedFields [4]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ExdDataConceptConfiguration is a ExdDataConceptConfiguration message.

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) SetConceptField added in v0.4.0

SetConceptField sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetConceptIndex added in v0.4.0

SetConceptIndex sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetConceptKey added in v0.4.0

SetConceptKey sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetDataPage added in v0.4.0

SetDataPage sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetDataUnits added in v0.4.0

SetDataUnits sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetDescriptor added in v0.4.0

SetDescriptor sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields ExdDataConceptConfiguration's DeveloperFields.

func (*ExdDataConceptConfiguration) SetFieldId added in v0.4.0

SetFieldId sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetIsSigned added in v0.4.0

SetIsSigned sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetQualifier added in v0.4.0

SetQualifier sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetScaling added in v0.4.0

SetScaling sets ExdDataConceptConfiguration value.

func (*ExdDataConceptConfiguration) SetScreenIndex added in v0.4.0

SetScreenIndex sets ExdDataConceptConfiguration value.

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        []string // Array: [32]
	ScreenIndex  uint8
	ConceptField byte
	FieldId      uint8
	ConceptCount uint8
	DisplayType  typedef.ExdDisplayType

	IsExpandedFields [4]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ExdDataFieldConfiguration is a ExdDataFieldConfiguration message.

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) SetConceptCount added in v0.4.0

SetConceptCount sets ExdDataFieldConfiguration value.

func (*ExdDataFieldConfiguration) SetConceptField added in v0.4.0

SetConceptField sets ExdDataFieldConfiguration value.

func (*ExdDataFieldConfiguration) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields ExdDataFieldConfiguration's DeveloperFields.

func (*ExdDataFieldConfiguration) SetDisplayType added in v0.4.0

SetDisplayType sets ExdDataFieldConfiguration value.

func (*ExdDataFieldConfiguration) SetFieldId added in v0.4.0

SetFieldId sets ExdDataFieldConfiguration value.

func (*ExdDataFieldConfiguration) SetScreenIndex added in v0.4.0

SetScreenIndex sets ExdDataFieldConfiguration value.

func (*ExdDataFieldConfiguration) SetTitle added in v0.4.0

SetTitle sets ExdDataFieldConfiguration value.

Array: [32]

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 bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ExdScreenConfiguration is a ExdScreenConfiguration message.

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 ExdScreenConfiguration's DeveloperFields.

func (*ExdScreenConfiguration) SetFieldCount added in v0.4.0

SetFieldCount sets ExdScreenConfiguration value.

number of fields in screen

func (*ExdScreenConfiguration) SetLayout added in v0.4.0

SetLayout sets ExdScreenConfiguration value.

func (*ExdScreenConfiguration) SetScreenEnabled added in v0.4.0

func (m *ExdScreenConfiguration) SetScreenEnabled(v bool) *ExdScreenConfiguration

SetScreenEnabled sets ExdScreenConfiguration value.

func (*ExdScreenConfiguration) SetScreenIndex added in v0.4.0

func (m *ExdScreenConfiguration) SetScreenIndex(v uint8) *ExdScreenConfiguration

SetScreenIndex sets ExdScreenConfiguration value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ExerciseTitle is a ExerciseTitle message.

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 ExerciseTitle's DeveloperFields.

func (*ExerciseTitle) SetExerciseCategory added in v0.4.0

func (m *ExerciseTitle) SetExerciseCategory(v typedef.ExerciseCategory) *ExerciseTitle

SetExerciseCategory sets ExerciseTitle value.

func (*ExerciseTitle) SetExerciseName added in v0.4.0

func (m *ExerciseTitle) SetExerciseName(v uint16) *ExerciseTitle

SetExerciseName sets ExerciseTitle value.

func (*ExerciseTitle) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets ExerciseTitle value.

func (*ExerciseTitle) SetWktStepName added in v0.4.0

func (m *ExerciseTitle) SetWktStepName(v []string) *ExerciseTitle

SetWktStepName sets ExerciseTitle 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 {
	CreateMesgOnly(num typedef.MesgNum) proto.Message
	CreateField(mesgNum typedef.MesgNum, num byte) proto.Field
}

type FieldCapabilities

type FieldCapabilities struct {
	MessageIndex typedef.MessageIndex
	MesgNum      typedef.MesgNum
	Count        uint16
	File         typedef.File
	FieldNum     uint8

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

FieldCapabilities is a FieldCapabilities message.

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 FieldCapabilities value.

func (*FieldCapabilities) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields FieldCapabilities's DeveloperFields.

func (*FieldCapabilities) SetFieldNum added in v0.4.0

func (m *FieldCapabilities) SetFieldNum(v uint8) *FieldCapabilities

SetFieldNum sets FieldCapabilities value.

func (*FieldCapabilities) SetFile added in v0.4.0

SetFile sets FieldCapabilities value.

func (*FieldCapabilities) SetMesgNum added in v0.4.0

SetMesgNum sets FieldCapabilities value.

func (*FieldCapabilities) SetMessageIndex added in v0.4.0

SetMessageIndex sets FieldCapabilities value.

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
}

FieldDescription is a FieldDescription message.

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 FieldDescription value.

func (*FieldDescription) SetArray added in v0.4.0

func (m *FieldDescription) SetArray(v uint8) *FieldDescription

SetArray sets FieldDescription value.

func (*FieldDescription) SetBits added in v0.4.0

func (m *FieldDescription) SetBits(v string) *FieldDescription

SetBits sets FieldDescription value.

func (*FieldDescription) SetComponents added in v0.4.0

func (m *FieldDescription) SetComponents(v string) *FieldDescription

SetComponents sets FieldDescription value.

func (*FieldDescription) SetDeveloperDataIndex added in v0.4.0

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

SetDeveloperDataIndex sets FieldDescription value.

func (*FieldDescription) SetFieldDefinitionNumber added in v0.4.0

func (m *FieldDescription) SetFieldDefinitionNumber(v uint8) *FieldDescription

SetFieldDefinitionNumber sets FieldDescription value.

func (*FieldDescription) SetFieldName added in v0.4.0

func (m *FieldDescription) SetFieldName(v []string) *FieldDescription

SetFieldName sets FieldDescription value.

Array: [N]

func (*FieldDescription) SetFitBaseTypeId added in v0.4.0

func (m *FieldDescription) SetFitBaseTypeId(v basetype.BaseType) *FieldDescription

SetFitBaseTypeId sets FieldDescription value.

func (*FieldDescription) SetFitBaseUnitId added in v0.4.0

func (m *FieldDescription) SetFitBaseUnitId(v typedef.FitBaseUnit) *FieldDescription

SetFitBaseUnitId sets FieldDescription value.

func (*FieldDescription) SetNativeFieldNum added in v0.4.0

func (m *FieldDescription) SetNativeFieldNum(v uint8) *FieldDescription

SetNativeFieldNum sets FieldDescription value.

func (*FieldDescription) SetNativeMesgNum added in v0.4.0

func (m *FieldDescription) SetNativeMesgNum(v typedef.MesgNum) *FieldDescription

SetNativeMesgNum sets FieldDescription value.

func (*FieldDescription) SetOffset added in v0.4.0

func (m *FieldDescription) SetOffset(v int8) *FieldDescription

SetOffset sets FieldDescription value.

func (*FieldDescription) SetScale added in v0.4.0

func (m *FieldDescription) SetScale(v uint8) *FieldDescription

SetScale sets FieldDescription value.

func (*FieldDescription) SetUnits added in v0.4.0

func (m *FieldDescription) SetUnits(v []string) *FieldDescription

SetUnits sets FieldDescription value.

Array: [N]

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

FileCapabilities is a FileCapabilities message.

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 FileCapabilities's DeveloperFields.

func (*FileCapabilities) SetDirectory added in v0.4.0

func (m *FileCapabilities) SetDirectory(v string) *FileCapabilities

SetDirectory sets FileCapabilities value.

func (*FileCapabilities) SetFlags added in v0.4.0

SetFlags sets FileCapabilities value.

func (*FileCapabilities) SetMaxCount added in v0.4.0

func (m *FileCapabilities) SetMaxCount(v uint16) *FileCapabilities

SetMaxCount sets FileCapabilities value.

func (*FileCapabilities) SetMaxSize added in v0.4.0

func (m *FileCapabilities) SetMaxSize(v uint32) *FileCapabilities

SetMaxSize sets FileCapabilities value.

Units: bytes

func (*FileCapabilities) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets FileCapabilities value.

func (*FileCapabilities) SetType added in v0.4.0

SetType sets FileCapabilities value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

FileCreator is a FileCreator message.

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 FileCreator's DeveloperFields.

func (*FileCreator) SetHardwareVersion added in v0.4.0

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

SetHardwareVersion sets FileCreator value.

func (*FileCreator) SetSoftwareVersion added in v0.4.0

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

SetSoftwareVersion sets FileCreator value.

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
	Manufacturer typedef.Manufacturer
	Product      uint16
	Number       uint16 // Only set for files that are not created/erased.
	Type         typedef.File
}

FileId is a FileId message.

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) SetManufacturer added in v0.4.0

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

SetManufacturer sets FileId value.

func (*FileId) SetNumber added in v0.4.0

func (m *FileId) SetNumber(v uint16) *FileId

SetNumber sets FileId 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 FileId value.

func (*FileId) SetProductName added in v0.4.0

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

SetProductName sets FileId 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 FileId value.

func (*FileId) SetTimeCreated added in v0.4.0

func (m *FileId) SetTimeCreated(v time.Time) *FileId

SetTimeCreated sets FileId 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 FileId value.

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
	Recurrence      typedef.GoalRecurrence
	Source          typedef.GoalSource
	Repeat          bool
	Enabled         bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Goal is a Goal message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Goal's DeveloperFields.

func (*Goal) SetEnabled added in v0.4.0

func (m *Goal) SetEnabled(v bool) *Goal

SetEnabled sets Goal value.

func (*Goal) SetEndDate added in v0.4.0

func (m *Goal) SetEndDate(v time.Time) *Goal

SetEndDate sets Goal value.

func (*Goal) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Goal value.

func (*Goal) SetRecurrence added in v0.4.0

func (m *Goal) SetRecurrence(v typedef.GoalRecurrence) *Goal

SetRecurrence sets Goal value.

func (*Goal) SetRecurrenceValue added in v0.4.0

func (m *Goal) SetRecurrenceValue(v uint16) *Goal

SetRecurrenceValue sets Goal value.

func (*Goal) SetRepeat added in v0.4.0

func (m *Goal) SetRepeat(v bool) *Goal

SetRepeat sets Goal value.

func (*Goal) SetSource added in v0.4.0

func (m *Goal) SetSource(v typedef.GoalSource) *Goal

SetSource sets Goal value.

func (*Goal) SetSport added in v0.4.0

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

SetSport sets Goal value.

func (*Goal) SetStartDate added in v0.4.0

func (m *Goal) SetStartDate(v time.Time) *Goal

SetStartDate sets Goal value.

func (*Goal) SetSubSport added in v0.4.0

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

SetSubSport sets Goal value.

func (*Goal) SetTargetValue added in v0.4.0

func (m *Goal) SetTargetValue(v uint32) *Goal

SetTargetValue sets Goal value.

func (*Goal) SetType added in v0.4.0

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

SetType sets Goal value.

func (*Goal) SetValue added in v0.4.0

func (m *Goal) SetValue(v uint32) *Goal

SetValue sets Goal value.

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.
	Velocity         []int16   // Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.
	PositionLat      int32     // Units: semicircles
	PositionLong     int32     // Units: semicircles
	EnhancedAltitude uint32    // Scale: 5; Offset: 500; Units: m
	EnhancedSpeed    uint32    // Scale: 1000; Units: m/s
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.
	Heading          uint16    // Scale: 100; Units: degrees

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

GpsMetadata is a GpsMetadata message.

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 [Scale: 5; Offset: 500; Units: m].

If EnhancedAltitude value is invalid, float64 invalid value will be returned.

func (*GpsMetadata) EnhancedSpeedScaled added in v0.8.0

func (m *GpsMetadata) EnhancedSpeedScaled() float64

EnhancedSpeedScaled return EnhancedSpeed in its scaled value [Scale: 1000; Units: m/s].

If EnhancedSpeed value is invalid, float64 invalid value will be returned.

func (*GpsMetadata) HeadingScaled added in v0.8.0

func (m *GpsMetadata) HeadingScaled() float64

HeadingScaled return Heading in its scaled value [Scale: 100; Units: degrees].

If Heading 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 GpsMetadata's DeveloperFields.

func (*GpsMetadata) SetEnhancedAltitude added in v0.4.0

func (m *GpsMetadata) SetEnhancedAltitude(v uint32) *GpsMetadata

SetEnhancedAltitude sets GpsMetadata value.

Scale: 5; Offset: 500; Units: m

func (*GpsMetadata) SetEnhancedSpeed added in v0.4.0

func (m *GpsMetadata) SetEnhancedSpeed(v uint32) *GpsMetadata

SetEnhancedSpeed sets GpsMetadata value.

Scale: 1000; Units: m/s

func (*GpsMetadata) SetHeading added in v0.4.0

func (m *GpsMetadata) SetHeading(v uint16) *GpsMetadata

SetHeading sets GpsMetadata value.

Scale: 100; Units: degrees

func (*GpsMetadata) SetPositionLat added in v0.4.0

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

SetPositionLat sets GpsMetadata value.

Units: semicircles

func (*GpsMetadata) SetPositionLong added in v0.4.0

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

SetPositionLong sets GpsMetadata value.

Units: semicircles

func (*GpsMetadata) SetTimestamp added in v0.4.0

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

SetTimestamp sets GpsMetadata 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 GpsMetadata value.

Units: ms; Millisecond part of the timestamp.

func (*GpsMetadata) SetUtcTimestamp added in v0.4.0

func (m *GpsMetadata) SetUtcTimestamp(v time.Time) *GpsMetadata

SetUtcTimestamp sets GpsMetadata 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 []int16) *GpsMetadata

SetVelocity sets GpsMetadata 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) 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) VelocityScaled added in v0.8.0

func (m *GpsMetadata) VelocityScaled() []float64

VelocityScaled return Velocity in its scaled value [Array: [3]; Scale: 100; Units: m/s; velocity[0] is lon velocity. Velocity[1] is lat velocity. Velocity[2] is altitude velocity.].

If Velocity value is invalid, nil will be returned.

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 corrosponding 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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

GyroscopeData is a GyroscopeData message.

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 GyroscopeData 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 GyroscopeData 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 GyroscopeData 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 GyroscopeData's DeveloperFields.

func (*GyroscopeData) SetGyroX added in v0.4.0

func (m *GyroscopeData) SetGyroX(v []uint16) *GyroscopeData

SetGyroX sets GyroscopeData 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 GyroscopeData 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 GyroscopeData 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 GyroscopeData value.

Array: [N]; Units: ms; Each time in the array describes the time at which the gyro sample with the corrosponding 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 GyroscopeData 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 GyroscopeData value.

Units: ms; Millisecond part of the timestamp.

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

	IsExpandedFields [10]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Hr is a Hr message.

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 [Array: [N]; Scale: 1024; Units: s].

If EventTimestamp value is invalid, nil will be returned.

func (*Hr) FractionalTimestampScaled added in v0.8.0

func (m *Hr) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value [Scale: 32768; Units: s].

If FractionalTimestamp value is invalid, float64 invalid value will be returned.

func (*Hr) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Hr's DeveloperFields.

func (*Hr) SetEventTimestamp added in v0.4.0

func (m *Hr) SetEventTimestamp(v []uint32) *Hr

SetEventTimestamp sets Hr value.

Array: [N]; Scale: 1024; Units: s

func (*Hr) SetEventTimestamp12 added in v0.4.0

func (m *Hr) SetEventTimestamp12(v []byte) *Hr

SetEventTimestamp12 sets Hr value.

Array: [N]; Units: s

func (*Hr) SetFilteredBpm added in v0.4.0

func (m *Hr) SetFilteredBpm(v []uint8) *Hr

SetFilteredBpm sets Hr value.

Array: [N]; Units: bpm

func (*Hr) SetFractionalTimestamp added in v0.4.0

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

SetFractionalTimestamp sets Hr value.

Scale: 32768; Units: s

func (*Hr) SetTime256 added in v0.4.0

func (m *Hr) SetTime256(v uint8) *Hr

SetTime256 sets Hr value.

Scale: 256; Units: s

func (*Hr) SetTimestamp added in v0.4.0

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

SetTimestamp sets Hr value.

func (*Hr) Time256Scaled added in v0.8.0

func (m *Hr) Time256Scaled() float64

Time256Scaled return Time256 in its scaled value [Scale: 256; Units: s].

If Time256 value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HrZone is a HrZone message.

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 HrZone's DeveloperFields.

func (*HrZone) SetHighBpm added in v0.4.0

func (m *HrZone) SetHighBpm(v uint8) *HrZone

SetHighBpm sets HrZone value.

Units: bpm

func (*HrZone) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets HrZone value.

func (*HrZone) SetName added in v0.4.0

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

SetName sets HrZone value.

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
	HrmAntIdTransType uint8
	Enabled           bool
	LogHrv            bool

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HrmProfile is a HrmProfile message.

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 HrmProfile's DeveloperFields.

func (*HrmProfile) SetEnabled added in v0.4.0

func (m *HrmProfile) SetEnabled(v bool) *HrmProfile

SetEnabled sets HrmProfile value.

func (*HrmProfile) SetHrmAntId added in v0.4.0

func (m *HrmProfile) SetHrmAntId(v uint16) *HrmProfile

SetHrmAntId sets HrmProfile value.

func (*HrmProfile) SetHrmAntIdTransType added in v0.4.0

func (m *HrmProfile) SetHrmAntIdTransType(v uint8) *HrmProfile

SetHrmAntIdTransType sets HrmProfile value.

func (*HrmProfile) SetLogHrv added in v0.4.0

func (m *HrmProfile) SetLogHrv(v bool) *HrmProfile

SetLogHrv sets HrmProfile value.

func (*HrmProfile) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets HrmProfile value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Hrv is a Hrv message.

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 Hrv's DeveloperFields.

func (*Hrv) SetTime added in v0.4.0

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

SetTime sets Hrv value.

Array: [N]; Scale: 1000; Units: s; Time between beats

func (*Hrv) TimeScaled added in v0.8.0

func (m *Hrv) TimeScaled() []float64

TimeScaled return Time in its scaled value [Array: [N]; Scale: 1000; Units: s; Time between beats].

If Time value is invalid, nil will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HrvStatusSummary is a HrvStatusSummary message.

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 [Scale: 128; Units: ms; 3 week baseline, lower boundary of balanced HRV status].

If BaselineBalancedLower value is invalid, float64 invalid value will be returned.

func (*HrvStatusSummary) BaselineBalancedUpperScaled added in v0.8.0

func (m *HrvStatusSummary) BaselineBalancedUpperScaled() float64

BaselineBalancedUpperScaled return BaselineBalancedUpper in its scaled value [Scale: 128; Units: ms; 3 week baseline, upper boundary of balanced HRV status].

If BaselineBalancedUpper value is invalid, float64 invalid value will be returned.

func (*HrvStatusSummary) BaselineLowUpperScaled added in v0.8.0

func (m *HrvStatusSummary) BaselineLowUpperScaled() float64

BaselineLowUpperScaled return BaselineLowUpper in its scaled value [Scale: 128; Units: ms; 3 week baseline, upper boundary of low HRV status].

If BaselineLowUpper value is invalid, float64 invalid value will be returned.

func (*HrvStatusSummary) LastNight5MinHighScaled added in v0.8.0

func (m *HrvStatusSummary) LastNight5MinHighScaled() float64

LastNight5MinHighScaled return LastNight5MinHigh in its scaled value [Scale: 128; Units: ms; 5 minute high RMSSD value over sleep].

If LastNight5MinHigh value is invalid, float64 invalid value will be returned.

func (*HrvStatusSummary) LastNightAverageScaled added in v0.8.0

func (m *HrvStatusSummary) LastNightAverageScaled() float64

LastNightAverageScaled return LastNightAverage in its scaled value [Scale: 128; Units: ms; Last night RMSSD average over sleep].

If LastNightAverage value is invalid, float64 invalid value will be returned.

func (*HrvStatusSummary) SetBaselineBalancedLower added in v0.4.0

func (m *HrvStatusSummary) SetBaselineBalancedLower(v uint16) *HrvStatusSummary

SetBaselineBalancedLower sets HrvStatusSummary value.

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 HrvStatusSummary value.

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 HrvStatusSummary value.

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 HrvStatusSummary's DeveloperFields.

func (*HrvStatusSummary) SetLastNight5MinHigh added in v0.4.0

func (m *HrvStatusSummary) SetLastNight5MinHigh(v uint16) *HrvStatusSummary

SetLastNight5MinHigh sets HrvStatusSummary value.

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 HrvStatusSummary value.

Scale: 128; Units: ms; Last night RMSSD average over sleep

func (*HrvStatusSummary) SetStatus added in v0.4.0

SetStatus sets HrvStatusSummary value.

func (*HrvStatusSummary) SetTimestamp added in v0.4.0

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

SetTimestamp sets HrvStatusSummary value.

func (*HrvStatusSummary) SetWeeklyAverage added in v0.4.0

func (m *HrvStatusSummary) SetWeeklyAverage(v uint16) *HrvStatusSummary

SetWeeklyAverage sets HrvStatusSummary value.

Scale: 128; Units: ms; 7 day RMSSD average over sleep

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 [Scale: 128; Units: ms; 7 day RMSSD average over sleep].

If WeeklyAverage value is invalid, float64 invalid value will be returned.

type HrvValue

type HrvValue struct {
	Timestamp time.Time
	Value     uint16 // Scale: 128; Units: ms; 5 minute RMSSD

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HrvValue is a HrvValue message.

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 HrvValue's DeveloperFields.

func (*HrvValue) SetTimestamp added in v0.4.0

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

SetTimestamp sets HrvValue value.

func (*HrvValue) SetValue added in v0.4.0

func (m *HrvValue) SetValue(v uint16) *HrvValue

SetValue sets HrvValue value.

Scale: 128; Units: ms; 5 minute RMSSD

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 [Scale: 128; Units: ms; 5 minute RMSSD].

If Value value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaAccelerometerData is a HsaAccelerometerData message.

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 [Array: [N]; Scale: 1.024; Units: mG; X-Axis Measurement].

If AccelX value is invalid, nil will be returned.

func (*HsaAccelerometerData) AccelYScaled added in v0.10.0

func (m *HsaAccelerometerData) AccelYScaled() []float64

AccelYScaled return AccelY in its scaled value [Array: [N]; Scale: 1.024; Units: mG; Y-Axis Measurement].

If AccelY value is invalid, nil will be returned.

func (*HsaAccelerometerData) AccelZScaled added in v0.10.0

func (m *HsaAccelerometerData) AccelZScaled() []float64

AccelZScaled return AccelZ in its scaled value [Array: [N]; Scale: 1.024; Units: mG; Z-Axis Measurement].

If AccelZ value is invalid, nil will be returned.

func (*HsaAccelerometerData) SetAccelX added in v0.10.0

func (m *HsaAccelerometerData) SetAccelX(v []int16) *HsaAccelerometerData

SetAccelX sets HsaAccelerometerData value.

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 HsaAccelerometerData value.

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 HsaAccelerometerData value.

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 HsaAccelerometerData's DeveloperFields.

func (*HsaAccelerometerData) SetSamplingInterval added in v0.10.0

func (m *HsaAccelerometerData) SetSamplingInterval(v uint16) *HsaAccelerometerData

SetSamplingInterval sets HsaAccelerometerData 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 HsaAccelerometerData value.

Units: s

func (*HsaAccelerometerData) SetTimestamp32K added in v0.10.0

func (m *HsaAccelerometerData) SetTimestamp32K(v uint32) *HsaAccelerometerData

SetTimestamp32K sets HsaAccelerometerData value.

32 kHz timestamp

func (*HsaAccelerometerData) SetTimestampMs added in v0.10.0

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

SetTimestampMs sets HsaAccelerometerData value.

Units: ms; Millisecond resolution of the timestamp

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
	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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaBodyBatteryData is a HsaBodyBatteryData message.

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 HsaBodyBatteryData value.

Array: [N]; Body battery charged value

func (*HsaBodyBatteryData) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields HsaBodyBatteryData's DeveloperFields.

func (*HsaBodyBatteryData) SetLevel added in v0.10.0

func (m *HsaBodyBatteryData) SetLevel(v []int8) *HsaBodyBatteryData

SetLevel sets HsaBodyBatteryData value.

Array: [N]; Units: percent; Body battery level

func (*HsaBodyBatteryData) SetProcessingInterval added in v0.10.0

func (m *HsaBodyBatteryData) SetProcessingInterval(v uint16) *HsaBodyBatteryData

SetProcessingInterval sets HsaBodyBatteryData 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 HsaBodyBatteryData value.

Units: s

func (*HsaBodyBatteryData) SetUncharged added in v0.10.0

func (m *HsaBodyBatteryData) SetUncharged(v []int16) *HsaBodyBatteryData

SetUncharged sets HsaBodyBatteryData value.

Array: [N]; Body battery uncharged value

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]
	DataSize  uint8     // Size in bytes of data field

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaConfigurationData is a HsaConfigurationData message.

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 HsaConfigurationData value.

Array: [N]

func (*HsaConfigurationData) SetDataSize added in v0.10.0

func (m *HsaConfigurationData) SetDataSize(v uint8) *HsaConfigurationData

SetDataSize sets HsaConfigurationData value.

Size in bytes of data field

func (*HsaConfigurationData) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields HsaConfigurationData's DeveloperFields.

func (*HsaConfigurationData) SetTimestamp added in v0.10.0

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

SetTimestamp sets HsaConfigurationData value.

Units: s; Encoded configuration data

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaEvent is a HsaEvent message.

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 HsaEvent's DeveloperFields.

func (*HsaEvent) SetEventId added in v0.10.0

func (m *HsaEvent) SetEventId(v uint8) *HsaEvent

SetEventId sets HsaEvent value.

Event ID

func (*HsaEvent) SetTimestamp added in v0.10.0

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

SetTimestamp sets HsaEvent value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaGyroscopeData is a HsaGyroscopeData message.

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 [Array: [N]; Scale: 28.57143; Units: deg/s; X-Axis Measurement].

If GyroX value is invalid, nil will be returned.

func (*HsaGyroscopeData) GyroYScaled added in v0.10.0

func (m *HsaGyroscopeData) GyroYScaled() []float64

GyroYScaled return GyroY in its scaled value [Array: [N]; Scale: 28.57143; Units: deg/s; Y-Axis Measurement].

If GyroY value is invalid, nil will be returned.

func (*HsaGyroscopeData) GyroZScaled added in v0.10.0

func (m *HsaGyroscopeData) GyroZScaled() []float64

GyroZScaled return GyroZ in its scaled value [Array: [N]; Scale: 28.57143; Units: deg/s; Z-Axis Measurement].

If GyroZ value is invalid, nil will be returned.

func (*HsaGyroscopeData) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields HsaGyroscopeData's DeveloperFields.

func (*HsaGyroscopeData) SetGyroX added in v0.10.0

func (m *HsaGyroscopeData) SetGyroX(v []int16) *HsaGyroscopeData

SetGyroX sets HsaGyroscopeData value.

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 HsaGyroscopeData value.

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 HsaGyroscopeData value.

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 HsaGyroscopeData 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 HsaGyroscopeData value.

Units: s

func (*HsaGyroscopeData) SetTimestamp32K added in v0.10.0

func (m *HsaGyroscopeData) SetTimestamp32K(v uint32) *HsaGyroscopeData

SetTimestamp32K sets HsaGyroscopeData 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 HsaGyroscopeData value.

Units: ms; Millisecond resolution of the timestamp

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
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds
	Status             uint8     // Status of measurements in buffer - 0 indicates SEARCHING 1 indicates LOCKED

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaHeartRateData is a HsaHeartRateData message.

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 HsaHeartRateData's DeveloperFields.

func (*HsaHeartRateData) SetHeartRate added in v0.10.0

func (m *HsaHeartRateData) SetHeartRate(v []uint8) *HsaHeartRateData

SetHeartRate sets HsaHeartRateData value.

Array: [N]; Units: bpm; Beats / min

func (*HsaHeartRateData) SetProcessingInterval added in v0.10.0

func (m *HsaHeartRateData) SetProcessingInterval(v uint16) *HsaHeartRateData

SetProcessingInterval sets HsaHeartRateData 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 HsaHeartRateData 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 HsaHeartRateData value.

Units: s

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 * 100 /min -300 indicates invalid -200 indicates large motion -100 indicates off wrist
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaRespirationData is a HsaRespirationData message.

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 [Array: [N]; Scale: 100; Units: breaths/min; Breaths * 100 /min -300 indicates invalid -200 indicates large motion -100 indicates off wrist].

If RespirationRate value is invalid, nil will be returned.

func (*HsaRespirationData) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields HsaRespirationData's DeveloperFields.

func (*HsaRespirationData) SetProcessingInterval added in v0.10.0

func (m *HsaRespirationData) SetProcessingInterval(v uint16) *HsaRespirationData

SetProcessingInterval sets HsaRespirationData 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 HsaRespirationData value.

Array: [N]; Scale: 100; Units: breaths/min; Breaths * 100 /min -300 indicates invalid -200 indicates large motion -100 indicates off wrist

func (*HsaRespirationData) SetTimestamp added in v0.10.0

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

SetTimestamp sets HsaRespirationData value.

Units: s

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
	Confidence         []uint8   // Array: [N]; SpO2 Confidence
	ProcessingInterval uint16    // Units: s; Processing interval length in seconds

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaSpo2Data is a HsaSpo2Data message.

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 HsaSpo2Data value.

Array: [N]; SpO2 Confidence

func (*HsaSpo2Data) SetDeveloperFields added in v0.10.0

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

SetDeveloperFields HsaSpo2Data's DeveloperFields.

func (*HsaSpo2Data) SetProcessingInterval added in v0.10.0

func (m *HsaSpo2Data) SetProcessingInterval(v uint16) *HsaSpo2Data

SetProcessingInterval sets HsaSpo2Data 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 HsaSpo2Data value.

Array: [N]; Units: percent; SpO2 Reading

func (*HsaSpo2Data) SetTimestamp added in v0.10.0

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

SetTimestamp sets HsaSpo2Data value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaStepData is a HsaStepData message.

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 HsaStepData's DeveloperFields.

func (*HsaStepData) SetProcessingInterval added in v0.10.0

func (m *HsaStepData) SetProcessingInterval(v uint16) *HsaStepData

SetProcessingInterval sets HsaStepData value.

Units: s; Processing interval length in seconds

func (*HsaStepData) SetSteps added in v0.10.0

func (m *HsaStepData) SetSteps(v []uint32) *HsaStepData

SetSteps sets HsaStepData 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 HsaStepData value.

Units: s

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 ) -300 indicates invalid -200 indicates large motion -100 indicates off wrist
	ProcessingInterval uint16 // Units: s; Processing interval length in seconds

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaStressData is a HsaStressData message.

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 HsaStressData's DeveloperFields.

func (*HsaStressData) SetProcessingInterval added in v0.10.0

func (m *HsaStressData) SetProcessingInterval(v uint16) *HsaStressData

SetProcessingInterval sets HsaStressData 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 HsaStressData value.

Array: [N]; Units: s; Stress Level ( 0 - 100 ) -300 indicates invalid -200 indicates large motion -100 indicates off wrist

func (*HsaStressData) SetTimestamp added in v0.10.0

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

SetTimestamp sets HsaStressData value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

HsaWristTemperatureData is a HsaWristTemperatureData message.

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 HsaWristTemperatureData's DeveloperFields.

func (*HsaWristTemperatureData) SetProcessingInterval added in v0.10.0

func (m *HsaWristTemperatureData) SetProcessingInterval(v uint16) *HsaWristTemperatureData

SetProcessingInterval sets HsaWristTemperatureData value.

Units: s; Processing interval length in seconds

func (*HsaWristTemperatureData) SetTimestamp added in v0.10.0

SetTimestamp sets HsaWristTemperatureData value.

Units: s

func (*HsaWristTemperatureData) SetValue added in v0.10.0

SetValue sets HsaWristTemperatureData value.

Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading

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 [Array: [N]; Scale: 1000; Units: degC; Wrist temperature reading].

If Value value is invalid, nil will be returned.

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

	IsExpandedFields [9]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Jump is a Jump message.

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 [Scale: 1000; Units: m/s].

If EnhancedSpeed 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 Jump's DeveloperFields.

func (*Jump) SetDistance added in v0.4.0

func (m *Jump) SetDistance(v float32) *Jump

SetDistance sets Jump value.

Units: m

func (*Jump) SetEnhancedSpeed added in v0.4.0

func (m *Jump) SetEnhancedSpeed(v uint32) *Jump

SetEnhancedSpeed sets Jump value.

Scale: 1000; Units: m/s

func (*Jump) SetHangTime added in v0.4.0

func (m *Jump) SetHangTime(v float32) *Jump

SetHangTime sets Jump value.

Units: s

func (*Jump) SetHeight added in v0.4.0

func (m *Jump) SetHeight(v float32) *Jump

SetHeight sets Jump value.

Units: m

func (*Jump) SetPositionLat added in v0.4.0

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

SetPositionLat sets Jump value.

Units: semicircles

func (*Jump) SetPositionLong added in v0.4.0

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

SetPositionLong sets Jump value.

Units: semicircles

func (*Jump) SetRotations added in v0.4.0

func (m *Jump) SetRotations(v uint8) *Jump

SetRotations sets Jump value.

func (*Jump) SetScore added in v0.4.0

func (m *Jump) SetScore(v float32) *Jump

SetScore sets Jump 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 Jump value.

Scale: 1000; Units: m/s

func (*Jump) SetTimestamp added in v0.4.0

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

SetTimestamp sets Jump value.

Units: s

func (*Jump) SpeedScaled added in v0.8.0

func (m *Jump) SpeedScaled() float64

SpeedScaled return Speed in its scaled value [Scale: 1000; Units: m/s].

If Speed value is invalid, float64 invalid value will be returned.

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

	IsExpandedFields [138]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Lap is a Lap message.

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 [Scale: 5; Offset: 500; Units: m].

If AvgAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Lap) AvgCoreTemperatureScaled added in v0.8.0

func (m *Lap) AvgCoreTemperatureScaled() float64

AvgCoreTemperatureScaled return AvgCoreTemperature in its scaled value [Scale: 100; Units: C].

If AvgCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Lap) AvgDepthScaled added in v0.8.0

func (m *Lap) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If AvgDepth value is invalid, float64 invalid value will be returned.

func (*Lap) AvgFractionalCadenceScaled added in v0.8.0

func (m *Lap) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the avg_cadence].

If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

func (*Lap) AvgGradeScaled added in v0.8.0

func (m *Lap) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value [Scale: 100; Units: %].

If AvgGrade value is invalid, float64 invalid value will be returned.

func (*Lap) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Lap) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *Lap) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.].

If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

func (*Lap) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *Lap) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.].

If AvgLeftPowerPhase value is invalid, nil will be returned.

func (*Lap) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *Lap) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Lap) AvgNegGradeScaled added in v0.8.0

func (m *Lap) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value [Scale: 100; Units: %].

If AvgNegGrade value is invalid, float64 invalid value will be returned.

func (*Lap) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *Lap) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) AvgPosGradeScaled added in v0.8.0

func (m *Lap) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value [Scale: 100; Units: %].

If AvgPosGrade value is invalid, float64 invalid value will be returned.

func (*Lap) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *Lap) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *Lap) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Lap) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *Lap) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.].

If AvgRightPowerPhasePeak value is invalid, nil will be returned.

func (*Lap) AvgRightPowerPhaseScaled added in v0.8.0

func (m *Lap) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.].

If AvgRightPowerPhase value is invalid, nil will be returned.

func (*Lap) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *Lap) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Lap) AvgSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) AvgSaturatedHemoglobinPercentScaled() []float64

AvgSaturatedHemoglobinPercentScaled return AvgSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen].

If AvgSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Lap) AvgSpeedScaled added in v0.8.0

func (m *Lap) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) AvgStanceTimeBalanceScaled added in v0.8.0

func (m *Lap) AvgStanceTimeBalanceScaled() float64

AvgStanceTimeBalanceScaled return AvgStanceTimeBalance in its scaled value [Scale: 100; Units: percent].

If AvgStanceTimeBalance value is invalid, float64 invalid value will be returned.

func (*Lap) AvgStanceTimePercentScaled added in v0.8.0

func (m *Lap) AvgStanceTimePercentScaled() float64

AvgStanceTimePercentScaled return AvgStanceTimePercent in its scaled value [Scale: 100; Units: percent].

If AvgStanceTimePercent value is invalid, float64 invalid value will be returned.

func (*Lap) AvgStanceTimeScaled added in v0.8.0

func (m *Lap) AvgStanceTimeScaled() float64

AvgStanceTimeScaled return AvgStanceTime in its scaled value [Scale: 10; Units: ms].

If AvgStanceTime value is invalid, float64 invalid value will be returned.

func (*Lap) AvgStepLengthScaled added in v0.8.0

func (m *Lap) AvgStepLengthScaled() float64

AvgStepLengthScaled return AvgStepLength in its scaled value [Scale: 10; Units: mm].

If AvgStepLength value is invalid, float64 invalid value will be returned.

func (*Lap) AvgStrokeDistanceScaled added in v0.8.0

func (m *Lap) AvgStrokeDistanceScaled() float64

AvgStrokeDistanceScaled return AvgStrokeDistance in its scaled value [Scale: 100; Units: m].

If AvgStrokeDistance value is invalid, float64 invalid value will be returned.

func (*Lap) AvgTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) AvgTotalHemoglobinConcScaled() []float64

AvgTotalHemoglobinConcScaled return AvgTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin].

If AvgTotalHemoglobinConc value is invalid, nil will be returned.

func (*Lap) AvgVamScaled added in v0.8.0

func (m *Lap) AvgVamScaled() float64

AvgVamScaled return AvgVam in its scaled value [Scale: 1000; Units: m/s].

If AvgVam value is invalid, float64 invalid value will be returned.

func (*Lap) AvgVerticalOscillationScaled added in v0.8.0

func (m *Lap) AvgVerticalOscillationScaled() float64

AvgVerticalOscillationScaled return AvgVerticalOscillation in its scaled value [Scale: 10; Units: mm].

If AvgVerticalOscillation value is invalid, float64 invalid value will be returned.

func (*Lap) AvgVerticalRatioScaled added in v0.8.0

func (m *Lap) AvgVerticalRatioScaled() float64

AvgVerticalRatioScaled return AvgVerticalRatio in its scaled value [Scale: 100; Units: percent].

If AvgVerticalRatio 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 [Scale: 5; Offset: 500; Units: m].

If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Lap) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedAvgSpeedScaled added in v0.8.0

func (m *Lap) EnhancedAvgSpeedScaled() float64

EnhancedAvgSpeedScaled return EnhancedAvgSpeed in its scaled value [Scale: 1000; Units: m/s].

If EnhancedAvgSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *Lap) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Lap) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedMaxSpeedScaled added in v0.8.0

func (m *Lap) EnhancedMaxSpeedScaled() float64

EnhancedMaxSpeedScaled return EnhancedMaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If EnhancedMaxSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) EnhancedMinAltitudeScaled added in v0.8.0

func (m *Lap) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) LevBatteryConsumptionScaled added in v0.8.0

func (m *Lap) LevBatteryConsumptionScaled() float64

LevBatteryConsumptionScaled return LevBatteryConsumption in its scaled value [Scale: 2; Units: percent; lev battery consumption during lap].

If LevBatteryConsumption value is invalid, float64 invalid value will be returned.

func (*Lap) MaxAltitudeScaled added in v0.8.0

func (m *Lap) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MaxAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) MaxCoreTemperatureScaled added in v0.8.0

func (m *Lap) MaxCoreTemperatureScaled() float64

MaxCoreTemperatureScaled return MaxCoreTemperature in its scaled value [Scale: 100; Units: C].

If MaxCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Lap) MaxDepthScaled added in v0.8.0

func (m *Lap) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If MaxDepth value is invalid, float64 invalid value will be returned.

func (*Lap) MaxFractionalCadenceScaled added in v0.8.0

func (m *Lap) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the max_cadence].

If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

func (*Lap) MaxNegGradeScaled added in v0.8.0

func (m *Lap) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value [Scale: 100; Units: %].

If MaxNegGrade value is invalid, float64 invalid value will be returned.

func (*Lap) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *Lap) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) MaxPosGradeScaled added in v0.8.0

func (m *Lap) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value [Scale: 100; Units: %].

If MaxPosGrade value is invalid, float64 invalid value will be returned.

func (*Lap) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *Lap) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) MaxSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) MaxSaturatedHemoglobinPercentScaled() []float64

MaxSaturatedHemoglobinPercentScaled return MaxSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen].

If MaxSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Lap) MaxSpeedScaled added in v0.8.0

func (m *Lap) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*Lap) MaxTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) MaxTotalHemoglobinConcScaled() []float64

MaxTotalHemoglobinConcScaled return MaxTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin].

If MaxTotalHemoglobinConc value is invalid, nil will be returned.

func (*Lap) MinAltitudeScaled added in v0.8.0

func (m *Lap) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MinAltitude value is invalid, float64 invalid value will be returned.

func (*Lap) MinCoreTemperatureScaled added in v0.8.0

func (m *Lap) MinCoreTemperatureScaled() float64

MinCoreTemperatureScaled return MinCoreTemperature in its scaled value [Scale: 100; Units: C].

If MinCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Lap) MinSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Lap) MinSaturatedHemoglobinPercentScaled() []float64

MinSaturatedHemoglobinPercentScaled return MinSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen].

If MinSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Lap) MinTotalHemoglobinConcScaled added in v0.8.0

func (m *Lap) MinTotalHemoglobinConcScaled() []float64

MinTotalHemoglobinConcScaled return MinTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin].

If MinTotalHemoglobinConc value is invalid, nil will be returned.

func (*Lap) SetAvgAltitude added in v0.4.0

func (m *Lap) SetAvgAltitude(v uint16) *Lap

SetAvgAltitude sets Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetAvgCadence added in v0.4.0

func (m *Lap) SetAvgCadence(v uint8) *Lap

SetAvgCadence sets Lap 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 Lap 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 Lap value.

Scale: 2; Units: percent

func (*Lap) SetAvgCoreTemperature added in v0.4.0

func (m *Lap) SetAvgCoreTemperature(v uint16) *Lap

SetAvgCoreTemperature sets Lap value.

Scale: 100; Units: C

func (*Lap) SetAvgDepth added in v0.4.0

func (m *Lap) SetAvgDepth(v uint32) *Lap

SetAvgDepth sets Lap value.

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 Lap 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 Lap value.

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 Lap value.

Scale: 100; Units: %

func (*Lap) SetAvgGrit added in v0.4.0

func (m *Lap) SetAvgGrit(v float32) *Lap

SetAvgGrit sets Lap 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 Lap value.

Units: bpm

func (*Lap) SetAvgLeftPco added in v0.4.0

func (m *Lap) SetAvgLeftPco(v int8) *Lap

SetAvgLeftPco sets Lap 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 Lap value.

Scale: 2; Units: percent

func (*Lap) SetAvgLeftPowerPhase added in v0.4.0

func (m *Lap) SetAvgLeftPowerPhase(v []uint8) *Lap

SetAvgLeftPowerPhase sets Lap 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 Lap value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak 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 Lap value.

Scale: 2; Units: percent

func (*Lap) SetAvgLevMotorPower added in v0.4.0

func (m *Lap) SetAvgLevMotorPower(v uint16) *Lap

SetAvgLevMotorPower sets Lap 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 Lap value.

Scale: 100; Units: %

func (*Lap) SetAvgNegVerticalSpeed added in v0.4.0

func (m *Lap) SetAvgNegVerticalSpeed(v int16) *Lap

SetAvgNegVerticalSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgPosGrade added in v0.4.0

func (m *Lap) SetAvgPosGrade(v int16) *Lap

SetAvgPosGrade sets Lap value.

Scale: 100; Units: %

func (*Lap) SetAvgPosVerticalSpeed added in v0.4.0

func (m *Lap) SetAvgPosVerticalSpeed(v int16) *Lap

SetAvgPosVerticalSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgPower added in v0.4.0

func (m *Lap) SetAvgPower(v uint16) *Lap

SetAvgPower sets Lap 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 Lap 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 Lap value.

func (*Lap) SetAvgRightPco added in v0.4.0

func (m *Lap) SetAvgRightPco(v int8) *Lap

SetAvgRightPco sets Lap 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 Lap value.

Scale: 2; Units: percent

func (*Lap) SetAvgRightPowerPhase added in v0.4.0

func (m *Lap) SetAvgRightPowerPhase(v []uint8) *Lap

SetAvgRightPowerPhase sets Lap 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 Lap value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak 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 Lap value.

Scale: 2; Units: percent

func (*Lap) SetAvgSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetAvgSaturatedHemoglobinPercent(v []uint16) *Lap

SetAvgSaturatedHemoglobinPercent sets Lap value.

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 Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgStanceTime added in v0.4.0

func (m *Lap) SetAvgStanceTime(v uint16) *Lap

SetAvgStanceTime sets Lap value.

Scale: 10; Units: ms

func (*Lap) SetAvgStanceTimeBalance added in v0.4.0

func (m *Lap) SetAvgStanceTimeBalance(v uint16) *Lap

SetAvgStanceTimeBalance sets Lap value.

Scale: 100; Units: percent

func (*Lap) SetAvgStanceTimePercent added in v0.4.0

func (m *Lap) SetAvgStanceTimePercent(v uint16) *Lap

SetAvgStanceTimePercent sets Lap value.

Scale: 100; Units: percent

func (*Lap) SetAvgStepLength added in v0.4.0

func (m *Lap) SetAvgStepLength(v uint16) *Lap

SetAvgStepLength sets Lap value.

Scale: 10; Units: mm

func (*Lap) SetAvgStrokeDistance added in v0.4.0

func (m *Lap) SetAvgStrokeDistance(v uint16) *Lap

SetAvgStrokeDistance sets Lap value.

Scale: 100; Units: m

func (*Lap) SetAvgTemperature added in v0.4.0

func (m *Lap) SetAvgTemperature(v int8) *Lap

SetAvgTemperature sets Lap value.

Units: C

func (*Lap) SetAvgTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetAvgTotalHemoglobinConc(v []uint16) *Lap

SetAvgTotalHemoglobinConc sets Lap value.

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 Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetAvgVerticalOscillation added in v0.4.0

func (m *Lap) SetAvgVerticalOscillation(v uint16) *Lap

SetAvgVerticalOscillation sets Lap value.

Scale: 10; Units: mm

func (*Lap) SetAvgVerticalRatio added in v0.4.0

func (m *Lap) SetAvgVerticalRatio(v uint16) *Lap

SetAvgVerticalRatio sets Lap value.

Scale: 100; Units: percent

func (*Lap) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Lap's DeveloperFields.

func (*Lap) SetEndPositionLat added in v0.4.0

func (m *Lap) SetEndPositionLat(v int32) *Lap

SetEndPositionLat sets Lap value.

Units: semicircles

func (*Lap) SetEndPositionLong added in v0.4.0

func (m *Lap) SetEndPositionLong(v int32) *Lap

SetEndPositionLong sets Lap value.

Units: semicircles

func (*Lap) SetEnhancedAvgAltitude added in v0.4.0

func (m *Lap) SetEnhancedAvgAltitude(v uint32) *Lap

SetEnhancedAvgAltitude sets Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Lap) SetEnhancedAvgRespirationRate(v uint16) *Lap

SetEnhancedAvgRespirationRate sets Lap value.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedAvgSpeed added in v0.4.0

func (m *Lap) SetEnhancedAvgSpeed(v uint32) *Lap

SetEnhancedAvgSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedMaxAltitude added in v0.4.0

func (m *Lap) SetEnhancedMaxAltitude(v uint32) *Lap

SetEnhancedMaxAltitude sets Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Lap) SetEnhancedMaxRespirationRate(v uint16) *Lap

SetEnhancedMaxRespirationRate sets Lap value.

Scale: 100; Units: Breaths/min

func (*Lap) SetEnhancedMaxSpeed added in v0.4.0

func (m *Lap) SetEnhancedMaxSpeed(v uint32) *Lap

SetEnhancedMaxSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetEnhancedMinAltitude added in v0.4.0

func (m *Lap) SetEnhancedMinAltitude(v uint32) *Lap

SetEnhancedMinAltitude sets Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetEvent added in v0.4.0

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

SetEvent sets Lap value.

func (*Lap) SetEventGroup added in v0.4.0

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

SetEventGroup sets Lap value.

func (*Lap) SetEventType added in v0.4.0

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

SetEventType sets Lap value.

func (*Lap) SetFirstLengthIndex added in v0.4.0

func (m *Lap) SetFirstLengthIndex(v uint16) *Lap

SetFirstLengthIndex sets Lap value.

func (*Lap) SetGpsAccuracy added in v0.4.0

func (m *Lap) SetGpsAccuracy(v uint8) *Lap

SetGpsAccuracy sets Lap value.

Units: m

func (*Lap) SetIntensity added in v0.4.0

func (m *Lap) SetIntensity(v typedef.Intensity) *Lap

SetIntensity sets Lap value.

func (*Lap) SetJumpCount added in v0.4.0

func (m *Lap) SetJumpCount(v uint16) *Lap

SetJumpCount sets Lap value.

func (*Lap) SetLapTrigger added in v0.4.0

func (m *Lap) SetLapTrigger(v typedef.LapTrigger) *Lap

SetLapTrigger sets Lap value.

func (*Lap) SetLeftRightBalance added in v0.4.0

func (m *Lap) SetLeftRightBalance(v typedef.LeftRightBalance100) *Lap

SetLeftRightBalance sets Lap value.

func (*Lap) SetLevBatteryConsumption added in v0.4.0

func (m *Lap) SetLevBatteryConsumption(v uint8) *Lap

SetLevBatteryConsumption sets Lap value.

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 Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMaxCadence added in v0.4.0

func (m *Lap) SetMaxCadence(v uint8) *Lap

SetMaxCadence sets Lap value.

Units: rpm

func (*Lap) SetMaxCadencePosition added in v0.4.0

func (m *Lap) SetMaxCadencePosition(v []uint8) *Lap

SetMaxCadencePosition sets Lap 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 Lap value.

Scale: 100; Units: C

func (*Lap) SetMaxDepth added in v0.4.0

func (m *Lap) SetMaxDepth(v uint32) *Lap

SetMaxDepth sets Lap value.

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 Lap value.

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 Lap value.

Units: bpm

func (*Lap) SetMaxLevMotorPower added in v0.4.0

func (m *Lap) SetMaxLevMotorPower(v uint16) *Lap

SetMaxLevMotorPower sets Lap 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 Lap value.

Scale: 100; Units: %

func (*Lap) SetMaxNegVerticalSpeed added in v0.4.0

func (m *Lap) SetMaxNegVerticalSpeed(v int16) *Lap

SetMaxNegVerticalSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxPosGrade added in v0.4.0

func (m *Lap) SetMaxPosGrade(v int16) *Lap

SetMaxPosGrade sets Lap value.

Scale: 100; Units: %

func (*Lap) SetMaxPosVerticalSpeed added in v0.4.0

func (m *Lap) SetMaxPosVerticalSpeed(v int16) *Lap

SetMaxPosVerticalSpeed sets Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxPower added in v0.4.0

func (m *Lap) SetMaxPower(v uint16) *Lap

SetMaxPower sets Lap value.

Units: watts

func (*Lap) SetMaxPowerPosition added in v0.4.0

func (m *Lap) SetMaxPowerPosition(v []uint16) *Lap

SetMaxPowerPosition sets Lap 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 Lap value.

func (*Lap) SetMaxSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetMaxSaturatedHemoglobinPercent(v []uint16) *Lap

SetMaxSaturatedHemoglobinPercent sets Lap value.

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 Lap value.

Scale: 1000; Units: m/s

func (*Lap) SetMaxTemperature added in v0.4.0

func (m *Lap) SetMaxTemperature(v int8) *Lap

SetMaxTemperature sets Lap value.

Units: C

func (*Lap) SetMaxTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetMaxTotalHemoglobinConc(v []uint16) *Lap

SetMaxTotalHemoglobinConc sets Lap value.

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 Lap value.

func (*Lap) SetMinAltitude added in v0.4.0

func (m *Lap) SetMinAltitude(v uint16) *Lap

SetMinAltitude sets Lap value.

Scale: 5; Offset: 500; Units: m

func (*Lap) SetMinCoreTemperature added in v0.4.0

func (m *Lap) SetMinCoreTemperature(v uint16) *Lap

SetMinCoreTemperature sets Lap value.

Scale: 100; Units: C

func (*Lap) SetMinHeartRate added in v0.4.0

func (m *Lap) SetMinHeartRate(v uint8) *Lap

SetMinHeartRate sets Lap value.

Units: bpm

func (*Lap) SetMinSaturatedHemoglobinPercent added in v0.4.0

func (m *Lap) SetMinSaturatedHemoglobinPercent(v []uint16) *Lap

SetMinSaturatedHemoglobinPercent sets Lap value.

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 Lap value.

Units: C

func (*Lap) SetMinTotalHemoglobinConc added in v0.4.0

func (m *Lap) SetMinTotalHemoglobinConc(v []uint16) *Lap

SetMinTotalHemoglobinConc sets Lap value.

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 Lap value.

Units: watts

func (*Lap) SetNumActiveLengths added in v0.4.0

func (m *Lap) SetNumActiveLengths(v uint16) *Lap

SetNumActiveLengths sets Lap 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 Lap 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 Lap value.

func (*Lap) SetPlayerScore added in v0.4.0

func (m *Lap) SetPlayerScore(v uint16) *Lap

SetPlayerScore sets Lap value.

func (*Lap) SetRepetitionNum added in v0.4.0

func (m *Lap) SetRepetitionNum(v uint16) *Lap

SetRepetitionNum sets Lap value.

func (*Lap) SetSport added in v0.4.0

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

SetSport sets Lap value.

func (*Lap) SetStandCount added in v0.4.0

func (m *Lap) SetStandCount(v uint16) *Lap

SetStandCount sets Lap 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 Lap value.

Units: semicircles

func (*Lap) SetStartPositionLong added in v0.4.0

func (m *Lap) SetStartPositionLong(v int32) *Lap

SetStartPositionLong sets Lap value.

Units: semicircles

func (*Lap) SetStartTime added in v0.4.0

func (m *Lap) SetStartTime(v time.Time) *Lap

SetStartTime sets Lap value.

func (*Lap) SetStrokeCount added in v0.4.0

func (m *Lap) SetStrokeCount(v []uint16) *Lap

SetStrokeCount sets Lap 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 Lap value.

func (*Lap) SetSwimStroke added in v0.4.0

func (m *Lap) SetSwimStroke(v typedef.SwimStroke) *Lap

SetSwimStroke sets Lap value.

func (*Lap) SetTimeInCadenceZone added in v0.4.0

func (m *Lap) SetTimeInCadenceZone(v []uint32) *Lap

SetTimeInCadenceZone sets Lap value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInHrZone added in v0.4.0

func (m *Lap) SetTimeInHrZone(v []uint32) *Lap

SetTimeInHrZone sets Lap value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInPowerZone added in v0.4.0

func (m *Lap) SetTimeInPowerZone(v []uint32) *Lap

SetTimeInPowerZone sets Lap value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeInSpeedZone added in v0.4.0

func (m *Lap) SetTimeInSpeedZone(v []uint32) *Lap

SetTimeInSpeedZone sets Lap value.

Array: [N]; Scale: 1000; Units: s

func (*Lap) SetTimeStanding added in v0.4.0

func (m *Lap) SetTimeStanding(v uint32) *Lap

SetTimeStanding sets Lap value.

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 Lap value.

Units: s; Lap end time.

func (*Lap) SetTotalAscent added in v0.4.0

func (m *Lap) SetTotalAscent(v uint16) *Lap

SetTotalAscent sets Lap value.

Units: m

func (*Lap) SetTotalCalories added in v0.4.0

func (m *Lap) SetTotalCalories(v uint16) *Lap

SetTotalCalories sets Lap value.

Units: kcal

func (*Lap) SetTotalCycles added in v0.4.0

func (m *Lap) SetTotalCycles(v uint32) *Lap

SetTotalCycles sets Lap value.

Units: cycles

func (*Lap) SetTotalDescent added in v0.4.0

func (m *Lap) SetTotalDescent(v uint16) *Lap

SetTotalDescent sets Lap value.

Units: m

func (*Lap) SetTotalDistance added in v0.4.0

func (m *Lap) SetTotalDistance(v uint32) *Lap

SetTotalDistance sets Lap value.

Scale: 100; Units: m

func (*Lap) SetTotalElapsedTime added in v0.4.0

func (m *Lap) SetTotalElapsedTime(v uint32) *Lap

SetTotalElapsedTime sets Lap value.

Scale: 1000; Units: s; Time (includes pauses)

func (*Lap) SetTotalFatCalories added in v0.4.0

func (m *Lap) SetTotalFatCalories(v uint16) *Lap

SetTotalFatCalories sets Lap value.

Units: kcal; If New Leaf

func (*Lap) SetTotalFlow added in v0.4.0

func (m *Lap) SetTotalFlow(v float32) *Lap

SetTotalFlow sets Lap 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 Lap value.

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 Lap value.

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 Lap value.

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 Lap 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 Lap value.

Scale: 1000; Units: s

func (*Lap) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets Lap value.

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 Lap value.

Units: J

func (*Lap) SetWktStepIndex added in v0.4.0

func (m *Lap) SetWktStepIndex(v typedef.MessageIndex) *Lap

SetWktStepIndex sets Lap value.

func (*Lap) SetZoneCount added in v0.4.0

func (m *Lap) SetZoneCount(v []uint16) *Lap

SetZoneCount sets Lap value.

Array: [N]; Units: counts; zone number used as the index

func (*Lap) TimeInCadenceZoneScaled added in v0.8.0

func (m *Lap) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInCadenceZone value is invalid, nil will be returned.

func (*Lap) TimeInHrZoneScaled added in v0.8.0

func (m *Lap) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInHrZone value is invalid, nil will be returned.

func (*Lap) TimeInPowerZoneScaled added in v0.8.0

func (m *Lap) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInPowerZone value is invalid, nil will be returned.

func (*Lap) TimeInSpeedZoneScaled added in v0.8.0

func (m *Lap) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInSpeedZone value is invalid, nil will be returned.

func (*Lap) TimeStandingScaled added in v0.8.0

func (m *Lap) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value [Scale: 1000; Units: s; Total time spent in the standing position].

If TimeStanding value is invalid, float64 invalid value will be returned.

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 [Scale: 100; Units: m].

If TotalDistance value is invalid, float64 invalid value will be returned.

func (*Lap) TotalElapsedTimeScaled added in v0.8.0

func (m *Lap) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value [Scale: 1000; Units: s; Time (includes pauses)].

If TotalElapsedTime value is invalid, float64 invalid value will be returned.

func (*Lap) TotalFractionalAscentScaled added in v0.8.0

func (m *Lap) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value [Scale: 100; Units: m; fractional part of total_ascent].

If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

func (*Lap) TotalFractionalCyclesScaled added in v0.8.0

func (m *Lap) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value [Scale: 128; Units: cycles; fractional part of the total_cycles].

If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

func (*Lap) TotalFractionalDescentScaled added in v0.8.0

func (m *Lap) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value [Scale: 100; Units: m; fractional part of total_descent].

If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

func (*Lap) TotalMovingTimeScaled added in v0.8.0

func (m *Lap) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value [Scale: 1000; Units: s].

If TotalMovingTime value is invalid, float64 invalid value will be returned.

func (*Lap) TotalTimerTimeScaled added in v0.8.0

func (m *Lap) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s; Timer Time (excludes pauses)].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

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

	IsExpandedFields [24]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Length is a Length message.

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 [Scale: 1000; Units: m/s].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*Length) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Length) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

func (*Length) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Length) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

func (*Length) SetAvgRespirationRate added in v0.4.0

func (m *Length) SetAvgRespirationRate(v uint8) *Length

SetAvgRespirationRate sets Length value.

func (*Length) SetAvgSpeed added in v0.4.0

func (m *Length) SetAvgSpeed(v uint16) *Length

SetAvgSpeed sets Length value.

Scale: 1000; Units: m/s

func (*Length) SetAvgSwimmingCadence added in v0.4.0

func (m *Length) SetAvgSwimmingCadence(v uint8) *Length

SetAvgSwimmingCadence sets Length value.

Units: strokes/min

func (*Length) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Length's DeveloperFields.

func (*Length) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Length) SetEnhancedAvgRespirationRate(v uint16) *Length

SetEnhancedAvgRespirationRate sets Length value.

Scale: 100; Units: Breaths/min

func (*Length) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Length) SetEnhancedMaxRespirationRate(v uint16) *Length

SetEnhancedMaxRespirationRate sets Length value.

Scale: 100; Units: Breaths/min

func (*Length) SetEvent added in v0.4.0

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

SetEvent sets Length value.

func (*Length) SetEventGroup added in v0.4.0

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

SetEventGroup sets Length value.

func (*Length) SetEventType added in v0.4.0

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

SetEventType sets Length value.

func (*Length) SetLengthType added in v0.4.0

func (m *Length) SetLengthType(v typedef.LengthType) *Length

SetLengthType sets Length value.

func (*Length) SetMaxRespirationRate added in v0.4.0

func (m *Length) SetMaxRespirationRate(v uint8) *Length

SetMaxRespirationRate sets Length value.

func (*Length) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Length value.

func (*Length) SetOpponentScore added in v0.4.0

func (m *Length) SetOpponentScore(v uint16) *Length

SetOpponentScore sets Length value.

func (*Length) SetPlayerScore added in v0.4.0

func (m *Length) SetPlayerScore(v uint16) *Length

SetPlayerScore sets Length value.

func (*Length) SetStartTime added in v0.4.0

func (m *Length) SetStartTime(v time.Time) *Length

SetStartTime sets Length value.

func (*Length) SetStrokeCount added in v0.4.0

func (m *Length) SetStrokeCount(v []uint16) *Length

SetStrokeCount sets Length 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 Length value.

Units: swim_stroke

func (*Length) SetTimestamp added in v0.4.0

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

SetTimestamp sets Length value.

func (*Length) SetTotalCalories added in v0.4.0

func (m *Length) SetTotalCalories(v uint16) *Length

SetTotalCalories sets Length value.

Units: kcal

func (*Length) SetTotalElapsedTime added in v0.4.0

func (m *Length) SetTotalElapsedTime(v uint32) *Length

SetTotalElapsedTime sets Length value.

Scale: 1000; Units: s

func (*Length) SetTotalStrokes added in v0.4.0

func (m *Length) SetTotalStrokes(v uint16) *Length

SetTotalStrokes sets Length value.

Units: strokes

func (*Length) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets Length value.

Scale: 1000; Units: s

func (*Length) SetZoneCount added in v0.4.0

func (m *Length) SetZoneCount(v []uint16) *Length

SetZoneCount sets Length value.

Array: [N]; Units: counts; zone number used as the index

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 [Scale: 1000; Units: s].

If TotalElapsedTime value is invalid, float64 invalid value will be returned.

func (*Length) TotalTimerTimeScaled added in v0.8.0

func (m *Length) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

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 corrosponding 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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MagnetometerData is a MagnetometerData message.

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 MagnetometerData 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 MagnetometerData 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 MagnetometerData 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 MagnetometerData's DeveloperFields.

func (*MagnetometerData) SetMagX added in v0.4.0

func (m *MagnetometerData) SetMagX(v []uint16) *MagnetometerData

SetMagX sets MagnetometerData 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 MagnetometerData 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 MagnetometerData 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 MagnetometerData value.

Array: [N]; Units: ms; Each time in the array describes the time at which the compass sample with the corrosponding 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 MagnetometerData 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 MagnetometerData value.

Units: ms; Millisecond part of the timestamp.

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
	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
	CalibratedData bool                          // Indicates if calibrated data was used in the calculation

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MaxMetData is a MaxMetData message.

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 bool) *MaxMetData

SetCalibratedData sets MaxMetData 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 MaxMetData's DeveloperFields.

func (*MaxMetData) SetHrSource added in v0.4.0

SetHrSource sets MaxMetData 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 MaxMetData value.

func (*MaxMetData) SetSpeedSource added in v0.4.0

func (m *MaxMetData) SetSpeedSource(v typedef.MaxMetSpeedSource) *MaxMetData

SetSpeedSource sets MaxMetData 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 MaxMetData value.

func (*MaxMetData) SetSubSport added in v0.4.0

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

SetSubSport sets MaxMetData value.

func (*MaxMetData) SetUpdateTime added in v0.4.0

func (m *MaxMetData) SetUpdateTime(v time.Time) *MaxMetData

SetUpdateTime sets MaxMetData value.

Time maxMET and vo2 were calculated

func (*MaxMetData) SetVo2Max added in v0.4.0

func (m *MaxMetData) SetVo2Max(v uint16) *MaxMetData

SetVo2Max sets MaxMetData value.

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) Vo2MaxScaled added in v0.8.0

func (m *MaxMetData) Vo2MaxScaled() float64

Vo2MaxScaled return Vo2Max in its scaled value [Scale: 10; Units: mL/kg/min].

If Vo2Max value is invalid, float64 invalid value will be returned.

type MemoGlob

type MemoGlob struct {
	Memo        []byte               // Array: [N]; Deprecated. Use data field.
	Data        []uint8              // 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MemoGlob is a MemoGlob message.

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 MemoGlob value.

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 MemoGlob's DeveloperFields.

func (*MemoGlob) SetFieldNum added in v0.4.0

func (m *MemoGlob) SetFieldNum(v uint8) *MemoGlob

SetFieldNum sets MemoGlob 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 MemoGlob 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 MemoGlob 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 MemoGlob 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 MemoGlob value.

Sequence number of memo blocks

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MesgCapabilities is a MesgCapabilities message.

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) SetCount added in v0.4.0

func (m *MesgCapabilities) SetCount(v uint16) *MesgCapabilities

SetCount sets MesgCapabilities value.

func (*MesgCapabilities) SetCountType added in v0.4.0

func (m *MesgCapabilities) SetCountType(v typedef.MesgCount) *MesgCapabilities

SetCountType sets MesgCapabilities value.

func (*MesgCapabilities) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields MesgCapabilities's DeveloperFields.

func (*MesgCapabilities) SetFile added in v0.4.0

SetFile sets MesgCapabilities value.

func (*MesgCapabilities) SetMesgNum added in v0.4.0

SetMesgNum sets MesgCapabilities value.

func (*MesgCapabilities) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets MesgCapabilities value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MetZone is a MetZone message.

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 [Scale: 10; Units: kcal / min].

If Calories value is invalid, float64 invalid value will be returned.

func (*MetZone) FatCaloriesScaled added in v0.8.0

func (m *MetZone) FatCaloriesScaled() float64

FatCaloriesScaled return FatCalories in its scaled value [Scale: 10; Units: kcal / min].

If FatCalories value is invalid, float64 invalid value will be returned.

func (*MetZone) SetCalories added in v0.4.0

func (m *MetZone) SetCalories(v uint16) *MetZone

SetCalories sets MetZone value.

Scale: 10; Units: kcal / min

func (*MetZone) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields MetZone's DeveloperFields.

func (*MetZone) SetFatCalories added in v0.4.0

func (m *MetZone) SetFatCalories(v uint8) *MetZone

SetFatCalories sets MetZone value.

Scale: 10; Units: kcal / min

func (*MetZone) SetHighBpm added in v0.4.0

func (m *MetZone) SetHighBpm(v uint8) *MetZone

SetHighBpm sets MetZone value.

func (*MetZone) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets MetZone value.

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                 []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

	IsExpandedFields [29]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Monitoring is a Monitoring message.

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 [Scale: 1000; Units: s].

If ActiveTime value is invalid, float64 invalid value will be returned.

func (*Monitoring) AscentScaled added in v0.8.0

func (m *Monitoring) AscentScaled() float64

AscentScaled return Ascent in its scaled value [Scale: 1000; Units: m].

If Ascent value is invalid, float64 invalid value will be returned.

func (*Monitoring) CyclesScaled added in v0.8.0

func (m *Monitoring) CyclesScaled() float64

CyclesScaled return Cycles in its scaled value [Scale: 2; Units: cycles; Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.].

If Cycles value is invalid, float64 invalid value will be returned.

func (*Monitoring) DescentScaled added in v0.8.0

func (m *Monitoring) DescentScaled() float64

DescentScaled return Descent in its scaled value [Scale: 1000; Units: m].

If Descent value is invalid, float64 invalid value will be returned.

func (*Monitoring) DistanceScaled added in v0.8.0

func (m *Monitoring) DistanceScaled() float64

DistanceScaled return Distance in its scaled value [Scale: 100; Units: m; Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.].

If Distance value is invalid, float64 invalid value will be returned.

func (*Monitoring) IntensityScaled added in v0.8.0

func (m *Monitoring) IntensityScaled() float64

IntensityScaled return Intensity in its scaled value [Scale: 10].

If Intensity value is invalid, float64 invalid value will be returned.

func (*Monitoring) SetActiveCalories added in v0.4.0

func (m *Monitoring) SetActiveCalories(v uint16) *Monitoring

SetActiveCalories sets Monitoring value.

Units: kcal

func (*Monitoring) SetActiveTime added in v0.4.0

func (m *Monitoring) SetActiveTime(v uint32) *Monitoring

SetActiveTime sets Monitoring value.

Scale: 1000; Units: s

func (*Monitoring) SetActiveTime16 added in v0.4.0

func (m *Monitoring) SetActiveTime16(v uint16) *Monitoring

SetActiveTime16 sets Monitoring value.

Units: s

func (*Monitoring) SetActivityLevel added in v0.4.0

func (m *Monitoring) SetActivityLevel(v typedef.ActivityLevel) *Monitoring

SetActivityLevel sets Monitoring value.

func (*Monitoring) SetActivitySubtype added in v0.4.0

func (m *Monitoring) SetActivitySubtype(v typedef.ActivitySubtype) *Monitoring

SetActivitySubtype sets Monitoring value.

func (*Monitoring) SetActivityTime added in v0.4.0

func (m *Monitoring) SetActivityTime(v []uint16) *Monitoring

SetActivityTime sets Monitoring 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 Monitoring value.

func (*Monitoring) SetAscent added in v0.4.0

func (m *Monitoring) SetAscent(v uint32) *Monitoring

SetAscent sets Monitoring value.

Scale: 1000; Units: m

func (*Monitoring) SetCalories added in v0.4.0

func (m *Monitoring) SetCalories(v uint16) *Monitoring

SetCalories sets Monitoring 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 Monitoring 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 Monitoring 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 Monitoring value.

Units: 2 * cycles (steps)

func (*Monitoring) SetDescent added in v0.4.0

func (m *Monitoring) SetDescent(v uint32) *Monitoring

SetDescent sets Monitoring value.

Scale: 1000; Units: m

func (*Monitoring) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Monitoring's DeveloperFields.

func (*Monitoring) SetDeviceIndex added in v0.4.0

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

SetDeviceIndex sets Monitoring 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 Monitoring 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 Monitoring value.

Units: 100 * m

func (*Monitoring) SetDuration added in v0.4.0

func (m *Monitoring) SetDuration(v uint32) *Monitoring

SetDuration sets Monitoring value.

Units: s

func (*Monitoring) SetDurationMin added in v0.4.0

func (m *Monitoring) SetDurationMin(v uint16) *Monitoring

SetDurationMin sets Monitoring value.

Units: min

func (*Monitoring) SetHeartRate added in v0.4.0

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

SetHeartRate sets Monitoring value.

Units: bpm

func (*Monitoring) SetIntensity added in v0.4.0

func (m *Monitoring) SetIntensity(v uint8) *Monitoring

SetIntensity sets Monitoring value.

Scale: 10

func (*Monitoring) SetLocalTimestamp added in v0.4.0

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

SetLocalTimestamp sets Monitoring 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 Monitoring value.

Units: minutes

func (*Monitoring) SetTemperature added in v0.4.0

func (m *Monitoring) SetTemperature(v int16) *Monitoring

SetTemperature sets Monitoring 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 Monitoring value.

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 Monitoring value.

Scale: 100; Units: C; Min 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 Monitoring 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 Monitoring value.

Units: s

func (*Monitoring) SetTimestampMin8 added in v0.4.0

func (m *Monitoring) SetTimestampMin8(v uint8) *Monitoring

SetTimestampMin8 sets Monitoring value.

Units: min

func (*Monitoring) SetVigorousActivityMinutes added in v0.4.0

func (m *Monitoring) SetVigorousActivityMinutes(v uint16) *Monitoring

SetVigorousActivityMinutes sets Monitoring value.

Units: minutes

func (*Monitoring) TemperatureMaxScaled added in v0.8.0

func (m *Monitoring) TemperatureMaxScaled() float64

TemperatureMaxScaled return TemperatureMax in its scaled value [Scale: 100; Units: C; Max temperature during the logging interval ended at timestamp].

If TemperatureMax value is invalid, float64 invalid value will be returned.

func (*Monitoring) TemperatureMinScaled added in v0.8.0

func (m *Monitoring) TemperatureMinScaled() float64

TemperatureMinScaled return TemperatureMin in its scaled value [Scale: 100; Units: C; Min temperature during the logging interval ended at timestamp].

If TemperatureMin value is invalid, float64 invalid value will be returned.

func (*Monitoring) TemperatureScaled added in v0.8.0

func (m *Monitoring) TemperatureScaled() float64

TemperatureScaled return Temperature in its scaled value [Scale: 100; Units: C; Avg temperature during the logging interval ended at timestamp].

If Temperature value is invalid, float64 invalid value will be returned.

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)

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MonitoringHrData is a MonitoringHrData message.

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 MonitoringHrData 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 MonitoringHrData's DeveloperFields.

func (*MonitoringHrData) SetRestingHeartRate added in v0.4.0

func (m *MonitoringHrData) SetRestingHeartRate(v uint8) *MonitoringHrData

SetRestingHeartRate sets MonitoringHrData 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 MonitoringHrData value.

Units: s; Must align to logging interval, for example, time must be 00:00:00 for daily log.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

MonitoringInfo is a MonitoringInfo message.

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 [Array: [N]; Scale: 5000; Units: kcal/cycle; Indexed by activity_type].

If CyclesToCalories value is invalid, nil will be returned.

func (*MonitoringInfo) CyclesToDistanceScaled added in v0.8.0

func (m *MonitoringInfo) CyclesToDistanceScaled() []float64

CyclesToDistanceScaled return CyclesToDistance in its scaled value [Array: [N]; Scale: 5000; Units: m/cycle; Indexed by activity_type].

If CyclesToDistance value is invalid, nil will be returned.

func (*MonitoringInfo) SetActivityType added in v0.4.0

func (m *MonitoringInfo) SetActivityType(v []typedef.ActivityType) *MonitoringInfo

SetActivityType sets MonitoringInfo value.

Array: [N]

func (*MonitoringInfo) SetCyclesToCalories added in v0.4.0

func (m *MonitoringInfo) SetCyclesToCalories(v []uint16) *MonitoringInfo

SetCyclesToCalories sets MonitoringInfo value.

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 MonitoringInfo value.

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 MonitoringInfo's DeveloperFields.

func (*MonitoringInfo) SetLocalTimestamp added in v0.4.0

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

SetLocalTimestamp sets MonitoringInfo 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 MonitoringInfo value.

Units: kcal / day

func (*MonitoringInfo) SetTimestamp added in v0.4.0

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

SetTimestamp sets MonitoringInfo value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

NmeaSentence is a NmeaSentence message.

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 NmeaSentence's DeveloperFields.

func (*NmeaSentence) SetSentence added in v0.4.0

func (m *NmeaSentence) SetSentence(v string) *NmeaSentence

SetSentence sets NmeaSentence value.

NMEA sentence

func (*NmeaSentence) SetTimestamp added in v0.4.0

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

SetTimestamp sets NmeaSentence value.

Units: s; Timestamp message was output

func (*NmeaSentence) SetTimestampMs added in v0.4.0

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

SetTimestampMs sets NmeaSentence value.

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

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 accross 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ObdiiData is a ObdiiData message.

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 ObdiiData's DeveloperFields.

func (*ObdiiData) SetPid added in v0.4.0

func (m *ObdiiData) SetPid(v byte) *ObdiiData

SetPid sets ObdiiData value.

Parameter ID

func (*ObdiiData) SetPidDataSize added in v0.4.0

func (m *ObdiiData) SetPidDataSize(v []uint8) *ObdiiData

SetPidDataSize sets ObdiiData 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 ObdiiData value.

Array: [N]; Raw parameter data

func (*ObdiiData) SetStartTimestamp added in v0.4.0

func (m *ObdiiData) SetStartTimestamp(v time.Time) *ObdiiData

SetStartTimestamp sets ObdiiData 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 ObdiiData 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 ObdiiData 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 ObdiiData value.

Array: [N]; Units: ms; Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds.

func (*ObdiiData) SetTimestamp added in v0.4.0

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

SetTimestamp sets ObdiiData value.

Units: s; Timestamp message was output

func (*ObdiiData) SetTimestampMs added in v0.4.0

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

SetTimestampMs sets ObdiiData value.

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

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

OhrSettings is a OhrSettings message.

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 OhrSettings's DeveloperFields.

func (*OhrSettings) SetEnabled added in v0.4.0

func (m *OhrSettings) SetEnabled(v typedef.Switch) *OhrSettings

SetEnabled sets OhrSettings value.

func (*OhrSettings) SetTimestamp added in v0.4.0

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

SetTimestamp sets OhrSettings value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

OneDSensorCalibration is a OneDSensorCalibration message.

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) SetCalibrationDivisor added in v0.4.0

func (m *OneDSensorCalibration) SetCalibrationDivisor(v uint32) *OneDSensorCalibration

SetCalibrationDivisor sets OneDSensorCalibration value.

Units: counts; Calibration factor divisor

func (*OneDSensorCalibration) SetCalibrationFactor added in v0.4.0

func (m *OneDSensorCalibration) SetCalibrationFactor(v uint32) *OneDSensorCalibration

SetCalibrationFactor sets OneDSensorCalibration 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 OneDSensorCalibration's DeveloperFields.

func (*OneDSensorCalibration) SetLevelShift added in v0.4.0

func (m *OneDSensorCalibration) SetLevelShift(v uint32) *OneDSensorCalibration

SetLevelShift sets OneDSensorCalibration value.

Level shift value used to shift the ADC value back into range

func (*OneDSensorCalibration) SetOffsetCal added in v0.4.0

SetOffsetCal sets OneDSensorCalibration value.

Internal Calibration factor

func (*OneDSensorCalibration) SetSensorType added in v0.4.0

SetSensorType sets OneDSensorCalibration value.

Indicates which sensor the calibration is for

func (*OneDSensorCalibration) SetTimestamp added in v0.4.0

SetTimestamp sets OneDSensorCalibration value.

Units: s; Whole second part of the timestamp

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

PowerZone is a PowerZone message.

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 PowerZone's DeveloperFields.

func (*PowerZone) SetHighValue added in v0.4.0

func (m *PowerZone) SetHighValue(v uint16) *PowerZone

SetHighValue sets PowerZone value.

Units: watts

func (*PowerZone) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets PowerZone value.

func (*PowerZone) SetName added in v0.4.0

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

SetName sets PowerZone value.

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]
	Gap         []uint8  // Array: [N]
	TimestampMs uint16   // Units: ms; ms since last overnight_raw_bbi message

	IsExpandedFields [5]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

RawBbi is a RawBbi message.

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) SetData added in v0.10.0

func (m *RawBbi) SetData(v []uint16) *RawBbi

SetData sets RawBbi 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 RawBbi's DeveloperFields.

func (*RawBbi) SetGap added in v0.10.0

func (m *RawBbi) SetGap(v []uint8) *RawBbi

SetGap sets RawBbi value.

Array: [N]

func (*RawBbi) SetQuality added in v0.10.0

func (m *RawBbi) SetQuality(v []uint8) *RawBbi

SetQuality sets RawBbi value.

Array: [N]

func (*RawBbi) SetTime added in v0.10.0

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

SetTime sets RawBbi 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 RawBbi value.

func (*RawBbi) SetTimestampMs added in v0.10.0

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

SetTimestampMs sets RawBbi value.

Units: ms; ms since last overnight_raw_bbi message

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
	CompressedSpeedDistance       []byte    // Array: [3]; Units: m/s,m
	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 compatability
	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
	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

	IsExpandedFields [109]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Record is a Record message.

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 [Scale: 5; Offset: 500; Units: m].

If Altitude value is invalid, float64 invalid value will be returned.

func (*Record) AscentRateScaled added in v0.8.0

func (m *Record) AscentRateScaled() float64

AscentRateScaled return AscentRate in its scaled value [Scale: 1000; Units: m/s].

If AscentRate value is invalid, float64 invalid value will be returned.

func (*Record) BallSpeedScaled added in v0.8.0

func (m *Record) BallSpeedScaled() float64

BallSpeedScaled return BallSpeed in its scaled value [Scale: 100; Units: m/s].

If BallSpeed value is invalid, float64 invalid value will be returned.

func (*Record) BatterySocScaled added in v0.8.0

func (m *Record) BatterySocScaled() float64

BatterySocScaled return BatterySoc in its scaled value [Scale: 2; Units: percent; lev battery state of charge].

If BatterySoc value is invalid, float64 invalid value will be returned.

func (*Record) Cadence256Scaled added in v0.8.0

func (m *Record) Cadence256Scaled() float64

Cadence256Scaled return Cadence256 in its scaled value [Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatability].

If Cadence256 value is invalid, float64 invalid value will be returned.

func (*Record) CombinedPedalSmoothnessScaled added in v0.8.0

func (m *Record) CombinedPedalSmoothnessScaled() float64

CombinedPedalSmoothnessScaled return CombinedPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If CombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Record) CoreTemperatureScaled added in v0.8.0

func (m *Record) CoreTemperatureScaled() float64

CoreTemperatureScaled return CoreTemperature in its scaled value [Scale: 100; Units: C].

If CoreTemperature value is invalid, float64 invalid value will be returned.

func (*Record) CurrentStressScaled added in v0.8.0

func (m *Record) CurrentStressScaled() float64

CurrentStressScaled return CurrentStress in its scaled value [Scale: 100; Current Stress value].

If CurrentStress value is invalid, float64 invalid value will be returned.

func (*Record) CycleLength16Scaled added in v0.8.0

func (m *Record) CycleLength16Scaled() float64

CycleLength16Scaled return CycleLength16 in its scaled value [Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35].

If CycleLength16 value is invalid, float64 invalid value will be returned.

func (*Record) CycleLengthScaled added in v0.8.0

func (m *Record) CycleLengthScaled() float64

CycleLengthScaled return CycleLength in its scaled value [Scale: 100; Units: m].

If CycleLength value is invalid, float64 invalid value will be returned.

func (*Record) DepthScaled added in v0.8.0

func (m *Record) DepthScaled() float64

DepthScaled return Depth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If Depth value is invalid, float64 invalid value will be returned.

func (*Record) DistanceScaled added in v0.8.0

func (m *Record) DistanceScaled() float64

DistanceScaled return Distance in its scaled value [Scale: 100; Units: m].

If Distance value is invalid, float64 invalid value will be returned.

func (*Record) EnhancedAltitudeScaled added in v0.8.0

func (m *Record) EnhancedAltitudeScaled() float64

EnhancedAltitudeScaled return EnhancedAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedAltitude value is invalid, float64 invalid value will be returned.

func (*Record) EnhancedRespirationRateScaled added in v0.8.0

func (m *Record) EnhancedRespirationRateScaled() float64

EnhancedRespirationRateScaled return EnhancedRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedRespirationRate value is invalid, float64 invalid value will be returned.

func (*Record) EnhancedSpeedScaled added in v0.8.0

func (m *Record) EnhancedSpeedScaled() float64

EnhancedSpeedScaled return EnhancedSpeed in its scaled value [Scale: 1000; Units: m/s].

If EnhancedSpeed value is invalid, float64 invalid value will be returned.

func (*Record) FractionalCadenceScaled added in v0.8.0

func (m *Record) FractionalCadenceScaled() float64

FractionalCadenceScaled return FractionalCadence in its scaled value [Scale: 128; Units: rpm].

If FractionalCadence value is invalid, float64 invalid value will be returned.

func (*Record) GradeScaled added in v0.8.0

func (m *Record) GradeScaled() float64

GradeScaled return Grade in its scaled value [Scale: 100; Units: %].

If Grade value is invalid, float64 invalid value will be returned.

func (*Record) LeftPedalSmoothnessScaled added in v0.8.0

func (m *Record) LeftPedalSmoothnessScaled() float64

LeftPedalSmoothnessScaled return LeftPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If LeftPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Record) LeftPowerPhasePeakScaled added in v0.8.0

func (m *Record) LeftPowerPhasePeakScaled() []float64

LeftPowerPhasePeakScaled return LeftPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak angles. Data value indexes defined by power_phase_type.].

If LeftPowerPhasePeak value is invalid, nil will be returned.

func (*Record) LeftPowerPhaseScaled added in v0.8.0

func (m *Record) LeftPowerPhaseScaled() []float64

LeftPowerPhaseScaled return LeftPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase angles. Data value indexes defined by power_phase_type.].

If LeftPowerPhase value is invalid, nil will be returned.

func (*Record) LeftTorqueEffectivenessScaled added in v0.8.0

func (m *Record) LeftTorqueEffectivenessScaled() float64

LeftTorqueEffectivenessScaled return LeftTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If LeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Record) NextStopDepthScaled added in v0.8.0

func (m *Record) NextStopDepthScaled() float64

NextStopDepthScaled return NextStopDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If NextStopDepth value is invalid, float64 invalid value will be returned.

func (*Record) Po2Scaled added in v0.8.0

func (m *Record) Po2Scaled() float64

Po2Scaled return Po2 in its scaled value [Scale: 100; Units: percent; Current partial pressure of oxygen].

If Po2 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 [Scale: 100; Units: bar/min; Pressure-based surface air consumption].

If PressureSac value is invalid, float64 invalid value will be returned.

func (*Record) RightPedalSmoothnessScaled added in v0.8.0

func (m *Record) RightPedalSmoothnessScaled() float64

RightPedalSmoothnessScaled return RightPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If RightPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Record) RightPowerPhasePeakScaled added in v0.8.0

func (m *Record) RightPowerPhasePeakScaled() []float64

RightPowerPhasePeakScaled return RightPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak angles. Data value indexes defined by power_phase_type.].

If RightPowerPhasePeak value is invalid, nil will be returned.

func (*Record) RightPowerPhaseScaled added in v0.8.0

func (m *Record) RightPowerPhaseScaled() []float64

RightPowerPhaseScaled return RightPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase angles. Data value indexes defined by power_phase_type.].

If RightPowerPhase value is invalid, nil will be returned.

func (*Record) RightTorqueEffectivenessScaled added in v0.8.0

func (m *Record) RightTorqueEffectivenessScaled() float64

RightTorqueEffectivenessScaled return RightTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If RightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Record) RmvScaled added in v0.8.0

func (m *Record) RmvScaled() float64

RmvScaled return Rmv in its scaled value [Scale: 100; Units: L/min; Respiratory minute volume].

If Rmv value is invalid, float64 invalid value will be returned.

func (*Record) SaturatedHemoglobinPercentMaxScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentMaxScaled() float64

SaturatedHemoglobinPercentMaxScaled return SaturatedHemoglobinPercentMax in its scaled value [Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen].

If SaturatedHemoglobinPercentMax value is invalid, float64 invalid value will be returned.

func (*Record) SaturatedHemoglobinPercentMinScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentMinScaled() float64

SaturatedHemoglobinPercentMinScaled return SaturatedHemoglobinPercentMin in its scaled value [Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen].

If SaturatedHemoglobinPercentMin value is invalid, float64 invalid value will be returned.

func (*Record) SaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Record) SaturatedHemoglobinPercentScaled() float64

SaturatedHemoglobinPercentScaled return SaturatedHemoglobinPercent in its scaled value [Scale: 10; Units: %; Percentage of hemoglobin saturated with oxygen].

If SaturatedHemoglobinPercent value is invalid, float64 invalid value will be returned.

func (*Record) SetAbsolutePressure added in v0.4.0

func (m *Record) SetAbsolutePressure(v uint32) *Record

SetAbsolutePressure sets Record value.

Units: Pa; Includes atmospheric pressure

func (*Record) SetAccumulatedPower added in v0.4.0

func (m *Record) SetAccumulatedPower(v uint32) *Record

SetAccumulatedPower sets Record value.

Units: watts

func (*Record) SetActivityType added in v0.4.0

func (m *Record) SetActivityType(v typedef.ActivityType) *Record

SetActivityType sets Record value.

func (*Record) SetAirTimeRemaining added in v0.4.0

func (m *Record) SetAirTimeRemaining(v uint32) *Record

SetAirTimeRemaining sets Record value.

Units: s

func (*Record) SetAltitude added in v0.4.0

func (m *Record) SetAltitude(v uint16) *Record

SetAltitude sets Record value.

Scale: 5; Offset: 500; Units: m

func (*Record) SetAscentRate added in v0.4.0

func (m *Record) SetAscentRate(v int32) *Record

SetAscentRate sets Record value.

Scale: 1000; Units: m/s

func (*Record) SetBallSpeed added in v0.4.0

func (m *Record) SetBallSpeed(v uint16) *Record

SetBallSpeed sets Record value.

Scale: 100; Units: m/s

func (*Record) SetBatterySoc added in v0.4.0

func (m *Record) SetBatterySoc(v uint8) *Record

SetBatterySoc sets Record value.

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 Record value.

Units: rpm

func (*Record) SetCadence256 added in v0.4.0

func (m *Record) SetCadence256(v uint16) *Record

SetCadence256 sets Record value.

Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatability

func (*Record) SetCalories added in v0.4.0

func (m *Record) SetCalories(v uint16) *Record

SetCalories sets Record value.

Units: kcal

func (*Record) SetCnsLoad added in v0.4.0

func (m *Record) SetCnsLoad(v uint8) *Record

SetCnsLoad sets Record value.

Units: percent

func (*Record) SetCombinedPedalSmoothness added in v0.4.0

func (m *Record) SetCombinedPedalSmoothness(v uint8) *Record

SetCombinedPedalSmoothness sets Record value.

Scale: 2; Units: percent

func (*Record) SetCompressedAccumulatedPower added in v0.4.0

func (m *Record) SetCompressedAccumulatedPower(v uint16) *Record

SetCompressedAccumulatedPower sets Record value.

Units: watts

func (*Record) SetCompressedSpeedDistance added in v0.4.0

func (m *Record) SetCompressedSpeedDistance(v []byte) *Record

SetCompressedSpeedDistance sets Record value.

Array: [3]; Units: m/s,m

func (*Record) SetCoreTemperature added in v0.4.0

func (m *Record) SetCoreTemperature(v uint16) *Record

SetCoreTemperature sets Record value.

Scale: 100; Units: C

func (*Record) SetCurrentStress added in v0.4.0

func (m *Record) SetCurrentStress(v uint16) *Record

SetCurrentStress sets Record value.

Scale: 100; Current Stress value

func (*Record) SetCycleLength added in v0.4.0

func (m *Record) SetCycleLength(v uint8) *Record

SetCycleLength sets Record value.

Scale: 100; Units: m

func (*Record) SetCycleLength16 added in v0.4.0

func (m *Record) SetCycleLength16(v uint16) *Record

SetCycleLength16 sets Record value.

Scale: 100; Units: m; Supports larger cycle sizes needed for paddlesports. Max cycle size: 655.35

func (*Record) SetCycles added in v0.4.0

func (m *Record) SetCycles(v uint8) *Record

SetCycles sets Record value.

Units: cycles

func (*Record) SetDepth added in v0.4.0

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

SetDepth sets Record value.

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 Record's DeveloperFields.

func (*Record) SetDeviceIndex added in v0.4.0

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

SetDeviceIndex sets Record value.

func (*Record) SetDistance added in v0.4.0

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

SetDistance sets Record value.

Scale: 100; Units: m

func (*Record) SetEbikeAssistLevelPercent added in v0.4.0

func (m *Record) SetEbikeAssistLevelPercent(v uint8) *Record

SetEbikeAssistLevelPercent sets Record value.

Units: percent

func (*Record) SetEbikeAssistMode added in v0.4.0

func (m *Record) SetEbikeAssistMode(v uint8) *Record

SetEbikeAssistMode sets Record value.

Units: depends on sensor

func (*Record) SetEbikeBatteryLevel added in v0.4.0

func (m *Record) SetEbikeBatteryLevel(v uint8) *Record

SetEbikeBatteryLevel sets Record value.

Units: percent

func (*Record) SetEbikeTravelRange added in v0.4.0

func (m *Record) SetEbikeTravelRange(v uint16) *Record

SetEbikeTravelRange sets Record value.

Units: km

func (*Record) SetEnhancedAltitude added in v0.4.0

func (m *Record) SetEnhancedAltitude(v uint32) *Record

SetEnhancedAltitude sets Record value.

Scale: 5; Offset: 500; Units: m

func (*Record) SetEnhancedRespirationRate added in v0.4.0

func (m *Record) SetEnhancedRespirationRate(v uint16) *Record

SetEnhancedRespirationRate sets Record value.

Scale: 100; Units: Breaths/min

func (*Record) SetEnhancedSpeed added in v0.4.0

func (m *Record) SetEnhancedSpeed(v uint32) *Record

SetEnhancedSpeed sets Record value.

Scale: 1000; Units: m/s

func (*Record) SetFlow added in v0.4.0

func (m *Record) SetFlow(v float32) *Record

SetFlow sets Record 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 Record value.

Scale: 128; Units: rpm

func (*Record) SetGpsAccuracy added in v0.4.0

func (m *Record) SetGpsAccuracy(v uint8) *Record

SetGpsAccuracy sets Record value.

Units: m

func (*Record) SetGrade added in v0.4.0

func (m *Record) SetGrade(v int16) *Record

SetGrade sets Record value.

Scale: 100; Units: %

func (*Record) SetGrit added in v0.4.0

func (m *Record) SetGrit(v float32) *Record

SetGrit sets Record 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 Record value.

Units: bpm

func (*Record) SetLeftPco added in v0.4.0

func (m *Record) SetLeftPco(v int8) *Record

SetLeftPco sets Record value.

Units: mm; Left platform center offset

func (*Record) SetLeftPedalSmoothness added in v0.4.0

func (m *Record) SetLeftPedalSmoothness(v uint8) *Record

SetLeftPedalSmoothness sets Record value.

Scale: 2; Units: percent

func (*Record) SetLeftPowerPhase added in v0.4.0

func (m *Record) SetLeftPowerPhase(v []uint8) *Record

SetLeftPowerPhase sets Record 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 Record value.

Array: [N]; Scale: 0.7111111; Units: degrees; Left power phase peak 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 Record value.

func (*Record) SetLeftTorqueEffectiveness added in v0.4.0

func (m *Record) SetLeftTorqueEffectiveness(v uint8) *Record

SetLeftTorqueEffectiveness sets Record value.

Scale: 2; Units: percent

func (*Record) SetMotorPower added in v0.4.0

func (m *Record) SetMotorPower(v uint16) *Record

SetMotorPower sets Record value.

Units: watts; lev motor power

func (*Record) SetN2Load added in v0.4.0

func (m *Record) SetN2Load(v uint16) *Record

SetN2Load sets Record value.

Units: percent

func (*Record) SetNdlTime added in v0.4.0

func (m *Record) SetNdlTime(v uint32) *Record

SetNdlTime sets Record value.

Units: s

func (*Record) SetNextStopDepth added in v0.4.0

func (m *Record) SetNextStopDepth(v uint32) *Record

SetNextStopDepth sets Record value.

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 Record value.

Units: s

func (*Record) SetPo2 added in v0.4.0

func (m *Record) SetPo2(v uint8) *Record

SetPo2 sets Record value.

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 Record value.

Units: semicircles

func (*Record) SetPositionLong added in v0.4.0

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

SetPositionLong sets Record value.

Units: semicircles

func (*Record) SetPower added in v0.4.0

func (m *Record) SetPower(v uint16) *Record

SetPower sets Record value.

Units: watts

func (*Record) SetPressureSac added in v0.4.0

func (m *Record) SetPressureSac(v uint16) *Record

SetPressureSac sets Record value.

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 Record 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 Record value.

Units: s

func (*Record) SetRightPco added in v0.4.0

func (m *Record) SetRightPco(v int8) *Record

SetRightPco sets Record value.

Units: mm; Right platform center offset

func (*Record) SetRightPedalSmoothness added in v0.4.0

func (m *Record) SetRightPedalSmoothness(v uint8) *Record

SetRightPedalSmoothness sets Record value.

Scale: 2; Units: percent

func (*Record) SetRightPowerPhase added in v0.4.0

func (m *Record) SetRightPowerPhase(v []uint8) *Record

SetRightPowerPhase sets Record 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 Record value.

Array: [N]; Scale: 0.7111111; Units: degrees; Right power phase peak 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 Record value.

Scale: 2; Units: percent

func (*Record) SetRmv added in v0.4.0

func (m *Record) SetRmv(v uint16) *Record

SetRmv sets Record value.

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 Record 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 Record value.

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 Record value.

Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen

func (*Record) SetSpeed added in v0.4.0

func (m *Record) SetSpeed(v uint16) *Record

SetSpeed sets Record value.

Scale: 1000; Units: m/s

func (*Record) SetSpeed1S added in v0.4.0

func (m *Record) SetSpeed1S(v []uint8) *Record

SetSpeed1S sets Record value.

Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.

func (*Record) SetStanceTime added in v0.4.0

func (m *Record) SetStanceTime(v uint16) *Record

SetStanceTime sets Record value.

Scale: 10; Units: ms

func (*Record) SetStanceTimeBalance added in v0.4.0

func (m *Record) SetStanceTimeBalance(v uint16) *Record

SetStanceTimeBalance sets Record value.

Scale: 100; Units: percent

func (*Record) SetStanceTimePercent added in v0.4.0

func (m *Record) SetStanceTimePercent(v uint16) *Record

SetStanceTimePercent sets Record value.

Scale: 100; Units: percent

func (*Record) SetStepLength added in v0.4.0

func (m *Record) SetStepLength(v uint16) *Record

SetStepLength sets Record value.

Scale: 10; Units: mm

func (*Record) SetStrokeType added in v0.4.0

func (m *Record) SetStrokeType(v typedef.StrokeType) *Record

SetStrokeType sets Record value.

func (*Record) SetTemperature added in v0.4.0

func (m *Record) SetTemperature(v int8) *Record

SetTemperature sets Record value.

Units: C

func (*Record) SetTime128 added in v0.4.0

func (m *Record) SetTime128(v uint8) *Record

SetTime128 sets Record value.

Scale: 128; Units: s

func (*Record) SetTimeFromCourse added in v0.4.0

func (m *Record) SetTimeFromCourse(v int32) *Record

SetTimeFromCourse sets Record value.

Scale: 1000; Units: s

func (*Record) SetTimeToSurface added in v0.4.0

func (m *Record) SetTimeToSurface(v uint32) *Record

SetTimeToSurface sets Record value.

Units: s

func (*Record) SetTimestamp added in v0.4.0

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

SetTimestamp sets Record value.

Units: s

func (*Record) SetTotalCycles added in v0.4.0

func (m *Record) SetTotalCycles(v uint32) *Record

SetTotalCycles sets Record value.

Units: cycles

func (*Record) SetTotalHemoglobinConc added in v0.4.0

func (m *Record) SetTotalHemoglobinConc(v uint16) *Record

SetTotalHemoglobinConc sets Record 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 Record value.

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 Record value.

Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin

func (*Record) SetVerticalOscillation added in v0.4.0

func (m *Record) SetVerticalOscillation(v uint16) *Record

SetVerticalOscillation sets Record value.

Scale: 10; Units: mm

func (*Record) SetVerticalRatio added in v0.4.0

func (m *Record) SetVerticalRatio(v uint16) *Record

SetVerticalRatio sets Record value.

Scale: 100; Units: percent

func (*Record) SetVerticalSpeed added in v0.4.0

func (m *Record) SetVerticalSpeed(v int16) *Record

SetVerticalSpeed sets Record value.

Scale: 1000; Units: m/s

func (*Record) SetVolumeSac added in v0.4.0

func (m *Record) SetVolumeSac(v uint16) *Record

SetVolumeSac sets Record value.

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 Record value.

func (*Record) Speed1SScaled added in v0.8.0

func (m *Record) Speed1SScaled() []float64

Speed1SScaled return Speed1S in its scaled value [Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.].

If Speed1S value is invalid, nil will be returned.

func (*Record) SpeedScaled added in v0.8.0

func (m *Record) SpeedScaled() float64

SpeedScaled return Speed in its scaled value [Scale: 1000; Units: m/s].

If Speed value is invalid, float64 invalid value will be returned.

func (*Record) StanceTimeBalanceScaled added in v0.8.0

func (m *Record) StanceTimeBalanceScaled() float64

StanceTimeBalanceScaled return StanceTimeBalance in its scaled value [Scale: 100; Units: percent].

If StanceTimeBalance value is invalid, float64 invalid value will be returned.

func (*Record) StanceTimePercentScaled added in v0.8.0

func (m *Record) StanceTimePercentScaled() float64

StanceTimePercentScaled return StanceTimePercent in its scaled value [Scale: 100; Units: percent].

If StanceTimePercent value is invalid, float64 invalid value will be returned.

func (*Record) StanceTimeScaled added in v0.8.0

func (m *Record) StanceTimeScaled() float64

StanceTimeScaled return StanceTime in its scaled value [Scale: 10; Units: ms].

If StanceTime value is invalid, float64 invalid value will be returned.

func (*Record) StepLengthScaled added in v0.8.0

func (m *Record) StepLengthScaled() float64

StepLengthScaled return StepLength in its scaled value [Scale: 10; Units: mm].

If StepLength value is invalid, float64 invalid value will be returned.

func (*Record) Time128Scaled added in v0.8.0

func (m *Record) Time128Scaled() float64

Time128Scaled return Time128 in its scaled value [Scale: 128; Units: s].

If Time128 value is invalid, float64 invalid value will be returned.

func (*Record) TimeFromCourseScaled added in v0.8.0

func (m *Record) TimeFromCourseScaled() float64

TimeFromCourseScaled return TimeFromCourse in its scaled value [Scale: 1000; Units: s].

If TimeFromCourse value is invalid, float64 invalid value will be returned.

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 [Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin].

If TotalHemoglobinConcMax value is invalid, float64 invalid value will be returned.

func (*Record) TotalHemoglobinConcMinScaled added in v0.8.0

func (m *Record) TotalHemoglobinConcMinScaled() float64

TotalHemoglobinConcMinScaled return TotalHemoglobinConcMin in its scaled value [Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin].

If TotalHemoglobinConcMin value is invalid, float64 invalid value will be returned.

func (*Record) TotalHemoglobinConcScaled added in v0.8.0

func (m *Record) TotalHemoglobinConcScaled() float64

TotalHemoglobinConcScaled return TotalHemoglobinConc in its scaled value [Scale: 100; Units: g/dL; Total saturated and unsaturated hemoglobin].

If TotalHemoglobinConc value is invalid, float64 invalid value will be returned.

func (*Record) VerticalOscillationScaled added in v0.8.0

func (m *Record) VerticalOscillationScaled() float64

VerticalOscillationScaled return VerticalOscillation in its scaled value [Scale: 10; Units: mm].

If VerticalOscillation value is invalid, float64 invalid value will be returned.

func (*Record) VerticalRatioScaled added in v0.8.0

func (m *Record) VerticalRatioScaled() float64

VerticalRatioScaled return VerticalRatio in its scaled value [Scale: 100; Units: percent].

If VerticalRatio value is invalid, float64 invalid value will be returned.

func (*Record) VerticalSpeedScaled added in v0.8.0

func (m *Record) VerticalSpeedScaled() float64

VerticalSpeedScaled return VerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If VerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Record) VolumeSacScaled added in v0.8.0

func (m *Record) VolumeSacScaled() float64

VolumeSacScaled return VolumeSac in its scaled value [Scale: 100; Units: L/min; Volumetric surface air consumption].

If VolumeSac value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

RespirationRate is a RespirationRate message.

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 [Scale: 100; Units: breaths/min; Breaths * 100 /min, -300 indicates invalid, -200 indicates large motion, -100 indicates off wrist].

If RespirationRate value is invalid, float64 invalid value will be returned.

func (*RespirationRate) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields RespirationRate's 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) SetTimestamp added in v0.4.0

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

SetTimestamp sets RespirationRate value.

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               // 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.
	Type          typedef.Schedule
	Completed     bool // TRUE if this activity has been started

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Schedule is a Schedule message.

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) SetCompleted added in v0.4.0

func (m *Schedule) SetCompleted(v bool) *Schedule

SetCompleted sets Schedule 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 Schedule's DeveloperFields.

func (*Schedule) SetManufacturer added in v0.4.0

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

SetManufacturer sets Schedule 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 Schedule 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 Schedule value.

func (*Schedule) SetSerialNumber added in v0.4.0

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

SetSerialNumber sets Schedule value.

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 Schedule 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 Schedule value.

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
	SdmCalFactor      uint16 // Scale: 10; Units: %
	SdmAntIdTransType uint8
	OdometerRollover  uint8 // Rollover counter that can be used to extend the odometer
	Enabled           bool
	SpeedSource       bool // Use footpod for speed source instead of GPS

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SdmProfile is a SdmProfile message.

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 [Scale: 100; Units: m].

If Odometer value is invalid, float64 invalid value will be returned.

func (*SdmProfile) SdmCalFactorScaled added in v0.8.0

func (m *SdmProfile) SdmCalFactorScaled() float64

SdmCalFactorScaled return SdmCalFactor in its scaled value [Scale: 10; Units: %].

If SdmCalFactor value is invalid, float64 invalid value will be returned.

func (*SdmProfile) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields SdmProfile's DeveloperFields.

func (*SdmProfile) SetEnabled added in v0.4.0

func (m *SdmProfile) SetEnabled(v bool) *SdmProfile

SetEnabled sets SdmProfile value.

func (*SdmProfile) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets SdmProfile value.

func (*SdmProfile) SetOdometer added in v0.4.0

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

SetOdometer sets SdmProfile value.

Scale: 100; Units: m

func (*SdmProfile) SetOdometerRollover added in v0.4.0

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

SetOdometerRollover sets SdmProfile value.

Rollover counter that can be used to extend the odometer

func (*SdmProfile) SetSdmAntId added in v0.4.0

func (m *SdmProfile) SetSdmAntId(v uint16) *SdmProfile

SetSdmAntId sets SdmProfile value.

func (*SdmProfile) SetSdmAntIdTransType added in v0.4.0

func (m *SdmProfile) SetSdmAntIdTransType(v uint8) *SdmProfile

SetSdmAntIdTransType sets SdmProfile value.

func (*SdmProfile) SetSdmCalFactor added in v0.4.0

func (m *SdmProfile) SetSdmCalFactor(v uint16) *SdmProfile

SetSdmCalFactor sets SdmProfile value.

Scale: 10; Units: %

func (*SdmProfile) SetSpeedSource added in v0.4.0

func (m *SdmProfile) SetSpeedSource(v bool) *SdmProfile

SetSpeedSource sets SdmProfile value.

Use footpod for speed source instead of GPS

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
	DefaultRaceLeader      uint8 // Index for the Leader Board entry selected as the default race participant
	Enabled                bool  // Enabled state of the segment file

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SegmentFile is a SegmentFile message.

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 SegmentFile 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 SegmentFile's DeveloperFields.

func (*SegmentFile) SetEnabled added in v0.4.0

func (m *SegmentFile) SetEnabled(v bool) *SegmentFile

SetEnabled sets SegmentFile value.

Enabled state of the segment file

func (*SegmentFile) SetFileUuid added in v0.4.0

func (m *SegmentFile) SetFileUuid(v string) *SegmentFile

SetFileUuid sets SegmentFile value.

UUID of the segment file

func (*SegmentFile) SetLeaderActivityId added in v0.4.0

func (m *SegmentFile) SetLeaderActivityId(v []uint32) *SegmentFile

SetLeaderActivityId sets SegmentFile 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 SegmentFile 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 SegmentFile 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 SegmentFile 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 SegmentFile value.

func (*SegmentFile) SetUserProfilePrimaryKey added in v0.4.0

func (m *SegmentFile) SetUserProfilePrimaryKey(v uint32) *SegmentFile

SetUserProfilePrimaryKey sets SegmentFile 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
	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
	Enabled               bool                         // Segment enabled for evaluation

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SegmentId is a SegmentId message.

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 SegmentId 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 SegmentId 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 SegmentId's DeveloperFields.

func (*SegmentId) SetDeviceId added in v0.4.0

func (m *SegmentId) SetDeviceId(v uint32) *SegmentId

SetDeviceId sets SegmentId value.

ID of the device that created the segment

func (*SegmentId) SetEnabled added in v0.4.0

func (m *SegmentId) SetEnabled(v bool) *SegmentId

SetEnabled sets SegmentId value.

Segment enabled for evaluation

func (*SegmentId) SetName added in v0.4.0

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

SetName sets SegmentId value.

Friendly name assigned to segment

func (*SegmentId) SetSelectionType added in v0.4.0

func (m *SegmentId) SetSelectionType(v typedef.SegmentSelectionType) *SegmentId

SetSelectionType sets SegmentId 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 SegmentId value.

Sport associated with the segment

func (*SegmentId) SetUserProfilePrimaryKey added in v0.4.0

func (m *SegmentId) SetUserProfilePrimaryKey(v uint32) *SegmentId

SetUserProfilePrimaryKey sets SegmentId 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 SegmentId 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

	IsExpandedFields [94]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SegmentLap is a SegmentLap message.

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 [Scale: 1000; Units: s].

If ActiveTime value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgAltitudeScaled added in v0.8.0

func (m *SegmentLap) AvgAltitudeScaled() float64

AvgAltitudeScaled return AvgAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If AvgAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgFractionalCadenceScaled added in v0.8.0

func (m *SegmentLap) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the avg_cadence].

If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgGradeScaled added in v0.8.0

func (m *SegmentLap) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value [Scale: 100; Units: %].

If AvgGrade value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.].

If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

func (*SegmentLap) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *SegmentLap) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Data value indexes defined by power_phase_type.].

If AvgLeftPowerPhase value is invalid, nil will be returned.

func (*SegmentLap) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *SegmentLap) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgNegGradeScaled added in v0.8.0

func (m *SegmentLap) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value [Scale: 100; Units: %].

If AvgNegGrade value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgPosGradeScaled added in v0.8.0

func (m *SegmentLap) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value [Scale: 100; Units: %].

If AvgPosGrade value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *SegmentLap) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *SegmentLap) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles. Data value indexes defined by power_phase_type.].

If AvgRightPowerPhasePeak value is invalid, nil will be returned.

func (*SegmentLap) AvgRightPowerPhaseScaled added in v0.8.0

func (m *SegmentLap) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.].

If AvgRightPowerPhase value is invalid, nil will be returned.

func (*SegmentLap) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *SegmentLap) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*SegmentLap) AvgSpeedScaled added in v0.8.0

func (m *SegmentLap) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgSpeed 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 [Scale: 5; Offset: 500; Units: m].

If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentLap) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *SegmentLap) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentLap) EnhancedMinAltitudeScaled added in v0.8.0

func (m *SegmentLap) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxAltitudeScaled added in v0.8.0

func (m *SegmentLap) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MaxAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxFractionalCadenceScaled added in v0.8.0

func (m *SegmentLap) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the max_cadence].

If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxNegGradeScaled added in v0.8.0

func (m *SegmentLap) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value [Scale: 100; Units: %].

If MaxNegGrade value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxPosGradeScaled added in v0.8.0

func (m *SegmentLap) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value [Scale: 100; Units: %].

If MaxPosGrade value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MaxSpeedScaled added in v0.8.0

func (m *SegmentLap) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*SegmentLap) MinAltitudeScaled added in v0.8.0

func (m *SegmentLap) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MinAltitude 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 SegmentLap value.

Scale: 1000; Units: s

func (*SegmentLap) SetAvgAltitude added in v0.4.0

func (m *SegmentLap) SetAvgAltitude(v uint16) *SegmentLap

SetAvgAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetAvgCadence added in v0.4.0

func (m *SegmentLap) SetAvgCadence(v uint8) *SegmentLap

SetAvgCadence sets SegmentLap 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 SegmentLap 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 SegmentLap value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgFlow added in v0.4.0

func (m *SegmentLap) SetAvgFlow(v float32) *SegmentLap

SetAvgFlow sets SegmentLap 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 SegmentLap value.

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 SegmentLap value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgGrit added in v0.4.0

func (m *SegmentLap) SetAvgGrit(v float32) *SegmentLap

SetAvgGrit sets SegmentLap 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 SegmentLap value.

Units: bpm

func (*SegmentLap) SetAvgLeftPco added in v0.4.0

func (m *SegmentLap) SetAvgLeftPco(v int8) *SegmentLap

SetAvgLeftPco sets SegmentLap 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 SegmentLap value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgLeftPowerPhase added in v0.4.0

func (m *SegmentLap) SetAvgLeftPowerPhase(v []uint8) *SegmentLap

SetAvgLeftPowerPhase sets SegmentLap 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 SegmentLap value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak 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 SegmentLap value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgNegGrade added in v0.4.0

func (m *SegmentLap) SetAvgNegGrade(v int16) *SegmentLap

SetAvgNegGrade sets SegmentLap value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgNegVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetAvgNegVerticalSpeed(v int16) *SegmentLap

SetAvgNegVerticalSpeed sets SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgPosGrade added in v0.4.0

func (m *SegmentLap) SetAvgPosGrade(v int16) *SegmentLap

SetAvgPosGrade sets SegmentLap value.

Scale: 100; Units: %

func (*SegmentLap) SetAvgPosVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetAvgPosVerticalSpeed(v int16) *SegmentLap

SetAvgPosVerticalSpeed sets SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgPower added in v0.4.0

func (m *SegmentLap) SetAvgPower(v uint16) *SegmentLap

SetAvgPower sets SegmentLap 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 SegmentLap 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 SegmentLap 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 SegmentLap value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgRightPowerPhase added in v0.4.0

func (m *SegmentLap) SetAvgRightPowerPhase(v []uint8) *SegmentLap

SetAvgRightPowerPhase sets SegmentLap 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 SegmentLap value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak 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 SegmentLap value.

Scale: 2; Units: percent

func (*SegmentLap) SetAvgSpeed added in v0.4.0

func (m *SegmentLap) SetAvgSpeed(v uint16) *SegmentLap

SetAvgSpeed sets SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetAvgTemperature added in v0.4.0

func (m *SegmentLap) SetAvgTemperature(v int8) *SegmentLap

SetAvgTemperature sets SegmentLap value.

Units: C

func (*SegmentLap) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields SegmentLap's DeveloperFields.

func (*SegmentLap) SetEndPositionLat added in v0.4.0

func (m *SegmentLap) SetEndPositionLat(v int32) *SegmentLap

SetEndPositionLat sets SegmentLap value.

Units: semicircles

func (*SegmentLap) SetEndPositionLong added in v0.4.0

func (m *SegmentLap) SetEndPositionLong(v int32) *SegmentLap

SetEndPositionLong sets SegmentLap value.

Units: semicircles

func (*SegmentLap) SetEnhancedAvgAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedAvgAltitude(v uint32) *SegmentLap

SetEnhancedAvgAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMaxAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedMaxAltitude(v uint32) *SegmentLap

SetEnhancedMaxAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEnhancedMinAltitude added in v0.4.0

func (m *SegmentLap) SetEnhancedMinAltitude(v uint32) *SegmentLap

SetEnhancedMinAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetEvent added in v0.4.0

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

SetEvent sets SegmentLap value.

func (*SegmentLap) SetEventGroup added in v0.4.0

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

SetEventGroup sets SegmentLap value.

func (*SegmentLap) SetEventType added in v0.4.0

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

SetEventType sets SegmentLap value.

func (*SegmentLap) SetFrontGearShiftCount added in v0.4.0

func (m *SegmentLap) SetFrontGearShiftCount(v uint16) *SegmentLap

SetFrontGearShiftCount sets SegmentLap value.

func (*SegmentLap) SetGpsAccuracy added in v0.4.0

func (m *SegmentLap) SetGpsAccuracy(v uint8) *SegmentLap

SetGpsAccuracy sets SegmentLap value.

Units: m

func (*SegmentLap) SetLeftRightBalance added in v0.4.0

func (m *SegmentLap) SetLeftRightBalance(v typedef.LeftRightBalance100) *SegmentLap

SetLeftRightBalance sets SegmentLap value.

func (*SegmentLap) SetManufacturer added in v0.4.0

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

SetManufacturer sets SegmentLap value.

Manufacturer that produced the segment

func (*SegmentLap) SetMaxAltitude added in v0.4.0

func (m *SegmentLap) SetMaxAltitude(v uint16) *SegmentLap

SetMaxAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMaxCadence added in v0.4.0

func (m *SegmentLap) SetMaxCadence(v uint8) *SegmentLap

SetMaxCadence sets SegmentLap value.

Units: rpm

func (*SegmentLap) SetMaxCadencePosition added in v0.4.0

func (m *SegmentLap) SetMaxCadencePosition(v []uint8) *SegmentLap

SetMaxCadencePosition sets SegmentLap 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 SegmentLap value.

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 SegmentLap value.

Units: bpm

func (*SegmentLap) SetMaxNegGrade added in v0.4.0

func (m *SegmentLap) SetMaxNegGrade(v int16) *SegmentLap

SetMaxNegGrade sets SegmentLap value.

Scale: 100; Units: %

func (*SegmentLap) SetMaxNegVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetMaxNegVerticalSpeed(v int16) *SegmentLap

SetMaxNegVerticalSpeed sets SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxPosGrade added in v0.4.0

func (m *SegmentLap) SetMaxPosGrade(v int16) *SegmentLap

SetMaxPosGrade sets SegmentLap value.

Scale: 100; Units: %

func (*SegmentLap) SetMaxPosVerticalSpeed added in v0.4.0

func (m *SegmentLap) SetMaxPosVerticalSpeed(v int16) *SegmentLap

SetMaxPosVerticalSpeed sets SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxPower added in v0.4.0

func (m *SegmentLap) SetMaxPower(v uint16) *SegmentLap

SetMaxPower sets SegmentLap value.

Units: watts

func (*SegmentLap) SetMaxPowerPosition added in v0.4.0

func (m *SegmentLap) SetMaxPowerPosition(v []uint16) *SegmentLap

SetMaxPowerPosition sets SegmentLap 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 SegmentLap value.

Scale: 1000; Units: m/s

func (*SegmentLap) SetMaxTemperature added in v0.4.0

func (m *SegmentLap) SetMaxTemperature(v int8) *SegmentLap

SetMaxTemperature sets SegmentLap value.

Units: C

func (*SegmentLap) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets SegmentLap value.

func (*SegmentLap) SetMinAltitude added in v0.4.0

func (m *SegmentLap) SetMinAltitude(v uint16) *SegmentLap

SetMinAltitude sets SegmentLap value.

Scale: 5; Offset: 500; Units: m

func (*SegmentLap) SetMinHeartRate added in v0.4.0

func (m *SegmentLap) SetMinHeartRate(v uint8) *SegmentLap

SetMinHeartRate sets SegmentLap value.

Units: bpm

func (*SegmentLap) SetName added in v0.4.0

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

SetName sets SegmentLap value.

func (*SegmentLap) SetNecLat added in v0.4.0

func (m *SegmentLap) SetNecLat(v int32) *SegmentLap

SetNecLat sets SegmentLap value.

Units: semicircles; North east corner latitude.

func (*SegmentLap) SetNecLong added in v0.4.0

func (m *SegmentLap) SetNecLong(v int32) *SegmentLap

SetNecLong sets SegmentLap value.

Units: semicircles; North east corner longitude.

func (*SegmentLap) SetNormalizedPower added in v0.4.0

func (m *SegmentLap) SetNormalizedPower(v uint16) *SegmentLap

SetNormalizedPower sets SegmentLap value.

Units: watts

func (*SegmentLap) SetRearGearShiftCount added in v0.4.0

func (m *SegmentLap) SetRearGearShiftCount(v uint16) *SegmentLap

SetRearGearShiftCount sets SegmentLap value.

func (*SegmentLap) SetRepetitionNum added in v0.4.0

func (m *SegmentLap) SetRepetitionNum(v uint16) *SegmentLap

SetRepetitionNum sets SegmentLap value.

func (*SegmentLap) SetSport added in v0.4.0

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

SetSport sets SegmentLap value.

func (*SegmentLap) SetSportEvent added in v0.4.0

func (m *SegmentLap) SetSportEvent(v typedef.SportEvent) *SegmentLap

SetSportEvent sets SegmentLap value.

func (*SegmentLap) SetStandCount added in v0.4.0

func (m *SegmentLap) SetStandCount(v uint16) *SegmentLap

SetStandCount sets SegmentLap 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 SegmentLap value.

Units: semicircles

func (*SegmentLap) SetStartPositionLong added in v0.4.0

func (m *SegmentLap) SetStartPositionLong(v int32) *SegmentLap

SetStartPositionLong sets SegmentLap value.

Units: semicircles

func (*SegmentLap) SetStartTime added in v0.4.0

func (m *SegmentLap) SetStartTime(v time.Time) *SegmentLap

SetStartTime sets SegmentLap value.

func (*SegmentLap) SetStatus added in v0.4.0

func (m *SegmentLap) SetStatus(v typedef.SegmentLapStatus) *SegmentLap

SetStatus sets SegmentLap value.

func (*SegmentLap) SetSubSport added in v0.4.0

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

SetSubSport sets SegmentLap value.

func (*SegmentLap) SetSwcLat added in v0.4.0

func (m *SegmentLap) SetSwcLat(v int32) *SegmentLap

SetSwcLat sets SegmentLap value.

Units: semicircles; South west corner latitude.

func (*SegmentLap) SetSwcLong added in v0.4.0

func (m *SegmentLap) SetSwcLong(v int32) *SegmentLap

SetSwcLong sets SegmentLap value.

Units: semicircles; South west corner latitude.

func (*SegmentLap) SetTimeInCadenceZone added in v0.4.0

func (m *SegmentLap) SetTimeInCadenceZone(v []uint32) *SegmentLap

SetTimeInCadenceZone sets SegmentLap value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInHrZone added in v0.4.0

func (m *SegmentLap) SetTimeInHrZone(v []uint32) *SegmentLap

SetTimeInHrZone sets SegmentLap value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInPowerZone added in v0.4.0

func (m *SegmentLap) SetTimeInPowerZone(v []uint32) *SegmentLap

SetTimeInPowerZone sets SegmentLap value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeInSpeedZone added in v0.4.0

func (m *SegmentLap) SetTimeInSpeedZone(v []uint32) *SegmentLap

SetTimeInSpeedZone sets SegmentLap value.

Array: [N]; Scale: 1000; Units: s

func (*SegmentLap) SetTimeStanding added in v0.4.0

func (m *SegmentLap) SetTimeStanding(v uint32) *SegmentLap

SetTimeStanding sets SegmentLap value.

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 SegmentLap value.

Units: s; Lap end time.

func (*SegmentLap) SetTotalAscent added in v0.4.0

func (m *SegmentLap) SetTotalAscent(v uint16) *SegmentLap

SetTotalAscent sets SegmentLap value.

Units: m

func (*SegmentLap) SetTotalCalories added in v0.4.0

func (m *SegmentLap) SetTotalCalories(v uint16) *SegmentLap

SetTotalCalories sets SegmentLap value.

Units: kcal

func (*SegmentLap) SetTotalCycles added in v0.4.0

func (m *SegmentLap) SetTotalCycles(v uint32) *SegmentLap

SetTotalCycles sets SegmentLap value.

Units: cycles

func (*SegmentLap) SetTotalDescent added in v0.4.0

func (m *SegmentLap) SetTotalDescent(v uint16) *SegmentLap

SetTotalDescent sets SegmentLap value.

Units: m

func (*SegmentLap) SetTotalDistance added in v0.4.0

func (m *SegmentLap) SetTotalDistance(v uint32) *SegmentLap

SetTotalDistance sets SegmentLap value.

Scale: 100; Units: m

func (*SegmentLap) SetTotalElapsedTime added in v0.4.0

func (m *SegmentLap) SetTotalElapsedTime(v uint32) *SegmentLap

SetTotalElapsedTime sets SegmentLap value.

Scale: 1000; Units: s; Time (includes pauses)

func (*SegmentLap) SetTotalFatCalories added in v0.4.0

func (m *SegmentLap) SetTotalFatCalories(v uint16) *SegmentLap

SetTotalFatCalories sets SegmentLap value.

Units: kcal; If New Leaf

func (*SegmentLap) SetTotalFlow added in v0.4.0

func (m *SegmentLap) SetTotalFlow(v float32) *SegmentLap

SetTotalFlow sets SegmentLap 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 SegmentLap value.

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 SegmentLap value.

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 SegmentLap value.

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 SegmentLap 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 SegmentLap value.

Scale: 1000; Units: s

func (*SegmentLap) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets SegmentLap value.

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 SegmentLap value.

Units: J

func (*SegmentLap) SetUuid added in v0.4.0

func (m *SegmentLap) SetUuid(v string) *SegmentLap

SetUuid sets SegmentLap value.

func (*SegmentLap) SetWktStepIndex added in v0.4.0

func (m *SegmentLap) SetWktStepIndex(v typedef.MessageIndex) *SegmentLap

SetWktStepIndex sets SegmentLap value.

func (*SegmentLap) TimeInCadenceZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInCadenceZone value is invalid, nil will be returned.

func (*SegmentLap) TimeInHrZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInHrZone value is invalid, nil will be returned.

func (*SegmentLap) TimeInPowerZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInPowerZone value is invalid, nil will be returned.

func (*SegmentLap) TimeInSpeedZoneScaled added in v0.8.0

func (m *SegmentLap) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInSpeedZone value is invalid, nil will be returned.

func (*SegmentLap) TimeStandingScaled added in v0.8.0

func (m *SegmentLap) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value [Scale: 1000; Units: s; Total time spent in the standing position].

If TimeStanding value is invalid, float64 invalid value will be returned.

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 [Scale: 100; Units: m].

If TotalDistance value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalElapsedTimeScaled added in v0.8.0

func (m *SegmentLap) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value [Scale: 1000; Units: s; Time (includes pauses)].

If TotalElapsedTime value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalFractionalAscentScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value [Scale: 100; Units: m; fractional part of total_ascent].

If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalFractionalCyclesScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value [Scale: 128; Units: cycles; fractional part of the total_cycles].

If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalFractionalDescentScaled added in v0.8.0

func (m *SegmentLap) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value [Scale: 100; Units: m; fractional part of total_descent].

If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalMovingTimeScaled added in v0.8.0

func (m *SegmentLap) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value [Scale: 1000; Units: s].

If TotalMovingTime value is invalid, float64 invalid value will be returned.

func (*SegmentLap) TotalTimerTimeScaled added in v0.8.0

func (m *SegmentLap) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s; Timer Time (excludes pauses)].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SegmentLeaderboardEntry is a SegmentLeaderboardEntry message.

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 [Scale: 1000; Units: s; Segment Time (includes pauses)].

If SegmentTime value is invalid, float64 invalid value will be returned.

func (*SegmentLeaderboardEntry) SetActivityId added in v0.4.0

SetActivityId sets SegmentLeaderboardEntry 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 SegmentLeaderboardEntry 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 SegmentLeaderboardEntry's DeveloperFields.

func (*SegmentLeaderboardEntry) SetGroupPrimaryKey added in v0.4.0

func (m *SegmentLeaderboardEntry) SetGroupPrimaryKey(v uint32) *SegmentLeaderboardEntry

SetGroupPrimaryKey sets SegmentLeaderboardEntry value.

Primary user ID of this leader

func (*SegmentLeaderboardEntry) SetMessageIndex added in v0.4.0

SetMessageIndex sets SegmentLeaderboardEntry value.

func (*SegmentLeaderboardEntry) SetName added in v0.4.0

SetName sets SegmentLeaderboardEntry value.

Friendly name assigned to leader

func (*SegmentLeaderboardEntry) SetSegmentTime added in v0.4.0

SetSegmentTime sets SegmentLeaderboardEntry value.

Scale: 1000; Units: s; Segment Time (includes pauses)

func (*SegmentLeaderboardEntry) SetType added in v0.4.0

SetType sets SegmentLeaderboardEntry value.

Leader classification

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

	IsExpandedFields [7]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SegmentPoint is a SegmentPoint message.

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 [Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point].

If Altitude value is invalid, float64 invalid value will be returned.

func (*SegmentPoint) DistanceScaled added in v0.8.0

func (m *SegmentPoint) DistanceScaled() float64

DistanceScaled return Distance in its scaled value [Scale: 100; Units: m; Accumulated distance along the segment at the described point].

If Distance value is invalid, float64 invalid value will be returned.

func (*SegmentPoint) EnhancedAltitudeScaled added in v0.8.0

func (m *SegmentPoint) EnhancedAltitudeScaled() float64

EnhancedAltitudeScaled return EnhancedAltitude in its scaled value [Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point].

If EnhancedAltitude value is invalid, float64 invalid value will be returned.

func (*SegmentPoint) LeaderTimeScaled added in v0.8.0

func (m *SegmentPoint) LeaderTimeScaled() []float64

LeaderTimeScaled return LeaderTime in its scaled 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.].

If LeaderTime value is invalid, nil will be returned.

func (*SegmentPoint) SetAltitude added in v0.4.0

func (m *SegmentPoint) SetAltitude(v uint16) *SegmentPoint

SetAltitude sets SegmentPoint value.

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 SegmentPoint's DeveloperFields.

func (*SegmentPoint) SetDistance added in v0.4.0

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

SetDistance sets SegmentPoint value.

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 SegmentPoint value.

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 SegmentPoint 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) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets SegmentPoint value.

func (*SegmentPoint) SetPositionLat added in v0.4.0

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

SetPositionLat sets SegmentPoint value.

Units: semicircles

func (*SegmentPoint) SetPositionLong added in v0.4.0

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

SetPositionLong sets SegmentPoint value.

Units: semicircles

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
	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

	IsExpandedFields [181]bool // Used for tracking expanded fields, field.Num as index.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Session is a Session message.

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 [Scale: 5; Offset: 500; Units: m].

If AvgAltitude value is invalid, float64 invalid value will be returned.

func (*Session) AvgBallSpeedScaled added in v0.8.0

func (m *Session) AvgBallSpeedScaled() float64

AvgBallSpeedScaled return AvgBallSpeed in its scaled value [Scale: 100; Units: m/s].

If AvgBallSpeed value is invalid, float64 invalid value will be returned.

func (*Session) AvgCombinedPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgCombinedPedalSmoothnessScaled() float64

AvgCombinedPedalSmoothnessScaled return AvgCombinedPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgCombinedPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Session) AvgCoreTemperatureScaled added in v0.8.0

func (m *Session) AvgCoreTemperatureScaled() float64

AvgCoreTemperatureScaled return AvgCoreTemperature in its scaled value [Scale: 100; Units: C].

If AvgCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Session) AvgDepthScaled added in v0.8.0

func (m *Session) AvgDepthScaled() float64

AvgDepthScaled return AvgDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If AvgDepth value is invalid, float64 invalid value will be returned.

func (*Session) AvgFractionalCadenceScaled added in v0.8.0

func (m *Session) AvgFractionalCadenceScaled() float64

AvgFractionalCadenceScaled return AvgFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the avg_cadence].

If AvgFractionalCadence value is invalid, float64 invalid value will be returned.

func (*Session) AvgGradeScaled added in v0.8.0

func (m *Session) AvgGradeScaled() float64

AvgGradeScaled return AvgGrade in its scaled value [Scale: 100; Units: %].

If AvgGrade value is invalid, float64 invalid value will be returned.

func (*Session) AvgLapTimeScaled added in v0.8.0

func (m *Session) AvgLapTimeScaled() float64

AvgLapTimeScaled return AvgLapTime in its scaled value [Scale: 1000; Units: s].

If AvgLapTime value is invalid, float64 invalid value will be returned.

func (*Session) AvgLeftPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgLeftPedalSmoothnessScaled() float64

AvgLeftPedalSmoothnessScaled return AvgLeftPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgLeftPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Session) AvgLeftPowerPhasePeakScaled added in v0.8.0

func (m *Session) AvgLeftPowerPhasePeakScaled() []float64

AvgLeftPowerPhasePeakScaled return AvgLeftPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.].

If AvgLeftPowerPhasePeak value is invalid, nil will be returned.

func (*Session) AvgLeftPowerPhaseScaled added in v0.8.0

func (m *Session) AvgLeftPowerPhaseScaled() []float64

AvgLeftPowerPhaseScaled return AvgLeftPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase angles. Indexes defined by power_phase_type.].

If AvgLeftPowerPhase value is invalid, nil will be returned.

func (*Session) AvgLeftTorqueEffectivenessScaled added in v0.8.0

func (m *Session) AvgLeftTorqueEffectivenessScaled() float64

AvgLeftTorqueEffectivenessScaled return AvgLeftTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgLeftTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Session) AvgNegGradeScaled added in v0.8.0

func (m *Session) AvgNegGradeScaled() float64

AvgNegGradeScaled return AvgNegGrade in its scaled value [Scale: 100; Units: %].

If AvgNegGrade value is invalid, float64 invalid value will be returned.

func (*Session) AvgNegVerticalSpeedScaled added in v0.8.0

func (m *Session) AvgNegVerticalSpeedScaled() float64

AvgNegVerticalSpeedScaled return AvgNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Session) AvgPosGradeScaled added in v0.8.0

func (m *Session) AvgPosGradeScaled() float64

AvgPosGradeScaled return AvgPosGrade in its scaled value [Scale: 100; Units: %].

If AvgPosGrade value is invalid, float64 invalid value will be returned.

func (*Session) AvgPosVerticalSpeedScaled added in v0.8.0

func (m *Session) AvgPosVerticalSpeedScaled() float64

AvgPosVerticalSpeedScaled return AvgPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Session) AvgRightPedalSmoothnessScaled added in v0.8.0

func (m *Session) AvgRightPedalSmoothnessScaled() float64

AvgRightPedalSmoothnessScaled return AvgRightPedalSmoothness in its scaled value [Scale: 2; Units: percent].

If AvgRightPedalSmoothness value is invalid, float64 invalid value will be returned.

func (*Session) AvgRightPowerPhasePeakScaled added in v0.8.0

func (m *Session) AvgRightPowerPhasePeakScaled() []float64

AvgRightPowerPhasePeakScaled return AvgRightPowerPhasePeak in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak angles data value indexes defined by power_phase_type.].

If AvgRightPowerPhasePeak value is invalid, nil will be returned.

func (*Session) AvgRightPowerPhaseScaled added in v0.8.0

func (m *Session) AvgRightPowerPhaseScaled() []float64

AvgRightPowerPhaseScaled return AvgRightPowerPhase in its scaled value [Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase angles. Data value indexes defined by power_phase_type.].

If AvgRightPowerPhase value is invalid, nil will be returned.

func (*Session) AvgRightTorqueEffectivenessScaled added in v0.8.0

func (m *Session) AvgRightTorqueEffectivenessScaled() float64

AvgRightTorqueEffectivenessScaled return AvgRightTorqueEffectiveness in its scaled value [Scale: 2; Units: percent].

If AvgRightTorqueEffectiveness value is invalid, float64 invalid value will be returned.

func (*Session) AvgSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) AvgSaturatedHemoglobinPercentScaled() []float64

AvgSaturatedHemoglobinPercentScaled return AvgSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Avg percentage of hemoglobin saturated with oxygen].

If AvgSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Session) AvgSpeedScaled added in v0.8.0

func (m *Session) AvgSpeedScaled() float64

AvgSpeedScaled return AvgSpeed in its scaled value [Scale: 1000; Units: m/s; total_distance / total_timer_time].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*Session) AvgStanceTimeBalanceScaled added in v0.8.0

func (m *Session) AvgStanceTimeBalanceScaled() float64

AvgStanceTimeBalanceScaled return AvgStanceTimeBalance in its scaled value [Scale: 100; Units: percent].

If AvgStanceTimeBalance value is invalid, float64 invalid value will be returned.

func (*Session) AvgStanceTimePercentScaled added in v0.8.0

func (m *Session) AvgStanceTimePercentScaled() float64

AvgStanceTimePercentScaled return AvgStanceTimePercent in its scaled value [Scale: 100; Units: percent].

If AvgStanceTimePercent value is invalid, float64 invalid value will be returned.

func (*Session) AvgStanceTimeScaled added in v0.8.0

func (m *Session) AvgStanceTimeScaled() float64

AvgStanceTimeScaled return AvgStanceTime in its scaled value [Scale: 10; Units: ms].

If AvgStanceTime value is invalid, float64 invalid value will be returned.

func (*Session) AvgStepLengthScaled added in v0.8.0

func (m *Session) AvgStepLengthScaled() float64

AvgStepLengthScaled return AvgStepLength in its scaled value [Scale: 10; Units: mm].

If AvgStepLength value is invalid, float64 invalid value will be returned.

func (*Session) AvgStrokeCountScaled added in v0.8.0

func (m *Session) AvgStrokeCountScaled() float64

AvgStrokeCountScaled return AvgStrokeCount in its scaled value [Scale: 10; Units: strokes/lap].

If AvgStrokeCount value is invalid, float64 invalid value will be returned.

func (*Session) AvgStrokeDistanceScaled added in v0.8.0

func (m *Session) AvgStrokeDistanceScaled() float64

AvgStrokeDistanceScaled return AvgStrokeDistance in its scaled value [Scale: 100; Units: m].

If AvgStrokeDistance value is invalid, float64 invalid value will be returned.

func (*Session) AvgTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) AvgTotalHemoglobinConcScaled() []float64

AvgTotalHemoglobinConcScaled return AvgTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Avg saturated and unsaturated hemoglobin].

If AvgTotalHemoglobinConc value is invalid, nil will be returned.

func (*Session) AvgVamScaled added in v0.8.0

func (m *Session) AvgVamScaled() float64

AvgVamScaled return AvgVam in its scaled value [Scale: 1000; Units: m/s].

If AvgVam value is invalid, float64 invalid value will be returned.

func (*Session) AvgVerticalOscillationScaled added in v0.8.0

func (m *Session) AvgVerticalOscillationScaled() float64

AvgVerticalOscillationScaled return AvgVerticalOscillation in its scaled value [Scale: 10; Units: mm].

If AvgVerticalOscillation value is invalid, float64 invalid value will be returned.

func (*Session) AvgVerticalRatioScaled added in v0.8.0

func (m *Session) AvgVerticalRatioScaled() float64

AvgVerticalRatioScaled return AvgVerticalRatio in its scaled value [Scale: 100; Units: percent].

If AvgVerticalRatio 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 [Scale: 5; Offset: 500; Units: m].

If EnhancedAvgAltitude value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedAvgRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedAvgRespirationRateScaled() float64

EnhancedAvgRespirationRateScaled return EnhancedAvgRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedAvgRespirationRate value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedAvgSpeedScaled added in v0.8.0

func (m *Session) EnhancedAvgSpeedScaled() float64

EnhancedAvgSpeedScaled return EnhancedAvgSpeed in its scaled value [Scale: 1000; Units: m/s; total_distance / total_timer_time].

If EnhancedAvgSpeed value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedMaxAltitudeScaled added in v0.8.0

func (m *Session) EnhancedMaxAltitudeScaled() float64

EnhancedMaxAltitudeScaled return EnhancedMaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMaxAltitude value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedMaxRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedMaxRespirationRateScaled() float64

EnhancedMaxRespirationRateScaled return EnhancedMaxRespirationRate in its scaled value [Scale: 100; Units: Breaths/min].

If EnhancedMaxRespirationRate value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedMaxSpeedScaled added in v0.8.0

func (m *Session) EnhancedMaxSpeedScaled() float64

EnhancedMaxSpeedScaled return EnhancedMaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If EnhancedMaxSpeed value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedMinAltitudeScaled added in v0.8.0

func (m *Session) EnhancedMinAltitudeScaled() float64

EnhancedMinAltitudeScaled return EnhancedMinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If EnhancedMinAltitude value is invalid, float64 invalid value will be returned.

func (*Session) EnhancedMinRespirationRateScaled added in v0.8.0

func (m *Session) EnhancedMinRespirationRateScaled() float64

EnhancedMinRespirationRateScaled return EnhancedMinRespirationRate in its scaled value [Scale: 100].

If EnhancedMinRespirationRate value is invalid, float64 invalid value will be returned.

func (*Session) IntensityFactorScaled added in v0.8.0

func (m *Session) IntensityFactorScaled() float64

IntensityFactorScaled return IntensityFactor in its scaled value [Scale: 1000; Units: if].

If IntensityFactor value is invalid, float64 invalid value will be returned.

func (*Session) LevBatteryConsumptionScaled added in v0.8.0

func (m *Session) LevBatteryConsumptionScaled() float64

LevBatteryConsumptionScaled return LevBatteryConsumption in its scaled value [Scale: 2; Units: percent; lev battery consumption during session].

If LevBatteryConsumption value is invalid, float64 invalid value will be returned.

func (*Session) MaxAltitudeScaled added in v0.8.0

func (m *Session) MaxAltitudeScaled() float64

MaxAltitudeScaled return MaxAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MaxAltitude value is invalid, float64 invalid value will be returned.

func (*Session) MaxBallSpeedScaled added in v0.8.0

func (m *Session) MaxBallSpeedScaled() float64

MaxBallSpeedScaled return MaxBallSpeed in its scaled value [Scale: 100; Units: m/s].

If MaxBallSpeed value is invalid, float64 invalid value will be returned.

func (*Session) MaxCoreTemperatureScaled added in v0.8.0

func (m *Session) MaxCoreTemperatureScaled() float64

MaxCoreTemperatureScaled return MaxCoreTemperature in its scaled value [Scale: 100; Units: C].

If MaxCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Session) MaxDepthScaled added in v0.8.0

func (m *Session) MaxDepthScaled() float64

MaxDepthScaled return MaxDepth in its scaled value [Scale: 1000; Units: m; 0 if above water].

If MaxDepth value is invalid, float64 invalid value will be returned.

func (*Session) MaxFractionalCadenceScaled added in v0.8.0

func (m *Session) MaxFractionalCadenceScaled() float64

MaxFractionalCadenceScaled return MaxFractionalCadence in its scaled value [Scale: 128; Units: rpm; fractional part of the max_cadence].

If MaxFractionalCadence value is invalid, float64 invalid value will be returned.

func (*Session) MaxNegGradeScaled added in v0.8.0

func (m *Session) MaxNegGradeScaled() float64

MaxNegGradeScaled return MaxNegGrade in its scaled value [Scale: 100; Units: %].

If MaxNegGrade value is invalid, float64 invalid value will be returned.

func (*Session) MaxNegVerticalSpeedScaled added in v0.8.0

func (m *Session) MaxNegVerticalSpeedScaled() float64

MaxNegVerticalSpeedScaled return MaxNegVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxNegVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Session) MaxPosGradeScaled added in v0.8.0

func (m *Session) MaxPosGradeScaled() float64

MaxPosGradeScaled return MaxPosGrade in its scaled value [Scale: 100; Units: %].

If MaxPosGrade value is invalid, float64 invalid value will be returned.

func (*Session) MaxPosVerticalSpeedScaled added in v0.8.0

func (m *Session) MaxPosVerticalSpeedScaled() float64

MaxPosVerticalSpeedScaled return MaxPosVerticalSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxPosVerticalSpeed value is invalid, float64 invalid value will be returned.

func (*Session) MaxSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) MaxSaturatedHemoglobinPercentScaled() []float64

MaxSaturatedHemoglobinPercentScaled return MaxSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Max percentage of hemoglobin saturated with oxygen].

If MaxSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Session) MaxSpeedScaled added in v0.8.0

func (m *Session) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*Session) MaxTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) MaxTotalHemoglobinConcScaled() []float64

MaxTotalHemoglobinConcScaled return MaxTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Max saturated and unsaturated hemoglobin].

If MaxTotalHemoglobinConc value is invalid, nil will be returned.

func (*Session) MinAltitudeScaled added in v0.8.0

func (m *Session) MinAltitudeScaled() float64

MinAltitudeScaled return MinAltitude in its scaled value [Scale: 5; Offset: 500; Units: m].

If MinAltitude value is invalid, float64 invalid value will be returned.

func (*Session) MinCoreTemperatureScaled added in v0.8.0

func (m *Session) MinCoreTemperatureScaled() float64

MinCoreTemperatureScaled return MinCoreTemperature in its scaled value [Scale: 100; Units: C].

If MinCoreTemperature value is invalid, float64 invalid value will be returned.

func (*Session) MinSaturatedHemoglobinPercentScaled added in v0.8.0

func (m *Session) MinSaturatedHemoglobinPercentScaled() []float64

MinSaturatedHemoglobinPercentScaled return MinSaturatedHemoglobinPercent in its scaled value [Array: [N]; Scale: 10; Units: %; Min percentage of hemoglobin saturated with oxygen].

If MinSaturatedHemoglobinPercent value is invalid, nil will be returned.

func (*Session) MinTotalHemoglobinConcScaled added in v0.8.0

func (m *Session) MinTotalHemoglobinConcScaled() []float64

MinTotalHemoglobinConcScaled return MinTotalHemoglobinConc in its scaled value [Array: [N]; Scale: 100; Units: g/dL; Min saturated and unsaturated hemoglobin].

If MinTotalHemoglobinConc value is invalid, nil will be returned.

func (*Session) PoolLengthScaled added in v0.8.0

func (m *Session) PoolLengthScaled() float64

PoolLengthScaled return PoolLength in its scaled value [Scale: 100; Units: m].

If PoolLength value is invalid, float64 invalid value will be returned.

func (*Session) SetAvgAltitude added in v0.4.0

func (m *Session) SetAvgAltitude(v uint16) *Session

SetAvgAltitude sets Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetAvgBallSpeed added in v0.4.0

func (m *Session) SetAvgBallSpeed(v uint16) *Session

SetAvgBallSpeed sets Session value.

Scale: 100; Units: m/s

func (*Session) SetAvgCadence added in v0.4.0

func (m *Session) SetAvgCadence(v uint8) *Session

SetAvgCadence sets Session 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 Session 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 Session value.

Scale: 2; Units: percent

func (*Session) SetAvgCoreTemperature added in v0.4.0

func (m *Session) SetAvgCoreTemperature(v uint16) *Session

SetAvgCoreTemperature sets Session value.

Scale: 100; Units: C

func (*Session) SetAvgDepth added in v0.4.0

func (m *Session) SetAvgDepth(v uint32) *Session

SetAvgDepth sets Session value.

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 Session 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 Session value.

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 Session value.

Scale: 100; Units: %

func (*Session) SetAvgGrit added in v0.4.0

func (m *Session) SetAvgGrit(v float32) *Session

SetAvgGrit sets Session 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 Session 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 Session value.

Scale: 1000; Units: s

func (*Session) SetAvgLeftPco added in v0.4.0

func (m *Session) SetAvgLeftPco(v int8) *Session

SetAvgLeftPco sets Session 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 Session value.

Scale: 2; Units: percent

func (*Session) SetAvgLeftPowerPhase added in v0.4.0

func (m *Session) SetAvgLeftPowerPhase(v []uint8) *Session

SetAvgLeftPowerPhase sets Session 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 Session value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average left power phase peak angles. Data value indexes defined by power_phase_type.

func (*Session) SetAvgLeftTorqueEffectiveness added in v0.4.0

func (m *Session) SetAvgLeftTorqueEffectiveness(v uint8) *Session

SetAvgLeftTorqueEffectiveness sets Session value.

Scale: 2; Units: percent

func (*Session) SetAvgLevMotorPower added in v0.4.0

func (m *Session) SetAvgLevMotorPower(v uint16) *Session

SetAvgLevMotorPower sets Session 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 Session value.

Scale: 100; Units: %

func (*Session) SetAvgNegVerticalSpeed added in v0.4.0

func (m *Session) SetAvgNegVerticalSpeed(v int16) *Session

SetAvgNegVerticalSpeed sets Session value.

Scale: 1000; Units: m/s

func (*Session) SetAvgPosGrade added in v0.4.0

func (m *Session) SetAvgPosGrade(v int16) *Session

SetAvgPosGrade sets Session value.

Scale: 100; Units: %

func (*Session) SetAvgPosVerticalSpeed added in v0.4.0

func (m *Session) SetAvgPosVerticalSpeed(v int16) *Session

SetAvgPosVerticalSpeed sets Session value.

Scale: 1000; Units: m/s

func (*Session) SetAvgPower added in v0.4.0

func (m *Session) SetAvgPower(v uint16) *Session

SetAvgPower sets Session 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 Session 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 Session value.

func (*Session) SetAvgRightPco added in v0.4.0

func (m *Session) SetAvgRightPco(v int8) *Session

SetAvgRightPco sets Session 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 Session value.

Scale: 2; Units: percent

func (*Session) SetAvgRightPowerPhase added in v0.4.0

func (m *Session) SetAvgRightPowerPhase(v []uint8) *Session

SetAvgRightPowerPhase sets Session 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 Session value.

Array: [N]; Scale: 0.7111111; Units: degrees; Average right power phase peak 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 Session value.

Scale: 2; Units: percent

func (*Session) SetAvgSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetAvgSaturatedHemoglobinPercent(v []uint16) *Session

SetAvgSaturatedHemoglobinPercent sets Session value.

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 Session value.

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 Session 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 Session value.

Scale: 10; Units: ms

func (*Session) SetAvgStanceTimeBalance added in v0.4.0

func (m *Session) SetAvgStanceTimeBalance(v uint16) *Session

SetAvgStanceTimeBalance sets Session value.

Scale: 100; Units: percent

func (*Session) SetAvgStanceTimePercent added in v0.4.0

func (m *Session) SetAvgStanceTimePercent(v uint16) *Session

SetAvgStanceTimePercent sets Session value.

Scale: 100; Units: percent

func (*Session) SetAvgStepLength added in v0.4.0

func (m *Session) SetAvgStepLength(v uint16) *Session

SetAvgStepLength sets Session value.

Scale: 10; Units: mm

func (*Session) SetAvgStress added in v0.4.0

func (m *Session) SetAvgStress(v uint8) *Session

SetAvgStress sets Session 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 Session value.

Scale: 10; Units: strokes/lap

func (*Session) SetAvgStrokeDistance added in v0.4.0

func (m *Session) SetAvgStrokeDistance(v uint16) *Session

SetAvgStrokeDistance sets Session value.

Scale: 100; Units: m

func (*Session) SetAvgTemperature added in v0.4.0

func (m *Session) SetAvgTemperature(v int8) *Session

SetAvgTemperature sets Session value.

Units: C

func (*Session) SetAvgTotalHemoglobinConc added in v0.4.0

func (m *Session) SetAvgTotalHemoglobinConc(v []uint16) *Session

SetAvgTotalHemoglobinConc sets Session value.

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 Session value.

Scale: 1000; Units: m/s

func (*Session) SetAvgVerticalOscillation added in v0.4.0

func (m *Session) SetAvgVerticalOscillation(v uint16) *Session

SetAvgVerticalOscillation sets Session value.

Scale: 10; Units: mm

func (*Session) SetAvgVerticalRatio added in v0.4.0

func (m *Session) SetAvgVerticalRatio(v uint16) *Session

SetAvgVerticalRatio sets Session value.

Scale: 100; Units: percent

func (*Session) SetBestLapIndex added in v0.4.0

func (m *Session) SetBestLapIndex(v uint16) *Session

SetBestLapIndex sets Session value.

func (*Session) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Session's DeveloperFields.

func (*Session) SetDiveNumber added in v0.4.0

func (m *Session) SetDiveNumber(v uint32) *Session

SetDiveNumber sets Session value.

func (*Session) SetEndCns added in v0.4.0

func (m *Session) SetEndCns(v uint8) *Session

SetEndCns sets Session value.

Units: percent

func (*Session) SetEndN2 added in v0.4.0

func (m *Session) SetEndN2(v uint16) *Session

SetEndN2 sets Session value.

Units: percent

func (*Session) SetEndPositionLat added in v0.4.0

func (m *Session) SetEndPositionLat(v int32) *Session

SetEndPositionLat sets Session value.

Units: semicircles

func (*Session) SetEndPositionLong added in v0.4.0

func (m *Session) SetEndPositionLong(v int32) *Session

SetEndPositionLong sets Session value.

Units: semicircles

func (*Session) SetEnhancedAvgAltitude added in v0.4.0

func (m *Session) SetEnhancedAvgAltitude(v uint32) *Session

SetEnhancedAvgAltitude sets Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedAvgRespirationRate added in v0.4.0

func (m *Session) SetEnhancedAvgRespirationRate(v uint16) *Session

SetEnhancedAvgRespirationRate sets Session value.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedAvgSpeed added in v0.4.0

func (m *Session) SetEnhancedAvgSpeed(v uint32) *Session

SetEnhancedAvgSpeed sets Session value.

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 Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMaxRespirationRate added in v0.4.0

func (m *Session) SetEnhancedMaxRespirationRate(v uint16) *Session

SetEnhancedMaxRespirationRate sets Session value.

Scale: 100; Units: Breaths/min

func (*Session) SetEnhancedMaxSpeed added in v0.4.0

func (m *Session) SetEnhancedMaxSpeed(v uint32) *Session

SetEnhancedMaxSpeed sets Session value.

Scale: 1000; Units: m/s

func (*Session) SetEnhancedMinAltitude added in v0.4.0

func (m *Session) SetEnhancedMinAltitude(v uint32) *Session

SetEnhancedMinAltitude sets Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetEnhancedMinRespirationRate added in v0.4.0

func (m *Session) SetEnhancedMinRespirationRate(v uint16) *Session

SetEnhancedMinRespirationRate sets Session value.

Scale: 100

func (*Session) SetEvent added in v0.4.0

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

SetEvent sets Session value.

session

func (*Session) SetEventGroup added in v0.4.0

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

SetEventGroup sets Session value.

func (*Session) SetEventType added in v0.4.0

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

SetEventType sets Session value.

stop

func (*Session) SetFirstLapIndex added in v0.4.0

func (m *Session) SetFirstLapIndex(v uint16) *Session

SetFirstLapIndex sets Session value.

func (*Session) SetGpsAccuracy added in v0.4.0

func (m *Session) SetGpsAccuracy(v uint8) *Session

SetGpsAccuracy sets Session value.

Units: m

func (*Session) SetIntensityFactor added in v0.4.0

func (m *Session) SetIntensityFactor(v uint16) *Session

SetIntensityFactor sets Session value.

Scale: 1000; Units: if

func (*Session) SetJumpCount added in v0.4.0

func (m *Session) SetJumpCount(v uint16) *Session

SetJumpCount sets Session value.

func (*Session) SetLeftRightBalance added in v0.4.0

func (m *Session) SetLeftRightBalance(v typedef.LeftRightBalance100) *Session

SetLeftRightBalance sets Session value.

func (*Session) SetLevBatteryConsumption added in v0.4.0

func (m *Session) SetLevBatteryConsumption(v uint8) *Session

SetLevBatteryConsumption sets Session value.

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 Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMaxBallSpeed added in v0.4.0

func (m *Session) SetMaxBallSpeed(v uint16) *Session

SetMaxBallSpeed sets Session value.

Scale: 100; Units: m/s

func (*Session) SetMaxCadence added in v0.4.0

func (m *Session) SetMaxCadence(v uint8) *Session

SetMaxCadence sets Session value.

Units: rpm

func (*Session) SetMaxCadencePosition added in v0.4.0

func (m *Session) SetMaxCadencePosition(v []uint8) *Session

SetMaxCadencePosition sets Session 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 Session value.

Scale: 100; Units: C

func (*Session) SetMaxDepth added in v0.4.0

func (m *Session) SetMaxDepth(v uint32) *Session

SetMaxDepth sets Session value.

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 Session value.

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 Session value.

Units: bpm

func (*Session) SetMaxLevMotorPower added in v0.4.0

func (m *Session) SetMaxLevMotorPower(v uint16) *Session

SetMaxLevMotorPower sets Session 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 Session value.

Scale: 100; Units: %

func (*Session) SetMaxNegVerticalSpeed added in v0.4.0

func (m *Session) SetMaxNegVerticalSpeed(v int16) *Session

SetMaxNegVerticalSpeed sets Session value.

Scale: 1000; Units: m/s

func (*Session) SetMaxPosGrade added in v0.4.0

func (m *Session) SetMaxPosGrade(v int16) *Session

SetMaxPosGrade sets Session value.

Scale: 100; Units: %

func (*Session) SetMaxPosVerticalSpeed added in v0.4.0

func (m *Session) SetMaxPosVerticalSpeed(v int16) *Session

SetMaxPosVerticalSpeed sets Session value.

Scale: 1000; Units: m/s

func (*Session) SetMaxPower added in v0.4.0

func (m *Session) SetMaxPower(v uint16) *Session

SetMaxPower sets Session value.

Units: watts

func (*Session) SetMaxPowerPosition added in v0.4.0

func (m *Session) SetMaxPowerPosition(v []uint16) *Session

SetMaxPowerPosition sets Session 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 Session value.

func (*Session) SetMaxSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetMaxSaturatedHemoglobinPercent(v []uint16) *Session

SetMaxSaturatedHemoglobinPercent sets Session value.

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 Session value.

Scale: 1000; Units: m/s

func (*Session) SetMaxTemperature added in v0.4.0

func (m *Session) SetMaxTemperature(v int8) *Session

SetMaxTemperature sets Session value.

Units: C

func (*Session) SetMaxTotalHemoglobinConc added in v0.4.0

func (m *Session) SetMaxTotalHemoglobinConc(v []uint16) *Session

SetMaxTotalHemoglobinConc sets Session value.

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 Session 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 Session value.

Scale: 5; Offset: 500; Units: m

func (*Session) SetMinCoreTemperature added in v0.4.0

func (m *Session) SetMinCoreTemperature(v uint16) *Session

SetMinCoreTemperature sets Session value.

Scale: 100; Units: C

func (*Session) SetMinHeartRate added in v0.4.0

func (m *Session) SetMinHeartRate(v uint8) *Session

SetMinHeartRate sets Session value.

Units: bpm

func (*Session) SetMinRespirationRate added in v0.4.0

func (m *Session) SetMinRespirationRate(v uint8) *Session

SetMinRespirationRate sets Session value.

func (*Session) SetMinSaturatedHemoglobinPercent added in v0.4.0

func (m *Session) SetMinSaturatedHemoglobinPercent(v []uint16) *Session

SetMinSaturatedHemoglobinPercent sets Session value.

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 Session value.

Units: C

func (*Session) SetMinTotalHemoglobinConc added in v0.4.0

func (m *Session) SetMinTotalHemoglobinConc(v []uint16) *Session

SetMinTotalHemoglobinConc sets Session value.

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 Session value.

Units: semicircles; North east corner latitude

func (*Session) SetNecLong added in v0.4.0

func (m *Session) SetNecLong(v int32) *Session

SetNecLong sets Session value.

Units: semicircles; North east corner longitude

func (*Session) SetNormalizedPower added in v0.4.0

func (m *Session) SetNormalizedPower(v uint16) *Session

SetNormalizedPower sets Session value.

Units: watts

func (*Session) SetNumActiveLengths added in v0.4.0

func (m *Session) SetNumActiveLengths(v uint16) *Session

SetNumActiveLengths sets Session 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 Session value.

func (*Session) SetNumLengths added in v0.4.0

func (m *Session) SetNumLengths(v uint16) *Session

SetNumLengths sets Session 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 Session value.

Units: OTUs

func (*Session) SetOpponentName added in v0.4.0

func (m *Session) SetOpponentName(v string) *Session

SetOpponentName sets Session value.

func (*Session) SetOpponentScore added in v0.4.0

func (m *Session) SetOpponentScore(v uint16) *Session

SetOpponentScore sets Session value.

func (*Session) SetPlayerScore added in v0.4.0

func (m *Session) SetPlayerScore(v uint16) *Session

SetPlayerScore sets Session value.

func (*Session) SetPoolLength added in v0.4.0

func (m *Session) SetPoolLength(v uint16) *Session

SetPoolLength sets Session value.

Scale: 100; Units: m

func (*Session) SetPoolLengthUnit added in v0.4.0

func (m *Session) SetPoolLengthUnit(v typedef.DisplayMeasure) *Session

SetPoolLengthUnit sets Session value.

func (*Session) SetRmssdHrv added in v0.4.0

func (m *Session) SetRmssdHrv(v uint8) *Session

SetRmssdHrv sets Session 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 Session 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 Session value.

func (*Session) SetSportIndex added in v0.4.0

func (m *Session) SetSportIndex(v uint8) *Session

SetSportIndex sets Session value.

func (*Session) SetSportProfileName added in v0.4.0

func (m *Session) SetSportProfileName(v string) *Session

SetSportProfileName sets Session value.

Sport name from associated sport mesg

func (*Session) SetStandCount added in v0.4.0

func (m *Session) SetStandCount(v uint16) *Session

SetStandCount sets Session 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 Session value.

Units: percent

func (*Session) SetStartN2 added in v0.4.0

func (m *Session) SetStartN2(v uint16) *Session

SetStartN2 sets Session value.

Units: percent

func (*Session) SetStartPositionLat added in v0.4.0

func (m *Session) SetStartPositionLat(v int32) *Session

SetStartPositionLat sets Session value.

Units: semicircles

func (*Session) SetStartPositionLong added in v0.4.0

func (m *Session) SetStartPositionLong(v int32) *Session

SetStartPositionLong sets Session value.

Units: semicircles

func (*Session) SetStartTime added in v0.4.0

func (m *Session) SetStartTime(v time.Time) *Session

SetStartTime sets Session value.

func (*Session) SetStrokeCount added in v0.4.0

func (m *Session) SetStrokeCount(v []uint16) *Session

SetStrokeCount sets Session 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 Session value.

func (*Session) SetSurfaceInterval added in v0.4.0

func (m *Session) SetSurfaceInterval(v uint32) *Session

SetSurfaceInterval sets Session 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 Session value.

Units: semicircles; South west corner latitude

func (*Session) SetSwcLong added in v0.4.0

func (m *Session) SetSwcLong(v int32) *Session

SetSwcLong sets Session value.

Units: semicircles; South west corner longitude

func (*Session) SetSwimStroke added in v0.4.0

func (m *Session) SetSwimStroke(v typedef.SwimStroke) *Session

SetSwimStroke sets Session value.

Units: swim_stroke

func (*Session) SetThresholdPower added in v0.4.0

func (m *Session) SetThresholdPower(v uint16) *Session

SetThresholdPower sets Session value.

Units: watts

func (*Session) SetTimeInCadenceZone added in v0.4.0

func (m *Session) SetTimeInCadenceZone(v []uint32) *Session

SetTimeInCadenceZone sets Session value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInHrZone added in v0.4.0

func (m *Session) SetTimeInHrZone(v []uint32) *Session

SetTimeInHrZone sets Session value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInPowerZone added in v0.4.0

func (m *Session) SetTimeInPowerZone(v []uint32) *Session

SetTimeInPowerZone sets Session value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeInSpeedZone added in v0.4.0

func (m *Session) SetTimeInSpeedZone(v []uint32) *Session

SetTimeInSpeedZone sets Session value.

Array: [N]; Scale: 1000; Units: s

func (*Session) SetTimeStanding added in v0.4.0

func (m *Session) SetTimeStanding(v uint32) *Session

SetTimeStanding sets Session value.

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 Session value.

Units: s; Sesson end time.

func (*Session) SetTotalAnaerobicTrainingEffect added in v0.4.0

func (m *Session) SetTotalAnaerobicTrainingEffect(v uint8) *Session

SetTotalAnaerobicTrainingEffect sets Session value.

Scale: 10

func (*Session) SetTotalAscent added in v0.4.0

func (m *Session) SetTotalAscent(v uint16) *Session

SetTotalAscent sets Session value.

Units: m

func (*Session) SetTotalCalories added in v0.4.0

func (m *Session) SetTotalCalories(v uint16) *Session

SetTotalCalories sets Session value.

Units: kcal

func (*Session) SetTotalCycles added in v0.4.0

func (m *Session) SetTotalCycles(v uint32) *Session

SetTotalCycles sets Session value.

Units: cycles

func (*Session) SetTotalDescent added in v0.4.0

func (m *Session) SetTotalDescent(v uint16) *Session

SetTotalDescent sets Session value.

Units: m

func (*Session) SetTotalDistance added in v0.4.0

func (m *Session) SetTotalDistance(v uint32) *Session

SetTotalDistance sets Session value.

Scale: 100; Units: m

func (*Session) SetTotalElapsedTime added in v0.4.0

func (m *Session) SetTotalElapsedTime(v uint32) *Session

SetTotalElapsedTime sets Session value.

Scale: 1000; Units: s; Time (includes pauses)

func (*Session) SetTotalFatCalories added in v0.4.0

func (m *Session) SetTotalFatCalories(v uint16) *Session

SetTotalFatCalories sets Session value.

Units: kcal

func (*Session) SetTotalFlow added in v0.4.0

func (m *Session) SetTotalFlow(v float32) *Session

SetTotalFlow sets Session 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 Session value.

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 Session value.

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 Session value.

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 Session 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 Session value.

Scale: 1000; Units: s

func (*Session) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets Session value.

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 Session value.

Scale: 10

func (*Session) SetTotalWork added in v0.4.0

func (m *Session) SetTotalWork(v uint32) *Session

SetTotalWork sets Session value.

Units: J

func (*Session) SetTrainingLoadPeak added in v0.4.0

func (m *Session) SetTrainingLoadPeak(v int32) *Session

SetTrainingLoadPeak sets Session value.

Scale: 65536

func (*Session) SetTrainingStressScore added in v0.4.0

func (m *Session) SetTrainingStressScore(v uint16) *Session

SetTrainingStressScore sets Session value.

Scale: 10; Units: tss

func (*Session) SetTrigger added in v0.4.0

func (m *Session) SetTrigger(v typedef.SessionTrigger) *Session

SetTrigger sets Session value.

func (*Session) SetZoneCount added in v0.4.0

func (m *Session) SetZoneCount(v []uint16) *Session

SetZoneCount sets Session value.

Array: [N]; Units: counts; zone number used as the index

func (*Session) TimeInCadenceZoneScaled added in v0.8.0

func (m *Session) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInCadenceZone value is invalid, nil will be returned.

func (*Session) TimeInHrZoneScaled added in v0.8.0

func (m *Session) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInHrZone value is invalid, nil will be returned.

func (*Session) TimeInPowerZoneScaled added in v0.8.0

func (m *Session) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInPowerZone value is invalid, nil will be returned.

func (*Session) TimeInSpeedZoneScaled added in v0.8.0

func (m *Session) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInSpeedZone value is invalid, nil will be returned.

func (*Session) TimeStandingScaled added in v0.8.0

func (m *Session) TimeStandingScaled() float64

TimeStandingScaled return TimeStanding in its scaled value [Scale: 1000; Units: s; Total time spend in the standing position].

If TimeStanding value is invalid, float64 invalid value will be returned.

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 [Scale: 10].

If TotalAnaerobicTrainingEffect value is invalid, float64 invalid value will be returned.

func (*Session) TotalDistanceScaled added in v0.8.0

func (m *Session) TotalDistanceScaled() float64

TotalDistanceScaled return TotalDistance in its scaled value [Scale: 100; Units: m].

If TotalDistance value is invalid, float64 invalid value will be returned.

func (*Session) TotalElapsedTimeScaled added in v0.8.0

func (m *Session) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value [Scale: 1000; Units: s; Time (includes pauses)].

If TotalElapsedTime value is invalid, float64 invalid value will be returned.

func (*Session) TotalFractionalAscentScaled added in v0.8.0

func (m *Session) TotalFractionalAscentScaled() float64

TotalFractionalAscentScaled return TotalFractionalAscent in its scaled value [Scale: 100; Units: m; fractional part of total_ascent].

If TotalFractionalAscent value is invalid, float64 invalid value will be returned.

func (*Session) TotalFractionalCyclesScaled added in v0.8.0

func (m *Session) TotalFractionalCyclesScaled() float64

TotalFractionalCyclesScaled return TotalFractionalCycles in its scaled value [Scale: 128; Units: cycles; fractional part of the total_cycles].

If TotalFractionalCycles value is invalid, float64 invalid value will be returned.

func (*Session) TotalFractionalDescentScaled added in v0.8.0

func (m *Session) TotalFractionalDescentScaled() float64

TotalFractionalDescentScaled return TotalFractionalDescent in its scaled value [Scale: 100; Units: m; fractional part of total_descent].

If TotalFractionalDescent value is invalid, float64 invalid value will be returned.

func (*Session) TotalMovingTimeScaled added in v0.8.0

func (m *Session) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value [Scale: 1000; Units: s].

If TotalMovingTime value is invalid, float64 invalid value will be returned.

func (*Session) TotalTimerTimeScaled added in v0.8.0

func (m *Session) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s; Timer Time (excludes pauses)].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

func (*Session) TotalTrainingEffectScaled added in v0.8.0

func (m *Session) TotalTrainingEffectScaled() float64

TotalTrainingEffectScaled return TotalTrainingEffect in its scaled value [Scale: 10].

If TotalTrainingEffect value is invalid, float64 invalid value will be returned.

func (*Session) TrainingLoadPeakScaled added in v0.8.0

func (m *Session) TrainingLoadPeakScaled() float64

TrainingLoadPeakScaled return TrainingLoadPeak in its scaled value [Scale: 65536].

If TrainingLoadPeak value is invalid, float64 invalid value will be returned.

func (*Session) TrainingStressScoreScaled added in v0.8.0

func (m *Session) TrainingStressScoreScaled() float64

TrainingStressScoreScaled return TrainingStressScore in its scaled value [Scale: 10; Units: tss].

If TrainingStressScore value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Set is a Set message.

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 [Scale: 1000; Units: s].

If Duration value is invalid, float64 invalid value will be returned.

func (*Set) SetCategory added in v0.4.0

func (m *Set) SetCategory(v []typedef.ExerciseCategory) *Set

SetCategory sets Set value.

Array: [N]

func (*Set) SetCategorySubtype added in v0.4.0

func (m *Set) SetCategorySubtype(v []uint16) *Set

SetCategorySubtype sets Set 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 Set's DeveloperFields.

func (*Set) SetDuration added in v0.4.0

func (m *Set) SetDuration(v uint32) *Set

SetDuration sets Set value.

Scale: 1000; Units: s

func (*Set) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Set value.

func (*Set) SetRepetitions added in v0.4.0

func (m *Set) SetRepetitions(v uint16) *Set

SetRepetitions sets Set value.

of repitions of the movement

func (*Set) SetSetType added in v0.4.0

func (m *Set) SetSetType(v typedef.SetType) *Set

SetSetType sets Set value.

func (*Set) SetStartTime added in v0.4.0

func (m *Set) SetStartTime(v time.Time) *Set

SetStartTime sets Set value.

Start time of the set

func (*Set) SetTimestamp added in v0.4.0

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

SetTimestamp sets Set value.

Timestamp of the set

func (*Set) SetWeight added in v0.4.0

func (m *Set) SetWeight(v uint16) *Set

SetWeight sets Set 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 Set value.

func (*Set) SetWktStepIndex added in v0.4.0

func (m *Set) SetWktStepIndex(v typedef.MessageIndex) *Set

SetWktStepIndex sets Set value.

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 [Scale: 16; Units: kg; Amount of weight applied for the set].

If Weight value is invalid, float64 invalid value will be returned.

type SlaveDevice

type SlaveDevice struct {
	Manufacturer typedef.Manufacturer
	Product      uint16

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SlaveDevice is a SlaveDevice message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields SlaveDevice's DeveloperFields.

func (*SlaveDevice) SetManufacturer added in v0.4.0

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

SetManufacturer sets SlaveDevice value.

func (*SlaveDevice) SetProduct added in v0.4.0

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

SetProduct sets SlaveDevice value.

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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SleepAssessment is a SleepAssessment message.

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 [Scale: 100; Excludes stress during awake periods in the sleep window].

If AverageStressDuringSleep value is invalid, float64 invalid value will be returned.

func (*SleepAssessment) SetAverageStressDuringSleep added in v0.4.0

func (m *SleepAssessment) SetAverageStressDuringSleep(v uint16) *SleepAssessment

SetAverageStressDuringSleep sets SleepAssessment value.

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 SleepAssessment 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 SleepAssessment value.

The number of awakenings during sleep.

func (*SleepAssessment) SetAwakeningsCountScore added in v0.4.0

func (m *SleepAssessment) SetAwakeningsCountScore(v uint8) *SleepAssessment

SetAwakeningsCountScore sets SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment's DeveloperFields.

func (*SleepAssessment) SetInterruptionsScore added in v0.4.0

func (m *SleepAssessment) SetInterruptionsScore(v uint8) *SleepAssessment

SetInterruptionsScore sets SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment 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 SleepAssessment value.

Score that evaluates the amount of restlessness during sleep. If valid: 0 (worst) to 100 (best). If unknown: FIT_UINT8_INVALID.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SleepLevel is a SleepLevel message.

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 SleepLevel's 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 SleepLevel value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Software is a Software message.

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 Software's DeveloperFields.

func (*Software) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Software value.

func (*Software) SetPartNumber added in v0.4.0

func (m *Software) SetPartNumber(v string) *Software

SetPartNumber sets Software value.

func (*Software) SetVersion added in v0.4.0

func (m *Software) SetVersion(v uint16) *Software

SetVersion sets Software value.

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 [Scale: 100].

If Version value is invalid, float64 invalid value will be returned.

type SpeedZone

type SpeedZone struct {
	Name         string
	MessageIndex typedef.MessageIndex
	HighValue    uint16 // Scale: 1000; Units: m/s

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SpeedZone is a SpeedZone message.

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 [Scale: 1000; Units: m/s].

If HighValue value is invalid, float64 invalid value will be returned.

func (*SpeedZone) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields SpeedZone's DeveloperFields.

func (*SpeedZone) SetHighValue added in v0.4.0

func (m *SpeedZone) SetHighValue(v uint16) *SpeedZone

SetHighValue sets SpeedZone value.

Scale: 1000; Units: m/s

func (*SpeedZone) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets SpeedZone value.

func (*SpeedZone) SetName added in v0.4.0

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

SetName sets SpeedZone value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Split is a Split message.

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 [Scale: 1000; Units: m/s].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*Split) AvgVertSpeedScaled added in v0.8.0

func (m *Split) AvgVertSpeedScaled() float64

AvgVertSpeedScaled return AvgVertSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgVertSpeed value is invalid, float64 invalid value will be returned.

func (*Split) MaxSpeedScaled added in v0.8.0

func (m *Split) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*Split) SetAvgSpeed added in v0.4.0

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

SetAvgSpeed sets Split value.

Scale: 1000; Units: m/s

func (*Split) SetAvgVertSpeed added in v0.4.0

func (m *Split) SetAvgVertSpeed(v int32) *Split

SetAvgVertSpeed sets Split value.

Scale: 1000; Units: m/s

func (*Split) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Split's DeveloperFields.

func (*Split) SetEndPositionLat added in v0.4.0

func (m *Split) SetEndPositionLat(v int32) *Split

SetEndPositionLat sets Split value.

Units: semicircles

func (*Split) SetEndPositionLong added in v0.4.0

func (m *Split) SetEndPositionLong(v int32) *Split

SetEndPositionLong sets Split value.

Units: semicircles

func (*Split) SetEndTime added in v0.4.0

func (m *Split) SetEndTime(v time.Time) *Split

SetEndTime sets Split value.

func (*Split) SetMaxSpeed added in v0.4.0

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

SetMaxSpeed sets Split value.

Scale: 1000; Units: m/s

func (*Split) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Split value.

func (*Split) SetSplitType added in v0.4.0

func (m *Split) SetSplitType(v typedef.SplitType) *Split

SetSplitType sets Split value.

func (*Split) SetStartElevation added in v0.4.0

func (m *Split) SetStartElevation(v uint32) *Split

SetStartElevation sets Split value.

Scale: 5; Offset: 500; Units: m

func (*Split) SetStartPositionLat added in v0.4.0

func (m *Split) SetStartPositionLat(v int32) *Split

SetStartPositionLat sets Split value.

Units: semicircles

func (*Split) SetStartPositionLong added in v0.4.0

func (m *Split) SetStartPositionLong(v int32) *Split

SetStartPositionLong sets Split value.

Units: semicircles

func (*Split) SetStartTime added in v0.4.0

func (m *Split) SetStartTime(v time.Time) *Split

SetStartTime sets Split value.

func (*Split) SetTotalAscent added in v0.4.0

func (m *Split) SetTotalAscent(v uint16) *Split

SetTotalAscent sets Split value.

Units: m

func (*Split) SetTotalCalories added in v0.4.0

func (m *Split) SetTotalCalories(v uint32) *Split

SetTotalCalories sets Split value.

Units: kcal

func (*Split) SetTotalDescent added in v0.4.0

func (m *Split) SetTotalDescent(v uint16) *Split

SetTotalDescent sets Split value.

Units: m

func (*Split) SetTotalDistance added in v0.4.0

func (m *Split) SetTotalDistance(v uint32) *Split

SetTotalDistance sets Split value.

Scale: 100; Units: m

func (*Split) SetTotalElapsedTime added in v0.4.0

func (m *Split) SetTotalElapsedTime(v uint32) *Split

SetTotalElapsedTime sets Split value.

Scale: 1000; Units: s

func (*Split) SetTotalMovingTime added in v0.4.0

func (m *Split) SetTotalMovingTime(v uint32) *Split

SetTotalMovingTime sets Split value.

Scale: 1000; Units: s

func (*Split) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets Split value.

Scale: 1000; Units: s

func (*Split) StartElevationScaled added in v0.8.0

func (m *Split) StartElevationScaled() float64

StartElevationScaled return StartElevation in its scaled value [Scale: 5; Offset: 500; Units: m].

If StartElevation value is invalid, float64 invalid value will be returned.

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 [Scale: 100; Units: m].

If TotalDistance value is invalid, float64 invalid value will be returned.

func (*Split) TotalElapsedTimeScaled added in v0.8.0

func (m *Split) TotalElapsedTimeScaled() float64

TotalElapsedTimeScaled return TotalElapsedTime in its scaled value [Scale: 1000; Units: s].

If TotalElapsedTime value is invalid, float64 invalid value will be returned.

func (*Split) TotalMovingTimeScaled added in v0.8.0

func (m *Split) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value [Scale: 1000; Units: s].

If TotalMovingTime value is invalid, float64 invalid value will be returned.

func (*Split) TotalTimerTimeScaled added in v0.8.0

func (m *Split) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

SplitSummary is a SplitSummary message.

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 [Scale: 1000; Units: m/s].

If AvgSpeed value is invalid, float64 invalid value will be returned.

func (*SplitSummary) AvgVertSpeedScaled added in v0.8.0

func (m *SplitSummary) AvgVertSpeedScaled() float64

AvgVertSpeedScaled return AvgVertSpeed in its scaled value [Scale: 1000; Units: m/s].

If AvgVertSpeed value is invalid, float64 invalid value will be returned.

func (*SplitSummary) MaxSpeedScaled added in v0.8.0

func (m *SplitSummary) MaxSpeedScaled() float64

MaxSpeedScaled return MaxSpeed in its scaled value [Scale: 1000; Units: m/s].

If MaxSpeed value is invalid, float64 invalid value will be returned.

func (*SplitSummary) SetAvgHeartRate added in v0.4.0

func (m *SplitSummary) SetAvgHeartRate(v uint8) *SplitSummary

SetAvgHeartRate sets SplitSummary value.

Units: bpm

func (*SplitSummary) SetAvgSpeed added in v0.4.0

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

SetAvgSpeed sets SplitSummary value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetAvgVertSpeed added in v0.4.0

func (m *SplitSummary) SetAvgVertSpeed(v int32) *SplitSummary

SetAvgVertSpeed sets SplitSummary value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields SplitSummary's DeveloperFields.

func (*SplitSummary) SetMaxHeartRate added in v0.4.0

func (m *SplitSummary) SetMaxHeartRate(v uint8) *SplitSummary

SetMaxHeartRate sets SplitSummary value.

Units: bpm

func (*SplitSummary) SetMaxSpeed added in v0.4.0

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

SetMaxSpeed sets SplitSummary value.

Scale: 1000; Units: m/s

func (*SplitSummary) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets SplitSummary value.

func (*SplitSummary) SetNumSplits added in v0.4.0

func (m *SplitSummary) SetNumSplits(v uint16) *SplitSummary

SetNumSplits sets SplitSummary value.

func (*SplitSummary) SetSplitType added in v0.4.0

func (m *SplitSummary) SetSplitType(v typedef.SplitType) *SplitSummary

SetSplitType sets SplitSummary value.

func (*SplitSummary) SetTotalAscent added in v0.4.0

func (m *SplitSummary) SetTotalAscent(v uint16) *SplitSummary

SetTotalAscent sets SplitSummary value.

Units: m

func (*SplitSummary) SetTotalCalories added in v0.4.0

func (m *SplitSummary) SetTotalCalories(v uint32) *SplitSummary

SetTotalCalories sets SplitSummary value.

Units: kcal

func (*SplitSummary) SetTotalDescent added in v0.4.0

func (m *SplitSummary) SetTotalDescent(v uint16) *SplitSummary

SetTotalDescent sets SplitSummary value.

Units: m

func (*SplitSummary) SetTotalDistance added in v0.4.0

func (m *SplitSummary) SetTotalDistance(v uint32) *SplitSummary

SetTotalDistance sets SplitSummary value.

Scale: 100; Units: m

func (*SplitSummary) SetTotalMovingTime added in v0.4.0

func (m *SplitSummary) SetTotalMovingTime(v uint32) *SplitSummary

SetTotalMovingTime sets SplitSummary value.

Scale: 1000; Units: s

func (*SplitSummary) SetTotalTimerTime added in v0.4.0

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

SetTotalTimerTime sets SplitSummary value.

Scale: 1000; Units: s

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 [Scale: 100; Units: m].

If TotalDistance value is invalid, float64 invalid value will be returned.

func (*SplitSummary) TotalMovingTimeScaled added in v0.8.0

func (m *SplitSummary) TotalMovingTimeScaled() float64

TotalMovingTimeScaled return TotalMovingTime in its scaled value [Scale: 1000; Units: s].

If TotalMovingTime value is invalid, float64 invalid value will be returned.

func (*SplitSummary) TotalTimerTimeScaled added in v0.8.0

func (m *SplitSummary) TotalTimerTimeScaled() float64

TotalTimerTimeScaled return TotalTimerTime in its scaled value [Scale: 1000; Units: s].

If TotalTimerTime value is invalid, float64 invalid value will be returned.

type Spo2Data

type Spo2Data struct {
	Timestamp         time.Time // Units: s
	ReadingSpo2       uint8     // Units: percent
	ReadingConfidence uint8
	Mode              typedef.Spo2MeasurementType // Mode when data was captured

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Spo2Data is a Spo2Data message.

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 Spo2Data's DeveloperFields.

func (*Spo2Data) SetMode added in v0.4.0

SetMode sets Spo2Data value.

Mode when data was captured

func (*Spo2Data) SetReadingConfidence added in v0.4.0

func (m *Spo2Data) SetReadingConfidence(v uint8) *Spo2Data

SetReadingConfidence sets Spo2Data value.

func (*Spo2Data) SetReadingSpo2 added in v0.4.0

func (m *Spo2Data) SetReadingSpo2(v uint8) *Spo2Data

SetReadingSpo2 sets Spo2Data value.

Units: percent

func (*Spo2Data) SetTimestamp added in v0.4.0

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

SetTimestamp sets Spo2Data value.

Units: s

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Sport is a Sport message.

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 Sport's DeveloperFields.

func (*Sport) SetName added in v0.4.0

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

SetName sets Sport 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 Sport value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

StressLevel is a StressLevel message.

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 StressLevel's DeveloperFields.

func (*StressLevel) SetStressLevelTime added in v0.4.0

func (m *StressLevel) SetStressLevelTime(v time.Time) *StressLevel

SetStressLevelTime sets StressLevel 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 StressLevel value.

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
	VolumeUsed    uint32 // Scale: 100; Units: L
	StartPressure uint16 // Scale: 100; Units: bar
	EndPressure   uint16 // Scale: 100; Units: bar

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

TankSummary is a TankSummary message.

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 [Scale: 100; Units: bar].

If EndPressure value is invalid, float64 invalid value will be returned.

func (*TankSummary) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields TankSummary's DeveloperFields.

func (*TankSummary) SetEndPressure added in v0.4.0

func (m *TankSummary) SetEndPressure(v uint16) *TankSummary

SetEndPressure sets TankSummary value.

Scale: 100; Units: bar

func (*TankSummary) SetSensor added in v0.4.0

func (m *TankSummary) SetSensor(v typedef.AntChannelId) *TankSummary

SetSensor sets TankSummary value.

func (*TankSummary) SetStartPressure added in v0.4.0

func (m *TankSummary) SetStartPressure(v uint16) *TankSummary

SetStartPressure sets TankSummary value.

Scale: 100; Units: bar

func (*TankSummary) SetTimestamp added in v0.4.0

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

SetTimestamp sets TankSummary value.

Units: s

func (*TankSummary) SetVolumeUsed added in v0.4.0

func (m *TankSummary) SetVolumeUsed(v uint32) *TankSummary

SetVolumeUsed sets TankSummary value.

Scale: 100; Units: L

func (*TankSummary) StartPressureScaled added in v0.8.0

func (m *TankSummary) StartPressureScaled() float64

StartPressureScaled return StartPressure in its scaled value [Scale: 100; Units: bar].

If StartPressure value is invalid, float64 invalid value will be returned.

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 [Scale: 100; Units: L].

If VolumeUsed value is invalid, float64 invalid value will be returned.

type TankUpdate

type TankUpdate struct {
	Timestamp time.Time // Units: s
	Sensor    typedef.AntChannelId
	Pressure  uint16 // Scale: 100; Units: bar

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

TankUpdate is a TankUpdate message.

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 [Scale: 100; Units: bar].

If Pressure value is invalid, float64 invalid value will be returned.

func (*TankUpdate) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields TankUpdate's DeveloperFields.

func (*TankUpdate) SetPressure added in v0.4.0

func (m *TankUpdate) SetPressure(v uint16) *TankUpdate

SetPressure sets TankUpdate value.

Scale: 100; Units: bar

func (*TankUpdate) SetSensor added in v0.4.0

func (m *TankUpdate) SetSensor(v typedef.AntChannelId) *TankUpdate

SetSensor sets TankUpdate value.

func (*TankUpdate) SetTimestamp added in v0.4.0

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

SetTimestamp sets TankUpdate value.

Units: s

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          []int32            // Array: [3]; Internal calibration factors, one for each: xy, yx, zx
	OrientationMatrix  []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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ThreeDSensorCalibration is a ThreeDSensorCalibration message.

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) OrientationMatrixScaled added in v0.8.0

func (m *ThreeDSensorCalibration) OrientationMatrixScaled() []float64

OrientationMatrixScaled return OrientationMatrix in its scaled value [Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)].

If OrientationMatrix value is invalid, nil will be returned.

func (*ThreeDSensorCalibration) SetCalibrationDivisor added in v0.4.0

func (m *ThreeDSensorCalibration) SetCalibrationDivisor(v uint32) *ThreeDSensorCalibration

SetCalibrationDivisor sets ThreeDSensorCalibration value.

Units: counts; Calibration factor divisor

func (*ThreeDSensorCalibration) SetCalibrationFactor added in v0.4.0

func (m *ThreeDSensorCalibration) SetCalibrationFactor(v uint32) *ThreeDSensorCalibration

SetCalibrationFactor sets ThreeDSensorCalibration 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 ThreeDSensorCalibration's DeveloperFields.

func (*ThreeDSensorCalibration) SetLevelShift added in v0.4.0

SetLevelShift sets ThreeDSensorCalibration value.

Level shift value used to shift the ADC value back into range

func (*ThreeDSensorCalibration) SetOffsetCal added in v0.4.0

SetOffsetCal sets ThreeDSensorCalibration 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 []int32) *ThreeDSensorCalibration

SetOrientationMatrix sets ThreeDSensorCalibration value.

Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)

func (*ThreeDSensorCalibration) SetSensorType added in v0.4.0

SetSensorType sets ThreeDSensorCalibration value.

Indicates which sensor the calibration is for

func (*ThreeDSensorCalibration) SetTimestamp added in v0.4.0

SetTimestamp sets ThreeDSensorCalibration value.

Units: s; Whole second part of the timestamp

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
	CadenceZoneHighBondary   []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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

TimeInZone is a TimeInZone message.

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) SetCadenceZoneHighBondary added in v0.4.0

func (m *TimeInZone) SetCadenceZoneHighBondary(v []uint8) *TimeInZone

SetCadenceZoneHighBondary sets TimeInZone value.

Array: [N]; Units: rpm

func (*TimeInZone) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields TimeInZone's DeveloperFields.

func (*TimeInZone) SetFunctionalThresholdPower added in v0.4.0

func (m *TimeInZone) SetFunctionalThresholdPower(v uint16) *TimeInZone

SetFunctionalThresholdPower sets TimeInZone value.

func (*TimeInZone) SetHrCalcType added in v0.4.0

func (m *TimeInZone) SetHrCalcType(v typedef.HrZoneCalc) *TimeInZone

SetHrCalcType sets TimeInZone value.

func (*TimeInZone) SetHrZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetHrZoneHighBoundary(v []uint8) *TimeInZone

SetHrZoneHighBoundary sets TimeInZone value.

Array: [N]; Units: bpm

func (*TimeInZone) SetMaxHeartRate added in v0.4.0

func (m *TimeInZone) SetMaxHeartRate(v uint8) *TimeInZone

SetMaxHeartRate sets TimeInZone value.

func (*TimeInZone) SetPowerZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetPowerZoneHighBoundary(v []uint16) *TimeInZone

SetPowerZoneHighBoundary sets TimeInZone value.

Array: [N]; Units: watts

func (*TimeInZone) SetPwrCalcType added in v0.4.0

func (m *TimeInZone) SetPwrCalcType(v typedef.PwrZoneCalc) *TimeInZone

SetPwrCalcType sets TimeInZone value.

func (*TimeInZone) SetReferenceIndex added in v0.4.0

func (m *TimeInZone) SetReferenceIndex(v typedef.MessageIndex) *TimeInZone

SetReferenceIndex sets TimeInZone value.

func (*TimeInZone) SetReferenceMesg added in v0.4.0

func (m *TimeInZone) SetReferenceMesg(v typedef.MesgNum) *TimeInZone

SetReferenceMesg sets TimeInZone value.

func (*TimeInZone) SetRestingHeartRate added in v0.4.0

func (m *TimeInZone) SetRestingHeartRate(v uint8) *TimeInZone

SetRestingHeartRate sets TimeInZone value.

func (*TimeInZone) SetSpeedZoneHighBoundary added in v0.4.0

func (m *TimeInZone) SetSpeedZoneHighBoundary(v []uint16) *TimeInZone

SetSpeedZoneHighBoundary sets TimeInZone value.

Array: [N]; Scale: 1000; Units: m/s

func (*TimeInZone) SetThresholdHeartRate added in v0.4.0

func (m *TimeInZone) SetThresholdHeartRate(v uint8) *TimeInZone

SetThresholdHeartRate sets TimeInZone value.

func (*TimeInZone) SetTimeInCadenceZone added in v0.4.0

func (m *TimeInZone) SetTimeInCadenceZone(v []uint32) *TimeInZone

SetTimeInCadenceZone sets TimeInZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInHrZone added in v0.4.0

func (m *TimeInZone) SetTimeInHrZone(v []uint32) *TimeInZone

SetTimeInHrZone sets TimeInZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInPowerZone added in v0.4.0

func (m *TimeInZone) SetTimeInPowerZone(v []uint32) *TimeInZone

SetTimeInPowerZone sets TimeInZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimeInSpeedZone added in v0.4.0

func (m *TimeInZone) SetTimeInSpeedZone(v []uint32) *TimeInZone

SetTimeInSpeedZone sets TimeInZone value.

Array: [N]; Scale: 1000; Units: s

func (*TimeInZone) SetTimestamp added in v0.4.0

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

SetTimestamp sets TimeInZone value.

Units: s

func (*TimeInZone) SpeedZoneHighBoundaryScaled added in v0.8.0

func (m *TimeInZone) SpeedZoneHighBoundaryScaled() []float64

SpeedZoneHighBoundaryScaled return SpeedZoneHighBoundary in its scaled value [Array: [N]; Scale: 1000; Units: m/s].

If SpeedZoneHighBoundary value is invalid, nil will be returned.

func (*TimeInZone) TimeInCadenceZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInCadenceZoneScaled() []float64

TimeInCadenceZoneScaled return TimeInCadenceZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInCadenceZone value is invalid, nil will be returned.

func (*TimeInZone) TimeInHrZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInHrZoneScaled() []float64

TimeInHrZoneScaled return TimeInHrZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInHrZone value is invalid, nil will be returned.

func (*TimeInZone) TimeInPowerZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInPowerZoneScaled() []float64

TimeInPowerZoneScaled return TimeInPowerZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInPowerZone value is invalid, nil will be returned.

func (*TimeInZone) TimeInSpeedZoneScaled added in v0.8.0

func (m *TimeInZone) TimeInSpeedZoneScaled() []float64

TimeInSpeedZoneScaled return TimeInSpeedZone in its scaled value [Array: [N]; Scale: 1000; Units: s].

If TimeInSpeedZone value is invalid, nil will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

TimestampCorrelation is a TimestampCorrelation message.

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 [Scale: 32768; Units: s; Fractional part of the system timestamp].

If FractionalSystemTimestamp value is invalid, float64 invalid value will be returned.

func (*TimestampCorrelation) FractionalTimestampScaled added in v0.8.0

func (m *TimestampCorrelation) FractionalTimestampScaled() float64

FractionalTimestampScaled return FractionalTimestamp in its scaled value [Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.].

If FractionalTimestamp value is invalid, float64 invalid value will be returned.

func (*TimestampCorrelation) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields TimestampCorrelation's DeveloperFields.

func (*TimestampCorrelation) SetFractionalSystemTimestamp added in v0.4.0

func (m *TimestampCorrelation) SetFractionalSystemTimestamp(v uint16) *TimestampCorrelation

SetFractionalSystemTimestamp sets TimestampCorrelation value.

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 TimestampCorrelation value.

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 TimestampCorrelation 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 TimestampCorrelation 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 TimestampCorrelation 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 TimestampCorrelation 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 TimestampCorrelation value.

Units: ms; Millisecond part of the UTC timestamp at the time the system timestamp was recorded.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Totals is a Totals message.

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 Totals value.

Units: s

func (*Totals) SetCalories added in v0.4.0

func (m *Totals) SetCalories(v uint32) *Totals

SetCalories sets Totals value.

Units: kcal

func (*Totals) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Totals's DeveloperFields.

func (*Totals) SetDistance added in v0.4.0

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

SetDistance sets Totals value.

Units: m

func (*Totals) SetElapsedTime added in v0.4.0

func (m *Totals) SetElapsedTime(v uint32) *Totals

SetElapsedTime sets Totals value.

Units: s; Includes pauses

func (*Totals) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Totals value.

func (*Totals) SetSessions added in v0.4.0

func (m *Totals) SetSessions(v uint16) *Totals

SetSessions sets Totals value.

func (*Totals) SetSport added in v0.4.0

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

SetSport sets Totals value.

func (*Totals) SetSportIndex added in v0.4.0

func (m *Totals) SetSportIndex(v uint8) *Totals

SetSportIndex sets Totals value.

func (*Totals) SetTimerTime added in v0.4.0

func (m *Totals) SetTimerTime(v uint32) *Totals

SetTimerTime sets Totals value.

Units: s; Excludes pauses

func (*Totals) SetTimestamp added in v0.4.0

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

SetTimestamp sets Totals value.

Units: s

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
	Manufacturer typedef.Manufacturer
	Product      uint16
	Type         typedef.File

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

TrainingFile is a TrainingFile message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields TrainingFile's DeveloperFields.

func (*TrainingFile) SetManufacturer added in v0.4.0

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

SetManufacturer sets TrainingFile value.

func (*TrainingFile) SetProduct added in v0.4.0

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

SetProduct sets TrainingFile value.

func (*TrainingFile) SetSerialNumber added in v0.4.0

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

SetSerialNumber sets TrainingFile value.

func (*TrainingFile) SetTimeCreated added in v0.4.0

func (m *TrainingFile) SetTimeCreated(v time.Time) *TrainingFile

SetTimeCreated sets TrainingFile value.

func (*TrainingFile) SetTimestamp added in v0.4.0

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

SetTimestamp sets TrainingFile value.

func (*TrainingFile) SetType added in v0.4.0

func (m *TrainingFile) SetType(v typedef.File) *TrainingFile

SetType sets TrainingFile value.

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
	GlobalId                   []byte                   // Array: [6]
	WakeTime                   typedef.LocaltimeIntoDay // Typical wake time
	SleepTime                  typedef.LocaltimeIntoDay // Typical bed time
	DiveCount                  uint32
	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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

UserProfile is a UserProfile message.

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 [Scale: 100; Units: m].

If Height value is invalid, float64 invalid value will be returned.

func (*UserProfile) SetActivityClass added in v0.4.0

func (m *UserProfile) SetActivityClass(v typedef.ActivityClass) *UserProfile

SetActivityClass sets UserProfile value.

func (*UserProfile) SetAge added in v0.4.0

func (m *UserProfile) SetAge(v uint8) *UserProfile

SetAge sets UserProfile value.

Units: years

func (*UserProfile) SetDefaultMaxBikingHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxBikingHeartRate(v uint8) *UserProfile

SetDefaultMaxBikingHeartRate sets UserProfile value.

Units: bpm

func (*UserProfile) SetDefaultMaxHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxHeartRate(v uint8) *UserProfile

SetDefaultMaxHeartRate sets UserProfile value.

Units: bpm

func (*UserProfile) SetDefaultMaxRunningHeartRate added in v0.4.0

func (m *UserProfile) SetDefaultMaxRunningHeartRate(v uint8) *UserProfile

SetDefaultMaxRunningHeartRate sets UserProfile value.

Units: bpm

func (*UserProfile) SetDepthSetting added in v0.4.0

func (m *UserProfile) SetDepthSetting(v typedef.DisplayMeasure) *UserProfile

SetDepthSetting sets UserProfile value.

func (*UserProfile) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields UserProfile's DeveloperFields.

func (*UserProfile) SetDistSetting added in v0.4.0

func (m *UserProfile) SetDistSetting(v typedef.DisplayMeasure) *UserProfile

SetDistSetting sets UserProfile value.

func (*UserProfile) SetDiveCount added in v0.4.0

func (m *UserProfile) SetDiveCount(v uint32) *UserProfile

SetDiveCount sets UserProfile value.

func (*UserProfile) SetElevSetting added in v0.4.0

func (m *UserProfile) SetElevSetting(v typedef.DisplayMeasure) *UserProfile

SetElevSetting sets UserProfile value.

func (*UserProfile) SetFriendlyName added in v0.4.0

func (m *UserProfile) SetFriendlyName(v string) *UserProfile

SetFriendlyName sets UserProfile value.

Used for Morning Report greeting

func (*UserProfile) SetGender added in v0.4.0

func (m *UserProfile) SetGender(v typedef.Gender) *UserProfile

SetGender sets UserProfile value.

func (*UserProfile) SetGlobalId added in v0.4.0

func (m *UserProfile) SetGlobalId(v []byte) *UserProfile

SetGlobalId sets UserProfile value.

Array: [6]

func (*UserProfile) SetHeight added in v0.4.0

func (m *UserProfile) SetHeight(v uint8) *UserProfile

SetHeight sets UserProfile value.

Scale: 100; Units: m

func (*UserProfile) SetHeightSetting added in v0.4.0

func (m *UserProfile) SetHeightSetting(v typedef.DisplayMeasure) *UserProfile

SetHeightSetting sets UserProfile value.

func (*UserProfile) SetHrSetting added in v0.4.0

func (m *UserProfile) SetHrSetting(v typedef.DisplayHeart) *UserProfile

SetHrSetting sets UserProfile value.

func (*UserProfile) SetLanguage added in v0.4.0

func (m *UserProfile) SetLanguage(v typedef.Language) *UserProfile

SetLanguage sets UserProfile value.

func (*UserProfile) SetLocalId added in v0.4.0

func (m *UserProfile) SetLocalId(v typedef.UserLocalId) *UserProfile

SetLocalId sets UserProfile value.

func (*UserProfile) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets UserProfile value.

func (*UserProfile) SetPositionSetting added in v0.4.0

func (m *UserProfile) SetPositionSetting(v typedef.DisplayPosition) *UserProfile

SetPositionSetting sets UserProfile value.

func (*UserProfile) SetPowerSetting added in v0.4.0

func (m *UserProfile) SetPowerSetting(v typedef.DisplayPower) *UserProfile

SetPowerSetting sets UserProfile value.

func (*UserProfile) SetRestingHeartRate added in v0.4.0

func (m *UserProfile) SetRestingHeartRate(v uint8) *UserProfile

SetRestingHeartRate sets UserProfile value.

Units: bpm

func (*UserProfile) SetSleepTime added in v0.4.0

func (m *UserProfile) SetSleepTime(v typedef.LocaltimeIntoDay) *UserProfile

SetSleepTime sets UserProfile value.

Typical bed time

func (*UserProfile) SetSpeedSetting added in v0.4.0

func (m *UserProfile) SetSpeedSetting(v typedef.DisplayMeasure) *UserProfile

SetSpeedSetting sets UserProfile value.

func (*UserProfile) SetTemperatureSetting added in v0.4.0

func (m *UserProfile) SetTemperatureSetting(v typedef.DisplayMeasure) *UserProfile

SetTemperatureSetting sets UserProfile value.

func (*UserProfile) SetUserRunningStepLength added in v0.4.0

func (m *UserProfile) SetUserRunningStepLength(v uint16) *UserProfile

SetUserRunningStepLength sets UserProfile value.

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 UserProfile value.

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 UserProfile value.

Typical wake time

func (*UserProfile) SetWeight added in v0.4.0

func (m *UserProfile) SetWeight(v uint16) *UserProfile

SetWeight sets UserProfile value.

Scale: 10; Units: kg

func (*UserProfile) SetWeightSetting added in v0.4.0

func (m *UserProfile) SetWeightSetting(v typedef.DisplayMeasure) *UserProfile

SetWeightSetting sets UserProfile 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 [Scale: 1000; Units: m; User defined running step length set to 0 for auto length].

If UserRunningStepLength value is invalid, float64 invalid value will be returned.

func (*UserProfile) UserWalkingStepLengthScaled added in v0.8.0

func (m *UserProfile) UserWalkingStepLengthScaled() float64

UserWalkingStepLengthScaled return UserWalkingStepLength in its scaled value [Scale: 1000; Units: m; User defined walking step length set to 0 for auto length].

If UserWalkingStepLength value is invalid, float64 invalid value will be returned.

func (*UserProfile) WeightScaled added in v0.8.0

func (m *UserProfile) WeightScaled() float64

WeightScaled return Weight in its scaled value [Scale: 10; Units: kg].

If Weight value is invalid, float64 invalid value will be returned.

type Video

type Video struct {
	Url             string
	HostingProvider string
	Duration        uint32 // Units: ms; Playback time of video

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Video is a Video message.

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 Video's DeveloperFields.

func (*Video) SetDuration added in v0.4.0

func (m *Video) SetDuration(v uint32) *Video

SetDuration sets Video value.

Units: ms; Playback time of video

func (*Video) SetHostingProvider added in v0.4.0

func (m *Video) SetHostingProvider(v string) *Video

SetHostingProvider sets Video value.

func (*Video) SetUrl added in v0.4.0

func (m *Video) SetUrl(v string) *Video

SetUrl sets Video 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

VideoClip is a VideoClip message.

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) SetClipEnd added in v0.4.0

func (m *VideoClip) SetClipEnd(v uint32) *VideoClip

SetClipEnd sets VideoClip 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 VideoClip value.

func (*VideoClip) SetClipStart added in v0.4.0

func (m *VideoClip) SetClipStart(v uint32) *VideoClip

SetClipStart sets VideoClip 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 VideoClip's DeveloperFields.

func (*VideoClip) SetEndTimestamp added in v0.4.0

func (m *VideoClip) SetEndTimestamp(v time.Time) *VideoClip

SetEndTimestamp sets VideoClip value.

func (*VideoClip) SetEndTimestampMs added in v0.4.0

func (m *VideoClip) SetEndTimestampMs(v uint16) *VideoClip

SetEndTimestampMs sets VideoClip value.

func (*VideoClip) SetStartTimestamp added in v0.4.0

func (m *VideoClip) SetStartTimestamp(v time.Time) *VideoClip

SetStartTimestamp sets VideoClip value.

func (*VideoClip) SetStartTimestampMs added in v0.4.0

func (m *VideoClip) SetStartTimestampMs(v uint16) *VideoClip

SetStartTimestampMs sets VideoClip value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

VideoDescription is a VideoDescription message.

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 VideoDescription's DeveloperFields.

func (*VideoDescription) SetMessageCount added in v0.4.0

func (m *VideoDescription) SetMessageCount(v uint16) *VideoDescription

SetMessageCount sets VideoDescription value.

Total number of description parts

func (*VideoDescription) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets VideoDescription 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 VideoDescription value.

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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

VideoFrame is a VideoFrame message.

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 VideoFrame's DeveloperFields.

func (*VideoFrame) SetFrameNumber added in v0.4.0

func (m *VideoFrame) SetFrameNumber(v uint32) *VideoFrame

SetFrameNumber sets VideoFrame 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 VideoFrame 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 VideoFrame value.

Units: ms; Millisecond part of the timestamp.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

VideoTitle is a VideoTitle message.

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 VideoTitle's DeveloperFields.

func (*VideoTitle) SetMessageCount added in v0.4.0

func (m *VideoTitle) SetMessageCount(v uint16) *VideoTitle

SetMessageCount sets VideoTitle value.

Total number of title parts

func (*VideoTitle) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets VideoTitle 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 VideoTitle value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WatchfaceSettings is a WatchfaceSettings message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WatchfaceSettings's DeveloperFields.

func (*WatchfaceSettings) SetLayout added in v0.4.0

func (m *WatchfaceSettings) SetLayout(v byte) *WatchfaceSettings

SetLayout sets WatchfaceSettings value.

func (*WatchfaceSettings) SetMessageIndex added in v0.4.0

SetMessageIndex sets WatchfaceSettings value.

func (*WatchfaceSettings) SetMode added in v0.4.0

SetMode sets WatchfaceSettings value.

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.

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WeatherAlert is a WeatherAlert message.

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) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WeatherAlert's DeveloperFields.

func (*WeatherAlert) SetExpireTime added in v0.4.0

func (m *WeatherAlert) SetExpireTime(v time.Time) *WeatherAlert

SetExpireTime sets WeatherAlert value.

Time alert expires

func (*WeatherAlert) SetIssueTime added in v0.4.0

func (m *WeatherAlert) SetIssueTime(v time.Time) *WeatherAlert

SetIssueTime sets WeatherAlert value.

Time alert was issued

func (*WeatherAlert) SetReportId added in v0.4.0

func (m *WeatherAlert) SetReportId(v string) *WeatherAlert

SetReportId sets WeatherAlert 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 WeatherAlert value.

Warning, Watch, Advisory, Statement

func (*WeatherAlert) SetTimestamp added in v0.4.0

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

SetTimestamp sets WeatherAlert value.

func (*WeatherAlert) SetType added in v0.4.0

SetType sets WeatherAlert value.

Tornado, Severe Thunderstorm, etc.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WeatherConditions is a WeatherConditions message.

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) SetCondition added in v0.4.0

SetCondition sets WeatherConditions value.

Corresponds to GSC Response weatherIcon field

func (*WeatherConditions) SetDayOfWeek added in v0.4.0

SetDayOfWeek sets WeatherConditions value.

func (*WeatherConditions) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WeatherConditions's DeveloperFields.

func (*WeatherConditions) SetHighTemperature added in v0.4.0

func (m *WeatherConditions) SetHighTemperature(v int8) *WeatherConditions

SetHighTemperature sets WeatherConditions value.

Units: C

func (*WeatherConditions) SetLocation added in v0.4.0

func (m *WeatherConditions) SetLocation(v string) *WeatherConditions

SetLocation sets WeatherConditions 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 WeatherConditions value.

Units: C

func (*WeatherConditions) SetObservedAtTime added in v0.4.0

func (m *WeatherConditions) SetObservedAtTime(v time.Time) *WeatherConditions

SetObservedAtTime sets WeatherConditions value.

func (*WeatherConditions) SetObservedLocationLat added in v0.4.0

func (m *WeatherConditions) SetObservedLocationLat(v int32) *WeatherConditions

SetObservedLocationLat sets WeatherConditions value.

Units: semicircles

func (*WeatherConditions) SetObservedLocationLong added in v0.4.0

func (m *WeatherConditions) SetObservedLocationLong(v int32) *WeatherConditions

SetObservedLocationLong sets WeatherConditions value.

Units: semicircles

func (*WeatherConditions) SetPrecipitationProbability added in v0.4.0

func (m *WeatherConditions) SetPrecipitationProbability(v uint8) *WeatherConditions

SetPrecipitationProbability sets WeatherConditions value.

range 0-100

func (*WeatherConditions) SetRelativeHumidity added in v0.4.0

func (m *WeatherConditions) SetRelativeHumidity(v uint8) *WeatherConditions

SetRelativeHumidity sets WeatherConditions value.

func (*WeatherConditions) SetTemperature added in v0.4.0

func (m *WeatherConditions) SetTemperature(v int8) *WeatherConditions

SetTemperature sets WeatherConditions value.

Units: C

func (*WeatherConditions) SetTemperatureFeelsLike added in v0.4.0

func (m *WeatherConditions) SetTemperatureFeelsLike(v int8) *WeatherConditions

SetTemperatureFeelsLike sets WeatherConditions 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 WeatherConditions value.

time of update for current conditions, else forecast time

func (*WeatherConditions) SetWeatherReport added in v0.4.0

func (m *WeatherConditions) SetWeatherReport(v typedef.WeatherReport) *WeatherConditions

SetWeatherReport sets WeatherConditions value.

Current or forecast

func (*WeatherConditions) SetWindDirection added in v0.4.0

func (m *WeatherConditions) SetWindDirection(v uint16) *WeatherConditions

SetWindDirection sets WeatherConditions value.

Units: degrees

func (*WeatherConditions) SetWindSpeed added in v0.4.0

func (m *WeatherConditions) SetWindSpeed(v uint16) *WeatherConditions

SetWindSpeed sets WeatherConditions value.

Scale: 1000; Units: m/s

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 [Scale: 1000; Units: m/s].

If WindSpeed value is invalid, float64 invalid value will be returned.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WeightScale is a WeightScale message.

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 [Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal].

If ActiveMet value is invalid, float64 invalid value will be returned.

func (*WeightScale) BasalMetScaled added in v0.8.0

func (m *WeightScale) BasalMetScaled() float64

BasalMetScaled return BasalMet in its scaled value [Scale: 4; Units: kcal/day].

If BasalMet value is invalid, float64 invalid value will be returned.

func (*WeightScale) BmiScaled added in v0.8.0

func (m *WeightScale) BmiScaled() float64

BmiScaled return Bmi in its scaled value [Scale: 10; Units: kg/m^2].

If Bmi value is invalid, float64 invalid value will be returned.

func (*WeightScale) BoneMassScaled added in v0.8.0

func (m *WeightScale) BoneMassScaled() float64

BoneMassScaled return BoneMass in its scaled value [Scale: 100; Units: kg].

If BoneMass value is invalid, float64 invalid value will be returned.

func (*WeightScale) MuscleMassScaled added in v0.8.0

func (m *WeightScale) MuscleMassScaled() float64

MuscleMassScaled return MuscleMass in its scaled value [Scale: 100; Units: kg].

If MuscleMass value is invalid, float64 invalid value will be returned.

func (*WeightScale) PercentFatScaled added in v0.8.0

func (m *WeightScale) PercentFatScaled() float64

PercentFatScaled return PercentFat in its scaled value [Scale: 100; Units: %].

If PercentFat value is invalid, float64 invalid value will be returned.

func (*WeightScale) PercentHydrationScaled added in v0.8.0

func (m *WeightScale) PercentHydrationScaled() float64

PercentHydrationScaled return PercentHydration in its scaled value [Scale: 100; Units: %].

If PercentHydration value is invalid, float64 invalid value will be returned.

func (*WeightScale) SetActiveMet added in v0.4.0

func (m *WeightScale) SetActiveMet(v uint16) *WeightScale

SetActiveMet sets WeightScale value.

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 WeightScale value.

Scale: 4; Units: kcal/day

func (*WeightScale) SetBmi added in v0.4.0

func (m *WeightScale) SetBmi(v uint16) *WeightScale

SetBmi sets WeightScale value.

Scale: 10; Units: kg/m^2

func (*WeightScale) SetBoneMass added in v0.4.0

func (m *WeightScale) SetBoneMass(v uint16) *WeightScale

SetBoneMass sets WeightScale value.

Scale: 100; Units: kg

func (*WeightScale) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WeightScale's DeveloperFields.

func (*WeightScale) SetMetabolicAge added in v0.4.0

func (m *WeightScale) SetMetabolicAge(v uint8) *WeightScale

SetMetabolicAge sets WeightScale value.

Units: years

func (*WeightScale) SetMuscleMass added in v0.4.0

func (m *WeightScale) SetMuscleMass(v uint16) *WeightScale

SetMuscleMass sets WeightScale value.

Scale: 100; Units: kg

func (*WeightScale) SetPercentFat added in v0.4.0

func (m *WeightScale) SetPercentFat(v uint16) *WeightScale

SetPercentFat sets WeightScale value.

Scale: 100; Units: %

func (*WeightScale) SetPercentHydration added in v0.4.0

func (m *WeightScale) SetPercentHydration(v uint16) *WeightScale

SetPercentHydration sets WeightScale value.

Scale: 100; Units: %

func (*WeightScale) SetPhysiqueRating added in v0.4.0

func (m *WeightScale) SetPhysiqueRating(v uint8) *WeightScale

SetPhysiqueRating sets WeightScale value.

func (*WeightScale) SetTimestamp added in v0.4.0

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

SetTimestamp sets WeightScale value.

Units: s

func (*WeightScale) SetUserProfileIndex added in v0.4.0

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

SetUserProfileIndex sets WeightScale 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 WeightScale value.

Scale: 100; Units: kg

func (*WeightScale) SetVisceralFatRating added in v0.4.0

func (m *WeightScale) SetVisceralFatRating(v uint8) *WeightScale

SetVisceralFatRating sets WeightScale value.

func (*WeightScale) SetWeight added in v0.4.0

func (m *WeightScale) SetWeight(v typedef.Weight) *WeightScale

SetWeight sets WeightScale value.

Scale: 100; Units: kg

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 [Scale: 100; Units: kg].

If VisceralFatMass value is invalid, float64 invalid value will be returned.

func (*WeightScale) WeightScaled added in v0.8.0

func (m *WeightScale) WeightScaled() float64

WeightScaled return Weight in its scaled value [Scale: 100; Units: kg].

If Weight value is invalid, float64 invalid value will be returned.

type Workout

type Workout struct {
	WktName        string
	Capabilities   typedef.WorkoutCapabilities
	MessageIndex   typedef.MessageIndex
	NumValidSteps  uint16 // number of valid steps
	PoolLength     uint16 // Scale: 100; Units: m
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	PoolLengthUnit typedef.DisplayMeasure

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

Workout is a Workout message.

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 [Scale: 100; Units: m].

If PoolLength value is invalid, float64 invalid value will be returned.

func (*Workout) SetCapabilities added in v0.4.0

func (m *Workout) SetCapabilities(v typedef.WorkoutCapabilities) *Workout

SetCapabilities sets Workout value.

func (*Workout) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields Workout's DeveloperFields.

func (*Workout) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets Workout value.

func (*Workout) SetNumValidSteps added in v0.4.0

func (m *Workout) SetNumValidSteps(v uint16) *Workout

SetNumValidSteps sets Workout value.

number of valid steps

func (*Workout) SetPoolLength added in v0.4.0

func (m *Workout) SetPoolLength(v uint16) *Workout

SetPoolLength sets Workout value.

Scale: 100; Units: m

func (*Workout) SetPoolLengthUnit added in v0.4.0

func (m *Workout) SetPoolLengthUnit(v typedef.DisplayMeasure) *Workout

SetPoolLengthUnit sets Workout value.

func (*Workout) SetSport added in v0.4.0

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

SetSport sets Workout value.

func (*Workout) SetSubSport added in v0.4.0

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

SetSubSport sets Workout value.

func (*Workout) SetWktName added in v0.4.0

func (m *Workout) SetWktName(v string) *Workout

SetWktName sets Workout 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WorkoutSession is a WorkoutSession message.

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 [Scale: 100; Units: m].

If PoolLength value is invalid, float64 invalid value will be returned.

func (*WorkoutSession) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WorkoutSession's DeveloperFields.

func (*WorkoutSession) SetFirstStepIndex added in v0.4.0

func (m *WorkoutSession) SetFirstStepIndex(v uint16) *WorkoutSession

SetFirstStepIndex sets WorkoutSession value.

func (*WorkoutSession) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets WorkoutSession value.

func (*WorkoutSession) SetNumValidSteps added in v0.4.0

func (m *WorkoutSession) SetNumValidSteps(v uint16) *WorkoutSession

SetNumValidSteps sets WorkoutSession value.

func (*WorkoutSession) SetPoolLength added in v0.4.0

func (m *WorkoutSession) SetPoolLength(v uint16) *WorkoutSession

SetPoolLength sets WorkoutSession value.

Scale: 100; Units: m

func (*WorkoutSession) SetPoolLengthUnit added in v0.4.0

func (m *WorkoutSession) SetPoolLengthUnit(v typedef.DisplayMeasure) *WorkoutSession

SetPoolLengthUnit sets WorkoutSession value.

func (*WorkoutSession) SetSport added in v0.4.0

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

SetSport sets WorkoutSession value.

func (*WorkoutSession) SetSubSport added in v0.4.0

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

SetSubSport sets WorkoutSession value.

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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

WorkoutStep is a WorkoutStep message.

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 [Scale: 100; Units: kg].

If ExerciseWeight value is invalid, float64 invalid value will be returned.

func (*WorkoutStep) SetCustomTargetValueHigh added in v0.4.0

func (m *WorkoutStep) SetCustomTargetValueHigh(v uint32) *WorkoutStep

SetCustomTargetValueHigh sets WorkoutStep value.

func (*WorkoutStep) SetCustomTargetValueLow added in v0.4.0

func (m *WorkoutStep) SetCustomTargetValueLow(v uint32) *WorkoutStep

SetCustomTargetValueLow sets WorkoutStep value.

func (*WorkoutStep) SetDeveloperFields added in v0.4.0

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

SetDeveloperFields WorkoutStep's DeveloperFields.

func (*WorkoutStep) SetDurationType added in v0.4.0

func (m *WorkoutStep) SetDurationType(v typedef.WktStepDuration) *WorkoutStep

SetDurationType sets WorkoutStep value.

func (*WorkoutStep) SetDurationValue added in v0.4.0

func (m *WorkoutStep) SetDurationValue(v uint32) *WorkoutStep

SetDurationValue sets WorkoutStep value.

func (*WorkoutStep) SetEquipment added in v0.4.0

func (m *WorkoutStep) SetEquipment(v typedef.WorkoutEquipment) *WorkoutStep

SetEquipment sets WorkoutStep value.

func (*WorkoutStep) SetExerciseCategory added in v0.4.0

func (m *WorkoutStep) SetExerciseCategory(v typedef.ExerciseCategory) *WorkoutStep

SetExerciseCategory sets WorkoutStep value.

func (*WorkoutStep) SetExerciseName added in v0.4.0

func (m *WorkoutStep) SetExerciseName(v uint16) *WorkoutStep

SetExerciseName sets WorkoutStep value.

func (*WorkoutStep) SetExerciseWeight added in v0.4.0

func (m *WorkoutStep) SetExerciseWeight(v uint16) *WorkoutStep

SetExerciseWeight sets WorkoutStep value.

Scale: 100; Units: kg

func (*WorkoutStep) SetIntensity added in v0.4.0

func (m *WorkoutStep) SetIntensity(v typedef.Intensity) *WorkoutStep

SetIntensity sets WorkoutStep value.

func (*WorkoutStep) SetMessageIndex added in v0.4.0

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

SetMessageIndex sets WorkoutStep value.

func (*WorkoutStep) SetNotes added in v0.4.0

func (m *WorkoutStep) SetNotes(v string) *WorkoutStep

SetNotes sets WorkoutStep value.

func (*WorkoutStep) SetSecondaryCustomTargetValueHigh added in v0.4.0

func (m *WorkoutStep) SetSecondaryCustomTargetValueHigh(v uint32) *WorkoutStep

SetSecondaryCustomTargetValueHigh sets WorkoutStep value.

func (*WorkoutStep) SetSecondaryCustomTargetValueLow added in v0.4.0

func (m *WorkoutStep) SetSecondaryCustomTargetValueLow(v uint32) *WorkoutStep

SetSecondaryCustomTargetValueLow sets WorkoutStep value.

func (*WorkoutStep) SetSecondaryTargetType added in v0.4.0

func (m *WorkoutStep) SetSecondaryTargetType(v typedef.WktStepTarget) *WorkoutStep

SetSecondaryTargetType sets WorkoutStep value.

func (*WorkoutStep) SetSecondaryTargetValue added in v0.4.0

func (m *WorkoutStep) SetSecondaryTargetValue(v uint32) *WorkoutStep

SetSecondaryTargetValue sets WorkoutStep value.

func (*WorkoutStep) SetTargetType added in v0.4.0

func (m *WorkoutStep) SetTargetType(v typedef.WktStepTarget) *WorkoutStep

SetTargetType sets WorkoutStep value.

func (*WorkoutStep) SetTargetValue added in v0.4.0

func (m *WorkoutStep) SetTargetValue(v uint32) *WorkoutStep

SetTargetValue sets WorkoutStep value.

func (*WorkoutStep) SetWeightDisplayUnit added in v0.4.0

func (m *WorkoutStep) SetWeightDisplayUnit(v typedef.FitBaseUnit) *WorkoutStep

SetWeightDisplayUnit sets WorkoutStep value.

func (*WorkoutStep) SetWktStepName added in v0.4.0

func (m *WorkoutStep) SetWktStepName(v string) *WorkoutStep

SetWktStepName sets WorkoutStep 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

	// Developer Fields are dynamic, can't be mapped as struct's fields.
	// [Added since protocol version 2.0]
	DeveloperFields []proto.DeveloperField
}

ZonesTarget is a ZonesTarget message.

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 ZonesTarget's DeveloperFields.

func (*ZonesTarget) SetFunctionalThresholdPower added in v0.4.0

func (m *ZonesTarget) SetFunctionalThresholdPower(v uint16) *ZonesTarget

SetFunctionalThresholdPower sets ZonesTarget value.

func (*ZonesTarget) SetHrCalcType added in v0.4.0

func (m *ZonesTarget) SetHrCalcType(v typedef.HrZoneCalc) *ZonesTarget

SetHrCalcType sets ZonesTarget value.

func (*ZonesTarget) SetMaxHeartRate added in v0.4.0

func (m *ZonesTarget) SetMaxHeartRate(v uint8) *ZonesTarget

SetMaxHeartRate sets ZonesTarget value.

func (*ZonesTarget) SetPwrCalcType added in v0.4.0

func (m *ZonesTarget) SetPwrCalcType(v typedef.PwrZoneCalc) *ZonesTarget

SetPwrCalcType sets ZonesTarget value.

func (*ZonesTarget) SetThresholdHeartRate added in v0.4.0

func (m *ZonesTarget) SetThresholdHeartRate(v uint8) *ZonesTarget

SetThresholdHeartRate sets ZonesTarget value.

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