You are here: Forum Home → ANT Developers Forums → ANT General Questions → Thread
ANT_EXT_MESG_TIME_STAMP_FIELD_SIZEto
4 (from 2).
MESG_MAX_EXT_DATA_SIZEhas the following definition:
(ANT_EXT_MESG_DEVICE_ID_FIELD_SIZE + ANT_EXT_MESG_RSSI_FIELD_SIZE + ANT_EXT_MESG_ALT_TIME_STAMP_FIELD_SIZE + ANT_EXT_STRING_SIZE)
// ANT device ID (4 bytes) + ANT RSSI (4 bytes) + ANT timestamp (4 bytes) + ANT Ext String Size
sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_TIME_STAMP |
ANT_LIB_CONFIG_MESG_OUT_INC_RSSI |
ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
ANT_TIME_STAMP_CONFIG tsCfg =
{
.ucTimeBase = ANT_TIME_BASE_ALT2,
.bTimeStampEnabled = true,
};
err = sd_ant_time_stamp_config_set(&tsCfg;);
//Get time stamp from extended data
time_stamp = (pstEventMessage->ANT_MESSAGE_aucExtData[2] << 16) + (pstEventMessage->ANT_MESSAGE_aucExtData[1] << 8) +
pstEventMessage->ANT_MESSAGE_aucExtData[0];
15 | 4e | 01 | 48 61 62 63 64 65 66 00 | e0 | 51 ff 7f 01 | 20 bf b0 c1 | f3 00 00 20 | 81 ca 02 00 01 00 00 00 51 98 02 00 00 00 00 00 01
Size: 0x15 (21)
MsgId: 0x4e (MESG_BROADCAST_DATA_ID)
Channel: 0x01
Bcast Data: [0x48, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x00]
Ext Bitfield: 0xe0 (Time stamp + Device ID + RSSI enabled)
Device ID: [0x51, 0xff, 0x7f, 0x01]
RSSI: [0x20, 0xbf, 0xb0, 0xc1] (-65 dbm)
Timestamp: [0xf3, 0x00, 0x00, 0x20] (0x200000f3)
Extra data: [0x81, 0xca, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x98, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]