From cb7fdaa2fa4e0a338bee8bdecb1d6df3238216fd Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Fri, 8 Sep 2023 11:35:56 +1000 Subject: [PATCH] Fix #50, Separate config files --- arch_build.cmake | 27 ++++++++++++ .../default_hk_fcncodes.h | 13 +++--- config/default_hk_interface_cfg.h | 38 +++++++++++++++++ .../default_hk_internal_cfg.h | 15 +++++-- config/default_hk_mission_cfg.h | 37 ++++++++++++++++ config/default_hk_msg.h | 39 +++++++++++++++++ config/default_hk_msgdefs.h | 32 ++++++++++++++ .../hk_msgids.h => config/default_hk_msgids.h | 0 .../hk_msg.h => config/default_hk_msgstruct.h | 9 ++-- config/default_hk_platform_cfg.h | 42 +++++++++++++++++++ config/default_hk_tbl.h | 34 +++++++++++++++ .../default_hk_tbldefs.h | 18 ++++---- .../default_hk_tblstruct.h | 21 +++++----- docs/dox_src/hk-common.doxyfile.in | 1 + fsw/inc/{hk_events.h => hk_eventids.h} | 0 fsw/src/hk_app.c | 3 +- fsw/src/hk_app.h | 5 +-- fsw/src/hk_dispatch.c | 4 +- fsw/src/hk_dispatch.h | 2 +- fsw/src/hk_utils.c | 2 +- fsw/src/hk_utils.h | 2 +- fsw/tables/hk_cpy_tbl.c | 3 +- mission_build.cmake | 40 +++++++++++++++++- unit-test/hk_app_tests.c | 4 +- unit-test/hk_dispatch_tests.c | 2 +- unit-test/hk_utils_tests.c | 4 +- unit-test/utilities/hk_test_utils.c | 2 +- unit-test/utilities/hk_test_utils.h | 4 +- 28 files changed, 352 insertions(+), 51 deletions(-) create mode 100644 arch_build.cmake rename fsw/inc/hk_msgdefs.h => config/default_hk_fcncodes.h (89%) create mode 100644 config/default_hk_interface_cfg.h rename fsw/inc/hk_platform_cfg.h => config/default_hk_internal_cfg.h (87%) create mode 100644 config/default_hk_mission_cfg.h create mode 100644 config/default_hk_msg.h create mode 100644 config/default_hk_msgdefs.h rename fsw/inc/hk_msgids.h => config/default_hk_msgids.h (100%) rename fsw/inc/hk_msg.h => config/default_hk_msgstruct.h (95%) create mode 100644 config/default_hk_platform_cfg.h create mode 100644 config/default_hk_tbl.h rename fsw/inc/hk_extern_typedefs.h => config/default_hk_tbldefs.h (72%) rename fsw/inc/hk_tbldefs.h => config/default_hk_tblstruct.h (81%) rename fsw/inc/{hk_events.h => hk_eventids.h} (100%) diff --git a/arch_build.cmake b/arch_build.cmake new file mode 100644 index 0000000..f42b39f --- /dev/null +++ b/arch_build.cmake @@ -0,0 +1,27 @@ +########################################################### +# +# HK App platform build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### + +# The list of header files that control the app configuration +set(HK_PLATFORM_CONFIG_FILE_LIST + hk_internal_cfg.h + hk_msgids.h + hk_platform_cfg.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(HK_CFGFILE ${HK_PLATFORM_CONFIG_FILE_LIST}) + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${HK_CFGFILE}") + generate_config_includefile( + FILE_NAME "${HK_CFGFILE}" + FALLBACK_FILE "${DEFAULT_SOURCE}" + ) +endforeach() diff --git a/fsw/inc/hk_msgdefs.h b/config/default_hk_fcncodes.h similarity index 89% rename from fsw/inc/hk_msgdefs.h rename to config/default_hk_fcncodes.h index 3c5fae8..9a72ada 100644 --- a/fsw/inc/hk_msgdefs.h +++ b/config/default_hk_fcncodes.h @@ -19,12 +19,15 @@ /** * @file - * The CFS Housekeeping (HK) Application header file + * Specification for the CFS Housekeeping (HK) command function codes + * + * @note + * This file should be strictly limited to the command/function code (CC) + * macro definitions. Other definitions such as enums, typedefs, or other + * macros should be placed in the hk_msgdefs.h or hk_msg.h files. */ -#ifndef HK_MSGDEFS_H -#define HK_MSGDEFS_H - -#include +#ifndef HK_FCNCODES_H +#define HK_FCNCODES_H /** * \defgroup cfshkcmdcodes CFS Housekeeping Command Codes diff --git a/config/default_hk_interface_cfg.h b/config/default_hk_interface_cfg.h new file mode 100644 index 0000000..bceb49c --- /dev/null +++ b/config/default_hk_interface_cfg.h @@ -0,0 +1,38 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * CFS Housekeeping (HK) Application Public Definitions + * + * This provides default values for configurable items that affect + * the interface(s) of this module. This includes the CMD/TLM message + * interface, tables definitions, and any other data products that + * serve to exchange information with other entities. + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef HK_INTERFACE_CFG_H +#define HK_INTERFACE_CFG_H + +/* Place definitions for configurable items that affect the public interface here. */ + +#endif diff --git a/fsw/inc/hk_platform_cfg.h b/config/default_hk_internal_cfg.h similarity index 87% rename from fsw/inc/hk_platform_cfg.h rename to config/default_hk_internal_cfg.h index 182b832..9fd6b35 100644 --- a/fsw/inc/hk_platform_cfg.h +++ b/config/default_hk_internal_cfg.h @@ -19,10 +19,19 @@ /** * @file - * The CFS Housekeeping (HK) Application platform configuration header file + * CFS Housekeeping (HK) Application Private Config Definitions + * + * This provides default values for configurable items that are internal + * to this module and do NOT affect the interface(s) of this module. Changes + * to items in this file only affect the local module and will be transparent + * to external entities that are using the public interface(s). + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. */ -#ifndef HK_PLATFORM_CFG_H -#define HK_PLATFORM_CFG_H +#ifndef HK_INTERNAL_CFG_H +#define HK_INTERNAL_CFG_H /** * \defgroup cfshkplatformcfg CFS Housekeeping Platform Configuration diff --git a/config/default_hk_mission_cfg.h b/config/default_hk_mission_cfg.h new file mode 100644 index 0000000..7777026 --- /dev/null +++ b/config/default_hk_mission_cfg.h @@ -0,0 +1,37 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * + * CFS Housekeeping (HK) Application Mission Configuration Header File + * + * This is a compatibility header for the "mission_cfg.h" file that has + * traditionally provided public config definitions for each CFS app. + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef HK_MISSION_CFG_H +#define HK_MISSION_CFG_H + +#include "hk_interface_cfg.h" + +#endif \ No newline at end of file diff --git a/config/default_hk_msg.h b/config/default_hk_msg.h new file mode 100644 index 0000000..3ded84c --- /dev/null +++ b/config/default_hk_msg.h @@ -0,0 +1,39 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * Specification for the CFS Housekeeping (HK) command and telemetry + * message data types. + * + * This is a compatibility header for the "hk_msg.h" file that has + * traditionally provided the message definitions for cFS apps. + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ +#ifndef HK_MSG_H +#define HK_MSG_H + +#include "hk_interface_cfg.h" +#include "hk_msgdefs.h" +#include "hk_msgstruct.h" + +#endif diff --git a/config/default_hk_msgdefs.h b/config/default_hk_msgdefs.h new file mode 100644 index 0000000..adbabfe --- /dev/null +++ b/config/default_hk_msgdefs.h @@ -0,0 +1,32 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * Specification for the CFS Housekeeping (HK) command and telemetry + * message constant definitions (currently just includes the + * function/command codes). + */ + +#ifndef HK_MSGDEFS_H +#define HK_MSGDEFS_H + +#include "hk_fcncodes.h" + +#endif diff --git a/fsw/inc/hk_msgids.h b/config/default_hk_msgids.h similarity index 100% rename from fsw/inc/hk_msgids.h rename to config/default_hk_msgids.h diff --git a/fsw/inc/hk_msg.h b/config/default_hk_msgstruct.h similarity index 95% rename from fsw/inc/hk_msg.h rename to config/default_hk_msgstruct.h index efccd98..96c91dd 100644 --- a/fsw/inc/hk_msg.h +++ b/config/default_hk_msgstruct.h @@ -19,12 +19,13 @@ /** * @file - * The CFS Housekeeping (HK) Application header file + * Specification for the CFS Housekeeping (HK) command and telemetry + * message data types. */ -#ifndef HK_MSG_H -#define HK_MSG_H +#ifndef HK_MSGSTRUCT_H +#define HK_MSGSTRUCT_H -#include +#include "cfe.h" /** * \defgroup cfshkcmdstructs CFS Housekeeping Command Structures diff --git a/config/default_hk_platform_cfg.h b/config/default_hk_platform_cfg.h new file mode 100644 index 0000000..6c98cca --- /dev/null +++ b/config/default_hk_platform_cfg.h @@ -0,0 +1,42 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * CFS Housekeeping (HK) Application Platform Configuration Header File + * + * This is a compatibility header for the "platform_cfg.h" file that has + * traditionally provided both public and private config definitions + * for each CFS app. + * + * These definitions are now provided in two separate files, one for + * the public/mission scope and one for internal scope. + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. + */ + +#ifndef HK_PLATFORM_CFG_H +#define HK_PLATFORM_CFG_H + +#include "hk_mission_cfg.h" +#include "hk_internal_cfg.h" + +#endif diff --git a/config/default_hk_tbl.h b/config/default_hk_tbl.h new file mode 100644 index 0000000..a69a5dd --- /dev/null +++ b/config/default_hk_tbl.h @@ -0,0 +1,34 @@ +/************************************************************************ + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” + * + * Copyright (c) 2021 United States Government as represented by the + * Administrator of the National Aeronautics and Space Administration. + * All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ************************************************************************/ + +/** + * @file + * Specification for the CFS Housekeeping (HK) table related data + * structures + * + */ + +#ifndef HK_TBL_H +#define HK_TBL_H + +#include "hk_interface_cfg.h" +#include "hk_tbldefs.h" +#include "hk_tblstruct.h" + +#endif \ No newline at end of file diff --git a/fsw/inc/hk_extern_typedefs.h b/config/default_hk_tbldefs.h similarity index 72% rename from fsw/inc/hk_extern_typedefs.h rename to config/default_hk_tbldefs.h index 7ada491..f5c423d 100644 --- a/fsw/inc/hk_extern_typedefs.h +++ b/config/default_hk_tbldefs.h @@ -1,8 +1,8 @@ /************************************************************************ - * NASA Docket No. GSC-18,447-1, and identified as “CFS CFDP (CF) - * Application version 3.0.0” + * NASA Docket No. GSC-18,919-1, and identified as “Core Flight + * System (cFS) Housekeeping (HK) Application version 2.5.1” * - * Copyright (c) 2019 United States Government as represented by the + * Copyright (c) 2021 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. * All Rights Reserved. * @@ -19,12 +19,12 @@ /** * @file - * - * Declarations and prototypes for hk_extern_typedefs module + * Specification for the CFS Housekeeping (HK) table related + * constant definitions. */ -#ifndef HK_EXTERN_TYPEDEFS_H -#define HK_EXTERN_TYPEDEFS_H +#ifndef HK_TBLDEFS_H +#define HK_TBLDEFS_H /** * \brief Maximum Number of HK Copy Table Entries @@ -33,8 +33,8 @@ * Dictates the number of elements in the hk copy table. * * \par Limits - * The maximum size of this paramater is 8192 + * The maximum size of this parameter is 8192 */ #define HK_COPY_TABLE_ENTRIES 128 -#endif /* HK_EXTERN_TYPEDEFS_H */ \ No newline at end of file +#endif diff --git a/fsw/inc/hk_tbldefs.h b/config/default_hk_tblstruct.h similarity index 81% rename from fsw/inc/hk_tbldefs.h rename to config/default_hk_tblstruct.h index ad43e42..7c594b1 100644 --- a/fsw/inc/hk_tbldefs.h +++ b/config/default_hk_tblstruct.h @@ -19,19 +19,20 @@ /** * @file - * The CFS Housekeeping (HK) Application header file + * + * CFS Housekeeping (HK) Application Table Structure Definition + * + * Provides default definitions for HK table structures + * + * @note This file may be overridden/superseded by mission-provided definitions + * either by overriding this header or by generating definitions from a command/data + * dictionary tool. */ -#ifndef HK_TBLDEFS_H -#define HK_TBLDEFS_H -/************************************************************************ -** Includes -*************************************************************************/ -#include +#ifndef HK_TBLSTRUCT_H +#define HK_TBLSTRUCT_H -/************************************************************************* -** Type definitions -**************************************************************************/ +#include "cfe.h" /** \brief HK Copy Table Entry Format */ diff --git a/docs/dox_src/hk-common.doxyfile.in b/docs/dox_src/hk-common.doxyfile.in index 5c0b39b..8548ba9 100644 --- a/docs/dox_src/hk-common.doxyfile.in +++ b/docs/dox_src/hk-common.doxyfile.in @@ -5,3 +5,4 @@ # Include front material followed by everything in fsw INPUT += @hk_MISSION_DIR@/docs/dox_src/cfs_hk.dox INPUT += @hk_MISSION_DIR@/fsw +INPUT += @hk_MISSION_DIR@/config diff --git a/fsw/inc/hk_events.h b/fsw/inc/hk_eventids.h similarity index 100% rename from fsw/inc/hk_events.h rename to fsw/inc/hk_eventids.h diff --git a/fsw/src/hk_app.c b/fsw/src/hk_app.c index 6a2f05f..e258a29 100644 --- a/fsw/src/hk_app.c +++ b/fsw/src/hk_app.c @@ -27,7 +27,8 @@ ** Includes *************************************************************************/ #include "hk_app.h" -#include "hk_events.h" +#include "hk_eventids.h" +#include "hk_msg.h" #include "hk_msgids.h" #include "hk_perfids.h" #include "hk_verify.h" diff --git a/fsw/src/hk_app.h b/fsw/src/hk_app.h index cb2e745..673587b 100644 --- a/fsw/src/hk_app.h +++ b/fsw/src/hk_app.h @@ -29,11 +29,10 @@ ************************************************************************/ #include "cfe.h" -#include "hk_msgdefs.h" #include "hk_msg.h" #include "hk_utils.h" #include "hk_platform_cfg.h" -#include "hk_extern_typedefs.h" +#include "hk_tbl.h" /************************************************************************* * Macro definitions @@ -185,7 +184,7 @@ void HK_NoopCmd(const CFE_SB_Buffer_t *BufPtr); * * \par Description * Processes a reset counters ground command which will reset - * the memory manager commmand error and command execution counters + * the memory manager command error and command execution counters * to zero. * * \par Assumptions, External Events, and Notes: diff --git a/fsw/src/hk_dispatch.c b/fsw/src/hk_dispatch.c index c4f6516..a44bdb5 100644 --- a/fsw/src/hk_dispatch.c +++ b/fsw/src/hk_dispatch.c @@ -27,7 +27,7 @@ ** Includes *************************************************************************/ #include "hk_app.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_msgids.h" #include "hk_dispatch.h" #include "hk_utils.h" @@ -66,7 +66,7 @@ int32 HK_VerifyCmdLength(const CFE_SB_Buffer_t *BufPtr, size_t ExpectedLength) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* Verify Non-Command Msg Length (Event is differnt) */ +/* Verify Non-Command Msg Length (Event is different) */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ int32 HK_VerifyMsgLength(const CFE_SB_Buffer_t *BufPtr, size_t ExpectedLength) diff --git a/fsw/src/hk_dispatch.h b/fsw/src/hk_dispatch.h index 8735f3e..7260c5c 100644 --- a/fsw/src/hk_dispatch.h +++ b/fsw/src/hk_dispatch.h @@ -45,7 +45,7 @@ * None * * \param[in] BufPtr Pointer to the Software Buss Buffer - * \param[in] ExpectedLength The expected lenght of the command + * \param[in] ExpectedLength The expected length of the command * * \return Command Length Status * \retval #HK_SUCCESS Length Valid diff --git a/fsw/src/hk_utils.c b/fsw/src/hk_utils.c index 9cff1d7..74505d3 100644 --- a/fsw/src/hk_utils.c +++ b/fsw/src/hk_utils.c @@ -30,7 +30,7 @@ #include "cfe.h" #include "hk_utils.h" #include "hk_app.h" -#include "hk_events.h" +#include "hk_eventids.h" #include /************************************************************************* diff --git a/fsw/src/hk_utils.h b/fsw/src/hk_utils.h index 518ee5f..260de24 100644 --- a/fsw/src/hk_utils.h +++ b/fsw/src/hk_utils.h @@ -28,7 +28,7 @@ * Includes ************************************************************************/ #include "cfe.h" -#include "hk_tbldefs.h" +#include "hk_tbl.h" /************************************************************************* * Macro definitions diff --git a/fsw/tables/hk_cpy_tbl.c b/fsw/tables/hk_cpy_tbl.c index fc7f38a..1170f58 100644 --- a/fsw/tables/hk_cpy_tbl.c +++ b/fsw/tables/hk_cpy_tbl.c @@ -27,9 +27,8 @@ *************************************************************************/ #include "cfe.h" #include "cfe_msgids.h" -#include "hk_extern_typedefs.h" +#include "hk_tbl.h" #include "hk_msgids.h" -#include "hk_tbldefs.h" #include "cfe_tbl_filedef.h" hk_copy_table_entry_t HK_CopyTable[HK_COPY_TABLE_ENTRIES] = { diff --git a/mission_build.cmake b/mission_build.cmake index 8985f56..04beb44 100644 --- a/mission_build.cmake +++ b/mission_build.cmake @@ -1,4 +1,42 @@ -# App specific mission scope configuration +########################################################### +# +# HK App mission build setup +# +# This file is evaluated as part of the "prepare" stage +# and can be used to set up prerequisites for the build, +# such as generating header files +# +########################################################### # Add stand alone documentation add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/docs/dox_src ${MISSION_BINARY_DIR}/docs/hk-usersguide) + +# The list of header files that control the HK configuration +set(HK_MISSION_CONFIG_FILE_LIST + hk_fcncodes.h + hk_interface_cfg.h + hk_mission_cfg.h + hk_msg.h + hk_msgdefs.h + hk_msgstruct.h + hk_tbl.h + hk_tbldefs.h + hk_tblstruct.h +) + +# Create wrappers around the all the config header files +# This makes them individually overridable by the missions, without modifying +# the distribution default copies +foreach(HK_CFGFILE ${HK_MISSION_CONFIG_FILE_LIST}) + get_filename_component(CFGKEY "${HK_CFGFILE}" NAME_WE) + if (DEFINED HK_CFGFILE_SRC_${CFGKEY}) + set(DEFAULT_SOURCE "${HK_CFGFILE_SRC_${CFGKEY}}") + else() + set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${HK_CFGFILE}") + endif() + + generate_config_includefile( + FILE_NAME "${HK_CFGFILE}" + FALLBACK_FILE "${DEFAULT_SOURCE}" + ) +endforeach() diff --git a/unit-test/hk_app_tests.c b/unit-test/hk_app_tests.c index edb0c5d..265bae5 100644 --- a/unit-test/hk_app_tests.c +++ b/unit-test/hk_app_tests.c @@ -23,7 +23,7 @@ #include "hk_app.h" #include "hk_msg.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_version.h" #include "hk_msgids.h" #include "hk_utils.h" @@ -50,7 +50,7 @@ uint8 call_count_CFE_EVS_SendEvent; * Function under test: HK_AppMain * * Case: Tests the "nominal" mode where all dependent calls should be - * successful by defaut. + * successful by default. */ void Test_HK_AppMain_Success(void) { diff --git a/unit-test/hk_dispatch_tests.c b/unit-test/hk_dispatch_tests.c index 4b9300e..3caeeb5 100644 --- a/unit-test/hk_dispatch_tests.c +++ b/unit-test/hk_dispatch_tests.c @@ -23,7 +23,7 @@ #include "hk_dispatch.h" #include "hk_msg.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_msgids.h" #include "hk_test_utils.h" diff --git a/unit-test/hk_utils_tests.c b/unit-test/hk_utils_tests.c index fe2483e..11d01f2 100644 --- a/unit-test/hk_utils_tests.c +++ b/unit-test/hk_utils_tests.c @@ -23,7 +23,7 @@ #include "hk_app.h" #include "hk_msg.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_version.h" #include "hk_msgids.h" #include "hk_utils.h" @@ -1952,7 +1952,7 @@ void UtTest_Setup(void) UtTest_Add(Test_HK_ProcessIncomingHkData_MessageError, HK_Test_Setup, HK_Test_TearDown, "Test_HK_ProcessIncomingHkData_MessageError"); - /* Test functions for HK_VaidateHkCopyTable */ + /* Test functions for HK_ValidateHkCopyTable */ UtTest_Add(Test_HK_ValidateHkCopyTable_Success, HK_Test_Setup, HK_Test_TearDown, "Test_HK_ValidateHkCopyTable_Success"); UtTest_Add(Test_HK_ValidateHkCopyTable_Error, HK_Test_Setup, HK_Test_TearDown, diff --git a/unit-test/utilities/hk_test_utils.c b/unit-test/utilities/hk_test_utils.c index a0c349b..431482f 100644 --- a/unit-test/utilities/hk_test_utils.c +++ b/unit-test/utilities/hk_test_utils.c @@ -25,7 +25,7 @@ #include "cfe_msgids.h" #include "hk_app.h" #include "hk_msg.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_version.h" #include "hk_msgids.h" #include "hk_test_utils.h" diff --git a/unit-test/utilities/hk_test_utils.h b/unit-test/utilities/hk_test_utils.h index 399282d..87bfdaa 100644 --- a/unit-test/utilities/hk_test_utils.h +++ b/unit-test/utilities/hk_test_utils.h @@ -22,10 +22,10 @@ #include "hk_app.h" #include "hk_msg.h" -#include "hk_events.h" +#include "hk_eventids.h" #include "hk_version.h" #include "hk_msgids.h" -#include "hk_tbldefs.h" +#include "hk_tbl.h" #include "cfe_msgids.h"