diff --git a/README.md b/README.md index 4c9a568..30eefc8 100644 --- a/README.md +++ b/README.md @@ -2,56 +2,70 @@ This repository contains a sample application (sample_app), which is a framework component of the Core Flight System. -This sample application is a non-flight example application implementation for the cFS Bundle. It is intended to be located in the `apps/sample_app` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at https://github.com/nasa/cFS (which includes sample_app as a submodule), which includes build and execution instructions. +This sample application is a non-flight example application implementation for the cFS Bundle. It is intended to be located in the `apps/sample_app` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at (which includes sample_app as a submodule), which includes build and execution instructions. -sample_app is an example for how to build and link an application in cFS. See also the skeleton_app (https://github.com/nasa/skeleton_app) if you are looking for a bare-bones application to which to add your business logic. +sample_app is an example for how to build and link an application in cFS. See also the skeleton_app () if you are looking for a bare-bones application to which to add your business logic. ## Version History -#### Development Build: 1.1.8 +### Development Build: 1.1.9 + +- Applies the CFE_SB_MsgIdToValue() and CFE_SB_ValueToMsgId() routines where compatibility with an integer MsgId is necessary - syslog prints, events, compile-time MID #define values. +- No more format conversion error in RTEMS build +- See + +### Development Build: 1.1.8 + - Coverage data from make lcov includes the sample_app code -- See https://github.com/nasa/sample_app/pull/62 +- See + +### Development Build: 1.1.7 -#### Development Build: 1.1.7 - Fix bug where table is not released after being used -- Minor updates (see https://github.com/nasa/sample_app/pull/52) +- Minor updates (see ) + +### Development Build: 1.1.6 -#### Development Build: 1.1.6 -- Minor updates (see https://github.com/nasa/sample_app/pull/49) +- Minor updates (see ) + +### Development Build: 1.1.5 -#### Development Build: 1.1.5 - Fix to build on RASPBIAN OS -- Minor updates (see https://github.com/nasa/sample_app/pull/47) +- Minor updates (see ) + +### Development Build: 1.1.4 -#### Development Build: 1.1.4 - Fix for a clean build with OMIT_DEPRECATED -- Minor updates (see https://github.com/nasa/sample_app/pull/44) +- Minor updates (see ) + +### Development Build: 1.1.3 + +- Minor updates (see ) + +### Development Build: 1.1.2 -#### Development Build: 1.1.3 -- Minor updates (see https://github.com/nasa/sample_app/pull/34) +- Minor updates (see ) -#### Development Build: 1.1.2 -- Minor updates (see https://github.com/nasa/sample_app/pull/20) +### Development Build: 1.1.1 -#### Development Build: 1.1.1 -- Minor updates (see https://github.com/nasa/sample_app/pull/15) +- Minor updates (see ) -### ***OFFICIAL RELEASE: 1.1.0*** +### _**OFFICIAL RELEASE: 1.1.0**_ -- Minor updates (see https://github.com/nasa/sample_app/pull/11) +- Minor updates (see ) - Not backwards compatible with OSAL 4.2.1 - Released as part of cFE 6.7.0, Apache 2.0 -### ***OFFICIAL RELEASE: 1.0.0a*** +### _**OFFICIAL RELEASE: 1.0.0a**_ - Released as part of cFE 6.6.0a, Apache 2.0 ## Known issues -As a sample application, extensive testing is not performed prior to release and only minimal functionality is included. Note discrepancies likely exist between this application and the example detailed in the application developer guide. +As a sample application, extensive testing is not performed prior to release and only minimal functionality is included. Note discrepancies likely exist between this application and the example detailed in the application developer guide. ## Getting Help -For best results, submit issues:questions or issues:help wanted requests at https://github.com/nasa/cFS. +For best results, submit issues:questions or issues:help wanted requests at . -Official cFS page: http://cfs.gsfc.nasa.gov +Official cFS page: diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 82e51e1..1686c5d 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -278,7 +278,7 @@ void SAMPLE_ProcessCommandPacket( CFE_SB_MsgPtr_t Msg ) CFE_EVS_SendEvent(SAMPLE_INVALID_MSGID_ERR_EID, CFE_EVS_EventType_ERROR, "SAMPLE: invalid command packet,MID = 0x%x", - MsgId); + (unsigned int)CFE_SB_MsgIdToValue(MsgId)); break; } @@ -488,7 +488,7 @@ bool SAMPLE_VerifyCmdLength( CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength ) CFE_EVS_SendEvent(SAMPLE_LEN_ERR_EID, CFE_EVS_EventType_ERROR, "Invalid Msg length: ID = 0x%X, CC = %d, Len = %d, Expected = %d", - MessageID, + (unsigned int)CFE_SB_MsgIdToValue(MessageID), CommandCode, ActualLength, ExpectedLength); diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index 8f4ccc9..5fdc40f 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -33,7 +33,7 @@ #define SAMPLE_APP_MAJOR_VERSION 1 #define SAMPLE_APP_MINOR_VERSION 1 -#define SAMPLE_APP_REVISION 8 +#define SAMPLE_APP_REVISION 9 #define SAMPLE_APP_MISSION_REV 0 diff --git a/unit-test/coveragetest/coveragetest_sample_app.c b/unit-test/coveragetest/coveragetest_sample_app.c index b7a53a6..81cd5fc 100644 --- a/unit-test/coveragetest/coveragetest_sample_app.c +++ b/unit-test/coveragetest/coveragetest_sample_app.c @@ -150,8 +150,8 @@ void Test_SAMPLE_AppMain(void) * log will show what the incorrect value was. */ UtAssert_True(SAMPLE_AppData.RunStatus == CFE_ES_RunStatus_APP_ERROR, - "SAMPLE_AppData.RunStatus (%d) == CFE_ES_RunStatus_APP_ERROR", - SAMPLE_AppData.RunStatus); + "SAMPLE_AppData.RunStatus (%lu) == CFE_ES_RunStatus_APP_ERROR", + (unsigned long)SAMPLE_AppData.RunStatus); /* @@ -275,7 +275,7 @@ void Test_SAMPLE_ProcessCommandPacket(void) SAMPLE_ProcessCommandPacket(&TestMsg.Base); /* invalid message id */ - TestMsgId = 0; + TestMsgId = CFE_SB_INVALID_MSG_ID; UT_SetDataBuffer(UT_KEY(CFE_SB_GetMsgId), &TestMsgId, sizeof(TestMsgId), false); SAMPLE_ProcessCommandPacket(&TestMsg.Base); @@ -375,6 +375,18 @@ void Test_SAMPLE_ReportHousekeeping(void) SAMPLE_AppData.CmdCounter = 22; SAMPLE_AppData.ErrCounter = 11; + /* + * CFE_SB_InitMsg() needs to be done to set the emulated MsgId and Length. + * + * The FSW code only does this once during init and relies on it + * remaining during the SAMPLE_ReportHousekeeping(). This does + * not happen during UT so it must be initialized again here. + */ + CFE_SB_InitMsg(&SAMPLE_AppData.HkBuf.MsgHdr, + SAMPLE_APP_HK_TLM_MID, + sizeof(SAMPLE_AppData.HkBuf), + true); + /* * Set up to "capture" the telemetry message */