Skip to content

Commit

Permalink
Merge pull request nasa#2531 from jphickey:fix-2530-sendhk-naming
Browse files Browse the repository at this point in the history
Fix nasa#2530, naming convention for SendHkCmd
  • Loading branch information
dzbaker committed Mar 21, 2024
2 parents d1c9d7d + 6087d45 commit 239b224
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void CFE_ES_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
** Housekeeping telemetry request
*/
case CFE_ES_SEND_HK_MID:
CFE_ES_HousekeepingCmd((const CFE_ES_SendHkCmd_t *)SBBufPtr);
CFE_ES_SendHkCmd((const CFE_ES_SendHkCmd_t *)SBBufPtr);
break;

/*
Expand Down
10 changes: 5 additions & 5 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ int32 CFE_ES_TaskInit(void)
/*
** Task startup event message.
*/
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE",
CFE_SRC_VERSION, CFE_BUILD_CODENAME, CFE_LAST_OFFICIAL);
Status = CFE_EVS_SendEvent(CFE_ES_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "cFE ES Initialized: %s",
VersionString);
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE", CFE_SRC_VERSION, CFE_BUILD_CODENAME,
CFE_LAST_OFFICIAL);
Status =
CFE_EVS_SendEvent(CFE_ES_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "cFE ES Initialized: %s", VersionString);
if (Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("%s: Error sending init event:RC=0x%08X\n", __func__, (unsigned int)Status);
Expand Down Expand Up @@ -443,7 +443,7 @@ int32 CFE_ES_TaskInit(void)
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
int32 CFE_ES_HousekeepingCmd(const CFE_ES_SendHkCmd_t *data)
int32 CFE_ES_SendHkCmd(const CFE_ES_SendHkCmd_t *data)
{
OS_heap_prop_t HeapProp;
int32 OsStatus;
Expand Down
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void CFE_ES_BackgroundCleanup(void);
/*
** ES Task message dispatch functions
*/
int32 CFE_ES_HousekeepingCmd(const CFE_ES_SendHkCmd_t *data);
int32 CFE_ES_SendHkCmd(const CFE_ES_SendHkCmd_t *data);

/*---------------------------------------------------------------------------------------*/
/**
Expand Down
2 changes: 1 addition & 1 deletion modules/evs/fsw/src/cfe_evs_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void CFE_EVS_ProcessCommandPacket(const CFE_SB_Buffer_t *SBBufPtr)

case CFE_EVS_SEND_HK_MID:
/* Housekeeping request */
CFE_EVS_ReportHousekeepingCmd((const CFE_EVS_SendHkCmd_t *)SBBufPtr);
CFE_EVS_SendHkCmd((const CFE_EVS_SendHkCmd_t *)SBBufPtr);
break;

default:
Expand Down
10 changes: 5 additions & 5 deletions modules/evs/fsw/src/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ int32 CFE_EVS_TaskInit(void)

/* Write the AppID to the global location, now that the rest of initialization is done */
CFE_EVS_Global.EVS_AppID = AppID;
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE",
CFE_SRC_VERSION, CFE_BUILD_CODENAME, CFE_LAST_OFFICIAL);
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE", CFE_SRC_VERSION, CFE_BUILD_CODENAME,
CFE_LAST_OFFICIAL);
EVS_SendEvent(CFE_EVS_STARTUP_EID, CFE_EVS_EventType_INFORMATION, "cFE EVS Initialized: %s", VersionString);

return CFE_SUCCESS;
Expand All @@ -314,8 +314,8 @@ int32 CFE_EVS_TaskInit(void)
int32 CFE_EVS_NoopCmd(const CFE_EVS_NoopCmd_t *data)
{
char VersionString[CFE_CFG_MAX_VERSION_STR_LEN];
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE",
CFE_SRC_VERSION, CFE_BUILD_CODENAME, CFE_LAST_OFFICIAL);
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE", CFE_SRC_VERSION, CFE_BUILD_CODENAME,
CFE_LAST_OFFICIAL);
EVS_SendEvent(CFE_EVS_NOOP_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", VersionString);
return CFE_SUCCESS;
}
Expand All @@ -338,7 +338,7 @@ int32 CFE_EVS_ClearLogCmd(const CFE_EVS_ClearLogCmd_t *data)
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
int32 CFE_EVS_ReportHousekeepingCmd(const CFE_EVS_SendHkCmd_t *data)
int32 CFE_EVS_SendHkCmd(const CFE_EVS_SendHkCmd_t *data)
{
uint32 i, j;
EVS_AppData_t * AppDataPtr;
Expand Down
2 changes: 1 addition & 1 deletion modules/evs/fsw/src/cfe_evs_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int32 CFE_EVS_TaskInit(void);
*
* Request for housekeeping status telemetry packet.
*/
int32 CFE_EVS_ReportHousekeepingCmd(const CFE_EVS_SendHkCmd_t *data);
int32 CFE_EVS_SendHkCmd(const CFE_EVS_SendHkCmd_t *data);

/*---------------------------------------------------------------------------------------*/
/**
Expand Down
2 changes: 1 addition & 1 deletion modules/evs/ut-coverage/evs_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,5 +2139,5 @@ void Test_Misc(void)
/* Doesn't matter here that AppID is all the same... */
EVS_AppDataSetUsed(&CFE_EVS_Global.AppData[i], AppID);
}
UtAssert_UINT32_EQ(CFE_EVS_ReportHousekeepingCmd(NULL), CFE_STATUS_NO_COUNTER_INCREMENT);
UtAssert_UINT32_EQ(CFE_EVS_SendHkCmd(NULL), CFE_STATUS_NO_COUNTER_INCREMENT);
}
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef struct

const CFE_TBL_CmdHandlerTblRec_t CFE_TBL_CmdHandlerTbl[] = {
/* SEND_HK Entry */
CFE_TBL_ENTRY(CFE_TBL_SEND_HK_MID, 0, CFE_TBL_SendHkCmd_t, CFE_TBL_HousekeepingCmd, CFE_TBL_MSG_MSGTYPE),
CFE_TBL_ENTRY(CFE_TBL_SEND_HK_MID, 0, CFE_TBL_SendHkCmd_t, CFE_TBL_SendHkCmd, CFE_TBL_MSG_MSGTYPE),

/* Everything else */
CFE_TBL_ENTRY(CFE_TBL_CMD_MID, CFE_TBL_NOOP_CC, CFE_TBL_NoopCmd_t, CFE_TBL_NoopCmd, CFE_TBL_CMD_MSGTYPE),
Expand Down
6 changes: 3 additions & 3 deletions modules/tbl/fsw/src/cfe_tbl_task_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
int32 CFE_TBL_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data)
int32 CFE_TBL_SendHkCmd(const CFE_TBL_SendHkCmd_t *data)
{
int32 Status;
int32 OsStatus;
Expand Down Expand Up @@ -314,8 +314,8 @@ int32 CFE_TBL_NoopCmd(const CFE_TBL_NoopCmd_t *data)
char VersionString[CFE_CFG_MAX_VERSION_STR_LEN];

/* Acknowledge receipt of NOOP with Event Message */
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE",
CFE_SRC_VERSION, CFE_BUILD_CODENAME, CFE_LAST_OFFICIAL);
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE", CFE_SRC_VERSION, CFE_BUILD_CODENAME,
CFE_LAST_OFFICIAL);
CFE_EVS_SendEvent(CFE_TBL_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", VersionString);

return CFE_TBL_INC_CMD_CTR;
Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_task_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void CFE_TBL_GetTblRegData(void);
**
** \retval #CFE_TBL_DONT_INC_CTR \copydoc CFE_TBL_DONT_INC_CTR
*/
int32 CFE_TBL_HousekeepingCmd(const CFE_MSG_CommandHeader_t *data);
int32 CFE_TBL_SendHkCmd(const CFE_TBL_SendHkCmd_t *data);

/*---------------------------------------------------------------------------------------*/
/**
Expand Down
14 changes: 7 additions & 7 deletions modules/tbl/ut-coverage/tbl_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void UtTest_Setup(void)
UT_ADD_TEST(Test_CFE_TBL_DumpRegCmd);
UT_ADD_TEST(Test_CFE_TBL_DumpCmd);
UT_ADD_TEST(Test_CFE_TBL_LoadCmd);
UT_ADD_TEST(Test_CFE_TBL_HousekeepingCmd);
UT_ADD_TEST(Test_CFE_TBL_SendHkCmd);

/* cfe_tbl_api.c and cfe_tbl_internal.c functions */
UT_ADD_TEST(Test_CFE_TBL_ApiInit);
Expand Down Expand Up @@ -1319,7 +1319,7 @@ void Test_CFE_TBL_LoadCmd(void)
/*
** Test the function that processes housekeeping request message
*/
void Test_CFE_TBL_HousekeepingCmd(void)
void Test_CFE_TBL_SendHkCmd(void)
{
int i;
CFE_TBL_LoadBuff_t DumpBuff;
Expand Down Expand Up @@ -1361,7 +1361,7 @@ void Test_CFE_TBL_HousekeepingCmd(void)

UT_SetDeferredRetcode(UT_KEY(CFE_SB_TransmitMsg), 1, CFE_SUCCESS - 1);
CFE_TBL_Global.HkTlmTblRegIndex = CFE_TBL_NOT_FOUND + 1;
UtAssert_INT32_EQ(CFE_TBL_HousekeepingCmd(NULL), CFE_TBL_DONT_INC_CTR);
UtAssert_INT32_EQ(CFE_TBL_SendHkCmd(NULL), CFE_TBL_DONT_INC_CTR);

for (i = 1; i < CFE_PLATFORM_TBL_MAX_SIMULTANEOUS_LOADS; i++)
{
Expand All @@ -1376,26 +1376,26 @@ void Test_CFE_TBL_HousekeepingCmd(void)
CFE_TBL_Global.DumpControlBlocks[0].State = CFE_TBL_DUMP_PERFORMED;
CFE_TBL_Global.HkTlmTblRegIndex = CFE_TBL_NOT_FOUND + 1;
UT_SetDefaultReturnValue(UT_KEY(OS_OpenCreate), OS_ERROR);
UtAssert_INT32_EQ(CFE_TBL_HousekeepingCmd(NULL), CFE_TBL_DONT_INC_CTR);
UtAssert_INT32_EQ(CFE_TBL_SendHkCmd(NULL), CFE_TBL_DONT_INC_CTR);

/* Test response to an invalid table and a dump file create failure */
UT_InitData();
CFE_TBL_Global.HkTlmTblRegIndex = CFE_TBL_NOT_FOUND;
CFE_TBL_Global.DumpControlBlocks[0].State = CFE_TBL_DUMP_PERFORMED;
UT_SetDefaultReturnValue(UT_KEY(OS_OpenCreate), OS_ERROR);
UtAssert_INT32_EQ(CFE_TBL_HousekeepingCmd(NULL), CFE_TBL_DONT_INC_CTR);
UtAssert_INT32_EQ(CFE_TBL_SendHkCmd(NULL), CFE_TBL_DONT_INC_CTR);

/* Test response to a file time stamp failure */
UT_InitData();
CFE_TBL_Global.DumpControlBlocks[0].State = CFE_TBL_DUMP_PERFORMED;
UT_SetDeferredRetcode(UT_KEY(CFE_FS_SetTimestamp), 1, OS_SUCCESS - 1);
UtAssert_INT32_EQ(CFE_TBL_HousekeepingCmd(NULL), CFE_TBL_DONT_INC_CTR);
UtAssert_INT32_EQ(CFE_TBL_SendHkCmd(NULL), CFE_TBL_DONT_INC_CTR);

/* Test response to OS_OpenCreate failure */
UT_InitData();
CFE_TBL_Global.DumpControlBlocks[0].State = CFE_TBL_DUMP_PERFORMED;
UT_SetDeferredRetcode(UT_KEY(OS_OpenCreate), 3, -1);
UtAssert_INT32_EQ(CFE_TBL_HousekeepingCmd(NULL), CFE_TBL_DONT_INC_CTR);
UtAssert_INT32_EQ(CFE_TBL_SendHkCmd(NULL), CFE_TBL_DONT_INC_CTR);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/ut-coverage/tbl_UT.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void Test_CFE_TBL_LoadCmd(void);
** \returns
** This function does not return a value.
******************************************************************************/
void Test_CFE_TBL_HousekeepingCmd(void);
void Test_CFE_TBL_SendHkCmd(void);

/*****************************************************************************/
/**
Expand Down

0 comments on commit 239b224

Please sign in to comment.