From 7aa196af3db2da449cf7e953378b5fb8298c840a Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Mon, 5 Jun 2023 16:07:46 +1000 Subject: [PATCH] Fix #387, Update minor out-of-family naming/consistency issues in CF --- docs/dox_src/cfs_cf.dox | 2 +- fsw/inc/cf_events.h | 11 + fsw/inc/cf_msg.h | 24 +- fsw/src/cf_app.c | 73 ++- fsw/src/cf_app.h | 12 +- fsw/src/cf_cfdp.c | 4 +- fsw/src/cf_cmd.c | 148 +++--- fsw/src/cf_cmd.h | 138 +++--- unit-test/cf_app_tests.c | 112 ++--- unit-test/cf_cmd_tests.c | 778 +++++++++++++++--------------- unit-test/stubs/cf_app_stubs.c | 14 +- unit-test/stubs/cf_cmd_handlers.c | 2 +- unit-test/stubs/cf_cmd_stubs.c | 226 ++++----- 13 files changed, 758 insertions(+), 786 deletions(-) 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 4c5ab8e7..6decef53 100644 --- a/fsw/inc/cf_msg.h +++ b/fsw/inc/cf_msg.h @@ -113,7 +113,7 @@ typedef struct CF_HkChannel_Data */ typedef struct CF_HkPacket { - CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ + CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */ uint8 CommandCounter; /**< \brief Command success counter */ uint8 CommandErrorCounter; /**< \brief Command error counter */ uint8 spare[6]; /**< \brief Alignment spare */ @@ -126,17 +126,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 70bc0262..b6030b30 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.HkPacket.tlm_header.Msg, CFE_TIME_GetTime()); - /* return value ignored */ CFE_SB_TransmitMsg(&CF_AppData.HkPacket.tlm_header.Msg, true); + CFE_SB_TimeStampMsg(CFE_MSG_PTR(CF_AppData.HkPacket.TelemetryHeader)); + /* return value ignored */ CFE_SB_TransmitMsg(CFE_MSG_PTR(CF_AppData.HkPacket.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,19 @@ 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.HkPacket.tlm_header.Msg, CFE_SB_ValueToMsgId(CF_HK_TLM_MID), sizeof(CF_AppData.HkPacket)); + CF_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; + + CFE_MSG_Init(&CF_AppData.HkPacket.TelemetryHeader.Msg, CFE_SB_ValueToMsgId(CF_HK_TLM_MID), + sizeof(CF_AppData.HkPacket)); status = CFE_EVS_Register(NULL, 0, CFE_EVS_EventFilter_BINARY); if (status != CFE_SUCCESS) @@ -214,11 +218,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 +230,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 +252,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 +278,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 +302,7 @@ void CF_ProcessMsg(CFE_SB_Buffer_t *msg) default: ++CF_AppData.HkPacket.CommandErrorCounter; 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 +316,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 +350,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 ee32f553..1fd9f16e 100644 --- a/fsw/src/cf_app.h +++ b/fsw/src/cf_app.h @@ -79,9 +79,9 @@ typedef struct { CF_HkPacket_t HkPacket; - 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 2d87ec2f..e5ca08c6 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 da09e0d1..80d641a6 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->byte[0]; @@ -126,9 +126,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. @@ -139,7 +139,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.HkPacket.CommandErrorCounter; return; @@ -169,9 +169,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. @@ -182,7 +182,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.HkPacket.CommandErrorCounter; return; @@ -261,11 +261,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.HkPacket.CommandCounter; @@ -283,11 +283,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.HkPacket.CommandCounter; @@ -440,9 +440,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); } /*---------------------------------------------------------------- @@ -451,9 +451,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); } /*---------------------------------------------------------------- @@ -462,7 +462,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); } @@ -473,9 +473,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"); @@ -495,7 +495,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); } @@ -506,9 +506,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.HkPacket.CommandCounter; @@ -541,11 +541,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"); @@ -564,11 +564,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"); @@ -619,11 +619,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, @@ -644,11 +644,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, @@ -745,9 +745,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"); @@ -766,9 +766,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; @@ -899,7 +899,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)) @@ -915,7 +915,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; @@ -934,7 +934,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; @@ -975,7 +975,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; @@ -992,7 +992,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; @@ -1089,10 +1089,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); } /*---------------------------------------------------------------- @@ -1101,10 +1101,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); } /*---------------------------------------------------------------- @@ -1113,7 +1113,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) { @@ -1143,7 +1143,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) { @@ -1165,33 +1165,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] = { @@ -1224,11 +1224,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]) @@ -1236,7 +1236,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 41509757..88e5047b 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.HkPacket.CommandErrorCounter, 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 f3d2e81f..8bdb80b6 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.HkPacket.CommandCounter = 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.HkPacket.CommandErrorCounter = 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.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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.HkPacket.CommandErrorCounter = 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.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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; @@ -258,7 +258,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSe CF_AppData.HkPacket.CommandErrorCounter = Any_uint16_Except(0); /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -267,7 +267,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_command_AndResetHkCmdAndErrCountSe UtAssert_ZERO(CF_AppData.HkPacket.CommandErrorCounter); } -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; @@ -299,7 +299,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEven CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -327,7 +327,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_fault_ResetAllHkFaultCountSendEven UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -353,7 +353,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEvent CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -375,7 +375,7 @@ void Test_CF_CmdReset_tests_WhenCommandByteIs_up_AndResetAllHkRecvCountSendEvent UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -398,7 +398,7 @@ void Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEve CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdReset(arg_msg); + CF_ResetCountersCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -417,7 +417,7 @@ void Test_CF_CmdReset_tests_SWhenCommandByteIs_down_AndResetAllHkSentCountendEve UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -466,7 +466,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); @@ -496,14 +496,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; @@ -514,7 +514,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.HkPacket.CommandCounter, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); @@ -522,7 +522,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.HkPacket.CommandCounter, 2); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UT_CF_AssertEventID(CF_EID_INF_CMD_TX_FILE); @@ -531,14 +531,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.HkPacket.CommandErrorCounter, 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.HkPacket.CommandErrorCounter, 2); @@ -546,7 +546,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.HkPacket.CommandErrorCounter, 3); @@ -554,7 +554,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.HkPacket.CommandErrorCounter, 4); @@ -562,21 +562,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.HkPacket.CommandErrorCounter, 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; @@ -587,25 +587,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.HkPacket.CommandCounter, 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.HkPacket.CommandCounter, 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.HkPacket.CommandErrorCounter, 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.HkPacket.CommandErrorCounter, 2); @@ -613,7 +613,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.HkPacket.CommandErrorCounter, 3); @@ -621,7 +621,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.HkPacket.CommandErrorCounter, 4); @@ -629,7 +629,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.HkPacket.CommandErrorCounter, 5); } @@ -896,11 +896,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; @@ -919,7 +919,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndAcceptCommand(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdFreeze(arg_msg); + CF_FreezeCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -933,7 +933,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; @@ -949,7 +949,7 @@ void Test_CF_CmdFreeze_Set_frozen_To_1_AndRejectCommand(void) CF_AppData.HkPacket.CommandCounter = 0; /* Act */ - CF_CmdFreeze(arg_msg); + CF_FreezeCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -959,11 +959,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; @@ -982,7 +982,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndAcceptCommand(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdThaw(arg_msg); + CF_ThawCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -996,7 +996,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; @@ -1012,7 +1012,7 @@ void Test_CF_CmdThaw_Set_frozen_To_0_AndRejectCommand(void) CF_AppData.HkPacket.CommandCounter = 0; /* Act */ - CF_CmdThaw(arg_msg); + CF_ThawCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -1384,12 +1384,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; @@ -1400,7 +1400,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); @@ -1413,12 +1413,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; @@ -1429,7 +1429,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); @@ -1442,11 +1442,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; @@ -1458,7 +1458,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); @@ -1466,11 +1466,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; @@ -1481,7 +1481,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); @@ -1490,7 +1490,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; @@ -1501,7 +1501,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); @@ -1511,11 +1511,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; @@ -1527,7 +1527,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); @@ -1538,11 +1538,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; @@ -1553,7 +1553,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); @@ -1562,7 +1562,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; @@ -1573,7 +1573,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); @@ -1611,11 +1611,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; @@ -1638,12 +1638,12 @@ void Test_CF_CmdEnableDequeue_Success(void) CF_AppData.HkPacket.CommandCounter = 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( @@ -1655,7 +1655,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; @@ -1676,7 +1676,7 @@ void Test_CF_CmdEnableDequeue_Failure(void) CF_AppData.HkPacket.CommandErrorCounter = 0; /* Act */ - CF_CmdEnableDequeue(arg_msg); + CF_EnableDequeueCmd(arg_msg); /* Assert */ /* Assert for incremented counter */ @@ -1686,11 +1686,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; @@ -1713,12 +1713,12 @@ void Test_CF_CmdDisableDequeue_Success(void) CF_AppData.HkPacket.CommandCounter = 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.HkPacket.CommandCounter == (uint16)(initial_hk_cmd_counter + 1), @@ -1728,7 +1728,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; @@ -1749,7 +1749,7 @@ void Test_CF_CmdDisableDequeue_Failure(void) CF_AppData.HkPacket.CommandErrorCounter = 0; /* Act */ - CF_CmdDisableDequeue(arg_msg); + CF_DisableDequeueCmd(arg_msg); /* Assert */ /* Assert for CF_DoFreezeThaw */ @@ -1899,11 +1899,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; @@ -1928,7 +1928,7 @@ void Test_CF_CmdEnablePolldir_SuccessWhenActionSuccess(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdEnablePolldir(arg_msg); + CF_EnablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -1942,7 +1942,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(); @@ -1963,7 +1963,7 @@ void Test_CF_CmdEnablePolldir_FailWhenActionFail(void) CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdEnablePolldir(arg_msg); + CF_EnablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -1976,11 +1976,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; @@ -2005,7 +2005,7 @@ void Test_CF_CmdDisablePolldir_SuccessWhenActionSuccess(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdDisablePolldir(arg_msg); + CF_DisablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2019,7 +2019,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(); @@ -2040,7 +2040,7 @@ void Test_CF_CmdDisablePolldir_FailWhenActionFail(void) CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdDisablePolldir(arg_msg); + CF_DisablePolldirCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2287,11 +2287,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(); @@ -2312,7 +2312,7 @@ void Test_CF_CmdPurgeQueue_FailWhenActionFail(void) CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdPurgeQueue(arg_msg); + CF_PurgeQueueCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2323,7 +2323,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(); @@ -2339,7 +2339,7 @@ void Test_CF_CmdPurgeQueue_SuccessWhenActionSuccess(void) CF_AppData.HkPacket.CommandCounter = 0; /* Act */ - CF_CmdPurgeQueue(arg_msg); + CF_PurgeQueueCmd(arg_msg); /* Assert */ /* Assert for CF_DoEnableDisablePolldir */ @@ -2351,11 +2351,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; @@ -2371,7 +2371,7 @@ void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectComman CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2380,7 +2380,7 @@ void Test_CF_CmdWriteQueue_When_chan_Eq_CF_NUM_CAHNNELS_SendEventAndRejectComman UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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; @@ -2396,7 +2396,7 @@ void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRej CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2406,7 +2406,7 @@ void Test_CF_CmdWriteQueue_When_chan_GreaterThan_CF_NUM_CAHNNELS_SendEventAndRej UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) +void Test_CF_WriteQueueCmd_WhenUpAndPendingQueueSendEventAndRejectCommand(void) { /* Arrange */ CF_UT_cmd_write_q_buf_t utbuf; @@ -2426,7 +2426,7 @@ void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); @@ -2436,7 +2436,7 @@ void Test_CF_CmdWriteQueue_WhenUpAndPendingQueueSendEventAndRejectCommand(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2466,7 +2466,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_ CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); @@ -2478,7 +2478,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_Is_type_up_And_queue_ UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2508,7 +2508,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_que CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WrappedOpenCreate, 1); @@ -2520,7 +2520,7 @@ void Test_CF_CmdWriteQueue_When_CF_WrappedCreat_Fails_type_IsNot_type_up_And_que UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2557,7 +2557,7 @@ void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedC CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2568,7 +2568,7 @@ void Test_CF_CmdWriteQueue_When_wq_IsAllAnd_queue_IsAll_fd_Is_0_Call_CF_WrappedC UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2608,7 +2608,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_q CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2619,7 +2619,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteTxnQueueDataToFile_FailsAnd_wq_IsUpAnd_q UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2659,7 +2659,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpA CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2670,7 +2670,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsUpA UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2710,7 +2710,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2721,7 +2721,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnFirstCallAnd_wq UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2763,7 +2763,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_w CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); @@ -2774,7 +2774,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryDataToFile_FailsOnSecondCallAnd_w UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2814,7 +2814,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -2825,7 +2825,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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 */ @@ -2865,7 +2865,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2876,7 +2876,7 @@ void Test_CF_CmdWriteQueue_When_CF_WriteHistoryQueueDataToFile_FailsAnd_wq_IsDow UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -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; @@ -2913,7 +2913,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 4); @@ -2925,7 +2925,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -2958,7 +2958,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -2970,7 +2970,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3003,7 +3003,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); @@ -3015,7 +3015,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3048,7 +3048,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3060,7 +3060,7 @@ void Test_CF_CmdWriteQueue_Success_type_AllAnd_q_Pend(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3097,7 +3097,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3109,7 +3109,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3142,7 +3142,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -3154,7 +3154,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3187,7 +3187,7 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3199,9 +3199,9 @@ void Test_CF_CmdWriteQueue_Success_type_UpAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -/* 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; @@ -3234,7 +3234,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 3); @@ -3246,7 +3246,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_All(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3279,7 +3279,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 0); @@ -3291,7 +3291,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_History(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3324,7 +3324,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 2); @@ -3336,7 +3336,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Active(void) UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -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; @@ -3369,7 +3369,7 @@ void Test_CF_CmdWriteQueue_Success_type_DownAnd_q_Pend(void) CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdWriteQueue(arg_msg); + CF_WriteQueueCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_WriteTxnQueueDataToFile, 1); @@ -3383,11 +3383,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 */ @@ -3395,14 +3395,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 */ @@ -3410,14 +3410,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 */ @@ -3425,14 +3425,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 */ @@ -3440,20 +3440,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); @@ -3461,14 +3461,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; @@ -3480,14 +3480,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; @@ -3499,23 +3499,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 */ @@ -3533,7 +3533,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.HkPacket.CommandCounter, ++expected_count); } @@ -3554,26 +3554,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.HkPacket.CommandCounter, ++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.HkPacket.CommandErrorCounter, 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.HkPacket.CommandErrorCounter, 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.HkPacket.CommandErrorCounter, 3); @@ -3581,11 +3581,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; @@ -3601,7 +3601,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); @@ -3613,11 +3613,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; @@ -3632,7 +3632,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 */ @@ -3644,11 +3644,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; @@ -3662,7 +3662,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3674,7 +3674,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter(void) +void Test_CF_EnableEngineCmd_WithEngineNotEnableFailsInitSendEventAndIncrementErrCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3688,7 +3688,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3700,7 +3700,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, (initial_hk_err_counter + 1) & 0xFF); } -void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounter(void) +void Test_CF_EnableEngineCmd_WithEngineEnableFailsSendEventAndIncrementErrCounter(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3711,7 +3711,7 @@ void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounte CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdEnableEngine(arg_msg); + CF_EnableEngineCmd(arg_msg); UT_GetStubCount(UT_KEY(CF_CFDP_InitEngine)); @@ -3725,11 +3725,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; @@ -3740,7 +3740,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi CF_AppData.HkPacket.CommandCounter = initial_hk_cmd_counter; /* Act */ - CF_CmdDisableEngine(arg_msg); + CF_DisableEngineCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 1); @@ -3751,7 +3751,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandCounter, (initial_hk_cmd_counter + 1) & 0xFF); } -void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(void) +void Test_CF_DisableEngineCmd_WhenEngineDisabledAndIncrementErrCounterThenFail(void) { /* Arrange */ CFE_SB_Buffer_t *arg_msg = NULL; @@ -3762,7 +3762,7 @@ void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(v CF_AppData.HkPacket.CommandErrorCounter = initial_hk_err_counter; /* Act */ - CF_CmdDisableEngine(arg_msg); + CF_DisableEngineCmd(arg_msg); /* Assert */ UtAssert_STUB_COUNT(CF_CFDP_DisableEngine, 0); @@ -3858,7 +3858,7 @@ void Test_CF_ProcessGroundCommand_Receives_cmd_AndLengthDoesNotMatchExpectedForT UtAssert_UINT32_EQ(CF_AppData.HkPacket.CommandErrorCounter, 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; @@ -3879,7 +3879,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 */ @@ -3919,43 +3919,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) @@ -3983,20 +3985,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) @@ -4038,40 +4040,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) @@ -4080,20 +4082,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) @@ -4112,20 +4114,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) @@ -4153,154 +4155,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) @@ -4314,8 +4316,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"); @@ -4331,21 +4333,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(); @@ -4355,29 +4357,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(); @@ -4385,23 +4387,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(); } \ No newline at end of file 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); }