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/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ name: Build and Deploy Documentation

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

jobs:
build-documentation:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-run-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ name: Build and Run

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

jobs:
build-run:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +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 @@ -3,7 +3,15 @@ name: Static Analysis
# Run on all push and pull requests
on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
static-analysis:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/unit-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ name: Unit Test and Coverage

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

jobs:
unit-test-coverage:
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,26 @@ set(APP_SRC_FILES
fsw/src/sc_state.c
fsw/src/sc_loads.c
fsw/src/sc_cmds.c
fsw/src/sc_dispatch.c
)

if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES fsw/src/sc_eds_dispatch.c)
else()
list(APPEND APP_SRC_FILES fsw/src/sc_dispatch.c)
endif()

# Create the app module
add_cfe_app(sc ${APP_SRC_FILES})

# This permits direct access to public headers in the fsw/inc directory
target_include_directories(sc PUBLIC fsw/inc)

set(APP_TABLE_FILES
fsw/tables/sc_rts001.c
fsw/tables/sc_ats1.c
fsw/tables/sc_rts001.c
fsw/tables/sc_rts002.c
fsw/tables/sc_rts003.c
fsw/tables/sc_rts004.c
)

add_cfe_tables(sc ${APP_TABLE_FILES})
Expand Down
30 changes: 5 additions & 25 deletions arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,11 @@

# The list of header files that control the SC configuration
set(SC_PLATFORM_CONFIG_FILE_LIST
sc_internal_cfg.h
sc_msgids.h
sc_perfids.h
sc_internal_cfg_values.h
sc_platform_cfg.h
sc_perfids.h
sc_msgids.h
sc_msgid_values.h
)

if (CFE_EDS_ENABLED_BUILD)

# In an EDS-based build, msgids come generated from the EDS tool
set(SC_CFGFILE_SRC_sc_msgids "${CMAKE_CURRENT_LIST_DIR}/config/sc_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(SC_CFGFILE ${SC_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${SC_CFGFILE}" NAME_WE)
if (DEFINED SC_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE GENERATED_FILE "${SC_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${SC_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${SC_CFGFILE}"
${DEFAULT_SOURCE}
)
endforeach()
generate_configfile_set(${SC_PLATFORM_CONFIG_FILE_LIST})
40 changes: 37 additions & 3 deletions config/default_sc_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,924-1, and identified as “Core Flight
* System (cFS) Stored Command Application version 3.1.1”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2021 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 @@ -27,6 +26,41 @@

#include "common_types.h"

/**
* ATS/RTS Cmd Status Enumeratoion
*/
enum SC_Status
{
SC_Status_EMPTY, /**< \brief the object is not loaded */
SC_Status_LOADED, /**< \brief the object is loaded */
SC_Status_IDLE, /**< \brief the object is not executing */
SC_Status_EXECUTED, /**< \brief the object has completed executing */
SC_Status_SKIPPED, /**< \brief the object (ats command) was skipped */
SC_Status_EXECUTING, /**< \brief the object is currently executing */
SC_Status_FAILED_CHECKSUM, /**< \brief the object failed a checksum test */
SC_Status_FAILED_DISTRIB, /**< \brief the object could not be sent on the SWB */
SC_Status_STARTING /**< \brief used when an inline switch is executed */
};

typedef uint8 SC_Status_Enum_t;

#ifndef SC_OMIT_DEPRECATED
/**
* \name Old-style ATS/RTS Cmd Status macros
* \{
*/
#define SC_EMPTY SC_Status_EMPTY
#define SC_LOADED SC_Status_LOADED
#define SC_IDLE SC_Status_IDLE
#define SC_EXECUTED SC_Status_EXECUTED
#define SC_SKIPPED SC_Status_SKIPPED
#define SC_EXECUTING SC_Status_EXECUTING
#define SC_FAILED_CHECKSUM SC_Status_FAILED_CHECKSUM
#define SC_FAILED_DISTRIB SC_Status_FAILED_DISTRIB
#define SC_STARTING SC_Status_STARTING
/**\}*/
#endif

/**
* @brief An identifier for RTS's
*
Expand Down
51 changes: 51 additions & 0 deletions config/default_sc_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/************************************************************************
* 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
* The CFS Data Storage (DS) Application Message IDs header file
*/
#ifndef DEFAULT_SC_FCNCODE_VALUES_H
#define DEFAULT_SC_FCNCODE_VALUES_H

#define SC_CCVAL(x) SC_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

enum SC_FunctionCode
{
SC_FunctionCode_NOOP = 0,
SC_FunctionCode_RESET_COUNTERS = 1,
SC_FunctionCode_SET_APP_STATE = 2,
SC_FunctionCode_SET_FILTER_FILE = 3,
SC_FunctionCode_SET_FILTER_TYPE = 4,
SC_FunctionCode_SET_FILTER_PARMS = 5,
SC_FunctionCode_SET_DEST_TYPE = 6,
SC_FunctionCode_SET_DEST_STATE = 7,
SC_FunctionCode_SET_DEST_PATH = 8,
SC_FunctionCode_SET_DEST_BASE = 9,
SC_FunctionCode_SET_DEST_EXT = 10,
SC_FunctionCode_SET_DEST_SIZE = 11,
SC_FunctionCode_SET_DEST_AGE = 12,
SC_FunctionCode_SET_DEST_COUNT = 13,
SC_FunctionCode_CLOSE_FILE = 14,
SC_FunctionCode_GET_FILE_INFO = 15,
SC_FunctionCode_ADD_MID = 16,
SC_FunctionCode_REMOVE_MID = 17,
SC_FunctionCode_CLOSE_ALL = 18,
};

#endif
39 changes: 39 additions & 0 deletions config/default_sc_interface_cfg_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/************************************************************************
* 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
* The CFS Data Storage (DS) 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 DEFAULT_SC_INTERFACE_CFG_VALUES_H
#define DEFAULT_SC_INTERFACE_CFG_VALUES_H

/* Use the default configuration value for all */
#define SC_INTERFACE_CFGVAL(x) DEFAULT_SC_INTERFACE_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
38 changes: 38 additions & 0 deletions config/default_sc_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
* The CFS Data Storage (DS) 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 DEFAULT_SC_INTERNAL_CFG_H
#define DEFAULT_SC_INTERNAL_CFG_H

/* Use the default configuration value for all */
#define SC_INTERNAL_CFGVAL(x) DEFAULT_SC_INTERNAL_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
9 changes: 4 additions & 5 deletions config/default_sc_mission_cfg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,924-1, and identified as “Core Flight
* System (cFS) Stored Command Application version 3.1.1”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2021 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 @@ -29,8 +28,8 @@
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef SC_MISSION_CFG_H
#define SC_MISSION_CFG_H
#ifndef DEFAULT_SC_MISSION_CFG_H
#define DEFAULT_SC_MISSION_CFG_H

#include "sc_interface_cfg.h"

Expand Down
13 changes: 8 additions & 5 deletions config/default_sc_msg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,924-1, and identified as “Core Flight
* System (cFS) Stored Command Application version 3.1.1”
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2021 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 @@ -29,11 +28,15 @@
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef SC_MSG_H
#define SC_MSG_H
#ifndef DEFAULT_SC_MSG_H
#define DEFAULT_SC_MSG_H

#include "sc_interface_cfg.h"
#include "sc_fcncodes.h"
#include "sc_msgdefs.h"
#include "sc_msgstruct.h"

#define SC_MAX_TIME 0xFFFFFFFF /**< \brief Maximum time in SC */
#define SC_MAX_WAKEUP_CNT 0xFFFFFFFF /**< \brief Maximum wakeup count in SC */

#endif
Loading
Loading