Skip to content

Commit

Permalink
Fix nasa#2320, reorganize TIME header files
Browse files Browse the repository at this point in the history
Organize TIME header file contents according to the convention
  • Loading branch information
jphickey committed May 4, 2023
1 parent 5406656 commit f9c6de9
Show file tree
Hide file tree
Showing 15 changed files with 1,249 additions and 452 deletions.
32 changes: 32 additions & 0 deletions modules/time/arch_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###########################################################
#
# TIME 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 TIME configuration
set(TIME_PLATFORM_CONFIG_FILE_LIST
cfe_time_internal_cfg.h
cfe_time_msgids.h
cfe_time_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(TIME_CFGFILE ${TIME_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${TIME_CFGFILE}" NAME_WE)
if (DEFINED TIME_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE "${TIME_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TIME_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${TIME_CFGFILE}"
FALLBACK_FILE ${DEFAULT_SOURCE}
)
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
#ifndef CFE_TIME_EXTERN_TYPEDEFS_H
#define CFE_TIME_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_time_eds_typedefs.h"

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

#include "common_types.h"

/**
Expand Down Expand Up @@ -289,6 +279,4 @@ enum CFE_TIME_SetState
*/
typedef uint8 CFE_TIME_SetState_Enum_t;

#endif /* CFE_EDS_ENABLED_BUILD */

#endif /* CFE_TIME_EXTERN_TYPEDEFS_H */
Loading

0 comments on commit f9c6de9

Please sign in to comment.