Skip to content

Commit

Permalink
Merge pull request #63 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate COMBINED 2020-04-29 and 2020-05-06
  • Loading branch information
astrogeco authored May 13, 2020
2 parents af9b210 + 6c3972b commit 4b6d54f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 30 deletions.
62 changes: 38 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/nasa/cFS> (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 (<https://github.com/nasa/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 <https://github.com/nasa/sample_app/pull/63>

### 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 <https://github.com/nasa/sample_app/pull/62>

### 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 <https://github.com/nasa/sample_app/pull/52>)

### Development Build: 1.1.6

#### Development Build: 1.1.6
- Minor updates (see https://github.com/nasa/sample_app/pull/49)
- Minor updates (see <https://github.com/nasa/sample_app/pull/49>)

### 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 <https://github.com/nasa/sample_app/pull/47>)

### 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 <https://github.com/nasa/sample_app/pull/44>)

### Development Build: 1.1.3

- Minor updates (see <https://github.com/nasa/sample_app/pull/34>)

### Development Build: 1.1.2

#### Development Build: 1.1.3
- Minor updates (see https://github.com/nasa/sample_app/pull/34)
- Minor updates (see <https://github.com/nasa/sample_app/pull/20>)

#### 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 <https://github.com/nasa/sample_app/pull/15>)

### ***OFFICIAL RELEASE: 1.1.0***
### _**OFFICIAL RELEASE: 1.1.0**_

- Minor updates (see https://github.com/nasa/sample_app/pull/11)
- Minor updates (see <https://github.com/nasa/sample_app/pull/11>)
- 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 <https://github.com/nasa/cFS>.

Official cFS page: http://cfs.gsfc.nasa.gov
Official cFS page: <http://cfs.gsfc.nasa.gov>
4 changes: 2 additions & 2 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
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 8
#define SAMPLE_APP_REVISION 9
#define SAMPLE_APP_MISSION_REV 0


Expand Down
18 changes: 15 additions & 3 deletions unit-test/coveragetest/coveragetest_sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);


/*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 4b6d54f

Please sign in to comment.