You are here: Forum Home → ANT Developers Forums → ANT+ FIT Forum Has Moved → Thread
=============================================================================
Record 5 Header-Byte:
header_byte: 66
header_type:0=NORMAL message_type:1=DEFINITION local_message_type:2
Record 5 Content:
reserved:0 architecture:0=LITTLE ENDIAN global_msg:21=EVENT no_of_fields:5
field #: Def# Field Name Size Base-Type
field 0: 253 timestamp 4 6
field 1: 3 data 4 6
field 2: 0 event 1 0
field 3: 1 event_type 1 0
field 4: 4 event_group 1 2
=============================================================================
(Garmin edge 510 V3.40)
The SDK allows fields to be written in any order, messages should be fully decoded before interpreting subfields. I will clarify §4.5.
# Message: workout_step
# Dynamic Field: target_value
if target_type in ['heart_rate','power']:
RefField = target_type
else:
RefField = duration_type
if target_type == heart_rate
// Interpret field#4 (target_value) as 'target_hr_zone'
else if duration_type == repeat_until_time
// Interpret field#4 (target_value) as 'repeat_time'
// units are s
// Scale is 1000
else if ((duration_type == repeat_until_hr_less_than) OR (duration_type == repeat_until_hr_greater_than))
// Interpret field#4 (target_value) as 'repeat_hr'
// units are %orBPM
// Type is 'workout_hr' instead of uint32
Messages should not be defined such that more than one reference field condition can be satisfied at once.
If this occurs the first one should take priority.
# Message: workout_step
# Dynamic Field: target_value
if target_type in ['heart_rate','power']:
# use target_type as Reference Field
else:
# use duration_type as Reference Field