-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize source files into a directory and naming pattern that is compliant with the CFE current recommended practice. Configurable items are moved to the respective header files and documentation is added to indicate what they do.
- Loading branch information
Showing
25 changed files
with
1,096 additions
and
515 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,27 @@ | ||
########################################################### | ||
# | ||
# TO_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 TO_LAB configuration | ||
set(TO_LAB_PLATFORM_CONFIG_FILE_LIST | ||
to_lab_internal_cfg.h | ||
to_lab_platform_cfg.h | ||
to_lab_perfids.h | ||
to_lab_msgids.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(TO_LAB_CFGFILE ${TO_LAB_PLATFORM_CONFIG_FILE_LIST}) | ||
generate_config_includefile( | ||
FILE_NAME "${TO_LAB_CFGFILE}" | ||
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TO_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,46 @@ | ||
/************************************************************************ | ||
* 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 TO_LAB command function codes | ||
* | ||
* @note | ||
* This file should be strictly limited to the command/function code (CC) | ||
* macro definitions. Other definitions such as enums, typedefs, or other | ||
* macros should be placed in the msgdefs.h or msg.h files. | ||
*/ | ||
#ifndef TO_LAB_FCNCODES_H | ||
#define TO_LAB_FCNCODES_H | ||
|
||
/************************************************************************ | ||
* Macro Definitions | ||
************************************************************************/ | ||
|
||
/* | ||
** TO_LAB command codes | ||
*/ | ||
#define TO_LAB_NOOP_CC 0 /* no-op command */ | ||
#define TO_LAB_RESET_STATUS_CC 1 /* reset status */ | ||
#define TO_LAB_ADD_PKT_CC 2 /* add packet */ | ||
#define TO_LAB_SEND_DATA_TYPES_CC 3 /* send data types */ | ||
#define TO_LAB_REMOVE_PKT_CC 4 /* remove packet */ | ||
#define TO_LAB_REMOVE_ALL_PKT_CC 5 /* remove all packet */ | ||
#define TO_LAB_OUTPUT_ENABLE_CC 6 /* output enable */ | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/************************************************************************ | ||
* 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 | ||
* TO_LAB Application Public Definitions | ||
* | ||
* This provides default values for configurable items that affect | ||
* the interface(s) of this module. This includes the CMD/TLM message | ||
* interface, tables definitions, and any other data products that | ||
* serve to exchange information with other entities. | ||
* | ||
* @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 TO_LAB_INTERFACE_CFG_H | ||
#define TO_LAB_INTERFACE_CFG_H | ||
|
||
/** | ||
* @brief The base UDP port number that TO_LAB will send to | ||
*/ | ||
#define TO_LAB_TLM_PORT 1235 | ||
|
||
/** | ||
* @brief The maximum number of subscriptions that TO_LAB can subscribe to | ||
*/ | ||
#define TO_LAB_MAX_SUBSCRIPTIONS 32 | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/************************************************************************ | ||
* 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 | ||
* TO_LAB Application Private Config Definitions | ||
* | ||
* This provides default values for configurable items that are internal | ||
* to this module and do NOT affect the interface(s) of this module. Changes | ||
* to items in this file only affect the local module and will be transparent | ||
* to external entities that are using the public interface(s). | ||
* | ||
* @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 TO_LAB_INTERNAL_CFG_H | ||
#define TO_LAB_INTERNAL_CFG_H | ||
|
||
/*****************************************************************************/ | ||
|
||
#define TO_LAB_TASK_MSEC 500 /* run at 2 Hz */ | ||
|
||
/** | ||
* Depth of pipe for commands to the TO_LAB application itself | ||
*/ | ||
#define TO_LAB_CMD_PIPE_DEPTH 8 | ||
|
||
/** | ||
* Depth of pipe for telemetry forwarded through the TO_LAB application | ||
*/ | ||
#define TO_LAB_TLM_PIPE_DEPTH OS_QUEUE_MAX_DEPTH | ||
|
||
#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
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 | ||
* | ||
* TO_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 TO_LAB_MISSION_CFG_H | ||
#define TO_LAB_MISSION_CFG_H | ||
|
||
#include "to_lab_interface_cfg.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/************************************************************************ | ||
* 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 TO_LAB command and telemetry | ||
* message data types. | ||
* | ||
* This is a compatibility header for the "to_lab_msg.h" file that has | ||
* traditionally provided the message definitions for cFS apps. | ||
* | ||
* @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 TO_LAB_MSG_H | ||
#define TO_LAB_MSG_H | ||
|
||
#include "to_lab_interface_cfg.h" | ||
#include "to_lab_msgdefs.h" | ||
#include "to_lab_msgstruct.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/************************************************************************ | ||
* 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 TO_LAB command and telemetry | ||
* message constant definitions. | ||
* | ||
* For TO_LAB this is only the function/command code definitions | ||
*/ | ||
#ifndef TO_LAB_MSGDEFS_H | ||
#define TO_LAB_MSGDEFS_H | ||
|
||
#include "common_types.h" | ||
#include "cfe_sb_extern_typedefs.h" | ||
#include "to_lab_fcncodes.h" | ||
|
||
typedef struct | ||
{ | ||
uint8 CommandCounter; | ||
uint8 CommandErrorCounter; | ||
uint8 spareToAlign[2]; | ||
} TO_LAB_HkTlm_Payload_t; | ||
|
||
typedef struct | ||
{ | ||
uint16 synch; | ||
uint8 bl1, bl2; /* boolean */ | ||
int8 b1, b2, b3, b4; | ||
int16 w1, w2; | ||
int32 dw1, dw2; | ||
float f1, f2; | ||
double df1, df2; | ||
char str[10]; | ||
} TO_LAB_DataTypes_Payload_t; | ||
|
||
typedef struct | ||
{ | ||
CFE_SB_MsgId_t Stream; | ||
CFE_SB_Qos_t Flags; | ||
uint8 BufLimit; | ||
} TO_LAB_AddPacket_Payload_t; | ||
|
||
typedef struct | ||
{ | ||
CFE_SB_MsgId_t Stream; | ||
} TO_LAB_RemovePacket_Payload_t; | ||
|
||
typedef struct | ||
{ | ||
char dest_IP[16]; | ||
} TO_LAB_EnableOutput_Payload_t; | ||
|
||
#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
Oops, something went wrong.