Skip to content

Commit

Permalink
Merge pull request #163 from astrogeco/integration-candidate
Browse files Browse the repository at this point in the history
sample_app Integration candidate: Caelum-rc4+dev1
  • Loading branch information
astrogeco authored Dec 6, 2021
2 parents d009197 + 545a276 commit bd4a5fe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ sample_app is an example for how to build and link an application in cFS. See al

## Version History

### Development Build: v1.3.0-rc4+dev4

- Use CFE_MSG_PTR conversion macro
- Update baseline for cFS-Caelum-rc4 to v1.3.0-rc4
- See <https://github.com/nasa/sample_app/pull/163> and <https://github.com/nasa/cFS/pull/390>

### Development Build: v1.2.0-rc1+dev73

- Apply CFE_SB_ValueToMsgId where required
Expand Down
6 changes: 3 additions & 3 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int32 SAMPLE_APP_Init(void)
/*
** Initialize housekeeping packet (clear user data area).
*/
CFE_MSG_Init(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(SAMPLE_APP_HK_TLM_MID),
CFE_MSG_Init(CFE_MSG_PTR(SAMPLE_APP_Data.HkTlm.TelemetryHeader), CFE_SB_ValueToMsgId(SAMPLE_APP_HK_TLM_MID),
sizeof(SAMPLE_APP_Data.HkTlm));

/*
Expand Down Expand Up @@ -327,8 +327,8 @@ int32 SAMPLE_APP_ReportHousekeeping(const CFE_MSG_CommandHeader_t *Msg)
/*
** Send housekeeping telemetry packet...
*/
CFE_SB_TimeStampMsg(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg);
CFE_SB_TransmitMsg(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, true);
CFE_SB_TimeStampMsg(CFE_MSG_PTR(SAMPLE_APP_Data.HkTlm.TelemetryHeader));
CFE_SB_TransmitMsg(CFE_MSG_PTR(SAMPLE_APP_Data.HkTlm.TelemetryHeader), true);

/*
** Manage any pending table loads, validations, etc.
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/sample_app_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ typedef struct

typedef struct
{
CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief Telemetry header */
SAMPLE_APP_HkTlm_Payload_t Payload; /**< \brief Telemetry payload */
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry header */
SAMPLE_APP_HkTlm_Payload_t Payload; /**< \brief Telemetry payload */
} SAMPLE_APP_HkTlm_t;

#endif /* SAMPLE_APP_MSG_H */
19 changes: 13 additions & 6 deletions fsw/src/sample_app_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,23 @@

/* Development Build Macro Definitions */

#define SAMPLE_APP_BUILD_NUMBER 73 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_NUMBER 4 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_BASELINE \
"v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */
"v1.3.0-rc4" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define SAMPLE_APP_REVISION 99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define SAMPLE_APP_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */
#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define SAMPLE_APP_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */

/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define SAMPLE_APP_MISSION_REV 0xFF

#define SAMPLE_APP_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
#define SAMPLE_APP_STR(x) \
Expand Down
5 changes: 2 additions & 3 deletions unit-test/coveragetest/coveragetest_sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,11 @@ void Test_SAMPLE_APP_ReportHousekeeping(void)

/* Confirm message sent*/
UtAssert_True(UT_GetStubCount(UT_KEY(CFE_SB_TransmitMsg)) == 1, "CFE_SB_TransmitMsg() called once");
UtAssert_True(MsgSend == &SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, "CFE_SB_TransmitMsg() address matches expected");
UtAssert_ADDRESS_EQ(MsgSend, &SAMPLE_APP_Data.HkTlm);

/* Confirm timestamp msg address */
UtAssert_True(UT_GetStubCount(UT_KEY(CFE_SB_TimeStampMsg)) == 1, "CFE_SB_TimeStampMsg() called once");
UtAssert_True(MsgTimestamp == &SAMPLE_APP_Data.HkTlm.TlmHeader.Msg,
"CFE_SB_TimeStampMsg() address matches expected");
UtAssert_ADDRESS_EQ(MsgTimestamp, &SAMPLE_APP_Data.HkTlm);

/*
* Confirm that the CFE_TBL_Manage() call was done
Expand Down

0 comments on commit bd4a5fe

Please sign in to comment.