Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Dec 1, 2023
1 parent 0d0cad0 commit 9cfbd06
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
22 changes: 13 additions & 9 deletions fsw/inc/sample_app_eventids.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
#ifndef SAMPLE_APP_EVENTS_H
#define SAMPLE_APP_EVENTS_H

#define SAMPLE_APP_RESERVED_EID 0
#define SAMPLE_APP_INIT_INF_EID 1
#define SAMPLE_APP_CC_ERR_EID 2
#define SAMPLE_APP_NOOP_INF_EID 3
#define SAMPLE_APP_RESET_INF_EID 4
#define SAMPLE_APP_MID_ERR_EID 5
#define SAMPLE_APP_CMD_LEN_ERR_EID 6
#define SAMPLE_APP_PIPE_ERR_EID 7
#define SAMPLE_APP_VALUE_INF_EID 8
#define SAMPLE_APP_RESERVED_EID 0
#define SAMPLE_APP_INIT_INF_EID 1
#define SAMPLE_APP_CC_ERR_EID 2
#define SAMPLE_APP_NOOP_INF_EID 3
#define SAMPLE_APP_RESET_INF_EID 4
#define SAMPLE_APP_MID_ERR_EID 5
#define SAMPLE_APP_CMD_LEN_ERR_EID 6
#define SAMPLE_APP_PIPE_ERR_EID 7
#define SAMPLE_APP_VALUE_INF_EID 8
#define SAMPLE_APP_CR_PIPE_ERR_EID 9
#define SAMPLE_APP_SUB_HK_ERR_EID 10
#define SAMPLE_APP_SUB_CMD_ERR_EID 11
#define SAMPLE_APP_TABLE_REG_ERR_EID 12

#endif /* SAMPLE_APP_EVENTS_H */
13 changes: 8 additions & 5 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ int32 SAMPLE_APP_Init(void)
status = CFE_SB_CreatePipe(&SAMPLE_APP_Data.CommandPipe, SAMPLE_APP_Data.PipeDepth, SAMPLE_APP_Data.PipeName);
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error creating pipe, RC = 0x%08lX\n", (unsigned long)status);
CFE_EVS_SendEvent(SAMPLE_APP_CR_PIPE_ERR_EID, CFE_EVS_EventType_ERROR,
"Sample App: Error creating SB Command Pipe, RC = 0x%08lX\n", (unsigned long)status);
}
}

Expand All @@ -158,7 +159,8 @@ int32 SAMPLE_APP_Init(void)
status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(SAMPLE_APP_SEND_HK_MID), SAMPLE_APP_Data.CommandPipe);
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Subscribing to HK request, RC = 0x%08lX\n", (unsigned long)status);
CFE_EVS_SendEvent(SAMPLE_APP_SUBSCRIBE_HK_ERR_EID, CFE_EVS_EventType_ERROR,
"Sample App: Error Subscribing to HK request, RC = 0x%08lX\n", (unsigned long)status);
}
}

Expand All @@ -170,9 +172,9 @@ int32 SAMPLE_APP_Init(void)
status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(SAMPLE_APP_CMD_MID), SAMPLE_APP_Data.CommandPipe);
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Subscribing to Command, RC = 0x%08lX\n", (unsigned long)status);
CFE_EVS_SendEvent(SAMPLE_APP_SUBSCRIBE_CMD_ERR_EID, CFE_EVS_EventType_ERROR,
"Sample App: Error Subscribing to Commands, RC = 0x%08lX\n", (unsigned long)status);
}

}

if (status == CFE_SUCCESS)
Expand All @@ -184,7 +186,8 @@ int32 SAMPLE_APP_Init(void)
CFE_TBL_OPT_DEFAULT, SAMPLE_APP_TblValidationFunc);
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Registering Example Table, RC = 0x%08lX\n", (unsigned long)status);
CFE_EVS_SendEvent(SAMPLE_APP_TABLE_REG_ERR_EID, CFE_EVS_EventType_ERROR,
"Sample App: Error Registering Example Table, RC = 0x%08lX\n", (unsigned long)status);
}
else
{
Expand Down

0 comments on commit 9cfbd06

Please sign in to comment.