Skip to content

Commit a42147c

Browse files
authored
Merge pull request #27 from thnkslprpt/fix-26-apply-consistent-event-id-names
Fix #26, Apply consistent Event ID names to common events
2 parents 05cb142 + 1f7715a commit a42147c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

docs/dox_src/cfs_hk.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190

191191
If the packet length field in the
192192
command is set to the value expected by the HK app, then the command counter will
193-
increment and a #HK_NOOP_CMD_EID event message
193+
increment and a #HK_NOOP_INF_EID event message
194194
will be sent. This no-op event will show the version number of the HK application.
195195

196196
<H2>4. Sending the reset counters command</H2>

fsw/inc/hk_events.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* This event message is issued when the Housekeeping App completes its
4040
* initialization.
4141
*/
42-
#define HK_INIT_EID 1
42+
#define HK_INIT_INF_EID 1
4343

4444
/**
4545
* \brief HK Command Code Invalid Event ID
@@ -76,7 +76,7 @@
7676
* \link #HK_NOOP_CC No-op command. \endlink The command is used primarily as an
7777
* indicator that the HK application can receive commands and generate telemetry.
7878
*/
79-
#define HK_NOOP_CMD_EID 4
79+
#define HK_NOOP_INF_EID 4
8080

8181
/**
8282
* \brief HK Reset Counters Command Event ID
@@ -88,7 +88,7 @@
8888
* This event message is issued when the HK application receives a Reset
8989
* Counters command.
9090
*/
91-
#define HK_RESET_CNTRS_CMD_EID 5
91+
#define HK_RESET_INF_EID 5
9292

9393
/**
9494
* \brief HK Table Definition Exceeds Packet Length Event ID

fsw/inc/hk_msgdefs.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* Successful execution of this command may be verified with the
4646
* following telemetry:
4747
* - #HK_HkTlm_Payload_t.CmdCounter will increment
48-
* - The #HK_NOOP_CMD_EID informational event message will be generated
48+
* - The #HK_NOOP_INF_EID informational event message will be generated
4949
*
5050
* \par Error Conditions
5151
* There are no error conditions for this command. If the Housekeeping
@@ -71,7 +71,7 @@
7171
* Successful execution of this command may be verified with the
7272
* following telemetry:
7373
* - #HK_HkTlm_Payload_t.CmdCounter will be reset
74-
* - The #HK_RESET_CNTRS_CMD_EID informational event message will
74+
* - The #HK_RESET_INF_EID informational event message will
7575
* be generated
7676
*
7777
* \par Error Conditions

fsw/src/hk_app.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ CFE_Status_t HK_AppInit(void)
204204
}
205205

206206
/* Application initialization event */
207-
Status = CFE_EVS_SendEvent(HK_INIT_EID, CFE_EVS_EventType_INFORMATION, "HK Initialized. Version %d.%d.%d.%d",
207+
Status = CFE_EVS_SendEvent(HK_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "HK Initialized. Version %d.%d.%d.%d",
208208
HK_MAJOR_VERSION, HK_MINOR_VERSION, HK_REVISION, HK_MISSION_REV);
209209

210210
if (Status != CFE_SUCCESS)
@@ -346,7 +346,7 @@ void HK_SendHkCmd(const CFE_SB_Buffer_t *BufPtr)
346346
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
347347
void HK_NoopCmd(const CFE_SB_Buffer_t *BufPtr)
348348
{
349-
CFE_EVS_SendEvent(HK_NOOP_CMD_EID, CFE_EVS_EventType_INFORMATION, "HK No-op command, Version %d.%d.%d.%d",
349+
CFE_EVS_SendEvent(HK_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "HK No-op command, Version %d.%d.%d.%d",
350350
HK_MAJOR_VERSION, HK_MINOR_VERSION, HK_REVISION, HK_MISSION_REV);
351351

352352
HK_AppData.CmdCounter++;
@@ -360,7 +360,7 @@ void HK_NoopCmd(const CFE_SB_Buffer_t *BufPtr)
360360
void HK_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr)
361361
{
362362
HK_ResetHkData();
363-
CFE_EVS_SendEvent(HK_RESET_CNTRS_CMD_EID, CFE_EVS_EventType_DEBUG, "HK Reset Counters command received");
363+
CFE_EVS_SendEvent(HK_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "HK Reset Counters command received");
364364
}
365365

366366
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

unit-test/hk_app_tests.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void Test_HK_AppInit_Success(void)
288288

289289
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
290290

291-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_INIT_EID);
291+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_INIT_INF_EID);
292292

293293
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);
294294

@@ -983,7 +983,7 @@ void Test_HK_NoopCmd(void)
983983
/* Assert */
984984
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
985985

986-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_NOOP_CMD_EID);
986+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_NOOP_INF_EID);
987987

988988
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);
989989

@@ -1026,7 +1026,7 @@ void Test_HK_ResetCountersCmd(void)
10261026
/* Assert */
10271027
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
10281028

1029-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_RESET_CNTRS_CMD_EID);
1029+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HK_RESET_INF_EID);
10301030

10311031
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG);
10321032

0 commit comments

Comments
 (0)