Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ name: "CodeQL Analysis"

on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
codeql:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Format Check

# Run on all push and pull requests
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
format-check:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ name: Reuse Static Analysis

on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
static-analysis:
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(CFS_CI_LAB C)

set(APP_SRC_FILES
fsw/src/ci_lab_app.c
fsw/src/ci_lab_cmds.c
)

if (CFE_EDS_ENABLED_BUILD)
if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES
fsw/src/ci_lab_eds_dispatch.c
fsw/src/ci_lab_eds_decode.c
Expand Down
20 changes: 4 additions & 16 deletions arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,12 @@

# The list of header files that control the CI_LAB configuration
set(CI_LAB_PLATFORM_CONFIG_FILE_LIST
ci_lab_internal_cfg.h
ci_lab_internal_cfg_values.h
ci_lab_platform_cfg.h
ci_lab_perfids.h
ci_lab_msgids.h
ci_lab_msgid_values.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(CI_LAB_CFGFILE ${CI_LAB_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${CI_LAB_CFGFILE}" NAME_WE)
if (DEFINED CI_LAB_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE GENERATED_FILE "${CI_LAB_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${CI_LAB_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${CI_LAB_CFGFILE}"
${DEFAULT_SOURCE}
)
endforeach()
generate_configfile_set(${CI_LAB_PLATFORM_CONFIG_FILE_LIST})

43 changes: 43 additions & 0 deletions config/default_ci_lab_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 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 CI_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 DEFAULT_CI_LAB_FCNCODE_VALUES_H
#define DEFAULT_CI_LAB_FCNCODE_VALUES_H

/************************************************************************
* Macro Definitions
************************************************************************/

#define CI_LAB_CCVAL(x) CI_LAB_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CI_LAB_CCVAL(x) uses token pasting and is not allowed.

enum CI_LAB_FunctionCode
{
CI_LAB_FunctionCode_NOOP = 0,
CI_LAB_FunctionCode_RESET_COUNTERS = 1,
};

#endif
38 changes: 38 additions & 0 deletions config/default_ci_lab_interface_cfg_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 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
* CI_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 definitions
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef DEFAULT_CI_LAB_INTERFACE_CFG_VALUES_H
#define DEFAULT_CI_LAB_INTERFACE_CFG_VALUES_H

/* Use the default configuration value for all */
#define CI_LAB_MISSION_CFGVAL(x) DEFAULT_CI_LAB_MISSION_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CI_LAB_MISSION_CFGVAL(x) uses token pasting and is not allowed.

#endif
38 changes: 38 additions & 0 deletions config/default_ci_lab_internal_cfg_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 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
* CI_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 definitions
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef DEFAULT_CI_LAB_INTERNAL_CFG_VALUES_H
#define DEFAULT_CI_LAB_INTERNAL_CFG_VALUES_H

/* Use the default configuration value for all */
#define CI_LAB_PLATFORM_CFGVAL(x) DEFAULT_CI_LAB_PLATFORM_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CI_LAB_PLATFORM_CFGVAL(x) uses token pasting and is not allowed.

#endif
19 changes: 10 additions & 9 deletions config/default_ci_lab_mission_cfg.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2020 United States Government as represented by the
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
Expand All @@ -18,18 +18,19 @@

/**
* @file
* CI_LAB Application Public Definitions
*
* CI_LAB Application Mission Configuration Header File
* 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.
*
* 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
* @note This file may be overridden/superceded by mission-provided definitions
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef CI_LAB_MISSION_CFG_H
#define CI_LAB_MISSION_CFG_H
#ifndef DEFAULT_CI_LAB_MISSION_CFG_H
#define DEFAULT_CI_LAB_MISSION_CFG_H

#include "ci_lab_interface_cfg.h"

Expand Down
12 changes: 6 additions & 6 deletions config/default_ci_lab_msg.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2020 United States Government as represented by the
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
Expand All @@ -24,14 +24,14 @@
* This is a compatibility header for the "ci_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
* @note This file may be overridden/superceded by mission-provided definitions
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef CI_LAB_MSG_H
#define CI_LAB_MSG_H
#ifndef DEFAULT_CI_LAB_MSG_H
#define DEFAULT_CI_LAB_MSG_H

#include "ci_lab_interface_cfg.h"
#include "ci_lab_mission_cfg.h"
#include "ci_lab_msgdefs.h"
#include "ci_lab_msgstruct.h"

Expand Down
14 changes: 6 additions & 8 deletions config/default_ci_lab_msgdefs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2020 United States Government as represented by the
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
Expand All @@ -19,12 +19,10 @@
/**
* @file
* Specification for the CI_LAB command and telemetry
* message constant definitions.
*
* For CI_LAB this is only the function/command code definitions
* message payload and constant definitions.
*/
#ifndef CI_LAB_MSGDEFS_H
#define CI_LAB_MSGDEFS_H
#ifndef DEFAULT_CI_LAB_MSGDEFS_H
#define DEFAULT_CI_LAB_MSGDEFS_H

#include "ci_lab_fcncodes.h"

Expand All @@ -34,8 +32,8 @@
*/
typedef struct
{
uint8 CommandErrorCounter;
uint8 CommandCounter;
uint8 CommandErrorCounter;
uint8 EnableChecksums;
uint8 SocketConnected;
uint8 Spare1[8];
Expand Down
32 changes: 32 additions & 0 deletions config/default_ci_lab_msgid_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 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
* CI_LAB Application Message IDs
*/
#ifndef DEFAULT_CI_LAB_MSGID_VALUES_H
#define DEFAULT_CI_LAB_MSGID_VALUES_H

#include "cfe_core_api_base_msgids.h"
#include "ci_lab_topicids.h"

#define CI_LAB_CMD_PLATFORM_MIDVAL(x) CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CI_LAB_MISSION_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CI_LAB_CMD_PLATFORM_MIDVAL(x) uses token pasting and is not allowed.
#define CI_LAB_TLM_PLATFORM_MIDVAL(x) CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CI_LAB_MISSION_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CI_LAB_TLM_PLATFORM_MIDVAL(x) uses token pasting and is not allowed.

#endif
18 changes: 9 additions & 9 deletions config/default_ci_lab_msgids.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2020 United States Government as represented by the
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
Expand All @@ -20,15 +20,15 @@
* @file
* CI_LAB Application Message IDs
*/
#ifndef CI_LAB_MSGIDS_H
#define CI_LAB_MSGIDS_H
#ifndef DEFAULT_CI_LAB_MSGIDS_H
#define DEFAULT_CI_LAB_MSGIDS_H

#include "cfe_core_api_base_msgids.h"
#include "ci_lab_topicids.h"
#include "ci_lab_msgid_values.h"

#define CI_LAB_CMD_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_CMD_TOPICID)
#define CI_LAB_SEND_HK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_SEND_HK_TOPICID)
#define CI_LAB_READ_UPLINK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_READ_UPLINK_TOPICID)
#define CI_LAB_HK_TLM_MID CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CFE_MISSION_CI_LAB_HK_TLM_TOPICID)
#define CI_LAB_CMD_MID CI_LAB_CMD_PLATFORM_MIDVAL(CMD)
#define CI_LAB_SEND_HK_MID CI_LAB_CMD_PLATFORM_MIDVAL(SEND_HK)
#define CI_LAB_READ_UPLINK_MID CI_LAB_CMD_PLATFORM_MIDVAL(READ_UPLINK)
#define CI_LAB_HK_TLM_MID CI_LAB_TLM_PLATFORM_MIDVAL(HK_TLM)

#endif
8 changes: 4 additions & 4 deletions config/default_ci_lab_msgstruct.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2020 United States Government as represented by the
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
Expand All @@ -25,8 +25,8 @@
* Constants and enumerated types related to these message structures
* are defined in ci_lab_msgdefs.h.
*/
#ifndef CI_LAB_MSGSTRUCT_H
#define CI_LAB_MSGSTRUCT_H
#ifndef DEFAULT_CI_LAB_MSGSTRUCT_H
#define DEFAULT_CI_LAB_MSGSTRUCT_H

/************************************************************************
* Includes
Expand Down
Loading
Loading