Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IC - 20200226 #44

Merged
merged 3 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ This sample application is a non-flight example application implementation for t
sample_app is an example for how to build and link an application in cFS.

## Version Notes

- 1.1.4
- Fix for a clean build with OMIT_DEPRECATED
- Minor updates (see https://github.com/nasa/sample_app/pull/44)
- 1.1.3
- Minor updates (see https://github.com/nasa/sample_app/pull/34)
- 1.1.2
Expand All @@ -30,4 +32,3 @@ As a sample application, extensive testing is not performed prior to release and
For best results, submit issues:questions or issues:help wanted requests at https://github.com/nasa/cFS.

Official cFS page: http://cfs.gsfc.nasa.gov

26 changes: 13 additions & 13 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ void SAMPLE_AppMain( void )
/*
** Perform application specific initialization
** If the Initialization fails, set the RunStatus to
** CFE_ES_APP_ERROR and the App will not enter the RunLoop
** CFE_ES_RunStatus_APP_ERROR and the App will not enter the RunLoop
*/
status = SAMPLE_AppInit();
if (status != CFE_SUCCESS)
{
Sample_AppData.RunStatus = CFE_ES_APP_ERROR;
Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR;
}

/*
** SAMPLE Runloop
*/
while (CFE_ES_RunLoop(&Sample_AppData.RunStatus) == TRUE)
while (CFE_ES_RunLoop(&Sample_AppData.RunStatus) == true)
{
/*
** Performance Log Exit Stamp
Expand All @@ -99,10 +99,10 @@ void SAMPLE_AppMain( void )
else
{
CFE_EVS_SendEvent(SAMPLE_PIPE_ERR_EID,
CFE_EVS_ERROR,
CFE_EVS_EventType_ERROR,
"SAMPLE APP: SB Pipe Read Error, App Will Exit");

Sample_AppData.RunStatus = CFE_ES_APP_ERROR;
Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_ERROR;
}

}
Expand All @@ -125,7 +125,7 @@ int32 SAMPLE_AppInit( void )
{
int32 status;

Sample_AppData.RunStatus = CFE_ES_APP_RUN;
Sample_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN;

/*
** Initialize app command execution counters
Expand Down Expand Up @@ -163,7 +163,7 @@ int32 SAMPLE_AppInit( void )
*/
status = CFE_EVS_Register(Sample_AppData.SAMPLE_EventFilters,
SAMPLE_EVENT_COUNTS,
CFE_EVS_BINARY_FILTER);
CFE_EVS_EventFilter_BINARY);
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Registering Events, RC = 0x%08lX\n",
Expand Down Expand Up @@ -240,7 +240,7 @@ int32 SAMPLE_AppInit( void )
}

CFE_EVS_SendEvent (SAMPLE_STARTUP_INF_EID,
CFE_EVS_INFORMATION,
CFE_EVS_EventType_INFORMATION,
"SAMPLE App Initialized. Version %d.%d.%d.%d",
SAMPLE_APP_MAJOR_VERSION,
SAMPLE_APP_MINOR_VERSION,
Expand Down Expand Up @@ -277,7 +277,7 @@ void SAMPLE_ProcessCommandPacket( CFE_SB_MsgPtr_t Msg )

default:
CFE_EVS_SendEvent(SAMPLE_INVALID_MSGID_ERR_EID,
CFE_EVS_ERROR,
CFE_EVS_EventType_ERROR,
"SAMPLE: invalid command packet,MID = 0x%x",
MsgId);
break;
Expand Down Expand Up @@ -330,7 +330,7 @@ void SAMPLE_ProcessGroundCommand( CFE_SB_MsgPtr_t Msg )
/* default case already found during FC vs length test */
default:
CFE_EVS_SendEvent(SAMPLE_COMMAND_ERR_EID,
CFE_EVS_ERROR,
CFE_EVS_EventType_ERROR,
"Invalid ground command code: CC = %d",
CommandCode);
break;
Expand Down Expand Up @@ -388,7 +388,7 @@ void SAMPLE_NoopCmd( const SAMPLE_Noop_t *Msg )
Sample_AppData.CmdCounter++;

CFE_EVS_SendEvent(SAMPLE_COMMANDNOP_INF_EID,
CFE_EVS_INFORMATION,
CFE_EVS_EventType_INFORMATION,
"SAMPLE: NOOP command Version %d.%d.%d.%d",
SAMPLE_APP_MAJOR_VERSION,
SAMPLE_APP_MINOR_VERSION,
Expand All @@ -414,7 +414,7 @@ void SAMPLE_ResetCounters( const SAMPLE_ResetCounters_t *Msg )
Sample_AppData.ErrCounter = 0;

CFE_EVS_SendEvent(SAMPLE_COMMANDRST_INF_EID,
CFE_EVS_INFORMATION,
CFE_EVS_EventType_INFORMATION,
"SAMPLE: RESET command");

return;
Expand Down Expand Up @@ -479,7 +479,7 @@ bool SAMPLE_VerifyCmdLength( CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength )
uint16 CommandCode = CFE_SB_GetCmdCode(Msg);

CFE_EVS_SendEvent(SAMPLE_LEN_ERR_EID,
CFE_EVS_ERROR,
CFE_EVS_EventType_ERROR,
"Invalid Msg length: ID = 0x%X, CC = %d, Len = %d, Expected = %d",
MessageID,
CommandCode,
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/sample_app_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#define SAMPLE_APP_MAJOR_VERSION 1
#define SAMPLE_APP_MINOR_VERSION 1
#define SAMPLE_APP_REVISION 3
#define SAMPLE_APP_REVISION 4
#define SAMPLE_APP_MISSION_REV 0


Expand Down