-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #418, reorganize header files and restructure messages
Move the header files to a "config" directory as documented in the CFE guidelines, which allows easier override. Organize the content to adhere to the patterns. Specifically - adds a dedicated structure type for each cmd, and also puts the payload into a separate sub-structure. Command handlers and tests updated accordingly (many of which were simplified).
- Loading branch information
Showing
38 changed files
with
2,802 additions
and
2,181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
########################################################### | ||
# | ||
# CF 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 CF configuration | ||
set(CF_PLATFORM_CONFIG_FILE_LIST | ||
cf_internal_cfg.h | ||
cf_msgids.h | ||
cf_platform_cfg.h | ||
) | ||
|
||
if (CFE_EDS_ENABLED_BUILD) | ||
|
||
# In an EDS-based build, msgids come generated from the EDS tool | ||
set(CF_CFGFILE_SRC_cf_msgids "${CMAKE_CURRENT_LIST_DIR}/config/cf_eds_msg_topicids.h") | ||
|
||
endif(CFE_EDS_ENABLED_BUILD) | ||
|
||
# Create wrappers around the all the config header files | ||
# This makes them individually overridable by the missions, without modifying | ||
# the distribution default copies | ||
foreach(CF_CFGFILE ${CF_PLATFORM_CONFIG_FILE_LIST}) | ||
get_filename_component(CFGKEY "${CF_CFGFILE}" NAME_WE) | ||
if (DEFINED CF_CFGFILE_SRC_${CFGKEY}) | ||
set(DEFAULT_SOURCE "${CF_CFGFILE_SRC_${CFGKEY}}") | ||
else() | ||
set(DEFAULT_SOURCE "${CMAKE_CURRENT_LIST_DIR}/config/default_${CF_CFGFILE}") | ||
endif() | ||
generate_config_includefile( | ||
FILE_NAME "${CF_CFGFILE}" | ||
FALLBACK_FILE ${DEFAULT_SOURCE} | ||
) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/************************************************************************ | ||
* NASA Docket No. GSC-18,447-1, and identified as “CFS CFDP (CF) | ||
* Application version 3.0.0” | ||
* | ||
* Copyright (c) 2019 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. | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.