Skip to content

Commit

Permalink
add tlm
Browse files Browse the repository at this point in the history
  • Loading branch information
meltingrabbit committed Jul 20, 2023
1 parent 12abd9f commit 4af200e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,
,CDIS.ERROR_COUNTER,uint32_t,cdis->error_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.LOCKOUT,int32_t,cdis->lockout,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.STOP_ON_ERROR,int32_t,cdis->stop_on_error,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.PL,uint32_t,(uint32_t)cdis->pl,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,CDIS.PL,uint32_t,(uint32_t)cdis->pl,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,CDIS.PL.TOTAL_NODES,uint16_t,cdis->pl->total_nodes_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.PL.EXECUTED_NODES,uint32_t,cdis->pl->executed_nodes_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.PL.ACTIVE_NODES,uint16_t,cdis->pl->active_nodes_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.PL.PACKET_SIZE,uint16_t,cdis->pl->packet_size_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,CDIS.PL.PACKET_TYPE,uint8_t,(uint8_t)cdis->pl->packet_type_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=CTCP@@ 1=CTP@@ 2=CCP@@ 3=OTHER@@ *=ERR,,
,CDIS.PL.PL_NODE_STOCK,uint32_t,(uint32_t)cdis->pl->pl_node_stock_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,CDIS.PL.PACKET_STOCK,uint32_t,(uint32_t)cdis->pl->packet_stock_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,CDIS.PL.INACTIVE_LIST_HEAD,uint32_t,(uint32_t)cdis->pl->inactive_list_head_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,CDIS.PL.ACTIVE_LIST_HEAD,uint32_t,(uint32_t)cdis->pl->active_list_head_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,CDIS.PL.ACTIVE_LIST_TAIL,uint32_t,(uint32_t)cdis->pl->active_list_tail_,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,,
,PL.COUNTER,uint32_t,PL_count_executed_nodes(cdis->pl),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,PL.QUEUED,uint16_t,PL_count_active_nodes(cdis->pl),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,PL.NEXT_TIME,uint32_t,(PL_is_empty(cdis->pl)) ? 0 : CCP_get_ti((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,PL.NEXT_ID,uint32_t,(PL_is_empty(cdis->pl)) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,
,CDIS.ERROR_COUNTER,uint32_t,cdis->error_counter,PACKET,67,0,32,NONE,,,,,,,,,
,CDIS.LOCKOUT,int32_t,cdis->lockout,PACKET,71,0,32,NONE,,,,,,,,,
,CDIS.STOP_ON_ERROR,int32_t,cdis->stop_on_error,PACKET,75,0,32,NONE,,,,,,,,,
,CDIS.PL,uint32_t,(uint32_t)cdis->pl,PACKET,79,0,32,NONE,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,CDIS.PL,uint32_t,(uint32_t)cdis->pl,PACKET,79,0,32,HEX,,,,,,,,,
,CDIS.PL.TOTAL_NODES,uint16_t,cdis->pl->total_nodes_,PACKET,83,0,16,NONE,,,,,,,,,
,CDIS.PL.EXECUTED_NODES,uint32_t,cdis->pl->executed_nodes_,PACKET,85,0,32,NONE,,,,,,,,,
,CDIS.PL.ACTIVE_NODES,uint16_t,cdis->pl->active_nodes_,PACKET,89,0,16,NONE,,,,,,,,,
,CDIS.PL.PACKET_SIZE,uint16_t,cdis->pl->packet_size_,PACKET,91,0,16,NONE,,,,,,,,,
,CDIS.PL.PACKET_TYPE,uint8_t,(uint8_t)cdis->pl->packet_type_,PACKET,93,0,8,STATUS,,,,,,,0=CTCP@@ 1=CTP@@ 2=CCP@@ 3=OTHER@@ *=ERR,,
,CDIS.PL.PL_NODE_STOCK,uint32_t,(uint32_t)cdis->pl->pl_node_stock_,PACKET,94,0,32,HEX,,,,,,,,,
,CDIS.PL.PACKET_STOCK,uint32_t,(uint32_t)cdis->pl->packet_stock_,PACKET,98,0,32,HEX,,,,,,,,,
,CDIS.PL.INACTIVE_LIST_HEAD,uint32_t,(uint32_t)cdis->pl->inactive_list_head_,PACKET,102,0,32,HEX,,,,,,,,,
,CDIS.PL.ACTIVE_LIST_HEAD,uint32_t,(uint32_t)cdis->pl->active_list_head_,PACKET,106,0,32,HEX,,,,,,,,,
,CDIS.PL.ACTIVE_LIST_TAIL,uint32_t,(uint32_t)cdis->pl->active_list_tail_,PACKET,110,0,32,HEX,,,,,,,,,
,PL.COUNTER,uint32_t,PL_count_executed_nodes(cdis->pl),PACKET,114,0,32,NONE,,,,,,,,,
,PL.QUEUED,uint16_t,PL_count_active_nodes(cdis->pl),PACKET,118,0,16,NONE,,,,,,,,,
,PL.NEXT_TIME,uint32_t,(PL_is_empty(cdis->pl)) ? 0 : CCP_get_ti((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet),PACKET,120,0,32,NONE,,,,,,,,,
,PL.NEXT_ID,uint32_t,(PL_is_empty(cdis->pl)) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet),PACKET,124,0,32,NONE,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
Expand Down
18 changes: 16 additions & 2 deletions Examples/mobc/src/src_user/TlmCmd/telemetry_definitions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ static TF_TLM_FUNC_ACK Tlm_CDIS_(uint8_t* packet, uint16_t* len, uint16_t max_le
{
const CommandDispatcher* cdis = command_dispatcher_manager->cdises[command_dispatcher_manager->idx_for_tlm];

if (83 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN;
if (128 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN;

#ifndef BUILD_SETTINGS_FAST_BUILD
TF_copy_u8(&packet[26], command_dispatcher_manager->num_of_cdis);
Expand All @@ -1264,9 +1264,23 @@ static TF_TLM_FUNC_ACK Tlm_CDIS_(uint8_t* packet, uint16_t* len, uint16_t max_le
TF_copy_i32(&packet[71], cdis->lockout);
TF_copy_i32(&packet[75], cdis->stop_on_error);
TF_copy_u32(&packet[79], (uint32_t)cdis->pl);
TF_copy_u16(&packet[83], cdis->pl->total_nodes_);
TF_copy_u32(&packet[85], cdis->pl->executed_nodes_);
TF_copy_u16(&packet[89], cdis->pl->active_nodes_);
TF_copy_u16(&packet[91], cdis->pl->packet_size_);
TF_copy_u8(&packet[93], (uint8_t)cdis->pl->packet_type_);
TF_copy_u32(&packet[94], (uint32_t)cdis->pl->pl_node_stock_);
TF_copy_u32(&packet[98], (uint32_t)cdis->pl->packet_stock_);
TF_copy_u32(&packet[102], (uint32_t)cdis->pl->inactive_list_head_);
TF_copy_u32(&packet[106], (uint32_t)cdis->pl->active_list_head_);
TF_copy_u32(&packet[110], (uint32_t)cdis->pl->active_list_tail_);
TF_copy_u32(&packet[114], PL_count_executed_nodes(cdis->pl));
TF_copy_u16(&packet[118], PL_count_active_nodes(cdis->pl));
TF_copy_u32(&packet[120], (PL_is_empty(cdis->pl)) ? 0 : CCP_get_ti((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet));
TF_copy_u32(&packet[124], (PL_is_empty(cdis->pl)) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(cdis->pl))->packet));
#endif

*len = 83;
*len = 128;
return TF_TLM_FUNC_ACK_SUCCESS;
}

Expand Down

0 comments on commit 4af200e

Please sign in to comment.