From ca95abce704f4e6389fb2b1b8505bde00f8c1550 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 23 Jul 2020 17:19:18 -0400 Subject: [PATCH 1/3] Fix #44, Update table comments/instructions --- fsw/src/sch_lab_table.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fsw/src/sch_lab_table.c b/fsw/src/sch_lab_table.c index 05602ba..7de9a94 100644 --- a/fsw/src/sch_lab_table.c +++ b/fsw/src/sch_lab_table.c @@ -27,9 +27,9 @@ /* ** SCH Lab schedule table ** When populating this table: -** 1. Make sure the table is terminated by the SCH_LAB_END_OF_TABLE entry -** 2. You can have commented out entries, but a zero MID will terminate the table processing, -** skipping the remaining entries. +** 1. The entire table is processed (SCH_LAB_MAX_SCHEDULE_ENTRIES) but entries with a +** packet rate of 0 are skipped +** 2. You can have commented out entries or entries with a packet rate of 0 ** 3. If the table grows too big, increase SCH_LAB_MAX_SCHEDULE_ENTRIES */ @@ -43,12 +43,12 @@ SCH_LAB_ScheduleTable_t SCH_TBL_Structure = {.Config = { {CFE_SB_MSGID_WRAP_VALUE(TO_LAB_SEND_HK_MID), 4}, {CFE_SB_MSGID_WRAP_VALUE(SAMPLE_APP_SEND_HK_MID), 4}, #if 0 - { SC_SEND_HK_MID, 4, 0 }, - { SC_1HZ_WAKEUP_MID, 1, 0 }, /* Example of a 1hz packet */ - { HS_SEND_HK_MID, 4, 0 }, - { FM_SEND_HK_MID, 4, 0 }, - { DS_SEND_HK_MID, 4, 0 }, - { LC_SEND_HK_MID, 4, 0 }, + {CFE_SB_MSGID_WRAP_VALUE(SC_SEND_HK_MID), 4}, + {CFE_SB_MSGID_WRAP_VALUE(SC_1HZ_WAKEUP_MID), 1}, /* Example of a 1hz packet */ + {CFE_SB_MSGID_WRAP_VALUE(HS_SEND_HK_MID), 0}, /* Example of a message that wouldn't be sent */ + {CFE_SB_MSGID_WRAP_VALUE(FM_SEND_HK_MID), 4}, + {CFE_SB_MSGID_WRAP_VALUE(DS_SEND_HK_MID), 4}, + {CFE_SB_MSGID_WRAP_VALUE(LC_SEND_HK_MID), 4}, #endif }}; From 7757b95cfcb4e46b2d3c70094a53ea922dfb59d7 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Tue, 4 Aug 2020 21:44:42 -0400 Subject: [PATCH 2/3] Close #46, Add build number and baseline Add macros for build number and baseline Add macros for version string Use version string macro in version report --- fsw/src/sch_lab_app.c | 3 +-- fsw/src/sch_lab_version.h | 54 ++++++++++++++++++++++++++++----------- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/fsw/src/sch_lab_app.c b/fsw/src/sch_lab_app.c index 455cc88..360bf62 100644 --- a/fsw/src/sch_lab_app.c +++ b/fsw/src/sch_lab_app.c @@ -234,8 +234,7 @@ int32 SCH_LAB_AppInit(void) OS_printf("SCH Error subscribing to 1hz!\n"); } - OS_printf("SCH Lab Initialized. Version %d.%d.%d.%d\n", SCH_LAB_MAJOR_VERSION, SCH_LAB_MINOR_VERSION, - SCH_LAB_REVISION, SCH_LAB_MISSION_REV); + OS_printf("SCH Lab Initialized.%s\n", SCH_LAB_VERSION_STRING); return (CFE_SUCCESS); diff --git a/fsw/src/sch_lab_version.h b/fsw/src/sch_lab_version.h index 742a170..dd65d40 100644 --- a/fsw/src/sch_lab_version.h +++ b/fsw/src/sch_lab_version.h @@ -18,24 +18,48 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ** -** File: sch_lab_version.h -** -** Purpose: -** The SCH Lab Application header file containing version number -** -** Notes: -** *************************************************************************/ -#ifndef _sch_lab_version_h_ -#define _sch_lab_version_h_ +#ifndef SCH_LAB_VERSION_H +#define SCH_LAB_VERSION_H + +/*! @file SCH_LAB_version.h + * @brief Purpose: + * + * The SCH Lab Application header file containing version information + * + */ + +/* Development Build Macro Definitions */ +#define SCH_LAB_BUILD_NUMBER 34 /*!< Development Build: Number of commits since baseline */ +#define SCH_LAB_BUILD_BASELINE "v2.3.0" /*!< Development Build: git tag that is the base for the current development */ -#define SCH_LAB_MAJOR_VERSION 2 -#define SCH_LAB_MINOR_VERSION 3 -#define SCH_LAB_REVISION 7 -#define SCH_LAB_MISSION_REV 0 +/* Version Macro Definitions */ -#endif /* _sch_lab_version_h_ */ +#define SCH_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */ +#define SCH_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */ +#define SCH_LAB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */ +#define SCH_LAB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */ + +#define SCH_LAB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */ +#define SCH_LAB_STR(x) SCH_LAB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */ + +/*! @brief Development Build Version Number. + * @details Baseline git tag + Number of commits since baseline. @n + * See @ref cfsversions for format differences between development and release versions. + */ +#define SCH_LAB_VERSION SCH_LAB_BUILD_BASELINE "+dev" SCH_LAB_STR(SCH_LAB_BUILD_NUMBER) + +/*! @brief Development Build Version String. + * @details Reports the current development build's baseline, number, and name. Also includes a note about the latest official version. @n + * See @ref cfsversions for format differences between development and release versions. +*/ +#define SCH_LAB_VERSION_STRING \ + " SCH Lab Development Build " \ + SCH_LAB_VERSION \ + ", Last Official Release: v2.3.0" /* For full support please use this version */ + +#endif /* SCH_LAB_VERSION_H */ /************************/ /* End of File Comment */ -/************************/ +/************************/ \ No newline at end of file From dee101393a0a043fb9fc515d10f3745df65464ba Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Wed, 5 Aug 2020 15:15:08 -0400 Subject: [PATCH 3/3] Increase version to 2.3.0+dev37 and update readme Set "development build" part of version string to ALL CAPS for readability --- README.md | 6 ++++++ fsw/src/sch_lab_version.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58baae0..3cb317f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ To change the list of packets that sch_lab sends out, edit the schedule table lo ## Version History +### Development Build: 2.3.0+dev37 + +- Fixes schedule table documentation +- Add baseline and build number to version reporting +- See + ### Development Build: 2.3.7 - Apply 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. diff --git a/fsw/src/sch_lab_version.h b/fsw/src/sch_lab_version.h index dd65d40..dcf73fa 100644 --- a/fsw/src/sch_lab_version.h +++ b/fsw/src/sch_lab_version.h @@ -30,7 +30,7 @@ */ /* Development Build Macro Definitions */ -#define SCH_LAB_BUILD_NUMBER 34 /*!< Development Build: Number of commits since baseline */ +#define SCH_LAB_BUILD_NUMBER 37 /*!< Development Build: Number of commits since baseline */ #define SCH_LAB_BUILD_BASELINE "v2.3.0" /*!< Development Build: git tag that is the base for the current development */ /* Version Macro Definitions */ @@ -54,7 +54,7 @@ * See @ref cfsversions for format differences between development and release versions. */ #define SCH_LAB_VERSION_STRING \ - " SCH Lab Development Build " \ + " SCH Lab DEVELOPMENT BUILD " \ SCH_LAB_VERSION \ ", Last Official Release: v2.3.0" /* For full support please use this version */