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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ set(APP_SRC_FILES
fsw/src/cs_compute.c
)

if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES fsw/src/cs_eds_dispatch.c)
else()
list(APPEND APP_SRC_FILES fsw/src/cs_dispatch.c)
endif()

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

Expand Down
19 changes: 19 additions & 0 deletions arch_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###########################################################
#
# CS 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 app configuration
set(CS_PLATFORM_CONFIG_FILE_LIST
cs_internal_cfg_values.h
cs_msgid_values.h
cs_msgids.h
cs_platform_cfg.h
)

generate_configfile_set(${CS_PLATFORM_CONFIG_FILE_LIST})
74 changes: 74 additions & 0 deletions config/default_cs_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/************************************************************************
* 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 CFS Checksum command and telemetry
* messages.
*/
#ifndef DEFAULT_CS_EXTERN_TYPEDEFS_H
#define DEFAULT_CS_EXTERN_TYPEDEFS_H

/**
* \name CS Checksum Type Number Definitions
* \{
*/

typedef enum
{
CS_ChecksumType_CFECORE = 0, /**< \brief cFE Core checksum */
CS_ChecksumType_OSCORE = 1, /**< \brief OS Core checksum */
CS_ChecksumType_EEPROM_TABLE = 2, /**< \brief EEPROM checksum */
CS_ChecksumType_MEMORY_TABLE = 3, /**< \brief Memory checksum */
CS_ChecksumType_TABLES_TABLE = 4, /**< \brief Tables checksum */
CS_ChecksumType_APP_TABLE = 5 /**< \brief App checksum */
} CS_ChecksumType_Enum_t;

/* Compatibility macros (e.g. existing table definitions) */
#define CS_CFECORE CS_ChecksumType_CFECORE
#define CS_OSCORE CS_ChecksumType_OSCORE
#define CS_EEPROM_TABLE CS_ChecksumType_EEPROM_TABLE
#define CS_MEMORY_TABLE CS_ChecksumType_MEMORY_TABLE
#define CS_TABLES_TABLE CS_ChecksumType_TABLES_TABLE
#define CS_APP_TABLE CS_ChecksumType_APP_TABLE

#define CS_NUM_TABLES 6 /**< \brief Number of checksum types*/

/**\}*/

/**
* \name CS Checkum States
* \{
*/
typedef enum
{
CS_ChecksumState_EMPTY = 0x00, /**< \brief Entry unused */
CS_ChecksumState_ENABLED = 0x01, /**< \brief Entry or table enabled */
CS_ChecksumState_DISABLED = 0x02, /**< \brief Entry or table disabled */
CS_ChecksumState_UNDEFINED = 0x03 /**< \brief Entry not found state undefined */
} CS_ChecksumState_Enum_t;

/* Compatibility macros (e.g. existing table definitions) */
#define CS_STATE_EMPTY CS_ChecksumState_EMPTY
#define CS_STATE_ENABLED CS_ChecksumState_ENABLED
#define CS_STATE_DISABLED CS_ChecksumState_DISABLED
#define CS_STATE_UNDEFINED CS_ChecksumState_UNDEFINED

/**\}*/

#endif
73 changes: 73 additions & 0 deletions config/default_cs_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/************************************************************************
* 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 CFS Checksum command and telemetry
* messages.
*/
#ifndef DEFAULT_CS_FCNCODE_VALUES_H
#define DEFAULT_CS_FCNCODE_VALUES_H

#define CS_CCVAL(x) CS_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

enum CS_FunctionCode
{
CS_FunctionCode_NOOP = 0,
CS_FunctionCode_RESET = 1,
CS_FunctionCode_ONE_SHOT = 2,
CS_FunctionCode_CANCEL_ONE_SHOT = 3,
CS_FunctionCode_ENABLE_ALL_CS = 4,
CS_FunctionCode_DISABLE_ALL_CS = 5,
CS_FunctionCode_ENABLE_CFE_CORE = 6,
CS_FunctionCode_DISABLE_CFE_CORE = 7,
CS_FunctionCode_REPORT_BASELINE_CFE_CORE = 8,
CS_FunctionCode_RECOMPUTE_BASELINE_CFE_CORE = 9,
CS_FunctionCode_ENABLE_OS = 10,
CS_FunctionCode_DISABLE_OS = 11,
CS_FunctionCode_REPORT_BASELINE_OS = 12,
CS_FunctionCode_RECOMPUTE_BASELINE_OS = 13,
CS_FunctionCode_ENABLE_EEPROM = 14,
CS_FunctionCode_DISABLE_EEPROM = 15,
CS_FunctionCode_REPORT_BASELINE_ENTRY_ID_EEPROM = 16,
CS_FunctionCode_RECOMPUTE_BASELINE_EEPROM = 17,
CS_FunctionCode_ENABLE_ENTRY_ID_EEPROM = 18,
CS_FunctionCode_DISABLE_ENTRY_ID_EEPROM = 19,
CS_FunctionCode_GET_ENTRY_ID_EEPROM = 20,
CS_FunctionCode_ENABLE_MEMORY = 21,
CS_FunctionCode_DISABLE_MEMORY = 22,
CS_FunctionCode_REPORT_BASELINE_ENTRY_ID_MEMORY = 23,
CS_FunctionCode_RECOMPUTE_BASELINE_MEMORY = 24,
CS_FunctionCode_ENABLE_ENTRY_ID_MEMORY = 25,
CS_FunctionCode_DISABLE_ENTRY_ID_MEMORY = 26,
CS_FunctionCode_GET_ENTRY_ID_MEMORY = 27,
CS_FunctionCode_ENABLE_TABLES = 28,
CS_FunctionCode_DISABLE_TABLES = 29,
CS_FunctionCode_REPORT_BASELINE_TABLE = 30,
CS_FunctionCode_RECOMPUTE_BASELINE_TABLE = 31,
CS_FunctionCode_ENABLE_NAME_TABLE = 32,
CS_FunctionCode_DISABLE_NAME_TABLE = 33,
CS_FunctionCode_ENABLE_APPS = 34,
CS_FunctionCode_DISABLE_APPS = 35,
CS_FunctionCode_REPORT_BASELINE_APP = 36,
CS_FunctionCode_RECOMPUTE_BASELINE_APP = 37,
CS_FunctionCode_ENABLE_NAME_APP = 38,
CS_FunctionCode_DISABLE_NAME_APP = 39,
};

#endif
39 changes: 39 additions & 0 deletions config/default_cs_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
* Checksum (CS) 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_CS_INTERFACE_CFG_VALUES_H
#define DEFAULT_CS_INTERFACE_CFG_VALUES_H

/* Use the default configuration value for all */
#define CS_INTERFACE_CFGVAL(x) DEFAULT_CS_INTERFACE_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
38 changes: 38 additions & 0 deletions config/default_cs_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
* Checksum (CS) 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_CS_INTERNAL_CFG_H
#define DEFAULT_CS_INTERNAL_CFG_H

/* Use the default configuration value for all */
#define CS_INTERNAL_CFGVAL(x) DEFAULT_CS_INTERNAL_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
Loading
Loading