diff --git a/README.md b/README.md index 75cf58e..090fce6 100644 --- a/README.md +++ b/README.md @@ -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 and + ### Development Build: v1.2.0-rc1+dev73 - Apply CFE_SB_ValueToMsgId where required diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 317d734..cad0cfe 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -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)); /* @@ -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. diff --git a/fsw/src/sample_app_msg.h b/fsw/src/sample_app_msg.h index cfee86a..8d3785a 100644 --- a/fsw/src/sample_app_msg.h +++ b/fsw/src/sample_app_msg.h @@ -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 */ diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index b75940a..fddd423 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -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) \ diff --git a/unit-test/coveragetest/coveragetest_sample_app.c b/unit-test/coveragetest/coveragetest_sample_app.c index 7f35eaa..76db764 100644 --- a/unit-test/coveragetest/coveragetest_sample_app.c +++ b/unit-test/coveragetest/coveragetest_sample_app.c @@ -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