mesgdef

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccelerometerData

type AccelerometerData struct {
	Timestamp                  time.Time // Units: s; Whole second part of the timestamp
	TimestampMs                uint16    // Units: ms; Millisecond 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

	// 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(fac Factory) proto.Message

ToMesg converts AccelerometerData into proto.Message.

type Activity

type Activity struct {
	Timestamp      time.Time
	TotalTimerTime uint32 // Scale: 1000; Units: s; Exclude pauses
	NumSessions    uint16
	Type           typedef.Activity
	Event          typedef.Event
	EventType      typedef.EventType
	LocalTimestamp time.Time // timestamp epoch expressed in local time, used to convert activity timestamps to local time
	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(fac Factory) proto.Message

ToMesg converts Activity into proto.Message.

type AntChannelId

type AntChannelId struct {
	ChannelNumber    uint8
	DeviceType       uint8
	DeviceNumber     uint16
	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(fac Factory) proto.Message

ToMesg converts AntChannelId into proto.Message.

type AntRx

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

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

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

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) 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(fac Factory) proto.Message

ToMesg converts AntRx into proto.Message.

type AntTx

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

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

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

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) 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(fac Factory) proto.Message

ToMesg converts AntTx into proto.Message.

type AviationAttitude

type AviationAttitude struct {
	Timestamp             time.Time                  // Units: s; Timestamp message was output
	TimestampMs           uint16                     // Units: ms; Fractional part of timestamp, added to timestamp
	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];

	// 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) 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(fac Factory) proto.Message

ToMesg converts AviationAttitude into proto.Message.

type BarometerData

type BarometerData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	TimestampMs      uint16    // Units: ms; Millisecond 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.

	// 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(fac Factory) proto.Message

ToMesg converts BarometerData into proto.Message.

type BeatIntervals

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

	// 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(fac Factory) proto.Message

ToMesg converts BeatIntervals into proto.Message.

type BikeProfile

type BikeProfile struct {
	MessageIndex             typedef.MessageIndex
	Name                     string
	Sport                    typedef.Sport
	SubSport                 typedef.SubSport
	Odometer                 uint32 // Scale: 100; Units: m;
	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: %;
	AutoWheelCal             bool
	AutoPowerZero            bool
	Id                       uint8
	SpdEnabled               bool
	CadEnabled               bool
	SpdcadEnabled            bool
	PowerEnabled             bool
	CrankLength              uint8 // Scale: 2; Offset: -110; Units: mm;
	Enabled                  bool
	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
	FrontGear                []uint8 // Array: [N]; Number of teeth on each gear 0 is innermost
	RearGearNum              uint8   // Number of rear gears
	RearGear                 []uint8 // Array: [N]; Number of teeth on each gear 0 is innermost
	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) 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(fac Factory) proto.Message

ToMesg converts BikeProfile into proto.Message.

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;
	HeartRate            uint8     // Units: bpm;
	HeartRateType        typedef.HrType
	Status               typedef.BpStatus
	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.

	// 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(fac Factory) proto.Message

ToMesg converts BloodPressure into proto.Message.

type CadenceZone

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

	// 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(fac Factory) proto.Message

ToMesg converts CadenceZone into proto.Message.

type CameraEvent

type CameraEvent struct {
	Timestamp         time.Time // Units: s; Whole second part of the timestamp.
	TimestampMs       uint16    // Units: ms; Millisecond part of the timestamp.
	CameraEventType   typedef.CameraEventType
	CameraFileUuid    string
	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(fac Factory) proto.Message

ToMesg converts CameraEvent into proto.Message.

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(fac Factory) proto.Message

ToMesg converts Capabilities into proto.Message.

type ClimbPro

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

	// 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(fac Factory) proto.Message

ToMesg converts ClimbPro into proto.Message.

type Connectivity

type Connectivity struct {
	BluetoothEnabled            bool // Use Bluetooth for connectivity features
	BluetoothLeEnabled          bool // Use Bluetooth Low Energy for connectivity features
	AntEnabled                  bool // Use ANT for connectivity features
	Name                        string
	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(fac Factory) proto.Message

ToMesg converts Connectivity into proto.Message.

type Course

type Course struct {
	Sport        typedef.Sport
	Name         string
	Capabilities typedef.CourseCapabilities
	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(fac Factory) proto.Message

ToMesg converts Course into proto.Message.

type CoursePoint

type CoursePoint struct {
	MessageIndex typedef.MessageIndex
	Timestamp    time.Time
	PositionLat  int32  // Units: semicircles;
	PositionLong int32  // Units: semicircles;
	Distance     uint32 // Scale: 100; Units: m;
	Type         typedef.CoursePoint
	Name         string
	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) 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(fac Factory) proto.Message

ToMesg converts CoursePoint into proto.Message.

type DeveloperDataId

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

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(fac Factory) proto.Message

ToMesg converts DeveloperDataId into proto.Message.

type DeviceAuxBatteryInfo

type DeviceAuxBatteryInfo struct {
	Timestamp         time.Time
	DeviceIndex       typedef.DeviceIndex
	BatteryVoltage    uint16 // Scale: 256; Units: V;
	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) 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(fac Factory) proto.Message

ToMesg converts DeviceAuxBatteryInfo into proto.Message.

type DeviceInfo

type DeviceInfo struct {
	Timestamp           time.Time // Units: s;
	DeviceIndex         typedef.DeviceIndex
	DeviceType          uint8
	Manufacturer        typedef.Manufacturer
	SerialNumber        uint32
	Product             uint16
	SoftwareVersion     uint16 // Scale: 100;
	HardwareVersion     uint8
	CumOperatingTime    uint32 // Units: s; Reset by new battery or charge.
	BatteryVoltage      uint16 // Scale: 256; Units: V;
	BatteryStatus       typedef.BatteryStatus
	SensorPosition      typedef.BodyLocation // Indicates the location of the sensor
	Descriptor          string               // Used to describe the sensor or location
	AntTransmissionType uint8
	AntDeviceNumber     uint16
	AntNetwork          typedef.AntNetwork
	SourceType          typedef.SourceType
	ProductName         string // Optional free form string to indicate the devices name or model
	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) 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) ToMesg added in v0.3.0

func (m *DeviceInfo) ToMesg(fac Factory) proto.Message

ToMesg converts DeviceInfo into proto.Message.

type DeviceSettings

type DeviceSettings struct {
	ActiveTimeZone                      uint8                 // Index into time zone arrays.
	UtcOffset                           uint32                // Offset from system time. Required to convert timestamp from system time to UTC.
	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
	BacklightMode                       typedef.BacklightMode // Mode for backlight
	ActivityTrackerEnabled              bool                  // Enabled state of the activity tracker functionality
	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
	MoveAlertEnabled                    bool                  // Enabled state of the move alert
	DateMode                            typedef.DateMode      // Display mode for the date
	DisplayOrientation                  typedef.DisplayOrientation
	MountingSide                        typedef.Side
	DefaultPage                         []uint16                   // Array: [N]; Bitfield to indicate one page as default for each supported loop
	AutosyncMinSteps                    uint16                     // Units: steps; Minimum steps before an autosync can occur
	AutosyncMinTime                     uint16                     // Units: minutes; Minimum minutes before an autosync can occur
	LactateThresholdAutodetectEnabled   bool                       // Enable auto-detect setting for the lactate threshold feature.
	BleAutoUploadEnabled                bool                       // Automatically upload using BLE
	AutoSyncFrequency                   typedef.AutoSyncFrequency  // Helps to conserve battery by changing modes
	AutoActivityDetect                  typedef.AutoActivityDetect // Allows setting specific activities auto-activity detect enabled/disabled settings
	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

	// 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) ToMesg added in v0.3.0

func (m *DeviceSettings) ToMesg(fac Factory) proto.Message

ToMesg converts DeviceSettings into proto.Message.

type DiveAlarm

type DiveAlarm struct {
	MessageIndex     typedef.MessageIndex  // Index of the alarm
	Depth            uint32                // Scale: 1000; Units: m; Depth setting (m) for depth type alarms
	Time             int32                 // Units: s; Time setting (s) for time type alarms
	Enabled          bool                  // Enablement flag
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm
	DiveTypes        []typedef.SubSport    // Array: [N]; Dive types the alarm will trigger on
	Id               uint32                // Alarm ID
	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?
	Speed            int32                 // Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

	// 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) 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) ToMesg added in v0.3.0

func (m *DiveAlarm) ToMesg(fac Factory) proto.Message

ToMesg converts DiveAlarm into proto.Message.

type DiveApneaAlarm

type DiveApneaAlarm struct {
	MessageIndex     typedef.MessageIndex  // Index of the alarm
	Depth            uint32                // Scale: 1000; Units: m; Depth setting (m) for depth type alarms
	Time             int32                 // Units: s; Time setting (s) for time type alarms
	Enabled          bool                  // Enablement flag
	AlarmType        typedef.DiveAlarmType // Alarm type setting
	Sound            typedef.Tone          // Tone and Vibe setting for the alarm.
	DiveTypes        []typedef.SubSport    // Array: [N]; Dive types the alarm will trigger on
	Id               uint32                // Alarm ID
	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?
	Speed            int32                 // Scale: 1000; Units: mps; Ascent/descent rate (mps) setting for speed type alarms

	// 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) 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) ToMesg added in v0.3.0

func (m *DiveApneaAlarm) ToMesg(fac Factory) proto.Message

ToMesg converts DiveApneaAlarm into proto.Message.

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(fac Factory) proto.Message

ToMesg converts DiveGas into proto.Message.

type DiveSettings

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

	// 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) 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(fac Factory) proto.Message

ToMesg converts DiveSettings into proto.Message.

type DiveSummary

type DiveSummary struct {
	Timestamp       time.Time // Units: s;
	ReferenceMesg   typedef.MesgNum
	ReferenceIndex  typedef.MessageIndex
	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
	StartCns        uint8  // Units: percent;
	EndCns          uint8  // Units: percent;
	StartN2         uint16 // Units: percent;
	EndN2           uint16 // Units: percent;
	O2Toxicity      uint16 // Units: OTUs;
	DiveNumber      uint32
	BottomTime      uint32 // Scale: 1000; Units: s;
	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
	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

	// 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) 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(fac Factory) proto.Message

ToMesg converts DiveSummary into proto.Message.

type Event

type Event struct {
	Timestamp                   time.Time // Units: s;
	Event                       typedef.Event
	EventType                   typedef.EventType
	Data16                      uint16
	Data                        uint32
	EventGroup                  uint8
	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
	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
	StartTimestamp              time.Time                    // Units: s; Timestamp of when the event started
	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

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

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

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) 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(fac Factory) proto.Message

ToMesg converts Event into proto.Message.

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

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

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

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

ToMesg converts ExdDataConceptConfiguration into proto.Message.

type ExdDataFieldConfiguration

type ExdDataFieldConfiguration struct {
	ScreenIndex  uint8
	ConceptField byte
	FieldId      uint8
	ConceptCount uint8
	DisplayType  typedef.ExdDisplayType
	Title        []string // Array: [32];

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

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

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

ToMesg converts ExdDataFieldConfiguration into proto.Message.

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

ToMesg converts ExdScreenConfiguration into proto.Message.

type ExerciseTitle

type ExerciseTitle struct {
	MessageIndex     typedef.MessageIndex
	ExerciseCategory typedef.ExerciseCategory
	ExerciseName     uint16
	WktStepName      []string // Array: [N];

	// 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(fac Factory) proto.Message

ToMesg converts ExerciseTitle into proto.Message.

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
	File         typedef.File
	MesgNum      typedef.MesgNum
	FieldNum     uint8
	Count        uint16

	// 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(fac Factory) proto.Message

ToMesg converts FieldCapabilities into proto.Message.

type FieldDescription

type FieldDescription struct {
	DeveloperDataIndex    uint8
	FieldDefinitionNumber uint8
	FitBaseTypeId         basetype.BaseType
	FieldName             []string // Array: [N];
	Array                 uint8
	Components            string
	Scale                 uint8
	Offset                int8
	Units                 []string // Array: [N];
	Bits                  string
	Accumulate            string
	FitBaseUnitId         typedef.FitBaseUnit
	NativeMesgNum         typedef.MesgNum
	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(fac Factory) proto.Message

ToMesg converts FieldDescription into proto.Message.

type FileCapabilities

type FileCapabilities struct {
	MessageIndex typedef.MessageIndex
	Type         typedef.File
	Flags        typedef.FileFlags
	Directory    string
	MaxCount     uint16
	MaxSize      uint32 // Units: bytes;

	// 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(fac Factory) proto.Message

ToMesg converts FileCapabilities into proto.Message.

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(fac Factory) proto.Message

ToMesg converts FileCreator into proto.Message.

type FileId

type FileId struct {
	Type         typedef.File
	Manufacturer typedef.Manufacturer
	Product      uint16
	SerialNumber uint32
	TimeCreated  time.Time // Only set for files that are can be created/erased.
	Number       uint16    // Only set for files that are not created/erased.
	ProductName  string    // Optional free form string to indicate the devices name or model
}

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(fac Factory) proto.Message

ToMesg converts FileId into proto.Message.

type Goal

type Goal struct {
	MessageIndex    typedef.MessageIndex
	Sport           typedef.Sport
	SubSport        typedef.SubSport
	StartDate       time.Time
	EndDate         time.Time
	Type            typedef.Goal
	Value           uint32
	Repeat          bool
	TargetValue     uint32
	Recurrence      typedef.GoalRecurrence
	RecurrenceValue uint16
	Enabled         bool
	Source          typedef.GoalSource

	// 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(fac Factory) proto.Message

ToMesg converts Goal into proto.Message.

type GpsMetadata

type GpsMetadata struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp.
	TimestampMs      uint16    // Units: ms; Millisecond part of the timestamp.
	PositionLat      int32     // Units: semicircles;
	PositionLong     int32     // Units: semicircles;
	EnhancedAltitude uint32    // Scale: 5; Offset: 500; Units: m;
	EnhancedSpeed    uint32    // Scale: 1000; Units: m/s;
	Heading          uint16    // Scale: 100; Units: degrees;
	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.

	// 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) 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(fac Factory) proto.Message

ToMesg converts GpsMetadata into proto.Message.

type GyroscopeData

type GyroscopeData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	TimestampMs      uint16    // Units: ms; Millisecond 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

	// 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(fac Factory) proto.Message

ToMesg converts GyroscopeData into proto.Message.

type Hr

type Hr struct {
	Timestamp           time.Time
	FractionalTimestamp uint16   // Scale: 32768; Units: s;
	Time256             uint8    // Scale: 256; Units: s;
	FilteredBpm         []uint8  // Array: [N]; Units: bpm;
	EventTimestamp      []uint32 // Array: [N]; Scale: 1024; Units: s;
	EventTimestamp12    []byte   // Array: [N]; Scale: 1024; Units: s;

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

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

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) 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]; Scale: 1024; 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) ToMesg added in v0.3.0

func (m *Hr) ToMesg(fac Factory) proto.Message

ToMesg converts Hr into proto.Message.

type HrZone

type HrZone struct {
	MessageIndex typedef.MessageIndex
	HighBpm      uint8 // Units: bpm;
	Name         string

	// 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(fac Factory) proto.Message

ToMesg converts HrZone into proto.Message.

type HrmProfile

type HrmProfile struct {
	MessageIndex      typedef.MessageIndex
	Enabled           bool
	HrmAntId          uint16
	LogHrv            bool
	HrmAntIdTransType uint8

	// 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(fac Factory) proto.Message

ToMesg converts HrmProfile into proto.Message.

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) ToMesg added in v0.3.0

func (m *Hrv) ToMesg(fac Factory) proto.Message

ToMesg converts Hrv into proto.Message.

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) 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(fac Factory) proto.Message

ToMesg converts HrvStatusSummary into proto.Message.

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(fac Factory) proto.Message

ToMesg converts HrvValue into proto.Message.

type Jump

type Jump struct {
	Timestamp     time.Time // Units: s;
	Distance      float32   // Units: m;
	Height        float32   // Units: m;
	Rotations     uint8
	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;
	Speed         uint16  // Scale: 1000; Units: m/s;
	EnhancedSpeed uint32  // 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

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

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) 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) ToMesg added in v0.3.0

func (m *Jump) ToMesg(fac Factory) proto.Message

ToMesg converts Jump into proto.Message.

type Lap

type Lap struct {
	MessageIndex                  typedef.MessageIndex
	Timestamp                     time.Time // Units: s; Lap end time.
	Event                         typedef.Event
	EventType                     typedef.EventType
	StartTime                     time.Time
	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;
	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;
	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;
	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;
	Intensity                     typedef.Intensity
	LapTrigger                    typedef.LapTrigger
	Sport                         typedef.Sport
	EventGroup                    uint8
	NumLengths                    uint16 // Units: lengths; # of lengths of swim pool
	NormalizedPower               uint16 // Units: watts;
	LeftRightBalance              typedef.LeftRightBalance100
	FirstLengthIndex              uint16
	AvgStrokeDistance             uint16 // Scale: 100; Units: m;
	SwimStroke                    typedef.SwimStroke
	SubSport                      typedef.SubSport
	NumActiveLengths              uint16   // Units: lengths; # of active lengths of swim pool
	TotalWork                     uint32   // Units: J;
	AvgAltitude                   uint16   // Scale: 5; Offset: 500; Units: m;
	MaxAltitude                   uint16   // Scale: 5; Offset: 500; Units: m;
	GpsAccuracy                   uint8    // 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: %;
	AvgTemperature                int8     // Units: C;
	MaxTemperature                int8     // Units: C;
	TotalMovingTime               uint32   // Scale: 1000; Units: s;
	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;
	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;
	RepetitionNum                 uint16
	MinAltitude                   uint16 // Scale: 5; Offset: 500; Units: m;
	MinHeartRate                  uint8  // Units: bpm;
	WktStepIndex                  typedef.MessageIndex
	OpponentScore                 uint16
	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
	AvgVerticalOscillation        uint16   // Scale: 10; Units: mm;
	AvgStanceTimePercent          uint16   // Scale: 100; Units: percent;
	AvgStanceTime                 uint16   // Scale: 10; Units: ms;
	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
	PlayerScore                   uint16
	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
	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;
	TimeStanding                  uint32   // Scale: 1000; Units: s; Total time spent in the standing position
	StandCount                    uint16   // Number of transitions to the standing state
	AvgLeftPco                    int8     // Units: mm; Average left platform center offset
	AvgRightPco                   int8     // Units: mm; Average right platform center offset
	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.
	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;
	AvgLevMotorPower              uint16   // Units: watts; lev average motor power during lap
	MaxLevMotorPower              uint16   // Units: watts; lev maximum motor power during lap
	LevBatteryConsumption         uint8    // Scale: 2; Units: percent; lev battery consumption 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;
	AvgDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	MaxDepth                      uint32   // Scale: 1000; Units: m; 0 if above water
	MinTemperature                int8     // Units: C;
	EnhancedAvgRespirationRate    uint16   // Scale: 100; Units: Breaths/min;
	EnhancedMaxRespirationRate    uint16   // Scale: 100; Units: Breaths/min;
	AvgRespirationRate            uint8
	MaxRespirationRate            uint8
	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.
	JumpCount                     uint16
	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.
	TotalFractionalAscent         uint8   // Scale: 100; Units: m; fractional part of total_ascent
	TotalFractionalDescent        uint8   // Scale: 100; Units: m; fractional part of total_descent
	AvgCoreTemperature            uint16  // Scale: 100; Units: C;
	MinCoreTemperature            uint16  // Scale: 100; Units: C;
	MaxCoreTemperature            uint16  // Scale: 100; Units: C;

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

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

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) 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) ToMesg added in v0.3.0

func (m *Lap) ToMesg(fac Factory) proto.Message

ToMesg converts Lap into proto.Message.

type Length

type Length struct {
	MessageIndex               typedef.MessageIndex
	Timestamp                  time.Time
	Event                      typedef.Event
	EventType                  typedef.EventType
	StartTime                  time.Time
	TotalElapsedTime           uint32             // Scale: 1000; Units: s;
	TotalTimerTime             uint32             // Scale: 1000; Units: s;
	TotalStrokes               uint16             // Units: strokes;
	AvgSpeed                   uint16             // Scale: 1000; Units: m/s;
	SwimStroke                 typedef.SwimStroke // Units: swim_stroke;
	AvgSwimmingCadence         uint8              // Units: strokes/min;
	EventGroup                 uint8
	TotalCalories              uint16 // Units: kcal;
	LengthType                 typedef.LengthType
	PlayerScore                uint16
	OpponentScore              uint16
	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
	EnhancedAvgRespirationRate uint16   // Scale: 100; Units: Breaths/min;
	EnhancedMaxRespirationRate uint16   // Scale: 100; Units: Breaths/min;
	AvgRespirationRate         uint8
	MaxRespirationRate         uint8

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

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

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) 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(fac Factory) proto.Message

ToMesg converts Length into proto.Message.

type MagnetometerData

type MagnetometerData struct {
	Timestamp        time.Time // Units: s; Whole second part of the timestamp
	TimestampMs      uint16    // Units: ms; Millisecond 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

	// 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(fac Factory) proto.Message

ToMesg converts MagnetometerData into proto.Message.

type MaxMetData

type MaxMetData struct {
	UpdateTime     time.Time // Time maxMET and vo2 were calculated
	Vo2Max         uint16    // Scale: 10; Units: mL/kg/min;
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	MaxMetCategory typedef.MaxMetCategory
	CalibratedData bool                          // Indicates if calibrated data was used in the calculation
	HrSource       typedef.MaxMetHeartRateSource // Indicates if the estimate was obtained using a chest strap or wrist heart rate
	SpeedSource    typedef.MaxMetSpeedSource     // Indidcates if the estimate was obtained using onboard GPS or connected GPS

	// 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(fac Factory) proto.Message

ToMesg converts MaxMetData into proto.Message.

type MemoGlob

type MemoGlob struct {
	PartIndex   uint32               // Sequence number of memo blocks
	Memo        []byte               // Array: [N]; Deprecated. Use data field.
	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
	Data        []uint8              // Array: [N]; Block of utf8 bytes. Note, mutltibyte characters may be split across adjoining memo_glob messages.

	// 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(fac Factory) proto.Message

ToMesg converts MemoGlob into proto.Message.

type MesgCapabilities

type MesgCapabilities struct {
	MessageIndex typedef.MessageIndex
	File         typedef.File
	MesgNum      typedef.MesgNum
	CountType    typedef.MesgCount
	Count        uint16

	// 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(fac Factory) proto.Message

ToMesg converts MesgCapabilities into proto.Message.

type MetZone

type MetZone struct {
	MessageIndex typedef.MessageIndex
	HighBpm      uint8
	Calories     uint16 // Scale: 10; Units: kcal / min;
	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) 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(fac Factory) proto.Message

ToMesg converts MetZone into proto.Message.

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.
	DeviceIndex                  typedef.DeviceIndex // Associates this data to device_info message. Not required for file with single device (sensor).
	Calories                     uint16              // Units: kcal; Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation
	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;
	ActivityType                 typedef.ActivityType
	ActivitySubtype              typedef.ActivitySubtype
	ActivityLevel                typedef.ActivityLevel
	Distance16                   uint16    // Units: 100 * m;
	Cycles16                     uint16    // Units: 2 * cycles (steps);
	ActiveTime16                 uint16    // Units: s;
	LocalTimestamp               time.Time // Must align to logging interval, for example, time must be 00:00:00 for daily log.
	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
	ActivityTime                 []uint16  // Array: [8]; Units: minutes; Indexed using minute_activity_level enum
	ActiveCalories               uint16    // Units: kcal;
	CurrentActivityTypeIntensity byte      // Indicates single type / intensity for duration since last monitoring message.
	TimestampMin8                uint8     // Units: min;
	Timestamp16                  uint16    // Units: s;
	HeartRate                    uint8     // Units: bpm;
	Intensity                    uint8     // Scale: 10;
	DurationMin                  uint16    // Units: min;
	Duration                     uint32    // Units: s;
	Ascent                       uint32    // Scale: 1000; Units: m;
	Descent                      uint32    // Scale: 1000; Units: m;
	ModerateActivityMinutes      uint16    // Units: minutes;
	VigorousActivityMinutes      uint16    // Units: minutes;

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

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

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) 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) ToMesg added in v0.3.0

func (m *Monitoring) ToMesg(fac Factory) proto.Message

ToMesg converts Monitoring into proto.Message.

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(fac Factory) proto.Message

ToMesg converts MonitoringHrData into proto.Message.

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) 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(fac Factory) proto.Message

ToMesg converts MonitoringInfo into proto.Message.

type NmeaSentence

type NmeaSentence struct {
	Timestamp   time.Time // Units: s; Timestamp message was output
	TimestampMs uint16    // Units: ms; Fractional part of timestamp, added to timestamp
	Sentence    string    // NMEA sentence

	// 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(fac Factory) proto.Message

ToMesg converts NmeaSentence into proto.Message.

type ObdiiData

type ObdiiData struct {
	Timestamp        time.Time // Units: s; Timestamp message was output
	TimestampMs      uint16    // Units: ms; Fractional part of timestamp, added to timestamp
	TimeOffset       []uint16  // Array: [N]; Units: ms; Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds.
	Pid              byte      // Parameter ID
	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
	StartTimestampMs uint16    // Units: ms; Fractional part of start_timestamp

	// 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(fac Factory) proto.Message

ToMesg converts ObdiiData into proto.Message.

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(fac Factory) proto.Message

ToMesg converts OhrSettings into proto.Message.

type OneDSensorCalibration

type OneDSensorCalibration struct {
	Timestamp          time.Time          // Units: s; Whole second part of the timestamp
	SensorType         typedef.SensorType // Indicates which sensor the calibration is for
	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

	// 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(fac Factory) proto.Message

ToMesg converts OneDSensorCalibration into proto.Message.

type PowerZone

type PowerZone struct {
	MessageIndex typedef.MessageIndex
	HighValue    uint16 // Units: watts;
	Name         string

	// 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(fac Factory) proto.Message

ToMesg converts PowerZone into proto.Message.

type Record

type Record struct {
	Timestamp                     time.Time // Units: s;
	PositionLat                   int32     // Units: semicircles;
	PositionLong                  int32     // Units: semicircles;
	Altitude                      uint16    // Scale: 5; Offset: 500; Units: m;
	HeartRate                     uint8     // Units: bpm;
	Cadence                       uint8     // Units: rpm;
	Distance                      uint32    // Scale: 100; Units: m;
	Speed                         uint16    // Scale: 1000; Units: m/s;
	Power                         uint16    // Units: watts;
	CompressedSpeedDistance       []byte    // Array: [3]; Scale: 100; Units: m/s,m;
	Grade                         int16     // Scale: 100; Units: %;
	Resistance                    uint8     // Relative. 0 is none 254 is Max.
	TimeFromCourse                int32     // Scale: 1000; Units: s;
	CycleLength                   uint8     // Scale: 100; Units: m;
	Temperature                   int8      // Units: C;
	Speed1S                       []uint8   // Array: [N]; Scale: 16; Units: m/s; Speed at 1s intervals. Timestamp field indicates time of last array element.
	Cycles                        uint8     // Units: cycles;
	TotalCycles                   uint32    // Units: cycles;
	CompressedAccumulatedPower    uint16    // Units: watts;
	AccumulatedPower              uint32    // Units: watts;
	LeftRightBalance              typedef.LeftRightBalance
	GpsAccuracy                   uint8  // Units: m;
	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;
	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
	BallSpeed                     uint16 // Scale: 100; Units: m/s;
	Cadence256                    uint16 // Scale: 256; Units: rpm; Log cadence and fractional cadence for backwards compatability
	FractionalCadence             uint8  // Scale: 128; Units: rpm;
	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
	DeviceIndex                   typedef.DeviceIndex
	LeftPco                       int8    // Units: mm; Left platform center offset
	RightPco                      int8    // Units: mm; Right platform center offset
	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.
	EnhancedSpeed                 uint32  // Scale: 1000; Units: m/s;
	EnhancedAltitude              uint32  // Scale: 5; Offset: 500; Units: m;
	BatterySoc                    uint8   // Scale: 2; Units: percent; lev battery state of charge
	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
	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;
	CnsLoad                       uint8   // Units: percent;
	N2Load                        uint16  // Units: percent;
	RespirationRate               uint8   // Units: s;
	EnhancedRespirationRate       uint16  // Scale: 100; Units: Breaths/min;
	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.
	CurrentStress                 uint16  // Scale: 100; Current Stress value
	EbikeTravelRange              uint16  // Units: km;
	EbikeBatteryLevel             uint8   // Units: percent;
	EbikeAssistMode               uint8   // Units: depends on sensor;
	EbikeAssistLevelPercent       uint8   // Units: percent;
	AirTimeRemaining              uint32  // Units: s;
	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
	AscentRate                    int32   // Scale: 1000; Units: m/s;
	Po2                           uint8   // Scale: 100; Units: percent; Current partial pressure of oxygen
	CoreTemperature               uint16  // Scale: 100; Units: C;

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

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

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) 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]; Scale: 100; 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) ToMesg added in v0.3.0

func (m *Record) ToMesg(fac Factory) proto.Message

ToMesg converts Record into proto.Message.

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) 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(fac Factory) proto.Message

ToMesg converts RespirationRate into proto.Message.

type Schedule

type Schedule struct {
	Manufacturer  typedef.Manufacturer // Corresponds to file_id of scheduled workout / course.
	Product       uint16               // Corresponds to file_id of scheduled workout / course.
	SerialNumber  uint32               // Corresponds to file_id of scheduled workout / course.
	TimeCreated   time.Time            // Corresponds to file_id of scheduled workout / course.
	Completed     bool                 // TRUE if this activity has been started
	Type          typedef.Schedule
	ScheduledTime time.Time

	// 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(fac Factory) proto.Message

ToMesg converts Schedule into proto.Message.

type SdmProfile

type SdmProfile struct {
	MessageIndex      typedef.MessageIndex
	Enabled           bool
	SdmAntId          uint16
	SdmCalFactor      uint16 // Scale: 10; Units: %;
	Odometer          uint32 // Scale: 100; Units: m;
	SpeedSource       bool   // Use footpod for speed source instead of GPS
	SdmAntIdTransType uint8
	OdometerRollover  uint8 // Rollover counter that can be used to extend the odometer

	// 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) 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(fac Factory) proto.Message

ToMesg converts SdmProfile into proto.Message.

type SegmentFile

type SegmentFile struct {
	MessageIndex           typedef.MessageIndex
	FileUuid               string                           // UUID of the segment file
	Enabled                bool                             // Enabled state of the segment file
	UserProfilePrimaryKey  uint32                           // Primary key of the user that created 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
	DefaultRaceLeader      uint8                            // Index for the Leader Board entry selected as the default race participant

	// 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(fac Factory) proto.Message

ToMesg converts SegmentFile into proto.Message.

type SegmentId

type SegmentId struct {
	Name                  string                       // Friendly name assigned to segment
	Uuid                  string                       // UUID of the segment
	Sport                 typedef.Sport                // Sport associated with the segment
	Enabled               bool                         // Segment enabled for evaluation
	UserProfilePrimaryKey uint32                       // Primary key of the user that created the segment
	DeviceId              uint32                       // ID of the device that created 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

	// 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(fac Factory) proto.Message

ToMesg converts SegmentId into proto.Message.

type SegmentLap

type SegmentLap struct {
	MessageIndex                typedef.MessageIndex
	Timestamp                   time.Time // Units: s; Lap end time.
	Event                       typedef.Event
	EventType                   typedef.EventType
	StartTime                   time.Time
	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;
	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;
	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;
	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;
	Sport                       typedef.Sport
	EventGroup                  uint8
	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.
	Name                        string
	NormalizedPower             uint16 // Units: watts;
	LeftRightBalance            typedef.LeftRightBalance100
	SubSport                    typedef.SubSport
	TotalWork                   uint32   // Units: J;
	AvgAltitude                 uint16   // Scale: 5; Offset: 500; Units: m;
	MaxAltitude                 uint16   // Scale: 5; Offset: 500; Units: m;
	GpsAccuracy                 uint8    // 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: %;
	AvgTemperature              int8     // Units: C;
	MaxTemperature              int8     // Units: C;
	TotalMovingTime             uint32   // Scale: 1000; Units: s;
	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;
	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;
	RepetitionNum               uint16
	MinAltitude                 uint16 // Scale: 5; Offset: 500; Units: m;
	MinHeartRate                uint8  // Units: bpm;
	ActiveTime                  uint32 // Scale: 1000; Units: s;
	WktStepIndex                typedef.MessageIndex
	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
	Uuid                        string
	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
	FrontGearShiftCount         uint16
	RearGearShiftCount          uint16
	TimeStanding                uint32               // Scale: 1000; Units: s; Total time spent in the standing position
	StandCount                  uint16               // Number of transitions to the standing state
	AvgLeftPco                  int8                 // Units: mm; Average left platform center offset
	AvgRightPco                 int8                 // Units: mm; Average right platform center offset
	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.
	Manufacturer                typedef.Manufacturer // Manufacturer that produced the segment
	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.
	TotalFractionalAscent       uint8                // Scale: 100; Units: m; fractional part of total_ascent
	TotalFractionalDescent      uint8                // Scale: 100; Units: m; fractional part of total_descent
	EnhancedAvgAltitude         uint32               // Scale: 5; Offset: 500; Units: m;
	EnhancedMaxAltitude         uint32               // Scale: 5; Offset: 500; Units: m;
	EnhancedMinAltitude         uint32               // Scale: 5; Offset: 500; Units: m;

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

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

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) 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) ToMesg added in v0.3.0

func (m *SegmentLap) ToMesg(fac Factory) proto.Message

ToMesg converts SegmentLap into proto.Message.

type SegmentLeaderboardEntry

type SegmentLeaderboardEntry struct {
	MessageIndex     typedef.MessageIndex
	Name             string                         // Friendly name assigned to leader
	Type             typedef.SegmentLeaderboardType // Leader classification
	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)
	ActivityIdString string                         // String version of the activity_id. 21 characters long, express in decimal

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

ToMesg converts SegmentLeaderboardEntry into proto.Message.

type SegmentPoint

type SegmentPoint struct {
	MessageIndex     typedef.MessageIndex
	PositionLat      int32    // Units: semicircles;
	PositionLong     int32    // Units: semicircles;
	Distance         uint32   // Scale: 100; Units: m; Accumulated distance along the segment at the described point
	Altitude         uint16   // Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point
	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.
	EnhancedAltitude uint32   // Scale: 5; Offset: 500; Units: m; Accumulated altitude along the segment at the described point

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

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

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) 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(fac Factory) proto.Message

ToMesg converts SegmentPoint into proto.Message.

type Session

type Session struct {
	MessageIndex                  typedef.MessageIndex // Selected bit is set for the current session.
	Timestamp                     time.Time            // Units: s; Sesson end time.
	Event                         typedef.Event        // session
	EventType                     typedef.EventType    // stop
	StartTime                     time.Time
	StartPositionLat              int32 // Units: semicircles;
	StartPositionLong             int32 // Units: semicircles;
	Sport                         typedef.Sport
	SubSport                      typedef.SubSport
	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;
	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;
	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;
	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;
	TotalTrainingEffect           uint8  // Scale: 10;
	FirstLapIndex                 uint16
	NumLaps                       uint16
	EventGroup                    uint8
	Trigger                       typedef.SessionTrigger
	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
	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
	EndPositionLat                int32              // Units: semicircles;
	EndPositionLong               int32              // Units: semicircles;
	AvgStrokeCount                uint32             // Scale: 10; Units: strokes/lap;
	AvgStrokeDistance             uint16             // Scale: 100; Units: m;
	SwimStroke                    typedef.SwimStroke // Units: swim_stroke;
	PoolLength                    uint16             // Scale: 100; Units: m;
	ThresholdPower                uint16             // Units: watts;
	PoolLengthUnit                typedef.DisplayMeasure
	NumActiveLengths              uint16   // Units: lengths; # of active lengths of swim pool
	TotalWork                     uint32   // Units: J;
	AvgAltitude                   uint16   // Scale: 5; Offset: 500; Units: m;
	MaxAltitude                   uint16   // Scale: 5; Offset: 500; Units: m;
	GpsAccuracy                   uint8    // 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: %;
	AvgTemperature                int8     // Units: C;
	MaxTemperature                int8     // Units: C;
	TotalMovingTime               uint32   // Scale: 1000; Units: s;
	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;
	MinHeartRate                  uint8    // Units: bpm;
	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;
	AvgLapTime                    uint32   // Scale: 1000; Units: s;
	BestLapIndex                  uint16
	MinAltitude                   uint16 // Scale: 5; Offset: 500; Units: m;
	PlayerScore                   uint16
	OpponentScore                 uint16
	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
	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;
	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
	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
	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;
	SportProfileName              string   // Sport name from associated sport mesg
	SportIndex                    uint8
	TimeStanding                  uint32   // Scale: 1000; Units: s; Total time spend in the standing position
	StandCount                    uint16   // Number of transitions to the standing state
	AvgLeftPco                    int8     // Units: mm; Average platform center offset Left
	AvgRightPco                   int8     // Units: mm; Average platform center offset Right
	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.
	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;
	AvgLevMotorPower              uint16   // Units: watts; lev average motor power during session
	MaxLevMotorPower              uint16   // Units: watts; lev maximum motor power during session
	LevBatteryConsumption         uint8    // Scale: 2; Units: percent; lev battery consumption during session
	AvgVerticalRatio              uint16   // Scale: 100; Units: percent;
	AvgStanceTimeBalance          uint16   // Scale: 100; Units: percent;
	AvgStepLength                 uint16   // Scale: 10; Units: mm;
	TotalAnaerobicTrainingEffect  uint8    // Scale: 10;
	AvgVam                        uint16   // Scale: 1000; Units: m/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
	StartCns                      uint8    // Units: percent;
	EndCns                        uint8    // Units: percent;
	StartN2                       uint16   // Units: percent;
	EndN2                         uint16   // Units: percent;
	AvgRespirationRate            uint8
	MaxRespirationRate            uint8
	MinRespirationRate            uint8
	MinTemperature                int8   // Units: C;
	O2Toxicity                    uint16 // Units: OTUs;
	DiveNumber                    uint32
	TrainingLoadPeak              int32   // Scale: 65536;
	EnhancedAvgRespirationRate    uint16  // Scale: 100; Units: Breaths/min;
	EnhancedMaxRespirationRate    uint16  // Scale: 100; Units: Breaths/min;
	EnhancedMinRespirationRate    uint16  // Scale: 100;
	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.
	JumpCount                     uint16
	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.
	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
	AvgCoreTemperature            uint16  // Scale: 100; Units: C;
	MinCoreTemperature            uint16  // Scale: 100; Units: C;
	MaxCoreTemperature            uint16  // Scale: 100; Units: C;

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

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

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) 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) ToMesg added in v0.3.0

func (m *Session) ToMesg(fac Factory) proto.Message

ToMesg converts Session into proto.Message.

type Set

type Set struct {
	Timestamp         time.Time // Timestamp of the set
	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
	SetType           typedef.SetType
	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
	WeightDisplayUnit typedef.FitBaseUnit
	MessageIndex      typedef.MessageIndex
	WktStepIndex      typedef.MessageIndex

	// 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) 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(fac Factory) proto.Message

ToMesg converts Set into proto.Message.

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(fac Factory) proto.Message

ToMesg converts SlaveDevice into proto.Message.

type SleepAssessment

type SleepAssessment struct {
	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.
	AverageStressDuringSleep uint16 // Scale: 100; Excludes stress during awake periods in the sleep window

	// 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) 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(fac Factory) proto.Message

ToMesg converts SleepAssessment into proto.Message.

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(fac Factory) proto.Message

ToMesg converts SleepLevel into proto.Message.

type Software

type Software struct {
	MessageIndex typedef.MessageIndex
	Version      uint16 // Scale: 100;
	PartNumber   string

	// 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(fac Factory) proto.Message

ToMesg converts Software into proto.Message.

type SpeedZone

type SpeedZone struct {
	MessageIndex typedef.MessageIndex
	HighValue    uint16 // Scale: 1000; Units: m/s;
	Name         string

	// 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) 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(fac Factory) proto.Message

ToMesg converts SpeedZone into proto.Message.

type Split

type Split struct {
	MessageIndex      typedef.MessageIndex
	SplitType         typedef.SplitType
	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;
	StartTime         time.Time
	TotalAscent       uint16 // Units: m;
	TotalDescent      uint16 // Units: m;
	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;
	EndTime           time.Time
	TotalCalories     uint32 // Units: kcal;
	StartElevation    uint32 // Scale: 5; Offset: 500; Units: m;
	TotalMovingTime   uint32 // Scale: 1000; Units: s;

	// 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) 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) ToMesg added in v0.3.0

func (m *Split) ToMesg(fac Factory) proto.Message

ToMesg converts Split into proto.Message.

type SplitSummary added in v0.1.6

type SplitSummary struct {
	MessageIndex    typedef.MessageIndex
	SplitType       typedef.SplitType
	NumSplits       uint16
	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;
	TotalAscent     uint16 // Units: m;
	TotalDescent    uint16 // Units: m;
	AvgHeartRate    uint8  // Units: bpm;
	MaxHeartRate    uint8  // Units: bpm;
	AvgVertSpeed    int32  // Scale: 1000; Units: m/s;
	TotalCalories   uint32 // Units: kcal;
	TotalMovingTime uint32 // Scale: 1000; Units: s;

	// 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) 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(fac Factory) proto.Message

ToMesg converts SplitSummary into proto.Message.

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(fac Factory) proto.Message

ToMesg converts Spo2Data into proto.Message.

type Sport

type Sport struct {
	Sport    typedef.Sport
	SubSport typedef.SubSport
	Name     string

	// 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(fac Factory) proto.Message

ToMesg converts Sport into proto.Message.

type StressLevel

type StressLevel struct {
	StressLevelValue int16
	StressLevelTime  time.Time // Units: s; Time stress score was calculated

	// 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(fac Factory) proto.Message

ToMesg converts StressLevel into proto.Message.

type TankSummary

type TankSummary struct {
	Timestamp     time.Time // Units: s;
	Sensor        typedef.AntChannelId
	StartPressure uint16 // Scale: 100; Units: bar;
	EndPressure   uint16 // Scale: 100; Units: bar;
	VolumeUsed    uint32 // Scale: 100; Units: L;

	// 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) 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) ToMesg added in v0.3.0

func (m *TankSummary) ToMesg(fac Factory) proto.Message

ToMesg converts TankSummary into proto.Message.

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) 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(fac Factory) proto.Message

ToMesg converts TankUpdate into proto.Message.

type ThreeDSensorCalibration

type ThreeDSensorCalibration struct {
	Timestamp          time.Time          // Units: s; Whole second part of the timestamp
	SensorType         typedef.SensorType // Indicates which sensor the calibration is for
	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            // Array: [3]; Internal calibration factors, one for each: xy, yx, zx
	OrientationMatrix  []int32            // Array: [9]; Scale: 65535; 3 x 3 rotation matrix (row major)

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

ToMesg converts ThreeDSensorCalibration into proto.Message.

type TimeInZone

type TimeInZone struct {
	Timestamp                time.Time // Units: s;
	ReferenceMesg            typedef.MesgNum
	ReferenceIndex           typedef.MessageIndex
	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;
	HrCalcType               typedef.HrZoneCalc
	MaxHeartRate             uint8
	RestingHeartRate         uint8
	ThresholdHeartRate       uint8
	PwrCalcType              typedef.PwrZoneCalc
	FunctionalThresholdPower uint16

	// 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) ToMesg added in v0.3.0

func (m *TimeInZone) ToMesg(fac Factory) proto.Message

ToMesg converts TimeInZone into proto.Message.

type TimestampCorrelation

type TimestampCorrelation struct {
	Timestamp                 time.Time // Units: s; Whole second part of UTC timestamp at the time the system timestamp was recorded.
	FractionalTimestamp       uint16    // Scale: 32768; Units: s; Fractional part of the UTC timestamp at the time the system timestamp was recorded.
	SystemTimestamp           time.Time // Units: s; Whole second part of the system timestamp
	FractionalSystemTimestamp uint16    // Scale: 32768; Units: s; Fractional part of the system timestamp
	LocalTimestamp            time.Time // Units: s; timestamp epoch expressed in local time used to convert timestamps to local time
	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) 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(fac Factory) proto.Message

ToMesg converts TimestampCorrelation into proto.Message.

type Totals

type Totals struct {
	MessageIndex typedef.MessageIndex
	Timestamp    time.Time // Units: s;
	TimerTime    uint32    // Units: s; Excludes pauses
	Distance     uint32    // Units: m;
	Calories     uint32    // Units: kcal;
	Sport        typedef.Sport
	ElapsedTime  uint32 // Units: s; Includes pauses
	Sessions     uint16
	ActiveTime   uint32 // Units: s;
	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(fac Factory) proto.Message

ToMesg converts Totals into proto.Message.

type TrainingFile

type TrainingFile struct {
	Timestamp    time.Time
	Type         typedef.File
	Manufacturer typedef.Manufacturer
	Product      uint16
	SerialNumber uint32
	TimeCreated  time.Time

	// 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(fac Factory) proto.Message

ToMesg converts TrainingFile into proto.Message.

type UserProfile

type UserProfile struct {
	MessageIndex               typedef.MessageIndex
	FriendlyName               string // Used for Morning Report greeting
	Gender                     typedef.Gender
	Age                        uint8  // Units: years;
	Height                     uint8  // Scale: 100; Units: m;
	Weight                     uint16 // Scale: 10; Units: kg;
	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
	LocalId                    typedef.UserLocalId
	GlobalId                   []byte                   // Array: [6];
	WakeTime                   typedef.LocaltimeIntoDay // Typical wake time
	SleepTime                  typedef.LocaltimeIntoDay // Typical bed time
	HeightSetting              typedef.DisplayMeasure
	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
	DepthSetting               typedef.DisplayMeasure
	DiveCount                  uint32

	// 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) 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(fac Factory) proto.Message

ToMesg converts UserProfile into proto.Message.

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(fac Factory) proto.Message

ToMesg converts Video into proto.Message.

type VideoClip

type VideoClip struct {
	ClipNumber       uint16
	StartTimestamp   time.Time
	StartTimestampMs uint16
	EndTimestamp     time.Time
	EndTimestampMs   uint16
	ClipStart        uint32 // Units: ms; Start of clip in video time
	ClipEnd          uint32 // Units: ms; End of clip in video time

	// 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(fac Factory) proto.Message

ToMesg converts VideoClip into proto.Message.

type VideoDescription

type VideoDescription struct {
	MessageIndex typedef.MessageIndex // Long descriptions will be split into multiple parts
	MessageCount uint16               // Total number of description parts
	Text         string

	// 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(fac Factory) proto.Message

ToMesg converts VideoDescription into proto.Message.

type VideoFrame

type VideoFrame struct {
	Timestamp   time.Time // Units: s; Whole second part of the timestamp
	TimestampMs uint16    // Units: ms; Millisecond part of the timestamp.
	FrameNumber uint32    // Number of the frame that the timestamp and timestamp_ms correlate to

	// 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(fac Factory) proto.Message

ToMesg converts VideoFrame into proto.Message.

type VideoTitle

type VideoTitle struct {
	MessageIndex typedef.MessageIndex // Long titles will be split into multiple parts
	MessageCount uint16               // Total number of title parts
	Text         string

	// 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(fac Factory) proto.Message

ToMesg converts VideoTitle into proto.Message.

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(fac Factory) proto.Message

ToMesg converts WatchfaceSettings into proto.Message.

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(fac Factory) proto.Message

ToMesg converts WeatherAlert into proto.Message.

type WeatherConditions

type WeatherConditions struct {
	Timestamp                time.Time             // time of update for current conditions, else forecast time
	WeatherReport            typedef.WeatherReport // Current or forecast
	Temperature              int8                  // Units: C;
	Condition                typedef.WeatherStatus // Corresponds to GSC Response weatherIcon field
	WindDirection            uint16                // Units: degrees;
	WindSpeed                uint16                // Scale: 1000; Units: m/s;
	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
	Location                 string // string corresponding to GCS response location string
	ObservedAtTime           time.Time
	ObservedLocationLat      int32 // Units: semicircles;
	ObservedLocationLong     int32 // Units: semicircles;
	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(fac Factory) proto.Message

ToMesg converts WeatherConditions into proto.Message.

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;
	PhysiqueRating    uint8
	ActiveMet         uint16 // Scale: 4; Units: kcal/day; ~4kJ per kcal, 0.25 allows max 16384 kcal
	MetabolicAge      uint8  // Units: years;
	VisceralFatRating uint8
	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;

	// 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) 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(fac Factory) proto.Message

ToMesg converts WeightScale into proto.Message.

type Workout

type Workout struct {
	MessageIndex   typedef.MessageIndex
	Sport          typedef.Sport
	Capabilities   typedef.WorkoutCapabilities
	NumValidSteps  uint16 // number of valid steps
	WktName        string
	SubSport       typedef.SubSport
	PoolLength     uint16 // Scale: 100; Units: m;
	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) 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(fac Factory) proto.Message

ToMesg converts Workout into proto.Message.

type WorkoutSession

type WorkoutSession struct {
	MessageIndex   typedef.MessageIndex
	Sport          typedef.Sport
	SubSport       typedef.SubSport
	NumValidSteps  uint16
	FirstStepIndex uint16
	PoolLength     uint16 // Scale: 100; Units: m;
	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) 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(fac Factory) proto.Message

ToMesg converts WorkoutSession into proto.Message.

type WorkoutStep

type WorkoutStep struct {
	MessageIndex                   typedef.MessageIndex
	WktStepName                    string
	DurationType                   typedef.WktStepDuration
	DurationValue                  uint32
	TargetType                     typedef.WktStepTarget
	TargetValue                    uint32
	CustomTargetValueLow           uint32
	CustomTargetValueHigh          uint32
	Intensity                      typedef.Intensity
	Notes                          string
	Equipment                      typedef.WorkoutEquipment
	ExerciseCategory               typedef.ExerciseCategory
	ExerciseName                   uint16
	ExerciseWeight                 uint16 // Scale: 100; Units: kg;
	WeightDisplayUnit              typedef.FitBaseUnit
	SecondaryTargetType            typedef.WktStepTarget
	SecondaryTargetValue           uint32
	SecondaryCustomTargetValueLow  uint32
	SecondaryCustomTargetValueHigh uint32

	// 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) 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(fac Factory) proto.Message

ToMesg converts WorkoutStep into proto.Message.

type ZonesTarget

type ZonesTarget struct {
	MaxHeartRate             uint8
	ThresholdHeartRate       uint8
	FunctionalThresholdPower uint16
	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(fac Factory) proto.Message

ToMesg converts ZonesTarget into proto.Message.

Source Files

Jump to

Keyboard shortcuts

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