-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #150, implement header file convention for SCH_LAB
Move configurable header files into a separate directory with names according to the pattern documented in CFE.
- Loading branch information
Showing
11 changed files
with
249 additions
and
43 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
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,24 @@ | ||
########################################################### | ||
# | ||
# SCH_LAB 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 SCH_LAB configuration | ||
set(SCH_LAB_PLATFORM_CONFIG_FILE_LIST | ||
sch_lab_perfids.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(SCH_LAB_CFGFILE ${SCH_LAB_PLATFORM_CONFIG_FILE_LIST}) | ||
generate_config_includefile( | ||
FILE_NAME "${SCH_LAB_CFGFILE}" | ||
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SCH_LAB_CFGFILE}" | ||
) | ||
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,47 @@ | ||
/************************************************************************ | ||
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” | ||
* | ||
* Copyright (c) 2020 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 SCH_LAB 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/superceded by mission-provided defintions | ||
* either by overriding this header or by generating definitions from a command/data | ||
* dictionary tool. | ||
*/ | ||
#ifndef SCH_LAB_INTERFACE_CFG_H | ||
#define SCH_LAB_INTERFACE_CFG_H | ||
|
||
|
||
/** | ||
* @brief The maximum number of schedule table entries | ||
*/ | ||
#define SCH_LAB_MAX_SCHEDULE_ENTRIES 32 | ||
|
||
/** | ||
* @brief The maximum number of arguments to each schedule message entry | ||
* | ||
* This is allocated in units of 16 bit words. | ||
*/ | ||
#define SCH_LAB_MAX_ARGS_PER_ENTRY 32 | ||
|
||
#endif /* SCH_LAB_INTERFACE_CFG_H */ |
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,36 @@ | ||
/************************************************************************ | ||
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” | ||
* | ||
* Copyright (c) 2020 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 SCH_LAB 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/superceded by mission-provided defintions | ||
* either by overriding this header or by generating definitions from a command/data | ||
* dictionary tool. | ||
*/ | ||
#ifndef SCH_LAB_MISSION_CFG_H | ||
#define SCH_LAB_MISSION_CFG_H | ||
|
||
#include "sch_lab_interface_cfg.h" | ||
|
||
#endif /* SCH_LAB_MISSION_CFG_H */ |
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
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,33 @@ | ||
/************************************************************************ | ||
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” | ||
* | ||
* Copyright (c) 2020 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 SCH_LAB table structures | ||
* | ||
* @note | ||
* Constants and enumerated types related to these table structures | ||
* are defined in sch_lab_tbldefs.h. | ||
*/ | ||
#ifndef SCH_LAB_TBL_H | ||
#define SCH_LAB_TBL_H | ||
|
||
#include "sch_lab_tbldefs.h" | ||
#include "sch_lab_tblstruct.h" | ||
|
||
#endif |
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
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,41 @@ | ||
/************************************************************************ | ||
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” | ||
* | ||
* Copyright (c) 2020 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 SCH_LAB table encapsulation structures | ||
* | ||
* Provides default definitions for SCH_LAB table structures | ||
* | ||
* @note This file may be overridden/superceded by mission-provided defintions | ||
* either by overriding this header or by generating definitions from a command/data | ||
* dictionary tool. | ||
*/ | ||
#ifndef SCH_LAB_TBLSTRUCT_H | ||
#define SCH_LAB_TBLSTRUCT_H | ||
|
||
#include "sch_lab_tbldefs.h" | ||
|
||
|
||
/* | ||
* There is no extra encapsulation here, this header only | ||
* defines the default file name to use for the SCH table | ||
*/ | ||
#define SCH_TBL_DEFAULT_FILE "/cf/sch_lab_table.tbl" | ||
|
||
#endif |
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
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
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,43 @@ | ||
########################################################### | ||
# | ||
# SCH_LAB 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 | ||
# | ||
########################################################### | ||
|
||
# The list of header files that control the SCH_LAB configuration | ||
set(SCH_LAB_MISSION_CONFIG_FILE_LIST | ||
sch_lab_interface_cfg.h | ||
sch_lab_mission_cfg.h | ||
sch_lab_perfids.h | ||
sch_lab_tbldefs.h | ||
sch_lab_tbl.h | ||
sch_lab_tblstruct.h | ||
) | ||
|
||
if (CFE_EDS_ENABLED_BUILD) | ||
|
||
# In an EDS-based build, these files come generated from the EDS tool | ||
set(SCH_LAB_CFGFILE_SRC_sch_lab_interface_cfg "sch_lab_eds_designparameters.h") | ||
set(SCH_LAB_CFGFILE_SRC_sch_lab_tbldefs "sch_lab_eds_typedefs.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(SCH_LAB_CFGFILE ${SCH_LAB_MISSION_CONFIG_FILE_LIST}) | ||
get_filename_component(CFGKEY "${SCH_LAB_CFGFILE}" NAME_WE) | ||
if (DEFINED SCH_LAB_CFGFILE_SRC_${CFGKEY}) | ||
set(DEFAULT_SOURCE GENERATED_FILE "${SCH_LAB_CFGFILE_SRC_${CFGKEY}}") | ||
else() | ||
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SCH_LAB_CFGFILE}") | ||
endif() | ||
generate_config_includefile( | ||
FILE_NAME "${SCH_LAB_CFGFILE}" | ||
${DEFAULT_SOURCE} | ||
) | ||
endforeach() |