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
11 changes: 9 additions & 2 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ name: CodeQl Analysis

on:
push:
branches:
- dev
- main
pull_request:

types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
codeql:
name: Codeql Analysis
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
with:
component-path: apps/hs
component-path: apps/hs
prep: 'make prep; make -C build/tools/elf2cfetbl'
make: 'make -C build/native/default_cpu1/apps/hs'
setup: |
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(APP_SRC_FILES
fsw/src/hs_cmds.c
)

if (CFE_EDS_ENABLED_BUILD)
if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES
fsw/src/hs_eds_dispatch.c
)
Expand Down
19 changes: 3 additions & 16 deletions arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,10 @@

# The list of header files that control the HS configuration
set(HS_PLATFORM_CONFIG_FILE_LIST
hs_internal_cfg.h
hs_internal_cfg_values.h
hs_msgid_values.h
hs_msgids.h
hs_platform_cfg.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(HS_CFGFILE ${HS_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${HS_CFGFILE}" NAME_WE)
if (DEFINED HS_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE GENERATED_FILE "${HS_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${HS_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${HS_CFGFILE}"
${DEFAULT_SOURCE}
)
endforeach()
generate_configfile_set(${HS_PLATFORM_CONFIG_FILE_LIST})
54 changes: 54 additions & 0 deletions config/default_hs_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/************************************************************************
* 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 Health and Safety (HS) 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_HS_FCNCODE_VALUES_H
#define DEFAULT_HS_FCNCODE_VALUES_H

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

#define HS_CCVAL(x) HS_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

enum HS_FunctionCode_
{
HS_FunctionCode_NOOP = 0,
HS_FunctionCode_RESET = 1,
HS_FunctionCode_ENABLE_APP_MON = 2,
HS_FunctionCode_DISABLE_APP_MON = 3,
HS_FunctionCode_ENABLE_EVENT_MON = 4,
HS_FunctionCode_DISABLE_EVENT_MON = 5,
HS_FunctionCode_ENABLE_ALIVENESS = 6,
HS_FunctionCode_DISABLE_ALIVENESS = 7,
HS_FunctionCode_RESET_RESETS_PERFORMED = 8,
HS_FunctionCode_SET_MAX_RESETS = 9,
HS_FunctionCode_ENABLE_CPU_HOG = 10,
HS_FunctionCode_DISABLE_CPU_HOG = 11,

};

#endif
38 changes: 38 additions & 0 deletions config/default_hs_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
* CFS Health and Safety (HS) 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 definitionsm
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef DEFAULT_HS_INTERFACE_CFG_VALUES_H
#define DEFAULT_HS_INTERFACE_CFG_VALUES_H

/* Use the default configuration value for all */
#define HS_INTERFACE_CFGVAL(x) DEFAULT_HS_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
38 changes: 38 additions & 0 deletions config/default_hs_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 Health and Safety (HS) 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_HS_INTERNAL_CFG_VALUES_H
#define DEFAULT_HS_INTERNAL_CFG_VALUES_H

/* Use the default configuration value for all */
#define HS_INTERNAL_CFGVAL(x) DEFAULT_HS_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
9 changes: 4 additions & 5 deletions config/default_hs_mission_cfg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,920-1, and identified as “Core Flight
* System (cFS) Health & Safety (HS) Application version 2.4.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 HS_MISSION_CFG_H
#define HS_MISSION_CFG_H
#ifndef DEFAULT_HS_MISSION_CFG_H
#define DEFAULT_HS_MISSION_CFG_H

#include "hs_interface_cfg.h"

Expand Down
15 changes: 10 additions & 5 deletions config/default_hs_msg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,920-1, and identified as “Core Flight
* System (cFS) Health & Safety (HS) Application version 2.4.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,14 @@
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/
#ifndef HK_MSG_H
#define HK_MSG_H
#ifndef DEFAULT_HK_MSG_H
#define DEFAULT_HK_MSG_H

/************************************************************************
* THIS IS RELATED TO THE DATA TYPE USED IN 'AppMonEnable' FIELD IN THE TLM STRUCTURE
************************************************************************/

#define HS_BITS_PER_APPMON_ENABLE 32 /**< \brief HS Bits per AppMon Enable entry */

#include "hs_interface_cfg.h"
#include "hs_msgdefs.h"
Expand Down
9 changes: 4 additions & 5 deletions config/default_hs_msgdefs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/************************************************************************
* NASA Docket No. GSC-18,920-1, and identified as “Core Flight
* System (cFS) Health & Safety (HS) Application version 2.4.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 @@ -24,8 +23,8 @@
*
* For HS this is only the function/command code definitions
*/
#ifndef HS_MSGDEFS_H
#define HS_MSGDEFS_H
#ifndef DEFAULT_HS_MSGDEFS_H
#define DEFAULT_HS_MSGDEFS_H

#include "hs_fcncodes.h"

Expand Down
32 changes: 32 additions & 0 deletions config/default_hs_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
* CFS Health and Safety (HS) Application Message IDs
*/
#ifndef DEFAULT_HS_MSGID_VALUES_H
#define DEFAULT_HS_MSGID_VALUES_H

#include "cfe_core_api_base_msgids.h"
#include "hs_topicids.h"

#define CFE_PLATFORM_HS_CMD_MIDVAL(x) CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_HS_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro CFE_PLATFORM_HS_CMD_MIDVAL(x) uses token pasting and is not allowed.
#define CFE_PLATFORM_HS_TLM_MIDVAL(x) CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CFE_MISSION_HS_##x##_TOPICID)

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif
Loading
Loading