Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ set(APP_SRC_FILES
fsw/src/lc_custom.c
fsw/src/lc_app.c
fsw/src/lc_cmds.c
fsw/src/lc_dispatch.c
fsw/src/lc_watch.c
fsw/src/lc_action.c
fsw/src/lc_utils.c
)

if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES
fsw/src/lc_eds_dispatch.c
)
else()
list(APPEND APP_SRC_FILES
fsw/src/lc_dispatch.c
)
endif()

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

Expand Down
22 changes: 4 additions & 18 deletions arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,10 @@

# The list of header files that control the app configuration
set(LC_PLATFORM_CONFIG_FILE_LIST
lc_internal_cfg.h
lc_msgids.h
lc_internal_cfg_values.h
lc_platform_cfg.h
lc_msgid_values.h
lc_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(LC_CFGFILE ${LC_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${LC_CFGFILE}" NAME_WE)
if (DEFINED LC_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE GENERATED_FILE "${LC_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${LC_CFGFILE}")
endif()

generate_config_includefile(
FILE_NAME "${LC_CFGFILE}"
${DEFAULT_SOURCE}
)
endforeach()
generate_configfile_set(${LC_PLATFORM_CONFIG_FILE_LIST})
45 changes: 45 additions & 0 deletions config/default_lc_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/************************************************************************
* 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 Limit Checker (LC) command and telemetry
* message function code definitions.
*
*/
#ifndef DEFAULT_LC_FCNCODE_VALUES_H
#define DEFAULT_LC_FCNCODE_VALUES_H

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

#define LC_CCVAL(x) LC_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

enum LC_FunctionCode
{
LC_FunctionCode_NOOP = 0,
LC_FunctionCode_RESET_COUNTERS = 1,
LC_FunctionCode_SET_LC_STATE = 2,
LC_FunctionCode_SET_AP_STATE = 3,
LC_FunctionCode_SET_AP_PERM_OFF = 4,
LC_FunctionCode_RESET_AP_STATS = 5,
LC_FunctionCode_RESET_WP_STATS = 6,
};

#endif
37 changes: 37 additions & 0 deletions config/default_lc_interface_cfg_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/************************************************************************
* 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
* CFS Limit Checker (LC) 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/or the public API, if applicable.
*
* @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_LC_INTERFACE_CFG_VALUES_H
#define DEFAULT_LC_INTERFACE_CFG_VALUES_H

/* Use the default configuration value for all */
#define LC_INTERFACE_CFGVAL(x) DEFAULT_LC_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
38 changes: 38 additions & 0 deletions config/default_lc_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
* CFS Limit Checker (LC) 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_LC_INTERNAL_CFG_VALUES_H
#define DEFAULT_LC_INTERNAL_CFG_VALUES_H

/* Use the default configuration value for all */
#define LC_INTERNAL_CFGVAL(x) DEFAULT_LC_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
9 changes: 4 additions & 5 deletions config/default_lc_mission_cfg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,921-1, and identified as “CFS Limit Checker
* Application version 2.2.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 LC_MISSION_CFG_H
#define LC_MISSION_CFG_H
#ifndef DEFAULT_LC_MISSION_CFG_H
#define DEFAULT_LC_MISSION_CFG_H

#include "lc_interface_cfg.h"

Expand Down
9 changes: 4 additions & 5 deletions config/default_lc_msg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,921-1, and identified as “CFS Limit Checker
* Application version 2.2.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 LC_MSG_H
#define LC_MSG_H
#ifndef DEFAULT_LC_MSG_H
#define DEFAULT_LC_MSG_H

#include "lc_interface_cfg.h"
#include "lc_msgdefs.h"
Expand Down
9 changes: 4 additions & 5 deletions config/default_lc_msgdefs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,921-1, and identified as “CFS Limit Checker
* Application version 2.2.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 Down Expand Up @@ -30,8 +29,8 @@
* TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE!
* ADD THEM TO lc_msg.h IF NEEDED!
*/
#ifndef LC_MSGDEFS_H
#define LC_MSGDEFS_H
#ifndef DEFAULT_LC_MSGDEFS_H
#define DEFAULT_LC_MSGDEFS_H

/************************************************************************
* Includes
Expand Down
33 changes: 33 additions & 0 deletions config/default_lc_msgid_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/************************************************************************
* 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
* CFS Limit Checker (LC) Application Message IDs
*/
#ifndef LC_MSGID_VALUES_H
#define LC_MSGID_VALUES_H

#include "lc_topicids.h"
#include "cfe_core_api_base_msgids.h"

#define LC_CMD_PLATFORM_MIDVAL(x) CFE_PLATFORM_CMD_TOPICID_TO_MIDV(LC_MISSION_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro LC_CMD_PLATFORM_MIDVAL(x) uses token pasting and is not allowed.
#define LC_TLM_PLATFORM_MIDVAL(x) CFE_PLATFORM_TLM_TOPICID_TO_MIDV(LC_MISSION_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif

Loading
Loading