Skip to content

Commit

Permalink
Fix nasa#2320, reorganize EVS header files
Browse files Browse the repository at this point in the history
Organize EVS header file contents according to the convention
  • Loading branch information
jphickey committed May 3, 2023
1 parent 935fc45 commit 93e81e6
Show file tree
Hide file tree
Showing 13 changed files with 987 additions and 412 deletions.
32 changes: 32 additions & 0 deletions modules/evs/arch_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###########################################################
#
# EVS 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 EVS configuration
set(EVS_PLATFORM_CONFIG_FILE_LIST
cfe_evs_internal_cfg.h
cfe_evs_msgids.h
cfe_evs_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(EVS_CFGFILE ${EVS_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${EVS_CFGFILE}" NAME_WE)
if (DEFINED EVS_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE "${EVS_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${EVS_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${EVS_CFGFILE}"
FALLBACK_FILE ${DEFAULT_SOURCE}
)
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
#ifndef CFE_EVS_EXTERN_TYPEDEFS_H
#define CFE_EVS_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_evs_eds_typedefs.h"

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

#include "common_types.h"

/**
Expand Down Expand Up @@ -167,6 +157,4 @@ enum CFE_EVS_EventOutput
*/
typedef uint8 CFE_EVS_EventOutput_Enum_t;

#endif /* CFE_EDS_ENABLED_BUILD */

#endif /* CFE_EVS_EXTERN_TYPEDEFS_H */
Loading

0 comments on commit 93e81e6

Please sign in to comment.