diff --git a/CHANGELOG.md b/CHANGELOG.md index bda3f1f..3860b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Development Build: v2.5.0-rc4+dev45 +- adjust subscription table based on apps present +- See + ## Development Build: v2.5.0-rc4+dev41 - update cmake recipe - See diff --git a/CMakeLists.txt b/CMakeLists.txt index 023e438..f3fa9a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,20 @@ cmake_minimum_required(VERSION 3.5) project(CFS_TO_LAB C) +set(TO_TABLE_COMPILE_DEFS) + # These references are specifically needed for the table build # it is easiest to add them as directory properties so they won't -# be considered include directories for TO_LAB itself. -include_directories( - $ - $ -) +# be considered include directories for TO_LAB itself. Each one +# gets a macro for conditional inclusion in the subscription table. +foreach(EXT_APP ci_lab sample_app hs fm ds sc lc) + list (FIND TGTSYS_${SYSVAR}_APPS ${EXT_APP} HAVE_APP) + if (HAVE_APP GREATER_EQUAL 0) + include_directories($) + string(TOUPPER "HAVE_${EXT_APP}" APP_MACRO) + add_definitions(-D${APP_MACRO}) + endif() +endforeach() set(APP_SRC_FILES fsw/src/to_lab_app.c diff --git a/fsw/src/to_lab_version.h b/fsw/src/to_lab_version.h index 74dff51..e4aee7e 100644 --- a/fsw/src/to_lab_version.h +++ b/fsw/src/to_lab_version.h @@ -24,7 +24,7 @@ #define TO_LAB_VERSION_H /* Development Build Macro Definitions */ -#define TO_LAB_BUILD_NUMBER 41 /*!< Development Build: Number of commits since baseline */ +#define TO_LAB_BUILD_NUMBER 45 /*!< Development Build: Number of commits since baseline */ #define TO_LAB_BUILD_BASELINE \ "v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */ diff --git a/fsw/tables/to_lab_sub.c b/fsw/tables/to_lab_sub.c index 9aee964..1fc926f 100644 --- a/fsw/tables/to_lab_sub.c +++ b/fsw/tables/to_lab_sub.c @@ -28,37 +28,39 @@ /* ** Add the proper include file for the message IDs below */ - -/* -** Common CFS app includes below are commented out -*/ #include "to_lab_msgids.h" + +#ifdef HAVE_CI_LAB #include "ci_lab_msgids.h" +#endif +#ifdef HAVE_SAMPLE_APP #include "sample_app_msgids.h" +#endif -#if 0 +#ifdef HAVE_HS_APP #include "hs_msgids.h" +#endif + +#ifdef HAVE_FM_APP #include "fm_msgids.h" +#endif + +#ifdef HAVE_SC_APP #include "sc_msgids.h" +#endif + +#ifdef HAVE_DS_APP #include "ds_msgids.h" +#endif + +#ifdef HAVE_LC_APP #include "lc_msgids.h" #endif TO_LAB_Subs_t TO_LAB_Subs = {.Subs = {/* CFS App Subscriptions */ {CFE_SB_MSGID_WRAP_VALUE(TO_LAB_HK_TLM_MID), {0, 0}, 4}, {CFE_SB_MSGID_WRAP_VALUE(TO_LAB_DATA_TYPES_MID), {0, 0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(CI_LAB_HK_TLM_MID), {0, 0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(SAMPLE_APP_HK_TLM_MID), {0, 0}, 4}, - -#if 0 - /* Add these if needed */ - {CFE_SB_MSGID_WRAP_VALUE(HS_HK_TLM_MID), {0,0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(FM_HK_TLM_MID), {0,0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(SC_HK_TLM_MID), {0,0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(DS_HK_TLM_MID), {0,0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(LC_HK_TLM_MID), {0,0}, 4}, -#endif /* cFE Core subscriptions */ {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_HK_TLM_MID), {0, 0}, 4}, @@ -74,6 +76,28 @@ TO_LAB_Subs_t TO_LAB_Subs = {.Subs = {/* CFS App Subscriptions */ {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_APP_TLM_MID), {0, 0}, 4}, {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_MEMSTATS_TLM_MID), {0, 0}, 4}, +#ifdef HAVE_CI_LAB + {CFE_SB_MSGID_WRAP_VALUE(CI_LAB_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_SAMPLE_APP + {CFE_SB_MSGID_WRAP_VALUE(SAMPLE_APP_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_HS_APP + {CFE_SB_MSGID_WRAP_VALUE(HS_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_HS_APP + {CFE_SB_MSGID_WRAP_VALUE(FM_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_HS_APP + {CFE_SB_MSGID_WRAP_VALUE(SC_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_HS_APP + {CFE_SB_MSGID_WRAP_VALUE(DS_HK_TLM_MID), {0, 0}, 4}, +#endif +#ifdef HAVE_HS_APP + {CFE_SB_MSGID_WRAP_VALUE(LC_HK_TLM_MID), {0, 0}, 4}, +#endif + /* CFE_SB_MSGID_RESERVED entry to mark the end of valid MsgIds */ {CFE_SB_MSGID_RESERVED, {0, 0}, 0}}};