diff --git a/docs/dox_src/cfs_cf.dox b/docs/dox_src/cfs_cf.dox index e09b784b..38e8da1a 100644 --- a/docs/dox_src/cfs_cf.dox +++ b/docs/dox_src/cfs_cf.dox @@ -483,7 +483,7 @@ cf_platform_cfg.h uses macro definitions for configurable options, while cf_def_config.c uses a table. cf_def_config.c parameters can be accessed using the get/set functions - CF_CmdGetParam() and CF_CmdSetParam(). + CF_GetParamCmd() and CF_SetParamCmd(). CF expects to receive a CF_WAKEUP_MID message from the SCH (scheduler) app at a fixed rate. The number of wakeups per second is reflected in the configuration table. This diff --git a/fsw/inc/cf_events.h b/fsw/inc/cf_events.h index 9910ef0a..8f993bd0 100644 --- a/fsw/inc/cf_events.h +++ b/fsw/inc/cf_events.h @@ -212,6 +212,17 @@ */ #define CF_EID_ERR_INIT_OUTGOING_SIZE (35) +/** + * \brief CF Create SB Command Pipe at Initialization Failed Event ID + * + * \par Type: ERROR + * + * \par Cause: + * + * Failure from create command pipe call during application initialization + */ +#define CF_CR_PIPE_ERR_EID (36) + /************************************************************************** * CF_PDU event IDs - Protocol data unit */ diff --git a/fsw/inc/cf_msg.h b/fsw/inc/cf_msg.h index 27587c51..7840db02 100644 --- a/fsw/inc/cf_msg.h +++ b/fsw/inc/cf_msg.h @@ -122,9 +122,9 @@ typedef struct CF_HkChannel_Data */ typedef struct CF_HkPacket { - CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ - CF_HkCmdCounters_t counters; /**< \brief Command counters */ - uint8 spare[4]; /**< \brief Alignment spare (CF_HkCmdCounters_t is 4 bytes) */ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CF_HkCmdCounters_t counters; /**< \brief Command counters */ + uint8 spare[4]; /**< \brief Alignment spare (CF_HkCmdCounters_t is 4 bytes) */ CF_HkChannel_Data_t channel_hk[CF_NUM_CHANNELS]; /**< \brief Per channel housekeeping data */ } CF_HkPacket_t; @@ -134,17 +134,17 @@ typedef struct CF_HkPacket */ typedef struct CF_EotPacket { - CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ - CF_TransactionSeq_t seq_num; /**< \brief transaction identifier, stays constant for entire transfer */ - uint32 channel; /**< \brief Channel number */ - uint32 direction; /**< \brief direction of this transaction */ - uint32 state; /**< \brief Transaction state */ - uint32 txn_stat; /**< \brief final status code of transaction (extended CFDP CC) */ - CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ - CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */ - uint32 fsize; /**< \brief File size */ - uint32 crc_result; /**< \brief CRC result */ - CF_TxnFilenames_t fnames; /**< \brief file names associated with this transaction */ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ + CF_TransactionSeq_t seq_num; /**< \brief transaction identifier, stays constant for entire transfer */ + uint32 channel; /**< \brief Channel number */ + uint32 direction; /**< \brief direction of this transaction */ + uint32 state; /**< \brief Transaction state */ + uint32 txn_stat; /**< \brief final status code of transaction (extended CFDP CC) */ + CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */ + CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */ + uint32 fsize; /**< \brief File size */ + uint32 crc_result; /**< \brief CRC result */ + CF_TxnFilenames_t fnames; /**< \brief file names associated with this transaction */ } CF_EotPacket_t; /** diff --git a/fsw/src/cf_app.c b/fsw/src/cf_app.c index 919d8597..090d3d20 100644 --- a/fsw/src/cf_app.c +++ b/fsw/src/cf_app.c @@ -46,8 +46,8 @@ CF_AppData_t CF_AppData; *-----------------------------------------------------------------*/ void CF_HkCmd(void) { - CFE_MSG_SetMsgTime(&CF_AppData.hk.tlm_header.Msg, CFE_TIME_GetTime()); - /* return value ignored */ CFE_SB_TransmitMsg(&CF_AppData.hk.tlm_header.Msg, true); + CFE_SB_TimeStampMsg(CFE_MSG_PTR(CF_AppData.hk.TelemetryHeader)); + /* return value ignored */ CFE_SB_TransmitMsg(CFE_MSG_PTR(CF_AppData.hk.TelemetryHeader), true); } /*---------------------------------------------------------------- @@ -82,7 +82,7 @@ void CF_CheckTables(void) { CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_REL, CFE_EVS_EventType_ERROR, "CF: error in CFE_TBL_ReleaseAddress (check), returned 0x%08lx", (unsigned long)status); - CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } status = CFE_TBL_Manage(CF_AppData.config_handle); @@ -90,7 +90,7 @@ void CF_CheckTables(void) { CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_MAN, CFE_EVS_EventType_ERROR, "CF: error in CFE_TBL_Manage (check), returned 0x%08lx", (unsigned long)status); - CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } status = CFE_TBL_GetAddress((void *)&CF_AppData.config_table, CF_AppData.config_handle); @@ -98,7 +98,7 @@ void CF_CheckTables(void) { CFE_EVS_SendEvent(CF_EID_ERR_INIT_TBL_CHECK_GA, CFE_EVS_EventType_ERROR, "CF: failed to get table address (check), returned 0x%08lx", (unsigned long)status); - CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } } } @@ -197,15 +197,18 @@ CFE_Status_t CF_TableInit(void) * See description in cf_app.h for argument/return detail * *-----------------------------------------------------------------*/ -CFE_Status_t CF_Init(void) +CFE_Status_t CF_AppInit(void) { CFE_Status_t status; static const CFE_SB_MsgId_Atom_t MID_VALUES[] = {CF_CMD_MID, CF_SEND_HK_MID, CF_WAKE_UP_MID}; uint32 i; - CF_AppData.run_status = CFE_ES_RunStatus_APP_RUN; + /* Zero-out global data structure */ + memset(&CF_AppData, 0, sizeof(CF_AppData)); - CFE_MSG_Init(&CF_AppData.hk.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_HK_TLM_MID), sizeof(CF_AppData.hk)); + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; + + CFE_MSG_Init(&CF_AppData.hk.TelemetryHeader.Msg, CFE_SB_ValueToMsgId(CF_HK_TLM_MID), sizeof(CF_AppData.hk)); status = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY); if (status != CFE_SUCCESS) @@ -214,11 +217,11 @@ CFE_Status_t CF_Init(void) } else { - status = CFE_SB_CreatePipe(&CF_AppData.cmd_pipe, CF_PIPE_DEPTH, CF_PIPE_NAME); + status = CFE_SB_CreatePipe(&CF_AppData.CmdPipe, CF_PIPE_DEPTH, CF_PIPE_NAME); if (status != CFE_SUCCESS) { - CFE_ES_WriteToSysLog("CF app: error creating pipe %s, returned 0x%08lx", CF_PIPE_NAME, - (unsigned long)status); + CFE_EVS_SendEvent(CF_CR_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, + "CF app: error creating pipe %s, returned 0x%08lx", CF_PIPE_NAME, (unsigned long)status); } } @@ -226,7 +229,7 @@ CFE_Status_t CF_Init(void) { for (i = 0; i < (sizeof(MID_VALUES) / sizeof(MID_VALUES[0])); ++i) { - status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(MID_VALUES[i]), CF_AppData.cmd_pipe); + status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(MID_VALUES[i]), CF_AppData.CmdPipe); if (status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("CF app: failed to subscribe to MID 0x%04lx, returned 0x%08lx", @@ -248,13 +251,8 @@ CFE_Status_t CF_Init(void) if (status == CFE_SUCCESS) { - status = - CFE_EVS_SendEvent(CF_EID_INF_INIT, CFE_EVS_EventType_INFORMATION, "CF Initialized. Version %d.%d.%d.%d", - CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION, CF_MISSION_REV); - if (status != CFE_SUCCESS) - { - CFE_ES_WriteToSysLog("CF: error sending init event, returned 0x%08lx", (unsigned long)status); - } + CFE_EVS_SendEvent(CF_EID_INF_INIT, CFE_EVS_EventType_INFORMATION, "CF Initialized. Version %d.%d.%d.%d", + CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION, CF_MISSION_REV); } return status; @@ -279,16 +277,16 @@ void CF_WakeUp(void) * See description in cf_app.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_ProcessMsg(CFE_SB_Buffer_t *msg) +void CF_ProcessMsg(CFE_SB_Buffer_t *BufPtr) { - CFE_SB_MsgId_t msg_id = CFE_SB_INVALID_MSG_ID; + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; - CFE_MSG_GetMsgId(&msg->Msg, &msg_id); + CFE_MSG_GetMsgId(&BufPtr->Msg, &MessageID); - switch (CFE_SB_MsgIdToValue(msg_id)) + switch (CFE_SB_MsgIdToValue(MessageID)) { case CF_CMD_MID: - CF_ProcessGroundCommand(msg); + CF_ProcessGroundCommand(BufPtr); break; case CF_WAKE_UP_MID: @@ -303,7 +301,7 @@ void CF_ProcessMsg(CFE_SB_Buffer_t *msg) default: ++CF_AppData.hk.counters.err; CFE_EVS_SendEvent(CF_EID_ERR_INIT_CMD_LENGTH, CFE_EVS_EventType_ERROR, - "CF: invalid command packet id=0x%lx", (unsigned long)CFE_SB_MsgIdToValue(msg_id)); + "CF: invalid command packet id=0x%lx", (unsigned long)CFE_SB_MsgIdToValue(MessageID)); break; } } @@ -317,38 +315,32 @@ void CF_ProcessMsg(CFE_SB_Buffer_t *msg) void CF_AppMain(void) { int32 status; - CFE_SB_Buffer_t *msg; + CFE_SB_Buffer_t *BufPtr = NULL; CFE_ES_PerfLogEntry(CF_PERF_ID_APPMAIN); - status = CF_Init(); + status = CF_AppInit(); if (status != CFE_SUCCESS) { - CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } - msg = NULL; - - while (CFE_ES_RunLoop(&CF_AppData.run_status)) + while (CFE_ES_RunLoop(&CF_AppData.RunStatus)) { CFE_ES_PerfLogExit(CF_PERF_ID_APPMAIN); - status = CFE_SB_ReceiveBuffer(&msg, CF_AppData.cmd_pipe, CF_RCVMSG_TIMEOUT); + status = CFE_SB_ReceiveBuffer(&BufPtr, CF_AppData.CmdPipe, CF_RCVMSG_TIMEOUT); CFE_ES_PerfLogEntry(CF_PERF_ID_APPMAIN); - /* - * note that CFE_SB_ReceiveBuffer() guarantees that a CFE_SUCCESS status is accompanied by - * a valid (non-NULL) output message pointer. However the unit test can force this condition. - */ - if (status == CFE_SUCCESS && msg != NULL) + if (status == CFE_SUCCESS) { - CF_ProcessMsg(msg); + CF_ProcessMsg(BufPtr); } else if (status != CFE_SB_TIME_OUT && status != CFE_SB_NO_MESSAGE) { CFE_EVS_SendEvent(CF_EID_ERR_INIT_MSG_RECV, CFE_EVS_EventType_ERROR, "CF: exiting due to CFE_SB_ReceiveBuffer error 0x%08lx", (unsigned long)status); - CF_AppData.run_status = CFE_ES_RunStatus_APP_ERROR; + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR; } else { @@ -357,5 +349,5 @@ void CF_AppMain(void) } CFE_ES_PerfLogExit(CF_PERF_ID_APPMAIN); - CFE_ES_ExitApp(CF_AppData.run_status); + CFE_ES_ExitApp(CF_AppData.RunStatus); } diff --git a/fsw/src/cf_app.h b/fsw/src/cf_app.h index 0830de7e..a9f1b2d2 100644 --- a/fsw/src/cf_app.h +++ b/fsw/src/cf_app.h @@ -79,9 +79,9 @@ typedef struct { CF_HkPacket_t hk; - uint32 run_status; + uint32 RunStatus; - CFE_SB_PipeId_t cmd_pipe; + CFE_SB_PipeId_t CmdPipe; CFE_TBL_Handle_t config_handle; CF_ConfigTable_t *config_table; @@ -172,7 +172,7 @@ CFE_Status_t CF_TableInit(void); * @retval Returns anything else on error. * */ -CFE_Status_t CF_Init(void); +CFE_Status_t CF_AppInit(void); /************************************************************************/ /** @brief CF wakeup function @@ -193,12 +193,12 @@ void CF_WakeUp(void); * Process message packets received via the Software Bus command pipe * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param[in] msg Software Bus message pointer + * @param[in] BufPtr Software Bus message pointer * */ -void CF_ProcessMsg(CFE_SB_Buffer_t *msg); +void CF_ProcessMsg(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief CF app entry point diff --git a/fsw/src/cf_cfdp.c b/fsw/src/cf_cfdp.c index 07bcb5dc..e6ec6fc8 100644 --- a/fsw/src/cf_cfdp.c +++ b/fsw/src/cf_cfdp.c @@ -1712,7 +1712,7 @@ void CF_CFDP_SendEotPkt(CF_Transaction_t *t) if (PktBuf != NULL) { - CFE_MSG_Init(&PktBuf->eot.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_EOT_TLM_MID), sizeof(*PktBuf)); + CFE_MSG_Init(&PktBuf->eot.TelemetryHeader.Msg, CFE_SB_ValueToMsgId(CF_EOT_TLM_MID), sizeof(*PktBuf)); PktBuf->eot.channel = t->chan_num; PktBuf->eot.direction = t->history->dir; @@ -1728,7 +1728,7 @@ void CF_CFDP_SendEotPkt(CF_Transaction_t *t) /* ** Timestamp and send eod of transaction telemetry */ - CFE_SB_TimeStampMsg(&PktBuf->eot.tlm_header.Msg); + CFE_SB_TimeStampMsg(&PktBuf->eot.TelemetryHeader.Msg); CFE_SB_TransmitBuffer(&PktBuf->SBBuf, true); } } diff --git a/fsw/src/cf_cmd.c b/fsw/src/cf_cmd.c index e87b1d72..6aba5e1e 100644 --- a/fsw/src/cf_cmd.c +++ b/fsw/src/cf_cmd.c @@ -44,7 +44,7 @@ * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdNoop(CFE_SB_Buffer_t *msg) +void CF_NoopCmd(CFE_SB_Buffer_t *BufPtr) { CFE_EVS_SendEvent(CF_EID_INF_CMD_NOOP, CFE_EVS_EventType_INFORMATION, "CF: No-Op received, Version %d.%d.%d.%d", CF_MAJOR_VERSION, CF_MINOR_VERSION, CF_REVISION, CF_MISSION_REV); @@ -57,9 +57,9 @@ void CF_CmdNoop(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdReset(CFE_SB_Buffer_t *msg) +void CF_ResetCountersCmd(CFE_SB_Buffer_t *BufPtr) { - CF_UnionArgsCmd_t *cmd = (CF_UnionArgsCmd_t *)msg; + CF_UnionArgsCmd_t *cmd = (CF_UnionArgsCmd_t *)BufPtr; static const char *names[5] = {"all", "cmd", "fault", "up", "down"}; /* 0=all, 1=cmd, 2=fault 3=up 4=down */ uint8 param = cmd->data.byte[0]; @@ -125,9 +125,9 @@ void CF_CmdReset(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdTxFile(CFE_SB_Buffer_t *msg) +void CF_TxFileCmd(CFE_SB_Buffer_t *BufPtr) { - CF_TxFileCmd_t *tx = (CF_TxFileCmd_t *)msg; + CF_TxFileCmd_t *tx = (CF_TxFileCmd_t *)BufPtr; /* * This needs to validate all its inputs. @@ -138,7 +138,7 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg) tx->keep > 1) { CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR, - "CF: bad parameter in CF_CmdTxFile(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num, + "CF: bad parameter in CF_TxFileCmd(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num, (unsigned int)tx->cfdp_class, (unsigned int)tx->keep); ++CF_AppData.hk.counters.err; return; @@ -168,9 +168,9 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg) +void CF_PlaybackDirCmd(CFE_SB_Buffer_t *BufPtr) { - CF_PlaybackDirCmd_t *tx = (CF_PlaybackDirCmd_t *)msg; + CF_PlaybackDirCmd_t *tx = (CF_PlaybackDirCmd_t *)BufPtr; /* * This needs to validate all its inputs. @@ -181,7 +181,7 @@ void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg) tx->keep > 1) { CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR, - "CF: bad parameter in CF_CmdPlaybackDir(): chan=%u, class=%u keep=%u", + "CF: bad parameter in CF_PlaybackDirCmd(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num, (unsigned int)tx->cfdp_class, (unsigned int)tx->keep); ++CF_AppData.hk.counters.err; return; @@ -260,11 +260,11 @@ CFE_Status_t CF_DoFreezeThaw(uint8 chan_num, const CF_ChanAction_BoolArg_t *cont * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdFreeze(CFE_SB_Buffer_t *msg) +void CF_FreezeCmd(CFE_SB_Buffer_t *BufPtr) { CF_ChanAction_BoolArg_t barg = {1}; /* param is frozen, so 1 means freeze */ - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "freeze", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "freeze", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_FREEZE, CFE_EVS_EventType_INFORMATION, "CF: freeze successful"); ++CF_AppData.hk.counters.cmd; @@ -282,11 +282,11 @@ void CF_CmdFreeze(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdThaw(CFE_SB_Buffer_t *msg) +void CF_ThawCmd(CFE_SB_Buffer_t *BufPtr) { CF_ChanAction_BoolArg_t barg = {0}; /* param is frozen, so 0 means thawed */ - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "thaw", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "thaw", (CF_ChanActionFn_t)CF_DoFreezeThaw, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_THAW, CFE_EVS_EventType_INFORMATION, "CF: thaw successful"); ++CF_AppData.hk.counters.cmd; @@ -439,9 +439,9 @@ void CF_DoSuspRes(CF_TransactionCmd_t *cmd, uint8 action) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdSuspend(CFE_SB_Buffer_t *msg) +void CF_SuspendCmd(CFE_SB_Buffer_t *BufPtr) { - CF_DoSuspRes((CF_TransactionCmd_t *)msg, 1); + CF_DoSuspRes((CF_TransactionCmd_t *)BufPtr, 1); } /*---------------------------------------------------------------- @@ -450,9 +450,9 @@ void CF_CmdSuspend(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdResume(CFE_SB_Buffer_t *msg) +void CF_ResumeCmd(CFE_SB_Buffer_t *BufPtr) { - CF_DoSuspRes((CF_TransactionCmd_t *)msg, 0); + CF_DoSuspRes((CF_TransactionCmd_t *)BufPtr, 0); } /*---------------------------------------------------------------- @@ -461,7 +461,7 @@ void CF_CmdResume(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdCancel_Txn(CF_Transaction_t *t, void *ignored) +void CF_Cancel_TxnCmd(CF_Transaction_t *t, void *ignored) { CF_CFDP_CancelTransaction(t); } @@ -472,9 +472,9 @@ void CF_CmdCancel_Txn(CF_Transaction_t *t, void *ignored) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdCancel(CFE_SB_Buffer_t *msg) +void CF_CancelCmd(CFE_SB_Buffer_t *BufPtr) { - if (CF_TsnChanAction((CF_TransactionCmd_t *)msg, "cancel", CF_CmdCancel_Txn, NULL) > 0) + if (CF_TsnChanAction((CF_TransactionCmd_t *)BufPtr, "cancel", CF_Cancel_TxnCmd, NULL) > 0) { CFE_EVS_SendEvent(CF_EID_INF_CMD_CANCEL, CFE_EVS_EventType_INFORMATION, "CF: cancel transaction successfully initiated"); @@ -494,7 +494,7 @@ void CF_CmdCancel(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdAbandon_Txn(CF_Transaction_t *t, void *ignored) +void CF_Abandon_TxnCmd(CF_Transaction_t *t, void *ignored) { CF_CFDP_ResetTransaction(t, 0); } @@ -505,9 +505,9 @@ void CF_CmdAbandon_Txn(CF_Transaction_t *t, void *ignored) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdAbandon(CFE_SB_Buffer_t *msg) +void CF_AbandonCmd(CFE_SB_Buffer_t *BufPtr) { - if (CF_TsnChanAction((CF_TransactionCmd_t *)msg, "abandon", CF_CmdAbandon_Txn, NULL) > 0) + if (CF_TsnChanAction((CF_TransactionCmd_t *)BufPtr, "abandon", CF_Abandon_TxnCmd, NULL) > 0) { CFE_EVS_SendEvent(CF_EID_INF_CMD_ABANDON, CFE_EVS_EventType_INFORMATION, "CF: abandon successful"); ++CF_AppData.hk.counters.cmd; @@ -540,11 +540,11 @@ CFE_Status_t CF_DoEnableDisableDequeue(uint8 chan_num, const CF_ChanAction_BoolA * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdEnableDequeue(CFE_SB_Buffer_t *msg) +void CF_EnableDequeueCmd(CFE_SB_Buffer_t *BufPtr) { CF_ChanAction_BoolArg_t barg = {1}; - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "enable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "enable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_ENABLE_DEQUEUE, CFE_EVS_EventType_INFORMATION, "CF: dequeue enabled"); @@ -563,11 +563,11 @@ void CF_CmdEnableDequeue(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdDisableDequeue(CFE_SB_Buffer_t *msg) +void CF_DisableDequeueCmd(CFE_SB_Buffer_t *BufPtr) { CF_ChanAction_BoolArg_t barg = {0}; - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "disable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "disable_dequeue", (CF_ChanActionFn_t)CF_DoEnableDisableDequeue, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_DISABLE_DEQUEUE, CFE_EVS_EventType_INFORMATION, "CF: dequeue disabled"); @@ -618,11 +618,11 @@ CFE_Status_t CF_DoEnableDisablePolldir(uint8 chan_num, const CF_ChanAction_BoolM * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdEnablePolldir(CFE_SB_Buffer_t *msg) +void CF_EnablePolldirCmd(CFE_SB_Buffer_t *BufPtr) { - CF_ChanAction_BoolMsgArg_t barg = {(CF_UnionArgsCmd_t *)msg, 1}; + CF_ChanAction_BoolMsgArg_t barg = {(CF_UnionArgsCmd_t *)BufPtr, 1}; - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "enable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "enable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_ENABLE_POLLDIR, CFE_EVS_EventType_INFORMATION, @@ -643,11 +643,11 @@ void CF_CmdEnablePolldir(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdDisablePolldir(CFE_SB_Buffer_t *msg) +void CF_DisablePolldirCmd(CFE_SB_Buffer_t *BufPtr) { - CF_ChanAction_BoolMsgArg_t barg = {(CF_UnionArgsCmd_t *)msg, 0}; + CF_ChanAction_BoolMsgArg_t barg = {(CF_UnionArgsCmd_t *)BufPtr, 0}; - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "disable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "disable_polldir", (CF_ChanActionFn_t)CF_DoEnableDisablePolldir, &barg) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_DISABLE_POLLDIR, CFE_EVS_EventType_INFORMATION, @@ -744,9 +744,9 @@ CFE_Status_t CF_DoPurgeQueue(uint8 chan_num, CF_UnionArgsCmd_t *cmd) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdPurgeQueue(CFE_SB_Buffer_t *msg) +void CF_PurgeQueueCmd(CFE_SB_Buffer_t *BufPtr) { - if (CF_DoChanAction((CF_UnionArgsCmd_t *)msg, "purge_queue", (CF_ChanActionFn_t)CF_DoPurgeQueue, msg) == + if (CF_DoChanAction((CF_UnionArgsCmd_t *)BufPtr, "purge_queue", (CF_ChanActionFn_t)CF_DoPurgeQueue, BufPtr) == CFE_SUCCESS) { CFE_EVS_SendEvent(CF_EID_INF_CMD_PURGE_QUEUE, CFE_EVS_EventType_INFORMATION, "CF: queue purged"); @@ -765,9 +765,9 @@ void CF_CmdPurgeQueue(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) +void CF_WriteQueueCmd(CFE_SB_Buffer_t *BufPtr) { - CF_WriteQueueCmd_t *wq = (CF_WriteQueueCmd_t *)msg; + CF_WriteQueueCmd_t *wq = (CF_WriteQueueCmd_t *)BufPtr; CF_Channel_t * c = &CF_AppData.engine.channels[wq->chan]; osal_id_t fd = OS_OBJECT_ID_UNDEFINED; bool success = true; @@ -898,7 +898,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num /* ignored */) +CFE_Status_t CF_ValidateChunkSizeCmd(uint32 val, uint8 chan_num /* ignored */) { CFE_Status_t ret = CFE_SUCCESS; if (val > sizeof(CF_CFDP_PduFileDataContent_t)) @@ -914,7 +914,7 @@ CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num /* ignored */) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -CFE_Status_t CF_CmdValidateMaxOutgoing(uint32 val, uint8 chan_num) +CFE_Status_t CF_ValidateMaxOutgoingCmd(uint32 val, uint8 chan_num) { CFE_Status_t ret = CFE_SUCCESS; @@ -933,7 +933,7 @@ CFE_Status_t CF_CmdValidateMaxOutgoing(uint32 val, uint8 chan_num) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) +void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) { CF_ConfigTable_t *config; CFE_Status_t status = CF_ERROR; @@ -974,7 +974,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, case CF_GetSet_ValueID_outgoing_file_chunk_size: item.ptr = &config->outgoing_file_chunk_size; item.size = sizeof(config->outgoing_file_chunk_size); - item.fn = CF_CmdValidateChunkSize; + item.fn = CF_ValidateChunkSizeCmd; break; case CF_GetSet_ValueID_ack_limit: item.ptr = &config->chan[chan_num].ack_limit; @@ -991,7 +991,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, case CF_GetSet_ValueID_chan_max_outgoing_messages_per_wakeup: item.ptr = &config->chan[chan_num].max_outgoing_messages_per_wakeup; item.size = sizeof(config->chan[chan_num].max_outgoing_messages_per_wakeup); - item.fn = CF_CmdValidateMaxOutgoing; + item.fn = CF_ValidateMaxOutgoingCmd; break; default: break; @@ -1088,10 +1088,10 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdSetParam(CFE_SB_Buffer_t *msg) +void CF_SetParamCmd(CFE_SB_Buffer_t *BufPtr) { - CF_SetParamCmd_t *cmd = (CF_SetParamCmd_t *)msg; - CF_CmdGetSetParam(1, cmd->key, cmd->value, cmd->chan_num); + CF_SetParamCmd_t *cmd = (CF_SetParamCmd_t *)BufPtr; + CF_GetSetParamCmd(1, cmd->key, cmd->value, cmd->chan_num); } /*---------------------------------------------------------------- @@ -1100,10 +1100,10 @@ void CF_CmdSetParam(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdGetParam(CFE_SB_Buffer_t *msg) +void CF_GetParamCmd(CFE_SB_Buffer_t *BufPtr) { - CF_GetParamCmd_t *cmd = (CF_GetParamCmd_t *)msg; - CF_CmdGetSetParam(0, cmd->key, 0, cmd->chan_num); + CF_GetParamCmd_t *cmd = (CF_GetParamCmd_t *)BufPtr; + CF_GetSetParamCmd(0, cmd->key, 0, cmd->chan_num); } /*---------------------------------------------------------------- @@ -1112,7 +1112,7 @@ void CF_CmdGetParam(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdEnableEngine(CFE_SB_Buffer_t *msg) +void CF_EnableEngineCmd(CFE_SB_Buffer_t *BufPtr) { if (!CF_AppData.engine.enabled) { @@ -1142,7 +1142,7 @@ void CF_CmdEnableEngine(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CmdDisableEngine(CFE_SB_Buffer_t *msg) +void CF_DisableEngineCmd(CFE_SB_Buffer_t *BufPtr) { if (CF_AppData.engine.enabled) { @@ -1164,33 +1164,33 @@ void CF_CmdDisableEngine(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) +void CF_ProcessGroundCommand(CFE_SB_Buffer_t *BufPtr) { static void (*const fns[CF_NUM_COMMANDS])(CFE_SB_Buffer_t *) = { - CF_CmdNoop, /* CF_NOOP_CC */ - CF_CmdReset, /* CF_RESET_CC */ - CF_CmdTxFile, /* CF_TX_FILE_CC */ - CF_CmdPlaybackDir, /* CF_PLAYBACK_DIR_CC */ - CF_CmdFreeze, /* CF_FREEZE_CC */ - CF_CmdThaw, /* CF_THAW_CC */ - CF_CmdSuspend, /* CF_SUSPEND_CC */ - CF_CmdResume, /* CF_RESUME_CC */ - CF_CmdCancel, /* CF_CANCEL_CC */ - CF_CmdAbandon, /* CF_ABANDON_CC */ - CF_CmdSetParam, /* CF_SET_MIB_PARAM_CC */ - CF_CmdGetParam, /* CF_GET_MIB_PARAM_CC */ + CF_NoopCmd, /* CF_NOOP_CC */ + CF_ResetCountersCmd, /* CF_RESET_CC */ + CF_TxFileCmd, /* CF_TX_FILE_CC */ + CF_PlaybackDirCmd, /* CF_PLAYBACK_DIR_CC */ + CF_FreezeCmd, /* CF_FREEZE_CC */ + CF_ThawCmd, /* CF_THAW_CC */ + CF_SuspendCmd, /* CF_SUSPEND_CC */ + CF_ResumeCmd, /* CF_RESUME_CC */ + CF_CancelCmd, /* CF_CANCEL_CC */ + CF_AbandonCmd, /* CF_ABANDON_CC */ + CF_SetParamCmd, /* CF_SET_MIB_PARAM_CC */ + CF_GetParamCmd, /* CF_GET_MIB_PARAM_CC */ NULL, NULL, NULL, - CF_CmdWriteQueue, /* CF_WRITE_QUEUE_CC */ - CF_CmdEnableDequeue, /* CF_ENABLE_DEQUEUE_CC */ - CF_CmdDisableDequeue, /* CF_DISABLE_DEQUEUE_CC */ - CF_CmdEnablePolldir, /* CF_ENABLE_DIR_POLLING_CC */ - CF_CmdDisablePolldir, /* CF_DISABLE_DIR_POLLING_CC */ + CF_WriteQueueCmd, /* CF_WRITE_QUEUE_CC */ + CF_EnableDequeueCmd, /* CF_ENABLE_DEQUEUE_CC */ + CF_DisableDequeueCmd, /* CF_DISABLE_DEQUEUE_CC */ + CF_EnablePolldirCmd, /* CF_ENABLE_DIR_POLLING_CC */ + CF_DisablePolldirCmd, /* CF_DISABLE_DIR_POLLING_CC */ NULL, - CF_CmdPurgeQueue, /* CF_PURGE_QUEUE_CC */ - CF_CmdEnableEngine, /* CF_ENABLE_ENGINE_CC */ - CF_CmdDisableEngine, /* CF_DISABLE_ENGINE_CC */ + CF_PurgeQueueCmd, /* CF_PURGE_QUEUE_CC */ + CF_EnableEngineCmd, /* CF_ENABLE_ENGINE_CC */ + CF_DisableEngineCmd, /* CF_DISABLE_ENGINE_CC */ }; static const uint16 expected_lengths[CF_NUM_COMMANDS] = { @@ -1223,11 +1223,11 @@ void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) CFE_MSG_FcnCode_t cmd = 0; size_t len = 0; - CFE_MSG_GetFcnCode(&msg->Msg, &cmd); + CFE_MSG_GetFcnCode(&BufPtr->Msg, &cmd); if (cmd < CF_NUM_COMMANDS) { - CFE_MSG_GetSize(&msg->Msg, &len); + CFE_MSG_GetSize(&BufPtr->Msg, &len); /* first, verify command length */ if (len == expected_lengths[cmd]) @@ -1235,7 +1235,7 @@ void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) /* if valid, process command */ if (fns[cmd]) { - fns[cmd](msg); + fns[cmd](BufPtr); } } else diff --git a/fsw/src/cf_cmd.h b/fsw/src/cf_cmd.h index 85148d44..487fed85 100644 --- a/fsw/src/cf_cmd.h +++ b/fsw/src/cf_cmd.h @@ -83,14 +83,14 @@ typedef struct CF_ChanAction_BoolMsgArg * This function has a signature the same of all cmd_ functions. * This function simply prints an event message. * Increments the command accept counter. - * The msg parameter is ignored in this one. + * The BufPtr parameter is ignored in this one. * * @par Assumptions, External Events, and Notes: * None * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdNoop(CFE_SB_Buffer_t *msg); +void CF_NoopCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief The reset counters command. @@ -102,11 +102,11 @@ void CF_CmdNoop(CFE_SB_Buffer_t *msg); * counters are reset, then there is no increment. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdReset(CFE_SB_Buffer_t *msg); +void CF_ResetCountersCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command to start a file transfer. @@ -116,12 +116,12 @@ void CF_CmdReset(CFE_SB_Buffer_t *msg); * Increments the command accept or reject counter. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message * */ -void CF_CmdTxFile(CFE_SB_Buffer_t *msg); +void CF_TxFileCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command to start directory playback. @@ -131,11 +131,11 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg); * Increments the command accept or reject counter. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg); +void CF_PlaybackDirCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Common logic for all channel-based commands. @@ -176,21 +176,21 @@ CFE_Status_t CF_DoFreezeThaw(uint8 chan_num, const CF_ChanAction_BoolArg_t *cont /** @brief Freeze a channel. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdFreeze(CFE_SB_Buffer_t *msg); +void CF_FreezeCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Thaw a channel. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdThaw(CFE_SB_Buffer_t *msg); +void CF_ThawCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Search for a transaction across all channels. @@ -258,21 +258,21 @@ void CF_DoSuspRes(CF_TransactionCmd_t *cmd, uint8 action); /** @brief Handle transaction suspend command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdSuspend(CFE_SB_Buffer_t *msg); +void CF_SuspendCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Handle transaction resume command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdResume(CFE_SB_Buffer_t *msg); +void CF_ResumeCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief tsn chan action to cancel a transaction. @@ -285,17 +285,17 @@ void CF_CmdResume(CFE_SB_Buffer_t *msg); * @param t Pointer to transaction object * @param ignored Not used by this function */ -void CF_CmdCancel_Txn(CF_Transaction_t *t, void *ignored); +void CF_Cancel_TxnCmd(CF_Transaction_t *t, void *ignored); /************************************************************************/ /** @brief Handle a cancel ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdCancel(CFE_SB_Buffer_t *msg); +void CF_CancelCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief tsn chan action to abandon a transaction. @@ -303,22 +303,22 @@ void CF_CmdCancel(CFE_SB_Buffer_t *msg); * This helper function is used with CF_TsnChanAction() to abandon matched transactions * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * t must not be NULL. * * @param t Pointer to transaction object * @param ignored Not used by this function */ -void CF_CmdAbandon_Txn(CF_Transaction_t *t, void *ignored); +void CF_Abandon_TxnCmd(CF_Transaction_t *t, void *ignored); /************************************************************************/ /** @brief Handle an abandon ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdAbandon(CFE_SB_Buffer_t *msg); +void CF_AbandonCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Sets the dequeue enable/disable flag for a channel. @@ -338,21 +338,21 @@ CFE_Status_t CF_DoEnableDisableDequeue(uint8 chan_num, const CF_ChanAction_BoolA /** @brief Handle an enable dequeue ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdEnableDequeue(CFE_SB_Buffer_t *msg); +void CF_EnableDequeueCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Handle a disable dequeue ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdDisableDequeue(CFE_SB_Buffer_t *msg); +void CF_DisableDequeueCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Sets the enable/disable flag for the specified polling directory. @@ -373,21 +373,21 @@ CFE_Status_t CF_DoEnableDisablePolldir(uint8 chan_num, const CF_ChanAction_BoolM /** @brief Enable a polling dir ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdEnablePolldir(CFE_SB_Buffer_t *msg); +void CF_EnablePolldirCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Disable a polling dir ground command. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdDisablePolldir(CFE_SB_Buffer_t *msg); +void CF_DisablePolldirCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Purge the history queue for the given channel. @@ -442,21 +442,21 @@ CFE_Status_t CF_DoPurgeQueue(uint8 chan_num, CF_UnionArgsCmd_t *cmd); /** @brief Ground command to purge either the history or pending queues. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdPurgeQueue(CFE_SB_Buffer_t *msg); +void CF_PurgeQueueCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command to write a file with queue information. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg); +void CF_WriteQueueCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Checks if the value is less than or equal to the max PDU size. @@ -472,7 +472,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg); * @retval CF_ERROR if failed (val is greater than max PDU) * */ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num); +CFE_Status_t CF_ValidateChunkSizeCmd(uint32 val, uint8 chan_num); /************************************************************************/ /** @brief Checks if the value is within allowable range as outgoing packets per wakeup @@ -488,7 +488,7 @@ CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num); * @retval CF_ERROR if failed (val is not allowed) * */ -CFE_Status_t CF_CmdValidateMaxOutgoing(uint32 val, uint8 chan_num); +CFE_Status_t CF_ValidateMaxOutgoingCmd(uint32 val, uint8 chan_num); /************************************************************************/ /** @brief Perform a configuration get/set operation. @@ -508,56 +508,56 @@ CFE_Status_t CF_CmdValidateMaxOutgoing(uint32 val, uint8 chan_num); * @param chan_num Channel number to operate on * */ -void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num); +void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num); /************************************************************************/ /** @brief Ground command to set a configuration parameter. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdSetParam(CFE_SB_Buffer_t *msg); +void CF_SetParamCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command to set a configuration parameter. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdGetParam(CFE_SB_Buffer_t *msg); +void CF_GetParamCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command enable engine. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdEnableEngine(CFE_SB_Buffer_t *msg); +void CF_EnableEngineCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Ground command disable engine. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_CmdDisableEngine(CFE_SB_Buffer_t *msg); +void CF_DisableEngineCmd(CFE_SB_Buffer_t *BufPtr); /************************************************************************/ /** @brief Process any ground command contained in the given message. * * @par Assumptions, External Events, and Notes: - * msg must not be NULL. + * BufPtr must not be NULL. * - * @param msg Pointer to command message + * @param BufPtr Pointer to command message */ -void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg); +void CF_ProcessGroundCommand(CFE_SB_Buffer_t *BufPtr); #endif diff --git a/unit-test/cf_app_tests.c b/unit-test/cf_app_tests.c index fd435549..f3ccc684 100644 --- a/unit-test/cf_app_tests.c +++ b/unit-test/cf_app_tests.c @@ -71,9 +71,8 @@ void Test_CF_HkCmd(void) CF_HkCmd(); /* Assert */ - UtAssert_STUB_COUNT(CFE_MSG_SetMsgTime, 1); + UtAssert_STUB_COUNT(CFE_SB_TimeStampMsg, 1); UtAssert_STUB_COUNT(CFE_SB_TransmitMsg, 1); - UtAssert_STUB_COUNT(CFE_TIME_GetTime, 1); } /******************************************************************************* @@ -361,18 +360,18 @@ void Test_CF_TableInit_When_CFE_TBL_GetAddress_Returns_CFE_TBL_INFO_UPDATED_Succ /******************************************************************************* ** -** CF_Init tests - full coverage +** CF_AppInit tests - full coverage ** *******************************************************************************/ -void Test_CF_Init_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) +void Test_CF_AppInit_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) { int32 result = -1; UT_SetDefaultReturnValue(UT_KEY(CFE_EVS_Register), result); /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); + UtAssert_INT32_EQ(CF_AppInit(), result); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); @@ -380,7 +379,7 @@ void Test_CF_Init_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_Wri UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 1); } -void Test_CF_Init_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) +void Test_CF_AppInit_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) { /* Arrange */ int32 result = -1; @@ -388,16 +387,17 @@ void Test_CF_Init_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_Wr UT_SetDefaultReturnValue(UT_KEY(CFE_SB_CreatePipe), result); /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); + UtAssert_INT32_EQ(CF_AppInit(), result); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); UtAssert_STUB_COUNT(CFE_EVS_Register, 1); UtAssert_STUB_COUNT(CFE_SB_CreatePipe, 1); - UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 1); + UT_CF_AssertEventID(CF_CR_PIPE_ERR_EID); } -void Test_CF_Init_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) +void Test_CF_AppInit_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus( + void) { /* Arrange */ int32 result = -1; @@ -405,7 +405,7 @@ void Test_CF_Init_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_E UT_SetDefaultReturnValue(UT_KEY(CFE_SB_Subscribe), result); /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); + UtAssert_INT32_EQ(CF_AppInit(), result); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); @@ -417,7 +417,7 @@ void Test_CF_Init_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_E /* NOTE: multi call test for CFE_SB_Subscribe would be helpful but not necessary for coverage */ -void Test_CF_Init_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(void) +void Test_CF_AppInit_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(void) { /* Arrange */ int32 result = -1; @@ -426,7 +426,7 @@ void Test_CF_Init_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(v UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_Register), result); /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); + UtAssert_INT32_EQ(CF_AppInit(), result); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); @@ -436,7 +436,7 @@ void Test_CF_Init_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(v UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } -void Test_CF_Init_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(void) +void Test_CF_AppInit_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus(void) { /* Arrange */ int32 result = -1; @@ -444,7 +444,7 @@ void Test_CF_Init_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorSt UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_InitEngine), result); /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); + UtAssert_INT32_EQ(CF_AppInit(), result); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); @@ -454,29 +454,10 @@ void Test_CF_Init_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorSt UtAssert_STUB_COUNT(CF_CFDP_InitEngine, 1); } -void Test_CF_Init_CallTo_CFE_EVS_SendEvent_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus(void) +void Test_CF_AppInit_Success(void) { - /* Arrange */ - int32 result = -1; - - UT_SetDefaultReturnValue(UT_KEY(CFE_EVS_SendEvent), result); - /* Act */ - UtAssert_INT32_EQ(CF_Init(), result); - - /* Assert */ - UtAssert_STUB_COUNT(CFE_MSG_Init, 1); - UtAssert_STUB_COUNT(CFE_EVS_Register, 1); - UtAssert_STUB_COUNT(CFE_SB_CreatePipe, 1); - UtAssert_STUB_COUNT(CFE_SB_Subscribe, 3); - UtAssert_STUB_COUNT(CF_CFDP_InitEngine, 1); - UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); -} - -void Test_CF_Init_Success(void) -{ - /* Act */ - UtAssert_INT32_EQ(CF_Init(), CFE_SUCCESS); + UtAssert_INT32_EQ(CF_AppInit(), CFE_SUCCESS); /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_Init, 1); @@ -560,7 +541,7 @@ void Test_CF_ProcessMsg_SendHk(void) /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_GetMsgId, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); - UtAssert_STUB_COUNT(CFE_MSG_SetMsgTime, 1); /* Confirms CF_HkCmd path was taken */ + UtAssert_STUB_COUNT(CFE_SB_TimeStampMsg, 1); /* Confirms CF_HkCmd path was taken */ } void Test_CF_ProcessMsg_UnrecognizedCommandEnterDefaultPath(void) @@ -586,7 +567,7 @@ void Test_CF_ProcessMsg_UnrecognizedCommandEnterDefaultPath(void) ** *******************************************************************************/ -void Test_CF_AppMain_CallTo_CF_Init_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_run_status_To_CFE_ES_RunStatus_APP_ERROR( +void Test_CF_AppMain_CallTo_CF_AppInit_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_RunStatus_To_CFE_ES_RunStatus_APP_ERROR( void) { /* Arrange */ @@ -601,7 +582,7 @@ void Test_CF_AppMain_CallTo_CF_Init_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_run_s UtAssert_STUB_COUNT(CFE_ES_PerfLogAdd, 2); UtAssert_STUB_COUNT(CFE_ES_RunLoop, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); - UtAssert_UINT32_EQ(CF_AppData.run_status, CFE_ES_RunStatus_APP_ERROR); + UtAssert_UINT32_EQ(CF_AppData.RunStatus, CFE_ES_RunStatus_APP_ERROR); } void Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases(void) @@ -633,18 +614,6 @@ void Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases(void) UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_INF_INIT); UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_INIT_MSG_RECV); - /* Reset, return CFE_SUCCESS from CFE_SB_ReceiveBuffer and buffer NULL */ - UT_CF_ResetEventCapture(); - UT_SetDataBuffer(UT_KEY(CFE_SB_ReceiveBuffer), &sbbufptr, sizeof(sbbufptr), false); - UT_SetDeferredRetcode(UT_KEY(CFE_ES_RunLoop), 1, true); - - UtAssert_VOIDCALL(CF_AppMain()); - - /* Event from CF_Init and CF_AppMain */ - UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_INF_INIT); - UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[1], CF_EID_ERR_INIT_MSG_RECV); - /* Reset, return non-error codes and non-NULL buffer */ UT_CF_ResetEventCapture(); UT_ResetState(UT_KEY(CFE_ES_RunLoop)); @@ -657,7 +626,7 @@ void Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases(void) UtAssert_VOIDCALL(CF_AppMain()); - /* Event from CF_Init */ + /* Event from CF_AppInit */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UtAssert_UINT32_EQ(UT_CF_CapturedEventIDs[0], CF_EID_INF_INIT); UtAssert_STUB_COUNT(CFE_ES_RunLoop, 3); @@ -668,13 +637,13 @@ void Test_CF_AppMain_RunLoopCallTo_CFE_SB_ReceiveBuffer_Returns_CFE_SUCCESS_AndV /* Arrange */ CFE_SB_MsgId_t forced_MsgID = CFE_SB_INVALID_MSG_ID; CFE_SB_Buffer_t fake_msg; - CFE_SB_Buffer_t *msg = &fake_msg; + CFE_SB_Buffer_t *BufPtr = &fake_msg; UT_SetDeferredRetcode(UT_KEY(CFE_ES_RunLoop), 1, true); UT_SetDefaultReturnValue(UT_KEY(CFE_ES_RunLoop), false); /* Actual data not used, just address is needed */ - UT_SetDataBuffer(UT_KEY(CFE_SB_ReceiveBuffer), &msg, sizeof(msg), false); + UT_SetDataBuffer(UT_KEY(CFE_SB_ReceiveBuffer), &BufPtr, sizeof(BufPtr), false); /* Arrange unstubbable: CF_ProcessMsg, invalid ID */ UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &forced_MsgID, sizeof(forced_MsgID), false); @@ -686,7 +655,7 @@ void Test_CF_AppMain_RunLoopCallTo_CFE_SB_ReceiveBuffer_Returns_CFE_SUCCESS_AndV UtAssert_STUB_COUNT(CFE_ES_PerfLogAdd, 4); UtAssert_STUB_COUNT(CFE_ES_RunLoop, 2); UtAssert_STUB_COUNT(CFE_ES_ExitApp, 1); - /* Assert for CF_Init call and CF_ProcessMsg */ + /* Assert for CF_AppInit call and CF_ProcessMsg */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); /* Assert for CF_ProcessMsg */ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); @@ -756,30 +725,27 @@ void add_CF_TableInit_tests(void) "Test_CF_TableInit_When_CFE_TBL_GetAddress_Returns_CFE_TBL_INFO_UPDATED_SuccessAndDoNotSendEvent"); } -void add_CF_Init_tests(void) +void add_CF_AppInit_tests(void) { UtTest_Add( - Test_CF_Init_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, + Test_CF_AppInit_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_Init_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); + "Test_CF_AppInit_CallTo_CFE_EVS_Register_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); UtTest_Add( - Test_CF_Init_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, + Test_CF_AppInit_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_Init_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); + "Test_CF_AppInit_CallTo_CFE_SB_CreatePipe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); UtTest_Add( - Test_CF_Init_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, + Test_CF_AppInit_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_Init_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); - UtTest_Add(Test_CF_Init_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus, cf_app_tests_Setup, - CF_App_Tests_Teardown, "Test_CF_Init_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus"); - UtTest_Add(Test_CF_Init_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus, cf_app_tests_Setup, + "Test_CF_AppInit_FirstCallTo_CFE_SB_Subscribe_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_" + "ReturnErrorStatus"); + UtTest_Add(Test_CF_AppInit_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus, cf_app_tests_Setup, + CF_App_Tests_Teardown, "Test_CF_AppInit_CallTo_CF_TableInit_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus"); + UtTest_Add(Test_CF_AppInit_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus, cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_Init_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus"); - UtTest_Add( - Test_CF_Init_CallTo_CFE_EVS_SendEvent_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus, - cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_Init_CallTo_CFE_EVS_SendEvent_ReturnsNot_CFE_SUCCESS_Call_CFE_ES_WriteToSysLog_ReturnErrorStatus"); - UtTest_Add(Test_CF_Init_Success, cf_app_tests_Setup, CF_App_Tests_Teardown, "Test_CF_Init_Success"); + "Test_CF_AppInit_CallTo_CF_CFDP_InitEngine_ReturnsNot_CFE_SUCCESS_ReturnErrorStatus"); + UtTest_Add(Test_CF_AppInit_Success, cf_app_tests_Setup, CF_App_Tests_Teardown, "Test_CF_AppInit_Success"); } void add_CF_WakeUp_tests(void) @@ -800,9 +766,9 @@ void add_CF_ProcessMsg_tests(void) void add_CF_AppMain_tests(void) { UtTest_Add( - Test_CF_AppMain_CallTo_CF_Init_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_run_status_To_CFE_ES_RunStatus_APP_ERROR, + Test_CF_AppMain_CallTo_CF_AppInit_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_RunStatus_To_CFE_ES_RunStatus_APP_ERROR, cf_app_tests_Setup, CF_App_Tests_Teardown, - "Test_CF_AppMain_CallTo_CF_Init_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_run_status_To_CFE_ES_RunStatus_APP_" + "Test_CF_AppMain_CallTo_CF_AppInit_DoNotReturn_CFE_SUCCESS_Set_CF_AppData_RunStatus_To_CFE_ES_RunStatus_APP_" "ERROR"); UtTest_Add(Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases, cf_app_tests_Setup, CF_App_Tests_Teardown, "Test_CF_AppMain_CFE_SB_ReceiveBuffer_Cases"); @@ -830,7 +796,7 @@ void UtTest_Setup(void) add_CF_TableInit_tests(); - add_CF_Init_tests(); + add_CF_AppInit_tests(); add_CF_WakeUp_tests(); diff --git a/unit-test/cf_cmd_tests.c b/unit-test/cf_cmd_tests.c index 0fc3bd15..6d579baa 100644 --- a/unit-test/cf_cmd_tests.c +++ b/unit-test/cf_cmd_tests.c @@ -166,11 +166,11 @@ void Dummy_CF_TsnChanAction_fn_t(CF_Transaction_t *t, void *context) /******************************************************************************* ** -** CF_CmdNoop tests +** CF_NoopCmd tests ** *******************************************************************************/ -void Test_CF_CmdNoop_SendNoopEventAndAcceptCommand(void) +void Test_CF_NoopCmd_SendNoopEventAndAcceptCommand(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -180,7 +180,7 @@ void Test_CF_CmdNoop_SendNoopEventAndAcceptCommand(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdNoop(arg_msg); + CF_NoopCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -191,11 +191,11 @@ void Test_CF_CmdNoop_SendNoopEventAndAcceptCommand(void) /******************************************************************************* ** -** CF_CmdReset tests +** CF_ResetCountersCmd tests ** *******************************************************************************/ -void Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -210,7 +210,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand(vo CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -219,7 +219,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand(vo UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -234,7 +234,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCom CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -243,7 +243,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCom UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -257,7 +257,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSe CF_AppData.hk.counters.err = Any_uint16_Except(0); /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -266,7 +266,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSe UtAssert_ZERO(CF_AppData.hk.counters.err); } -void Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -298,7 +298,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEven CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -326,7 +326,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEven UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -352,7 +352,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEvent CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -374,7 +374,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEvent UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand(void) +void Test_CF_ResetCountersCmd_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -397,7 +397,7 @@ void Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEve CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -416,7 +416,7 @@ void Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEve UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdReset_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent(void) +void Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -465,7 +465,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent( } /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -495,14 +495,14 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent( /******************************************************************************* ** -** CF_CmdTxFile tests +** CF_TxFileCmd tests ** *******************************************************************************/ -void Test_CF_CmdTxFile(void) +void Test_CF_TxFileCmd(void) { /* Test case for: - * void CF_CmdTxFile(CFE_SB_Buffer_t *msg); + * void CF_TxFileCmd(CFE_SB_Buffer_t *msg); */ CF_UT_cmd_tx_file_buf_t utbuf; CF_TxFileCmd_t * msg = &utbuf.tf; @@ -512,7 +512,7 @@ void Test_CF_CmdTxFile(void) /* nominal, all zero should pass checks, just calls CF_CFDP_TxFile */ memset(msg, 0, sizeof(*msg)); msg->cfdp_class = CF_CFDP_CLASS_1; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); @@ -520,7 +520,7 @@ void Test_CF_CmdTxFile(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = CF_CFDP_CLASS_2; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); @@ -529,14 +529,14 @@ void Test_CF_CmdTxFile(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = 10; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = -10; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); @@ -544,7 +544,7 @@ void Test_CF_CmdTxFile(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->chan_num = CF_NUM_CHANNELS; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); @@ -552,7 +552,7 @@ void Test_CF_CmdTxFile(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->keep = 15; - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 4); @@ -560,21 +560,21 @@ void Test_CF_CmdTxFile(void) UT_CF_ResetEventCapture(); UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_TxFile), -1); memset(msg, 0, sizeof(*msg)); - UtAssert_VOIDCALL(CF_CmdTxFile(&utbuf.buf)); + UtAssert_VOIDCALL(CF_TxFileCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_TX_FILE); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 5); } /******************************************************************************* ** -** CF_CmdPlaybackDir tests +** CF_PlaybackDirCmd tests ** *******************************************************************************/ -void Test_CF_CmdPlaybackDir(void) +void Test_CF_PlaybackDirCmd(void) { /* Test case for: - * void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg); + * void CF_PlaybackDirCmd(CFE_SB_Buffer_t *msg); */ CF_UT_cmd_playback_dir_buf_t utbuf; CF_PlaybackDirCmd_t * msg = &utbuf.pd; @@ -584,25 +584,25 @@ void Test_CF_CmdPlaybackDir(void) /* nominal, all zero should pass checks, just calls CF_CFDP_PlaybackDir */ memset(msg, 0, sizeof(*msg)); msg->cfdp_class = CF_CFDP_CLASS_1; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 1); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = CF_CFDP_CLASS_2; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, 2); /* out of range arguments: bad class */ memset(msg, 0, sizeof(*msg)); msg->cfdp_class = 10; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->cfdp_class = -10; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); @@ -610,7 +610,7 @@ void Test_CF_CmdPlaybackDir(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->chan_num = CF_NUM_CHANNELS; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); @@ -618,7 +618,7 @@ void Test_CF_CmdPlaybackDir(void) UT_CF_ResetEventCapture(); memset(msg, 0, sizeof(*msg)); msg->keep = 15; - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_BAD_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 4); @@ -626,7 +626,7 @@ void Test_CF_CmdPlaybackDir(void) UT_CF_ResetEventCapture(); UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_PlaybackDir), -1); memset(msg, 0, sizeof(*msg)); - UtAssert_VOIDCALL(CF_CmdPlaybackDir(&utbuf.buf)); + UtAssert_VOIDCALL(CF_PlaybackDirCmd(&utbuf.buf)); UT_CF_AssertEventID(CF_EID_ERR_CMD_PLAYBACK_DIR); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 5); } @@ -891,11 +891,11 @@ void Test_CF_DoFreezeThaw_Set_frozen_ToGiven_context_barg_AndReturn_0(void) /************************************************************************** ** -** CF_CmdFreeze tests +** CF_FreezeCmd tests ** *******************************************************************************/ -void Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand(void) +void Test_CF_FreezeCmd_Set_frozen_To_1_AndAcceptCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -914,7 +914,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdFreeze(arg_msg); + CF_FreezeCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -928,7 +928,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand(void) UT_CF_AssertEventID(CF_EID_INF_CMD_FREEZE); } -void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) +void Test_CF_FreezeCmd_Set_frozen_To_1_AndRejectCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -944,7 +944,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) CF_AppData.hk.counters.cmd = 0; /* Act */ - CF_CmdFreeze(arg_msg); + CF_FreezeCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -954,11 +954,11 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) /******************************************************************************* ** -** CF_CmdThaw tests +** CF_ThawCmd tests ** *******************************************************************************/ -void Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand(void) +void Test_CF_ThawCmd_Set_frozen_To_0_AndAcceptCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -977,7 +977,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdThaw(arg_msg); + CF_ThawCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -991,7 +991,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand(void) UT_CF_AssertEventID(CF_EID_INF_CMD_THAW); } -void Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand(void) +void Test_CF_ThawCmd_Set_frozen_To_0_AndRejectCommand(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -1007,7 +1007,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand(void) CF_AppData.hk.counters.cmd = 0; /* Act */ - CF_CmdThaw(arg_msg); + CF_ThawCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -1378,12 +1378,12 @@ void Test_CF_DoSuspRes(void) /******************************************************************************* ** -** CF_CmdSuspend tests +** CF_SuspendCmd tests ** *******************************************************************************/ -/* Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1 */ -void Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1(void) +/* Test_CF_SuspendCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_1 */ +void Test_CF_SuspendCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_1(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1394,7 +1394,7 @@ void Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1(void) utbuf.xact.chan = CF_NUM_CHANNELS; /* Act */ - CF_CmdSuspend(&utbuf.buf); + CF_SuspendCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); @@ -1407,12 +1407,12 @@ void Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1(void) /******************************************************************************* ** -** CF_CmdResume tests +** CF_ResumeCmd tests ** *******************************************************************************/ -/* Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0 */ -void Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0(void) +/* Test_CF_ResumeCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_0 */ +void Test_CF_ResumeCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_0(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1423,7 +1423,7 @@ void Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0(void) utbuf.xact.chan = CF_NUM_CHANNELS; /* Act */ - CF_CmdResume(&utbuf.buf); + CF_ResumeCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2); @@ -1436,11 +1436,11 @@ void Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0(void) /******************************************************************************* ** -** CF_CmdCancel_Txn tests +** CF_Cancel_TxnCmd tests ** *******************************************************************************/ -void Test_CF_CmdCancel_Txn_Call_CF_CFDP_CancelTransaction_WithGiven_t(void) +void Test_CF_Cancel_TxnCmd_Call_CF_CFDP_CancelTransaction_WithGiven_t(void) { /* Arrange */ CF_Transaction_t t; @@ -1452,7 +1452,7 @@ void Test_CF_CmdCancel_Txn_Call_CF_CFDP_CancelTransaction_WithGiven_t(void) sizeof(context_CF_CFDP_CancelTransaction), false); /* Act */ - CF_CmdCancel_Txn(arg_t, arg_ignored); + CF_Cancel_TxnCmd(arg_t, arg_ignored); /* Assert */ UtAssert_ADDRESS_EQ(context_CF_CFDP_CancelTransaction, arg_t); @@ -1460,11 +1460,11 @@ void Test_CF_CmdCancel_Txn_Call_CF_CFDP_CancelTransaction_WithGiven_t(void) /******************************************************************************* ** -** CF_CmdCancel tests +** CF_CancelCmd tests ** *******************************************************************************/ -void Test_CF_CmdCancel_Success(void) +void Test_CF_CancelCmd_Success(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1475,7 +1475,7 @@ void Test_CF_CmdCancel_Success(void) UT_SetDefaultReturnValue(UT_KEY(CF_TraverseAllTransactions), 1); /* Act */ - CF_CmdCancel(&utbuf.buf); + CF_CancelCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); @@ -1484,7 +1484,7 @@ void Test_CF_CmdCancel_Success(void) UT_CF_AssertEventID(CF_EID_INF_CMD_CANCEL); } -void Test_CF_CmdCancel_Failure(void) +void Test_CF_CancelCmd_Failure(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1495,7 +1495,7 @@ void Test_CF_CmdCancel_Failure(void) UT_SetDefaultReturnValue(UT_KEY(CF_TraverseAllTransactions), 0); /* Act */ - CF_CmdCancel(&utbuf.buf); + CF_CancelCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); @@ -1505,11 +1505,11 @@ void Test_CF_CmdCancel_Failure(void) /******************************************************************************* ** -** CF_CmdAbandon_Txn tests +** CF_Abandon_TxnCmd tests ** *******************************************************************************/ -void Test_CF_CmdAbandon_Txn_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0(void) +void Test_CF_Abandon_TxnCmd_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0(void) { /* Arrange */ CF_Transaction_t t; @@ -1521,7 +1521,7 @@ void Test_CF_CmdAbandon_Txn_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0(void sizeof(context_CF_CFDP_ResetTransaction), false); /* Act */ - CF_CmdAbandon_Txn(arg_t, arg_ignored); + CF_Abandon_TxnCmd(arg_t, arg_ignored); /* Assert */ UtAssert_ADDRESS_EQ(context_CF_CFDP_ResetTransaction.t, arg_t); @@ -1532,11 +1532,11 @@ void Test_CF_CmdAbandon_Txn_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0(void /******************************************************************************* ** -** CF_CmdAbandon tests +** CF_AbandonCmd tests ** *******************************************************************************/ -void Test_CF_CmdAbandon_Success(void) +void Test_CF_AbandonCmd_Success(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1547,7 +1547,7 @@ void Test_CF_CmdAbandon_Success(void) UT_SetDefaultReturnValue(UT_KEY(CF_TraverseAllTransactions), 1); /* Act */ - CF_CmdAbandon(&utbuf.buf); + CF_AbandonCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); @@ -1556,7 +1556,7 @@ void Test_CF_CmdAbandon_Success(void) UT_CF_AssertEventID(CF_EID_INF_CMD_ABANDON); } -void Test_CF_CmdAbandon_Failure(void) +void Test_CF_AbandonCmd_Failure(void) { /* Arrange */ CF_UT_cmd_transaction_buf_t utbuf; @@ -1567,7 +1567,7 @@ void Test_CF_CmdAbandon_Failure(void) UT_SetDefaultReturnValue(UT_KEY(CF_TraverseAllTransactions), 0); /* Act */ - CF_CmdAbandon(&utbuf.buf); + CF_AbandonCmd(&utbuf.buf); /* Assert */ UtAssert_STUB_COUNT(CF_TraverseAllTransactions, 1); @@ -1605,11 +1605,11 @@ void Test_CF_DoEnableDisableDequeue_Set_chan_num_EnabledFlagTo_context_barg(void /******************************************************************************* ** -** CF_CmdEnableDequeue tests +** CF_EnableDequeueCmd tests ** *******************************************************************************/ -void Test_CF_CmdEnableDequeue_Success(void) +void Test_CF_EnableDequeueCmd_Success(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -1632,12 +1632,12 @@ void Test_CF_CmdEnableDequeue_Success(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdEnableDequeue(arg_msg); + CF_EnableDequeueCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ UtAssert_True(CF_AppData.config_table->chan[chan_num].dequeue_enabled == 1, - "CF_CmdEnableDequeue set dequeue_enabled to %d and should be 1 (barg = 1))", + "CF_EnableDequeueCmd set dequeue_enabled to %d and should be 1 (barg = 1))", CF_AppData.config_table->chan[chan_num].dequeue_enabled); /* Assert for incremented counter */ UtAssert_True(CF_AppData.hk.counters.cmd == (uint16)(initial_hk_cmd_counter + 1), @@ -1648,7 +1648,7 @@ void Test_CF_CmdEnableDequeue_Success(void) UT_CF_AssertEventID(CF_EID_INF_CMD_ENABLE_DEQUEUE); } -void Test_CF_CmdEnableDequeue_Failure(void) +void Test_CF_EnableDequeueCmd_Failure(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -1669,7 +1669,7 @@ void Test_CF_CmdEnableDequeue_Failure(void) CF_AppData.hk.counters.err = 0; /* Act */ - CF_CmdEnableDequeue(arg_msg); + CF_EnableDequeueCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -1679,11 +1679,11 @@ void Test_CF_CmdEnableDequeue_Failure(void) /******************************************************************************* ** -** CF_CmdDisableDequeue tests +** CF_DisableDequeueCmd tests ** *******************************************************************************/ -void Test_CF_CmdDisableDequeue_Success(void) +void Test_CF_DisableDequeueCmd_Success(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -1706,12 +1706,12 @@ void Test_CF_CmdDisableDequeue_Success(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdDisableDequeue(arg_msg); + CF_DisableDequeueCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ UtAssert_True(CF_AppData.config_table->chan[chan_num].dequeue_enabled == 0, - "CF_CmdEnableDequeue set dequeue_enabled to %d and should be 0 (barg = 0))", + "CF_EnableDequeueCmd set dequeue_enabled to %d and should be 0 (barg = 0))", CF_AppData.config_table->chan[chan_num].dequeue_enabled); /* Assert for incremented counter */ UtAssert_True(CF_AppData.hk.counters.cmd == (uint16)(initial_hk_cmd_counter + 1), @@ -1721,7 +1721,7 @@ void Test_CF_CmdDisableDequeue_Success(void) UT_CF_AssertEventID(CF_EID_INF_CMD_DISABLE_DEQUEUE); } -void Test_CF_CmdDisableDequeue_Failure(void) +void Test_CF_DisableDequeueCmd_Failure(void) { /* Arrange */ CF_UT_cmd_unionargs_buf_t utbuf; @@ -1742,7 +1742,7 @@ void Test_CF_CmdDisableDequeue_Failure(void) CF_AppData.hk.counters.err = 0; /* Act */ - CF_CmdDisableDequeue(arg_msg); + CF_DisableDequeueCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -1892,11 +1892,11 @@ void Test_CF_DoEnableDisablePolldir_FailAnyBadPolldirSendEvent(void) /******************************************************************************* ** -** CF_CmdEnablePolldir tests +** CF_EnablePolldirCmd tests ** *******************************************************************************/ -void Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess(void) +void Test_CF_EnablePolldirCmd_SuccessWhenActionSuccess(void) { /* Arrange */ CF_ConfigTable_t config_table; @@ -1921,7 +1921,7 @@ void Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdEnablePolldir(arg_msg); + CF_EnablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -1935,7 +1935,7 @@ void Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess(void) UT_CF_AssertEventID(CF_EID_INF_CMD_ENABLE_POLLDIR); } -void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) +void Test_CF_EnablePolldirCmd_FailWhenActionFail(void) { /* Arrange */ uint8 channel = Any_cf_channel(); @@ -1955,7 +1955,7 @@ void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdEnablePolldir(arg_msg); + CF_EnablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -1968,11 +1968,11 @@ void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) /******************************************************************************* ** -** CF_CmdDisablePolldir tests +** CF_DisablePolldirCmd tests ** *******************************************************************************/ -void Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess(void) +void Test_CF_DisablePolldirCmd_SuccessWhenActionSuccess(void) { /* Arrange */ CF_ConfigTable_t config_table; @@ -1997,7 +1997,7 @@ void Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdDisablePolldir(arg_msg); + CF_DisablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2011,7 +2011,7 @@ void Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess(void) UT_CF_AssertEventID(CF_EID_INF_CMD_DISABLE_POLLDIR); } -void Test_CF_CmdDisablePolldir_FailWhenActionFail(void) +void Test_CF_DisablePolldirCmd_FailWhenActionFail(void) { /* Arrange */ uint8 channel = Any_cf_channel(); @@ -2032,7 +2032,7 @@ void Test_CF_CmdDisablePolldir_FailWhenActionFail(void) CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdDisablePolldir(arg_msg); + CF_DisablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2279,11 +2279,11 @@ void Test_CF_DoPurgeQueue_AnyGivenBad_data_byte_1_SendEventAndReturn_neg1(void) /******************************************************************************* ** -** CF_CmdPurgeQueue tests +** CF_PurgeQueueCmd tests ** *******************************************************************************/ -void Test_CF_CmdPurgeQueue_FailWhenActionFail(void) +void Test_CF_PurgeQueueCmd_FailWhenActionFail(void) { /* Arrange */ uint8 channel = Any_cf_channel(); @@ -2304,7 +2304,7 @@ void Test_CF_CmdPurgeQueue_FailWhenActionFail(void) CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdPurgeQueue(arg_msg); + CF_PurgeQueueCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2315,7 +2315,7 @@ void Test_CF_CmdPurgeQueue_FailWhenActionFail(void) UT_CF_AssertEventID(CF_EID_ERR_CMD_PURGE_QUEUE); } -void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) +void Test_CF_PurgeQueueCmd_SuccessWhenActionSuccess(void) { /* Arrange */ uint8 channel = Any_cf_channel(); @@ -2331,7 +2331,7 @@ void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) CF_AppData.hk.counters.cmd = 0; /* Act */ - CF_CmdPurgeQueue(arg_msg); + CF_PurgeQueueCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2343,11 +2343,11 @@ void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) /******************************************************************************* ** -** CF_CmdWriteQueue tests +** CF_WriteQueueCmd tests ** *******************************************************************************/ -void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand(void) +void Test_CF_WriteQueueCmd_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2363,7 +2363,7 @@ void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectComman CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2372,7 +2372,7 @@ void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectComman UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand(void) +void Test_CF_WriteQueueCmd_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2388,7 +2388,7 @@ void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRej CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2398,7 +2398,7 @@ void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRej UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) +void Test_CF_WriteQueueCmd_WhenUpAndPendingQueueSendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2418,7 +2418,7 @@ void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2428,7 +2428,7 @@ void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_SendEventAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_SendEventAndRejectCommand( void) { /* Arrange */ @@ -2458,7 +2458,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_ CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); @@ -2470,7 +2470,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_ UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_SendEventAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_SendEventAndRejectCommand( void) { /* Arrange */ @@ -2500,7 +2500,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_que CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); @@ -2512,7 +2512,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_que UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_SendEventCloseAndRejectCommandWhen_CF_WriteTxnQueueDataToFile_Fails( +void Test_CF_WriteQueueCmd_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_SendEventCloseAndRejectCommandWhen_CF_WriteTxnQueueDataToFile_Fails( void) { /* Arrange */ @@ -2549,7 +2549,7 @@ void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedC CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2560,7 +2560,7 @@ void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedC UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventClosesAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventClosesAndRejectCommand( void) { /* Arrange */ @@ -2600,7 +2600,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_q CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2611,7 +2611,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_q UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( void) { /* Arrange */ @@ -2651,7 +2651,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpA CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2662,7 +2662,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpA UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( void) { /* Arrange */ @@ -2702,7 +2702,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2713,7 +2713,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( void) { /* Arrange */ @@ -2755,7 +2755,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_w CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); @@ -2766,7 +2766,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_w UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( void) { /* Arrange */ @@ -2806,7 +2806,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2817,7 +2817,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( +void Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand( void) { /* Arrange */ @@ -2857,7 +2857,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2868,7 +2868,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) +void Test_CF_WriteQueueCmd_Success_type_AllAnd_q_All(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2905,7 +2905,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 4); @@ -2917,7 +2917,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) +void Test_CF_WriteQueueCmd_Success_type_AllAnd_q_History(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2950,7 +2950,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2962,7 +2962,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) +void Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Active(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2995,7 +2995,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); @@ -3007,7 +3007,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) +void Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Pend(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3040,7 +3040,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3052,7 +3052,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) +void Test_CF_WriteQueueCmd_Success_type_UpAnd_q_All(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3089,7 +3089,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3101,7 +3101,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) +void Test_CF_WriteQueueCmd_Success_type_UpAnd_q_History(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3134,7 +3134,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -3146,7 +3146,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) +void Test_CF_WriteQueueCmd_Success_type_UpAnd_q_Active(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3179,7 +3179,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3191,9 +3191,9 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -/* Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Pend IS an error and is handled by a previous test */ +/* Test_CF_WriteQueueCmd_Success_type_UpAnd_q_Pend IS an error and is handled by a previous test */ -void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) +void Test_CF_WriteQueueCmd_Success_type_DownAnd_q_All(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3226,7 +3226,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); @@ -3238,7 +3238,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) +void Test_CF_WriteQueueCmd_Success_type_DownAnd_q_History(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3271,7 +3271,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -3283,7 +3283,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) +void Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Active(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3316,7 +3316,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); @@ -3328,7 +3328,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend(void) +void Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Pend(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -3361,7 +3361,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend(void) CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3375,11 +3375,11 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend(void) /******************************************************************************* ** -** CF_CmdValidateChunkSize tests +** CF_ValidateChunkSizeCmd tests ** *******************************************************************************/ -void Test_CF_CmdValidateChunkSize_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1(void) +void Test_CF_ValidateChunkSizeCmd_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1(void) { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ @@ -3387,14 +3387,14 @@ void Test_CF_CmdValidateChunkSize_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1( CFE_Status_t local_result; /* Act */ - local_result = CF_CmdValidateChunkSize(arg_val, arg_chan_num); + local_result = CF_ValidateChunkSizeCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CF_ERROR, "CF_CmdValidateChunkSize returned %d and should be -1 (CF_ERROR)", + UtAssert_True(local_result == CF_ERROR, "CF_ValidateChunkSizeCmd returned %d and should be -1 (CF_ERROR)", local_result); } -void Test_CF_CmdValidateChunkSize_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1(void) +void Test_CF_ValidateChunkSizeCmd_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1(void) { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ @@ -3402,14 +3402,14 @@ void Test_CF_CmdValidateChunkSize_Any_val_GreaterThan_pdu_fd_data_t_FailAndRetur CFE_Status_t local_result; /* Act */ - local_result = CF_CmdValidateChunkSize(arg_val, arg_chan_num); + local_result = CF_ValidateChunkSizeCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CF_ERROR, "CF_CmdValidateChunkSize returned %d and should be -1 (CF_ERROR)", + UtAssert_True(local_result == CF_ERROR, "CF_ValidateChunkSizeCmd returned %d and should be -1 (CF_ERROR)", local_result); } -void Test_CF_CmdValidateChunkSize_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0(void) +void Test_CF_ValidateChunkSizeCmd_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0(void) { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ @@ -3417,14 +3417,14 @@ void Test_CF_CmdValidateChunkSize_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0(vo CFE_Status_t local_result; /* Act */ - local_result = CF_CmdValidateChunkSize(arg_val, arg_chan_num); + local_result = CF_ValidateChunkSizeCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CFE_SUCCESS, "CF_CmdValidateChunkSize returned %d and should be 0 (CFE_SUCCESS)", + UtAssert_True(local_result == CFE_SUCCESS, "CF_ValidateChunkSizeCmd returned %d and should be 0 (CFE_SUCCESS)", local_result); } -void Test_CF_CmdValidateChunkSize_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0(void) +void Test_CF_ValidateChunkSizeCmd_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0(void) { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ @@ -3432,20 +3432,20 @@ void Test_CF_CmdValidateChunkSize_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAn CFE_Status_t local_result; /* Act */ - local_result = CF_CmdValidateChunkSize(arg_val, arg_chan_num); + local_result = CF_ValidateChunkSizeCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CFE_SUCCESS, "CF_CmdValidateChunkSize returned %d and should be 0 (CFE_SUCCESS)", + UtAssert_True(local_result == CFE_SUCCESS, "CF_ValidateChunkSizeCmd returned %d and should be 0 (CFE_SUCCESS)", local_result); } /******************************************************************************* ** -** CF_CmdValidateMaxOutgoing tests +** CF_ValidateMaxOutgoingCmd tests ** *******************************************************************************/ -void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_IsNot_0_Return_0_Success(void) +void Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_IsNot_0_Return_0_Success(void) { /* Arrange */ uint32 arg_val = Any_uint32_Except(0); @@ -3453,14 +3453,14 @@ void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_IsNot_0_Return_0_Success(void) CFE_Status_t local_result; /* Act */ - local_result = CF_CmdValidateMaxOutgoing(arg_val, arg_chan_num); + local_result = CF_ValidateMaxOutgoingCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CFE_SUCCESS, "CF_CmdValidateMaxOutgoing returned %d and should be 0 (CFE_SUCCESS)", + UtAssert_True(local_result == CFE_SUCCESS, "CF_ValidateMaxOutgoingCmd returned %d and should be 0 (CFE_SUCCESS)", local_result); } -void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success(void) +void Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success(void) { /* Arrange */ uint32 arg_val = 0; @@ -3472,14 +3472,14 @@ void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_R memset(CF_AppData.config_table->chan[arg_chan_num].sem_name, (char)Any_uint8_Except(0), 1); /* Act */ - local_result = CF_CmdValidateMaxOutgoing(arg_val, arg_chan_num); + local_result = CF_ValidateMaxOutgoingCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CFE_SUCCESS, "CF_CmdValidateMaxOutgoing returned %d and should be 0 (CFE_SUCCESS)", + UtAssert_True(local_result == CFE_SUCCESS, "CF_ValidateMaxOutgoingCmd returned %d and should be 0 (CFE_SUCCESS)", local_result); } -void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail(void) +void Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail(void) { /* Arrange */ uint32 arg_val = 0; @@ -3491,23 +3491,23 @@ void Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Retu memset(CF_AppData.config_table->chan[arg_chan_num].sem_name, (char)0, 1); /* Act */ - local_result = CF_CmdValidateMaxOutgoing(arg_val, arg_chan_num); + local_result = CF_ValidateMaxOutgoingCmd(arg_val, arg_chan_num); /* Assert */ - UtAssert_True(local_result == CF_ERROR, "CF_CmdValidateMaxOutgoing returned %d and should be -1 (CF_ERROR)", + UtAssert_True(local_result == CF_ERROR, "CF_ValidateMaxOutgoingCmd returned %d and should be -1 (CF_ERROR)", local_result); } /******************************************************************************* ** -** CF_CmdGetSetParam tests +** CF_GetSetParamCmd tests ** *******************************************************************************/ -void Test_CF_CmdGetSetParam(void) +void Test_CF_GetSetParamCmd(void) { /* Test cases for: - * void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num); + * void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num); */ /* Arrange */ @@ -3524,7 +3524,7 @@ void Test_CF_CmdGetSetParam(void) for (param_id = 0; param_id < CF_GetSet_ValueID_MAX; ++param_id) { UT_CF_ResetEventCapture(); - UtAssert_VOIDCALL(CF_CmdGetSetParam(1, param_id, 1 + param_id, UT_CFDP_CHANNEL)); + UtAssert_VOIDCALL(CF_GetSetParamCmd(1, param_id, 1 + param_id, UT_CFDP_CHANNEL)); UT_CF_AssertEventID(CF_EID_INF_CMD_GETSET1); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, ++expected_count); } @@ -3545,26 +3545,26 @@ void Test_CF_CmdGetSetParam(void) for (param_id = 0; param_id < CF_GetSet_ValueID_MAX; ++param_id) { UT_CF_ResetEventCapture(); - UtAssert_VOIDCALL(CF_CmdGetSetParam(0, param_id, 1, UT_CFDP_CHANNEL)); + UtAssert_VOIDCALL(CF_GetSetParamCmd(0, param_id, 1, UT_CFDP_CHANNEL)); UT_CF_AssertEventID(CF_EID_INF_CMD_GETSET2); UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, ++expected_count); } /* Bad param ID */ UT_CF_ResetEventCapture(); - UtAssert_VOIDCALL(CF_CmdGetSetParam(0, CF_GetSet_ValueID_MAX, 0, UT_CFDP_CHANNEL)); + UtAssert_VOIDCALL(CF_GetSetParamCmd(0, CF_GetSet_ValueID_MAX, 0, UT_CFDP_CHANNEL)); UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_PARAM); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); /* Bad channel ID */ UT_CF_ResetEventCapture(); - UtAssert_VOIDCALL(CF_CmdGetSetParam(0, 0, 0, CF_NUM_CHANNELS + 1)); + UtAssert_VOIDCALL(CF_GetSetParamCmd(0, 0, 0, CF_NUM_CHANNELS + 1)); UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_CHAN); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 2); /* Validation fail */ UT_CF_ResetEventCapture(); - UtAssert_VOIDCALL(CF_CmdGetSetParam(1, CF_GetSet_ValueID_outgoing_file_chunk_size, + UtAssert_VOIDCALL(CF_GetSetParamCmd(1, CF_GetSet_ValueID_outgoing_file_chunk_size, 100 + sizeof(CF_CFDP_PduFileDataContent_t), UT_CFDP_CHANNEL)); UT_CF_AssertEventID(CF_EID_ERR_CMD_GETSET_VALIDATE); UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 3); @@ -3572,11 +3572,11 @@ void Test_CF_CmdGetSetParam(void) /******************************************************************************* ** -** CF_CmdSetParam tests +** CF_SetParamCmd tests ** *******************************************************************************/ -void Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value(void) +void Test_CF_SetParamCmd_Call_CF_GetSetParamCmd_With_cmd_key_And_cmd_value(void) { /* Arrange */ CF_UT_cmd_set_param_args_buf_t utbuf; @@ -3592,7 +3592,7 @@ void Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value(void) CF_AppData.config_table = &config_table; /* Act */ - CF_CmdSetParam(&utbuf.buf); + CF_SetParamCmd(&utbuf.buf); /* Assert */ UtAssert_UINT32_EQ(CF_AppData.config_table->ticks_per_second, utbuf.sp.value); @@ -3604,11 +3604,11 @@ void Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value(void) /******************************************************************************* ** -** CF_CmdGetParam tests +** CF_GetParamCmd tests ** *******************************************************************************/ -void Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstantValue_0(void) +void Test_CF_GetParamCmd_Call_CF_GetSetParamCmd_With_cmd_data_byte_0_AndConstantValue_0(void) { /* Arrange */ CF_UT_cmd_get_param_args_buf_t utbuf; @@ -3623,7 +3623,7 @@ void Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstant CF_AppData.config_table = &config_table; /* Act */ - CF_CmdGetParam(&utbuf.buf); + CF_GetParamCmd(&utbuf.buf); /* Assert */ /* Note actual value not tested, just flow */ @@ -3635,11 +3635,11 @@ void Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstant /******************************************************************************* ** -** CF_CmdEnableEngine tests +** CF_EnableEngineCmd tests ** *******************************************************************************/ -void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounter(void) +void Test_CF_EnableEngineCmd_WithEngineNotEnableInitSuccessAndIncrementCmdCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3653,7 +3653,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3665,7 +3665,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter(void) +void Test_CF_EnableEngineCmd_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3679,7 +3679,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3691,7 +3691,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, (initial_hk_err_counter + 1) & 0xFFFF); } -void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounter(void) +void Test_CF_EnableEngineCmd_WithEngineEnableFailsSendEventAndIncrementErrCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3702,7 +3702,7 @@ void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounte CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3716,11 +3716,11 @@ void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounte /******************************************************************************* ** -** CF_CmdDisableEngine tests +** CF_DisableEngineCmd tests ** *******************************************************************************/ -void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(void) +void Test_CF_DisableEngineCmd_SuccessWhenEngineEnabledAndIncrementCmdCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3731,7 +3731,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi CF_AppData.hk.counters.cmd = initial_hk_cmd_counter; /* Act */ - CF_CmdDisableEngine(arg_msg); + CF_DisableEngineCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 1); @@ -3742,7 +3742,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi UtAssert_UINT32_EQ(CF_AppData.hk.counters.cmd, (initial_hk_cmd_counter + 1) & 0xFFFF); } -void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(void) +void Test_CF_DisableEngineCmd_WhenEngineDisabledAndIncrementErrCounterThenFail(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3753,7 +3753,7 @@ void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(v CF_AppData.hk.counters.err = initial_hk_err_counter; /* Act */ - CF_CmdDisableEngine(arg_msg); + CF_DisableEngineCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 0); @@ -3849,7 +3849,7 @@ void Test_CF_ProcessGroundCommand_Receives_cmd_AndLengthDoesNotMatchExpectedForT UtAssert_UINT32_EQ(CF_AppData.hk.counters.err, 1); } -void Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_CmdNoop_With_msg(void) +void Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_NoopCmd_With_msg(void) { /* Arrange */ CFE_SB_Buffer_t utbuf; @@ -3870,7 +3870,7 @@ void Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_CmdNoop_With_m /* Assert */ UtAssert_STUB_COUNT(CFE_MSG_GetFcnCode, 1); UtAssert_STUB_COUNT(CFE_MSG_GetSize, 1); - /* Assert for CF_CmdNoop */ + /* Assert for CF_NoopCmd */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UT_CF_AssertEventID(CF_EID_INF_CMD_NOOP); /* Assert for incremented counter */ @@ -3910,43 +3910,45 @@ void Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x0C_AndDoNothingBecause_fns_1 ** *******************************************************************************/ -void add_CF_CmdNoop_tests(void) +void add_CF_NoopCmd_tests(void) { - UtTest_Add(Test_CF_CmdNoop_SendNoopEventAndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdNoop_SendNoopEventAndAcceptCommand"); + UtTest_Add(Test_CF_NoopCmd_SendNoopEventAndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_NoopCmd_SendNoopEventAndAcceptCommand"); } -void add_CF_CmdReset_tests(void) +void add_CF_ResetCountersCmd_tests(void) { - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdReset_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand"); - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand, cf_cmd_tests_Setup, + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdReset_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand"); - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, - "Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent"); - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand, + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIsEqTo_5_SendEventAndRejectCommand"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand, + cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIsGreaterThan_5_SendEventAndRejectCommand"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand"); - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand, + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSendEvent"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand"); - UtTest_Add(Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand, + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEventAndAcceptCommand"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand"); - UtTest_Add(Test_CF_CmdReset_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdReset_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent"); + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEventAndAcceptCommand"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand, + cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_ResetCountersCmd_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEventAcceptCommand"); + UtTest_Add(Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, + "Test_CF_ResetCountersCmd_tests_WhenCommandByteIs_all_AndResetAllMemValuesSendEvent"); } -void add_CF_CmdTxFile_tests(void) +void add_CF_TxFileCmd_tests(void) { - UtTest_Add(Test_CF_CmdTxFile, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_CmdTxFile"); + UtTest_Add(Test_CF_TxFileCmd, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_TxFileCmd"); } -void add_CF_CmdPlaybackDir_tests(void) +void add_CF_PlaybackDirCmd_tests(void) { - UtTest_Add(Test_CF_CmdPlaybackDir, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_CmdPlaybackDir"); + UtTest_Add(Test_CF_PlaybackDirCmd, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_PlaybackDirCmd"); } void add_CF_DoChanAction_tests(void) @@ -3974,20 +3976,20 @@ void add_CF_DoFreezeThaw_tests(void) cf_cmd_tests_Teardown, "Test_CF_DoFreezeThaw_Set_frozen_ToGiven_context_barg_AndReturn_0"); } -void add_CF_CmdFreeze_tests(void) +void add_CF_FreezeCmd_tests(void) { - UtTest_Add(Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand"); - UtTest_Add(Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand"); + UtTest_Add(Test_CF_FreezeCmd_Set_frozen_To_1_AndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_FreezeCmd_Set_frozen_To_1_AndAcceptCommand"); + UtTest_Add(Test_CF_FreezeCmd_Set_frozen_To_1_AndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_FreezeCmd_Set_frozen_To_1_AndRejectCommand"); } -void add_CF_CmdThaw_tests(void) +void add_CF_ThawCmd_tests(void) { - UtTest_Add(Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand"); - UtTest_Add(Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand"); + UtTest_Add(Test_CF_ThawCmd_Set_frozen_To_0_AndAcceptCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_ThawCmd_Set_frozen_To_0_AndAcceptCommand"); + UtTest_Add(Test_CF_ThawCmd_Set_frozen_To_0_AndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_ThawCmd_Set_frozen_To_0_AndRejectCommand"); } void add_CF_FindTransactionBySequenceNumberAllChannels_tests(void) @@ -4029,40 +4031,40 @@ void add_CF_DoSuspRes_tests(void) UtTest_Add(Test_CF_DoSuspRes, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_DoSuspRes"); } -void add_CF_CmdSuspend_tests(void) +void add_CF_SuspendCmd_tests(void) { - UtTest_Add(Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdSuspend_Call_CF_DoSuspRes_WithGiven_msg_And_action_1"); + UtTest_Add(Test_CF_SuspendCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_1, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_SuspendCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_1"); } -void add_CF_CmdResume_tests(void) +void add_CF_ResumeCmd_tests(void) { - UtTest_Add(Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdResume_Call_CF_DoSuspRes_WithGiven_msg_And_action_0"); + UtTest_Add(Test_CF_ResumeCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_0, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ResumeCmd_Call_CF_DoSuspRes_WithGiven_msg_And_action_0"); } -void add_CF_CmdCancel_Txn_tests(void) +void add_CF_Cancel_TxnCmd_tests(void) { - UtTest_Add(Test_CF_CmdCancel_Txn_Call_CF_CFDP_CancelTransaction_WithGiven_t, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdCancel_Txn_Call_CF_CFDP_CancelTransaction_WithGiven_t"); + UtTest_Add(Test_CF_Cancel_TxnCmd_Call_CF_CFDP_CancelTransaction_WithGiven_t, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_Cancel_TxnCmd_Call_CF_CFDP_CancelTransaction_WithGiven_t"); } -void add_CF_CmdCancel_tests(void) +void add_CF_CancelCmd_tests(void) { - UtTest_Add(Test_CF_CmdCancel_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CmdCancel_Failure"); - UtTest_Add(Test_CF_CmdCancel_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CmdCancel_Success"); + UtTest_Add(Test_CF_CancelCmd_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CancelCmd_Failure"); + UtTest_Add(Test_CF_CancelCmd_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CancelCmd_Success"); } -void add_CF_CmdAbandon_Txn_tests(void) +void add_CF_Abandon_TxnCmd_tests(void) { - UtTest_Add(Test_CF_CmdAbandon_Txn_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdAbandon_Txn_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0"); + UtTest_Add(Test_CF_Abandon_TxnCmd_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_Abandon_TxnCmd_Call_CF_CFDP_ResetTransaction_WithGiven_t_And_0"); } -void add_CF_CmdAbandon_tests(void) +void add_CF_AbandonCmd_tests(void) { - UtTest_Add(Test_CF_CmdAbandon_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CmdAbandon_Failure"); - UtTest_Add(Test_CF_CmdAbandon_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_CmdAbandon_Success"); + UtTest_Add(Test_CF_AbandonCmd_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_AbandonCmd_Failure"); + UtTest_Add(Test_CF_AbandonCmd_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_AbandonCmd_Success"); } void add_CF_DoEnableDisableDequeue_tests(void) @@ -4071,20 +4073,20 @@ void add_CF_DoEnableDisableDequeue_tests(void) cf_cmd_tests_Teardown, "Test_CF_DoEnableDisableDequeue_Set_chan_num_EnabledFlagTo_context_barg"); } -void add_CF_CmdEnableDequeue_tests(void) +void add_CF_EnableDequeueCmd_tests(void) { - UtTest_Add(Test_CF_CmdEnableDequeue_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdEnableDequeue_Success"); - UtTest_Add(Test_CF_CmdEnableDequeue_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdEnableDequeue_Failure"); + UtTest_Add(Test_CF_EnableDequeueCmd_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_EnableDequeueCmd_Success"); + UtTest_Add(Test_CF_EnableDequeueCmd_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_EnableDequeueCmd_Failure"); } -void add_CF_CmdDisableDequeue_tests(void) +void add_CF_DisableDequeueCmd_tests(void) { - UtTest_Add(Test_CF_CmdDisableDequeue_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdDisableDequeue_Success"); - UtTest_Add(Test_CF_CmdDisableDequeue_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdDisableDequeue_Failure"); + UtTest_Add(Test_CF_DisableDequeueCmd_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_DisableDequeueCmd_Success"); + UtTest_Add(Test_CF_DisableDequeueCmd_Failure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_DisableDequeueCmd_Failure"); } void add_CF_DoEnableDisablePolldir_tests(void) @@ -4103,20 +4105,20 @@ void add_CF_DoEnableDisablePolldir_tests(void) "Test_CF_DoEnableDisablePolldir_FailAnyBadPolldirSendEvent"); } -void add_CF_CmdEnablePolldir_tests(void) +void add_CF_EnablePolldirCmd_tests(void) { - UtTest_Add(Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess"); - UtTest_Add(Test_CF_CmdEnablePolldir_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdEnablePolldir_FailWhenActionFail"); + UtTest_Add(Test_CF_EnablePolldirCmd_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_EnablePolldirCmd_SuccessWhenActionSuccess"); + UtTest_Add(Test_CF_EnablePolldirCmd_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_EnablePolldirCmd_FailWhenActionFail"); } -void add_CF_CmdDisablePolldir_tests(void) +void add_CF_DisablePolldirCmd_tests(void) { - UtTest_Add(Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess"); - UtTest_Add(Test_CF_CmdDisablePolldir_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdDisablePolldir_FailWhenActionFail"); + UtTest_Add(Test_CF_DisablePolldirCmd_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_DisablePolldirCmd_SuccessWhenActionSuccess"); + UtTest_Add(Test_CF_DisablePolldirCmd_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_DisablePolldirCmd_FailWhenActionFail"); } void add_CF_PurgeHistory_tests(void) @@ -4144,154 +4146,154 @@ void add_CF_DoPurgeQueue_tests(void) cf_cmd_tests_Teardown, "Test_CF_DoPurgeQueue_AnyGivenBad_data_byte_1_SendEventAndReturn_neg1"); } -void add_CF_CmdPurgeQueue_tests(void) +void add_CF_PurgeQueueCmd_tests(void) { - UtTest_Add(Test_CF_CmdPurgeQueue_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdPurgeQueue_FailWhenActionFail"); - UtTest_Add(Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess"); + UtTest_Add(Test_CF_PurgeQueueCmd_FailWhenActionFail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_PurgeQueueCmd_FailWhenActionFail"); + UtTest_Add(Test_CF_PurgeQueueCmd_SuccessWhenActionSuccess, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_PurgeQueueCmd_SuccessWhenActionSuccess"); } -void add_CF_CmdWriteQueue_tests(void) +void add_CF_WriteQueueCmd_tests(void) { - UtTest_Add(Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand"); - UtTest_Add(Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand, + UtTest_Add(Test_CF_WriteQueueCmd_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_WriteQueueCmd_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectCommand"); + UtTest_Add(Test_CF_WriteQueueCmd_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand"); - UtTest_Add(Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand"); + "Test_CF_WriteQueueCmd_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRejectCommand"); + UtTest_Add(Test_CF_WriteQueueCmd_WhenUpAndPendingQueueSendEventAndRejectCommand, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_WriteQueueCmd_WhenUpAndPendingQueueSendEventAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_SendEventAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_SendEventAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_" + "Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_IsNot_q_pend_" "SendEventAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_SendEventAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_SendEventAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_" + "Test_CF_WriteQueueCmd_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_queue_Is_q_pend_" "SendEventAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_SendEventCloseAndRejectCommandWhen_CF_WriteTxnQueueDataToFile_Fails, + Test_CF_WriteQueueCmd_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_SendEventCloseAndRejectCommandWhen_CF_WriteTxnQueueDataToFile_Fails, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_" + "Test_CF_WriteQueueCmd_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedClose_" "SendEventCloseAndRejectCommandWhen_CF_WriteTxnQueueDataToFile_Fails"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventClosesAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventClosesAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_" + "Test_CF_WriteQueueCmd_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsActive_fd_IsPositive_Call_" "CF_" "WrappedClose_SendEventClosesAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_" + "Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpAnd_queue_IsHistory_fd_IsPositive_" "Call_CF_WrappedClose_SendEventCloseAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_" + "Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq_IsDownAnd_queue_IsActive_fd_" "IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_" + "Test_CF_WriteQueueCmd_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_wq_IsDownAnd_queue_IsActive_fd_" "IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_" + "Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsPend_fd_IsPositive_" "Call_CF_WrappedClose_SendEventCloseAndRejectCommand"); UtTest_Add( - Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, + Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_Call_CF_WrappedClose_SendEventCloseAndRejectCommand, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_" + "Test_CF_WriteQueueCmd_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDownAnd_queue_IsHistory_fd_IsPositive_" "Call_CF_WrappedClose_SendEventCloseAndRejectCommand"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active"); - /* see Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand */ - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active"); - UtTest_Add(Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend"); -} - -void add_CF_CmdValidateChunkSize_tests(void) -{ - UtTest_Add(Test_CF_CmdValidateChunkSize_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdValidateChunkSize_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1"); - UtTest_Add(Test_CF_CmdValidateChunkSize_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdValidateChunkSize_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1"); - UtTest_Add(Test_CF_CmdValidateChunkSize_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdValidateChunkSize_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0"); - UtTest_Add(Test_CF_CmdValidateChunkSize_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0, cf_cmd_tests_Setup, + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_AllAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_AllAnd_q_All"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_AllAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_AllAnd_q_History"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Active"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Pend, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_AllAnd_q_Pend"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_UpAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_UpAnd_q_All"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_UpAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_UpAnd_q_History"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_UpAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_UpAnd_q_Active"); + /* see Test_CF_WriteQueueCmd_WhenUpAndPendingQueueSendEventAndRejectCommand */ + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_DownAnd_q_All, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_DownAnd_q_All"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_DownAnd_q_History, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_DownAnd_q_History"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Active, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Active"); + UtTest_Add(Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Pend, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, + "Test_CF_WriteQueueCmd_Success_type_DownAnd_q_Pend"); +} + +void add_CF_ValidateChunkSizeCmd_tests(void) +{ + UtTest_Add(Test_CF_ValidateChunkSizeCmd_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ValidateChunkSizeCmd_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1"); + UtTest_Add(Test_CF_ValidateChunkSizeCmd_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ValidateChunkSizeCmd_Any_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1"); + UtTest_Add(Test_CF_ValidateChunkSizeCmd_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ValidateChunkSizeCmd_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0"); + UtTest_Add(Test_CF_ValidateChunkSizeCmd_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdValidateChunkSize_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0"); + "Test_CF_ValidateChunkSizeCmd_val_LessThanOrEqSizeOf_pdu_fd_data_t_SuccessAndReturn_0"); } -void add_CF_CmdValidateMaxOutgoing_tests(void) +void add_CF_ValidateMaxOutgoingCmd_tests(void) { - UtTest_Add(Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_IsNot_0_Return_0_Success, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_IsNot_0_Return_0_Success"); - UtTest_Add(Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success, + UtTest_Add(Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_IsNot_0_Return_0_Success, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_IsNot_0_Return_0_Success"); + UtTest_Add(Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success"); - UtTest_Add(Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail, cf_cmd_tests_Setup, + "Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_But_sem_name_IsNot_NULL_Return_0_Success"); + UtTest_Add(Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdValidateMaxOutgoing_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail"); + "Test_CF_ValidateMaxOutgoingCmd_WhenGiven_val_Is_0_And_sem_name_Is_NULL_Return_1_Fail"); } -void add_CF_CmdGetSetParam_tests(void) +void add_CF_GetSetParamCmd_tests(void) { - UtTest_Add(Test_CF_CmdGetSetParam, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_CmdGetSetParam"); + UtTest_Add(Test_CF_GetSetParamCmd, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "CF_GetSetParamCmd"); } -void add_CF_CmdSetParam_tests(void) +void add_CF_SetParamCmd_tests(void) { - UtTest_Add(Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdSetParam_Call_CF_CmdGetSetParam_With_cmd_key_And_cmd_value"); + UtTest_Add(Test_CF_SetParamCmd_Call_CF_GetSetParamCmd_With_cmd_key_And_cmd_value, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_SetParamCmd_Call_CF_GetSetParamCmd_With_cmd_key_And_cmd_value"); } -void add_CF_CmdGetParam_tests(void) +void add_CF_GetParamCmd_tests(void) { - UtTest_Add(Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstantValue_0, cf_cmd_tests_Setup, + UtTest_Add(Test_CF_GetParamCmd_Call_CF_GetSetParamCmd_With_cmd_data_byte_0_AndConstantValue_0, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdGetParam_Call_CF_CmdGetSetParam_With_cmd_data_byte_0_AndConstantValue_0"); + "Test_CF_GetParamCmd_Call_CF_GetSetParamCmd_With_cmd_data_byte_0_AndConstantValue_0"); } -void add_CF_CmdEnableEngine_tests(void) +void add_CF_EnableEngineCmd_tests(void) { - UtTest_Add(Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounter, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounter"); - UtTest_Add(Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter, cf_cmd_tests_Setup, + UtTest_Add(Test_CF_EnableEngineCmd_WithEngineNotEnableInitSuccessAndIncrementCmdCounter, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_EnableEngineCmd_WithEngineNotEnableInitSuccessAndIncrementCmdCounter"); + UtTest_Add(Test_CF_EnableEngineCmd_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, - "Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter"); - UtTest_Add(Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounter, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounter"); + "Test_CF_EnableEngineCmd_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter"); + UtTest_Add(Test_CF_EnableEngineCmd_WithEngineEnableFailsSendEventAndIncrementErrCounter, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_EnableEngineCmd_WithEngineEnableFailsSendEventAndIncrementErrCounter"); } -void add_CF_CmdDisableEngine_tests(void) +void add_CF_DisableEngineCmd_tests(void) { - UtTest_Add(Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter"); - UtTest_Add(Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail"); + UtTest_Add(Test_CF_DisableEngineCmd_SuccessWhenEngineEnabledAndIncrementCmdCounter, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_DisableEngineCmd_SuccessWhenEngineEnabledAndIncrementCmdCounter"); + UtTest_Add(Test_CF_DisableEngineCmd_WhenEngineDisabledAndIncrementErrCounterThenFail, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_DisableEngineCmd_WhenEngineDisabledAndIncrementErrCounterThenFail"); } void add_CF_ProcessGroundCommand_tests(void) @@ -4305,8 +4307,8 @@ void add_CF_ProcessGroundCommand_tests(void) Test_CF_ProcessGroundCommand_Receives_cmd_AndLengthDoesNotMatchExpectedForThatCommandSendEventAndFailure, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_ProcessGroundCommand_Receives_cmd_AndLengthDoesNotMatchExpectedForThatCommandSendEventAndFailure"); - UtTest_Add(Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_CmdNoop_With_msg, cf_cmd_tests_Setup, - cf_cmd_tests_Teardown, "Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_CmdNoop_With_msg"); + UtTest_Add(Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_NoopCmd_With_msg, cf_cmd_tests_Setup, + cf_cmd_tests_Teardown, "Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x00_AndCall_CF_NoopCmd_With_msg"); UtTest_Add(Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x0C_AndDoNothingBecause_fns_12_Is_NULL, cf_cmd_tests_Setup, cf_cmd_tests_Teardown, "Test_CF_ProcessGroundCommand_ReceivesCmdCode_0x0C_AndDoNothingBecause_fns_12_Is_NULL"); @@ -4322,21 +4324,21 @@ void UtTest_Setup(void) { TestUtil_InitializeRandomSeed(); - add_CF_CmdNoop_tests(); + add_CF_NoopCmd_tests(); - add_CF_CmdReset_tests(); + add_CF_ResetCountersCmd_tests(); - add_CF_CmdTxFile_tests(); + add_CF_TxFileCmd_tests(); - add_CF_CmdPlaybackDir_tests(); + add_CF_PlaybackDirCmd_tests(); add_CF_DoChanAction_tests(); add_CF_DoFreezeThaw_tests(); - add_CF_CmdFreeze_tests(); + add_CF_FreezeCmd_tests(); - add_CF_CmdThaw_tests(); + add_CF_ThawCmd_tests(); add_CF_FindTransactionBySequenceNumberAllChannels_tests(); @@ -4346,29 +4348,29 @@ void UtTest_Setup(void) add_CF_DoSuspRes_tests(); - add_CF_CmdSuspend_tests(); + add_CF_SuspendCmd_tests(); - add_CF_CmdResume_tests(); + add_CF_ResumeCmd_tests(); - add_CF_CmdCancel_Txn_tests(); + add_CF_Cancel_TxnCmd_tests(); - add_CF_CmdCancel_tests(); + add_CF_CancelCmd_tests(); - add_CF_CmdAbandon_Txn_tests(); + add_CF_Abandon_TxnCmd_tests(); - add_CF_CmdAbandon_tests(); + add_CF_AbandonCmd_tests(); add_CF_DoEnableDisableDequeue_tests(); - add_CF_CmdEnableDequeue_tests(); + add_CF_EnableDequeueCmd_tests(); - add_CF_CmdDisableDequeue_tests(); + add_CF_DisableDequeueCmd_tests(); add_CF_DoEnableDisablePolldir_tests(); - add_CF_CmdEnablePolldir_tests(); + add_CF_EnablePolldirCmd_tests(); - add_CF_CmdDisablePolldir_tests(); + add_CF_DisablePolldirCmd_tests(); add_CF_PurgeHistory_tests(); @@ -4376,23 +4378,23 @@ void UtTest_Setup(void) add_CF_DoPurgeQueue_tests(); - add_CF_CmdPurgeQueue_tests(); + add_CF_PurgeQueueCmd_tests(); - add_CF_CmdWriteQueue_tests(); + add_CF_WriteQueueCmd_tests(); - add_CF_CmdValidateChunkSize_tests(); + add_CF_ValidateChunkSizeCmd_tests(); - add_CF_CmdValidateMaxOutgoing_tests(); + add_CF_ValidateMaxOutgoingCmd_tests(); - add_CF_CmdGetSetParam_tests(); + add_CF_GetSetParamCmd_tests(); - add_CF_CmdSetParam_tests(); + add_CF_SetParamCmd_tests(); - add_CF_CmdGetParam_tests(); + add_CF_GetParamCmd_tests(); - add_CF_CmdEnableEngine_tests(); + add_CF_EnableEngineCmd_tests(); - add_CF_CmdDisableEngine_tests(); + add_CF_DisableEngineCmd_tests(); add_CF_ProcessGroundCommand_tests(); } diff --git a/unit-test/stubs/cf_app_stubs.c b/unit-test/stubs/cf_app_stubs.c index 10660328..521a087a 100644 --- a/unit-test/stubs/cf_app_stubs.c +++ b/unit-test/stubs/cf_app_stubs.c @@ -58,16 +58,16 @@ void CF_HkCmd(void) /* * ---------------------------------------------------- - * Generated stub function for CF_Init() + * Generated stub function for CF_AppInit() * ---------------------------------------------------- */ -CFE_Status_t CF_Init(void) +CFE_Status_t CF_AppInit(void) { - UT_GenStub_SetupReturnBuffer(CF_Init, CFE_Status_t); + UT_GenStub_SetupReturnBuffer(CF_AppInit, CFE_Status_t); - UT_GenStub_Execute(CF_Init, Basic, NULL); + UT_GenStub_Execute(CF_AppInit, Basic, NULL); - return UT_GenStub_GetReturnValue(CF_Init, CFE_Status_t); + return UT_GenStub_GetReturnValue(CF_AppInit, CFE_Status_t); } /* @@ -75,9 +75,9 @@ CFE_Status_t CF_Init(void) * Generated stub function for CF_ProcessMsg() * ---------------------------------------------------- */ -void CF_ProcessMsg(CFE_SB_Buffer_t *msg) +void CF_ProcessMsg(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_ProcessMsg, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_ProcessMsg, CFE_SB_Buffer_t *, BufPtr); UT_GenStub_Execute(CF_ProcessMsg, Basic, NULL); } diff --git a/unit-test/stubs/cf_cmd_handlers.c b/unit-test/stubs/cf_cmd_handlers.c index e8cacef4..819315b1 100644 --- a/unit-test/stubs/cf_cmd_handlers.c +++ b/unit-test/stubs/cf_cmd_handlers.c @@ -46,6 +46,6 @@ void UT_DefaultHandler_CF_ProcessGroundCommand(void *UserObj, UT_EntryKey_t Func if (ctxt) { - *ctxt = UT_Hook_GetArgValueByName(Context, "msg", CFE_SB_Buffer_t *); + *ctxt = UT_Hook_GetArgValueByName(Context, "BufPtr", CFE_SB_Buffer_t *); } } diff --git a/unit-test/stubs/cf_cmd_stubs.c b/unit-test/stubs/cf_cmd_stubs.c index 4fff043e..f052524f 100644 --- a/unit-test/stubs/cf_cmd_stubs.c +++ b/unit-test/stubs/cf_cmd_stubs.c @@ -30,317 +30,317 @@ void UT_DefaultHandler_CF_ProcessGroundCommand(void *, UT_EntryKey_t, const UT_S /* * ---------------------------------------------------- - * Generated stub function for CF_CmdAbandon() + * Generated stub function for CF_AbandonCmd() * ---------------------------------------------------- */ -void CF_CmdAbandon(CFE_SB_Buffer_t *msg) +void CF_AbandonCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdAbandon, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_AbandonCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdAbandon, Basic, NULL); + UT_GenStub_Execute(CF_AbandonCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdAbandon_Txn() + * Generated stub function for CF_Abandon_TxnCmd() * ---------------------------------------------------- */ -void CF_CmdAbandon_Txn(CF_Transaction_t *t, void *ignored) +void CF_Abandon_TxnCmd(CF_Transaction_t *t, void *ignored) { - UT_GenStub_AddParam(CF_CmdAbandon_Txn, CF_Transaction_t *, t); - UT_GenStub_AddParam(CF_CmdAbandon_Txn, void *, ignored); + UT_GenStub_AddParam(CF_Abandon_TxnCmd, CF_Transaction_t *, t); + UT_GenStub_AddParam(CF_Abandon_TxnCmd, void *, ignored); - UT_GenStub_Execute(CF_CmdAbandon_Txn, Basic, NULL); + UT_GenStub_Execute(CF_Abandon_TxnCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdCancel() + * Generated stub function for CF_CancelCmd() * ---------------------------------------------------- */ -void CF_CmdCancel(CFE_SB_Buffer_t *msg) +void CF_CancelCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdCancel, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_CancelCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdCancel, Basic, NULL); + UT_GenStub_Execute(CF_CancelCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdCancel_Txn() + * Generated stub function for CF_Cancel_TxnCmd() * ---------------------------------------------------- */ -void CF_CmdCancel_Txn(CF_Transaction_t *t, void *ignored) +void CF_Cancel_TxnCmd(CF_Transaction_t *t, void *ignored) { - UT_GenStub_AddParam(CF_CmdCancel_Txn, CF_Transaction_t *, t); - UT_GenStub_AddParam(CF_CmdCancel_Txn, void *, ignored); + UT_GenStub_AddParam(CF_Cancel_TxnCmd, CF_Transaction_t *, t); + UT_GenStub_AddParam(CF_Cancel_TxnCmd, void *, ignored); - UT_GenStub_Execute(CF_CmdCancel_Txn, Basic, NULL); + UT_GenStub_Execute(CF_Cancel_TxnCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdDisableDequeue() + * Generated stub function for CF_DisableDequeueCmd() * ---------------------------------------------------- */ -void CF_CmdDisableDequeue(CFE_SB_Buffer_t *msg) +void CF_DisableDequeueCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdDisableDequeue, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_DisableDequeueCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdDisableDequeue, Basic, NULL); + UT_GenStub_Execute(CF_DisableDequeueCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdDisableEngine() + * Generated stub function for CF_DisableEngineCmd() * ---------------------------------------------------- */ -void CF_CmdDisableEngine(CFE_SB_Buffer_t *msg) +void CF_DisableEngineCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdDisableEngine, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_DisableEngineCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdDisableEngine, Basic, NULL); + UT_GenStub_Execute(CF_DisableEngineCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdDisablePolldir() + * Generated stub function for CF_DisablePolldirCmd() * ---------------------------------------------------- */ -void CF_CmdDisablePolldir(CFE_SB_Buffer_t *msg) +void CF_DisablePolldirCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdDisablePolldir, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_DisablePolldirCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdDisablePolldir, Basic, NULL); + UT_GenStub_Execute(CF_DisablePolldirCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdEnableDequeue() + * Generated stub function for CF_EnableDequeueCmd() * ---------------------------------------------------- */ -void CF_CmdEnableDequeue(CFE_SB_Buffer_t *msg) +void CF_EnableDequeueCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdEnableDequeue, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_EnableDequeueCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdEnableDequeue, Basic, NULL); + UT_GenStub_Execute(CF_EnableDequeueCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdEnableEngine() + * Generated stub function for CF_EnableEngineCmd() * ---------------------------------------------------- */ -void CF_CmdEnableEngine(CFE_SB_Buffer_t *msg) +void CF_EnableEngineCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdEnableEngine, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_EnableEngineCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdEnableEngine, Basic, NULL); + UT_GenStub_Execute(CF_EnableEngineCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdEnablePolldir() + * Generated stub function for CF_EnablePolldirCmd() * ---------------------------------------------------- */ -void CF_CmdEnablePolldir(CFE_SB_Buffer_t *msg) +void CF_EnablePolldirCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdEnablePolldir, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_EnablePolldirCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdEnablePolldir, Basic, NULL); + UT_GenStub_Execute(CF_EnablePolldirCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdFreeze() + * Generated stub function for CF_FreezeCmd() * ---------------------------------------------------- */ -void CF_CmdFreeze(CFE_SB_Buffer_t *msg) +void CF_FreezeCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdFreeze, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_FreezeCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdFreeze, Basic, NULL); + UT_GenStub_Execute(CF_FreezeCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdGetParam() + * Generated stub function for CF_GetParamCmd() * ---------------------------------------------------- */ -void CF_CmdGetParam(CFE_SB_Buffer_t *msg) +void CF_GetParamCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdGetParam, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_GetParamCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdGetParam, Basic, NULL); + UT_GenStub_Execute(CF_GetParamCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdGetSetParam() + * Generated stub function for CF_GetSetParamCmd() * ---------------------------------------------------- */ -void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) +void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) { - UT_GenStub_AddParam(CF_CmdGetSetParam, uint8, is_set); - UT_GenStub_AddParam(CF_CmdGetSetParam, CF_GetSet_ValueID_t, param_id); - UT_GenStub_AddParam(CF_CmdGetSetParam, uint32, value); - UT_GenStub_AddParam(CF_CmdGetSetParam, uint8, chan_num); + UT_GenStub_AddParam(CF_GetSetParamCmd, uint8, is_set); + UT_GenStub_AddParam(CF_GetSetParamCmd, CF_GetSet_ValueID_t, param_id); + UT_GenStub_AddParam(CF_GetSetParamCmd, uint32, value); + UT_GenStub_AddParam(CF_GetSetParamCmd, uint8, chan_num); - UT_GenStub_Execute(CF_CmdGetSetParam, Basic, NULL); + UT_GenStub_Execute(CF_GetSetParamCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdNoop() + * Generated stub function for CF_NoopCmd() * ---------------------------------------------------- */ -void CF_CmdNoop(CFE_SB_Buffer_t *msg) +void CF_NoopCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdNoop, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_NoopCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdNoop, Basic, NULL); + UT_GenStub_Execute(CF_NoopCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdPlaybackDir() + * Generated stub function for CF_PlaybackDirCmd() * ---------------------------------------------------- */ -void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg) +void CF_PlaybackDirCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdPlaybackDir, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_PlaybackDirCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdPlaybackDir, Basic, NULL); + UT_GenStub_Execute(CF_PlaybackDirCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdPurgeQueue() + * Generated stub function for CF_PurgeQueueCmd() * ---------------------------------------------------- */ -void CF_CmdPurgeQueue(CFE_SB_Buffer_t *msg) +void CF_PurgeQueueCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdPurgeQueue, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_PurgeQueueCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdPurgeQueue, Basic, NULL); + UT_GenStub_Execute(CF_PurgeQueueCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdReset() + * Generated stub function for CF_ResetCountersCmd() * ---------------------------------------------------- */ -void CF_CmdReset(CFE_SB_Buffer_t *msg) +void CF_ResetCountersCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdReset, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_ResetCountersCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdReset, Basic, NULL); + UT_GenStub_Execute(CF_ResetCountersCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdResume() + * Generated stub function for CF_ResumeCmd() * ---------------------------------------------------- */ -void CF_CmdResume(CFE_SB_Buffer_t *msg) +void CF_ResumeCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdResume, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_ResumeCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdResume, Basic, NULL); + UT_GenStub_Execute(CF_ResumeCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdSetParam() + * Generated stub function for CF_SetParamCmd() * ---------------------------------------------------- */ -void CF_CmdSetParam(CFE_SB_Buffer_t *msg) +void CF_SetParamCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdSetParam, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_SetParamCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdSetParam, Basic, NULL); + UT_GenStub_Execute(CF_SetParamCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdSuspend() + * Generated stub function for CF_SuspendCmd() * ---------------------------------------------------- */ -void CF_CmdSuspend(CFE_SB_Buffer_t *msg) +void CF_SuspendCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdSuspend, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_SuspendCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdSuspend, Basic, NULL); + UT_GenStub_Execute(CF_SuspendCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdThaw() + * Generated stub function for CF_ThawCmd() * ---------------------------------------------------- */ -void CF_CmdThaw(CFE_SB_Buffer_t *msg) +void CF_ThawCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdThaw, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_ThawCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdThaw, Basic, NULL); + UT_GenStub_Execute(CF_ThawCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdTxFile() + * Generated stub function for CF_TxFileCmd() * ---------------------------------------------------- */ -void CF_CmdTxFile(CFE_SB_Buffer_t *msg) +void CF_TxFileCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdTxFile, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_TxFileCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdTxFile, Basic, NULL); + UT_GenStub_Execute(CF_TxFileCmd, Basic, NULL); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdValidateChunkSize() + * Generated stub function for CF_ValidateChunkSizeCmd() * ---------------------------------------------------- */ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num) +CFE_Status_t CF_ValidateChunkSizeCmd(uint32 val, uint8 chan_num) { - UT_GenStub_SetupReturnBuffer(CF_CmdValidateChunkSize, CFE_Status_t); + UT_GenStub_SetupReturnBuffer(CF_ValidateChunkSizeCmd, CFE_Status_t); - UT_GenStub_AddParam(CF_CmdValidateChunkSize, uint32, val); - UT_GenStub_AddParam(CF_CmdValidateChunkSize, uint8, chan_num); + UT_GenStub_AddParam(CF_ValidateChunkSizeCmd, uint32, val); + UT_GenStub_AddParam(CF_ValidateChunkSizeCmd, uint8, chan_num); - UT_GenStub_Execute(CF_CmdValidateChunkSize, Basic, NULL); + UT_GenStub_Execute(CF_ValidateChunkSizeCmd, Basic, NULL); - return UT_GenStub_GetReturnValue(CF_CmdValidateChunkSize, CFE_Status_t); + return UT_GenStub_GetReturnValue(CF_ValidateChunkSizeCmd, CFE_Status_t); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdValidateMaxOutgoing() + * Generated stub function for CF_ValidateMaxOutgoingCmd() * ---------------------------------------------------- */ -CFE_Status_t CF_CmdValidateMaxOutgoing(uint32 val, uint8 chan_num) +CFE_Status_t CF_ValidateMaxOutgoingCmd(uint32 val, uint8 chan_num) { - UT_GenStub_SetupReturnBuffer(CF_CmdValidateMaxOutgoing, CFE_Status_t); + UT_GenStub_SetupReturnBuffer(CF_ValidateMaxOutgoingCmd, CFE_Status_t); - UT_GenStub_AddParam(CF_CmdValidateMaxOutgoing, uint32, val); - UT_GenStub_AddParam(CF_CmdValidateMaxOutgoing, uint8, chan_num); + UT_GenStub_AddParam(CF_ValidateMaxOutgoingCmd, uint32, val); + UT_GenStub_AddParam(CF_ValidateMaxOutgoingCmd, uint8, chan_num); - UT_GenStub_Execute(CF_CmdValidateMaxOutgoing, Basic, NULL); + UT_GenStub_Execute(CF_ValidateMaxOutgoingCmd, Basic, NULL); - return UT_GenStub_GetReturnValue(CF_CmdValidateMaxOutgoing, CFE_Status_t); + return UT_GenStub_GetReturnValue(CF_ValidateMaxOutgoingCmd, CFE_Status_t); } /* * ---------------------------------------------------- - * Generated stub function for CF_CmdWriteQueue() + * Generated stub function for CF_WriteQueueCmd() * ---------------------------------------------------- */ -void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) +void CF_WriteQueueCmd(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_CmdWriteQueue, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_WriteQueueCmd, CFE_SB_Buffer_t *, BufPtr); - UT_GenStub_Execute(CF_CmdWriteQueue, Basic, NULL); + UT_GenStub_Execute(CF_WriteQueueCmd, Basic, NULL); } /* @@ -478,9 +478,9 @@ CF_Transaction_t *CF_FindTransactionBySequenceNumberAllChannels(CF_TransactionSe * Generated stub function for CF_ProcessGroundCommand() * ---------------------------------------------------- */ -void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) +void CF_ProcessGroundCommand(CFE_SB_Buffer_t *BufPtr) { - UT_GenStub_AddParam(CF_ProcessGroundCommand, CFE_SB_Buffer_t *, msg); + UT_GenStub_AddParam(CF_ProcessGroundCommand, CFE_SB_Buffer_t *, BufPtr); UT_GenStub_Execute(CF_ProcessGroundCommand, Basic, UT_DefaultHandler_CF_ProcessGroundCommand); }