Skip to content

Commit

Permalink
Fix nasa#2320, reorganize TBL header files
Browse files Browse the repository at this point in the history
Organize TBL header file contents according to the convention
  • Loading branch information
jphickey committed May 4, 2023
1 parent 941468d commit 4c79b5f
Show file tree
Hide file tree
Showing 17 changed files with 1,124 additions and 466 deletions.
2 changes: 1 addition & 1 deletion modules/tbl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ endif(ENABLE_UNIT_TESTS)

cfs_app_check_intf(${DEP}
cfe_tbl_msg.h
cfe_tbl_events.h
cfe_tbl_eventids.h
)
32 changes: 32 additions & 0 deletions modules/tbl/arch_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###########################################################
#
# TBL Core Module 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 TBL configuration
set(TBL_PLATFORM_CONFIG_FILE_LIST
cfe_tbl_internal_cfg.h
cfe_tbl_msgids.h
cfe_tbl_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(TBL_CFGFILE ${TBL_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${TBL_CFGFILE}" NAME_WE)
if (DEFINED TBL_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE "${TBL_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TBL_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${TBL_CFGFILE}"
FALLBACK_FILE ${DEFAULT_SOURCE}
)
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
#ifndef CFE_TBL_EXTERN_TYPEDEFS_H
#define CFE_TBL_EXTERN_TYPEDEFS_H

/* This header may be generated from an EDS file,
* tools are available and the feature is enabled */
#ifdef CFE_EDS_ENABLED_BUILD

/* Use the EDS generated version of these types */
#include "cfe_tbl_eds_typedefs.h"

#else
/* Use the local definitions of these types */

#include "common_types.h"
#include "cfe_es_extern_typedefs.h"
#include "cfe_mission_cfg.h" /* for CFE_MISSION_TBL_MAX_FULL_NAME_LEN */
Expand Down Expand Up @@ -79,6 +69,4 @@ typedef struct CFE_TBL_File_Hdr
char TableName[CFE_MISSION_TBL_MAX_FULL_NAME_LEN]; /**< Fully qualified name of table to load */
} CFE_TBL_File_Hdr_t;

#endif /* CFE_EDS_ENABLED_BUILD */

#endif /* CFE_TBL_EXTERN_TYPEDEFS_H */
Loading

0 comments on commit 4c79b5f

Please sign in to comment.