@@ -62,7 +62,7 @@ void CF_CmdReset(CFE_SB_Buffer_t *msg)
62
62
CF_UnionArgsCmd_t * cmd = (CF_UnionArgsCmd_t * )msg ;
63
63
static const char * names [5 ] = {"all" , "cmd" , "fault" , "up" , "down" };
64
64
/* 0=all, 1=cmd, 2=fault 3=up 4=down */
65
- uint8 param = cmd -> byte [0 ];
65
+ uint8 param = cmd -> data . byte [0 ];
66
66
int i ;
67
67
int acc = 1 ;
68
68
@@ -220,22 +220,22 @@ CFE_Status_t CF_DoChanAction(CF_UnionArgsCmd_t *cmd, const char *errstr, CF_Chan
220
220
/* this function is generic for any ground command that takes a single channel
221
221
* argument which must be less than CF_NUM_CHANNELS or 255 which is a special
222
222
* value that means apply command to all channels */
223
- if (cmd -> byte [0 ] == CF_ALL_CHANNELS )
223
+ if (cmd -> data . byte [0 ] == CF_ALL_CHANNELS )
224
224
{
225
225
/* apply to all channels */
226
226
for (i = 0 ; i < CF_NUM_CHANNELS ; ++ i )
227
227
ret |= fn (i , context );
228
228
}
229
- else if (cmd -> byte [0 ] < CF_NUM_CHANNELS )
229
+ else if (cmd -> data . byte [0 ] < CF_NUM_CHANNELS )
230
230
{
231
- ret = fn (cmd -> byte [0 ], context );
231
+ ret = fn (cmd -> data . byte [0 ], context );
232
232
}
233
233
else
234
234
{
235
235
/* bad parameter */
236
236
CFE_EVS_SendEvent (CF_EID_ERR_CMD_CHAN_PARAM , CFE_EVS_EventType_ERROR ,
237
- "CF: %s: channel parameter out of range. received %d" , errstr , cmd -> byte [0 ]);
238
- ret = CF_ERROR ;
237
+ "CF: %s: channel parameter out of range. received %d" , errstr , cmd -> data . byte [0 ]);
238
+ ret = -1 ;
239
239
}
240
240
241
241
return ret ;
@@ -591,20 +591,20 @@ CFE_Status_t CF_DoEnableDisablePolldir(uint8 chan_num, const CF_ChanAction_BoolM
591
591
int i ;
592
592
CFE_Status_t ret = CFE_SUCCESS ;
593
593
/* no need to bounds check chan_num, done in caller */
594
- if (context -> msg -> byte [1 ] == CF_ALL_POLLDIRS )
594
+ if (context -> msg -> data . byte [1 ] == CF_ALL_POLLDIRS )
595
595
{
596
596
/* all polldirs in channel */
597
597
for (i = 0 ; i < CF_MAX_POLLING_DIR_PER_CHAN ; ++ i )
598
598
CF_AppData .config_table -> chan [chan_num ].polldir [i ].enabled = context -> barg ;
599
599
}
600
- else if (context -> msg -> byte [1 ] < CF_MAX_POLLING_DIR_PER_CHAN )
600
+ else if (context -> msg -> data . byte [1 ] < CF_MAX_POLLING_DIR_PER_CHAN )
601
601
{
602
- CF_AppData .config_table -> chan [chan_num ].polldir [context -> msg -> byte [1 ]].enabled = context -> barg ;
602
+ CF_AppData .config_table -> chan [chan_num ].polldir [context -> msg -> data . byte [1 ]].enabled = context -> barg ;
603
603
}
604
604
else
605
605
{
606
606
CFE_EVS_SendEvent (CF_EID_ERR_CMD_POLLDIR_INVALID , CFE_EVS_EventType_ERROR ,
607
- "CF: enable/disable polldir: invalid polldir %d on channel %d" , context -> msg -> byte [1 ],
607
+ "CF: enable/disable polldir: invalid polldir %d on channel %d" , context -> msg -> data . byte [1 ],
608
608
chan_num );
609
609
ret = CF_ERROR ;
610
610
}
@@ -703,7 +703,7 @@ CFE_Status_t CF_DoPurgeQueue(uint8 chan_num, CF_UnionArgsCmd_t *cmd)
703
703
int pend = 0 ;
704
704
int hist = 0 ;
705
705
706
- switch (cmd -> byte [1 ])
706
+ switch (cmd -> data . byte [1 ])
707
707
{
708
708
case 0 : /* pend */
709
709
pend = 1 ;
@@ -720,8 +720,8 @@ CFE_Status_t CF_DoPurgeQueue(uint8 chan_num, CF_UnionArgsCmd_t *cmd)
720
720
721
721
default :
722
722
CFE_EVS_SendEvent (CF_EID_ERR_CMD_PURGE_ARG , CFE_EVS_EventType_ERROR , "CF: purge queue invalid arg %d" ,
723
- cmd -> byte [1 ]);
724
- ret = CF_ERROR ;
723
+ cmd -> data . byte [1 ]);
724
+ ret = -1 ;
725
725
break ;
726
726
}
727
727
0 commit comments