Skip to content

Commit f371311

Browse files
committed
NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
Batch update of latest cFS software release Reflects commit dcf2324cf56d27f9f49efeb2294ca279d1a28388 from NASA internal development repo
1 parent d1dac9a commit f371311

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2150
-767
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ project(CFS_HK C)
22

33
set(APP_SRC_FILES
44
fsw/src/hk_app.c
5-
fsw/src/hk_dispatch.c
5+
fsw/src/hk_cmds.c
66
fsw/src/hk_utils.c
77
)
88

9+
if (CFE_EDS_ENABLED)
10+
list(APPEND APP_SRC_FILES fsw/src/hk_eds_dispatch.c)
11+
else()
12+
list(APPEND APP_SRC_FILES fsw/src/hk_dispatch.c)
13+
endif()
14+
915
# Create the app module
1016
add_cfe_app(hk ${APP_SRC_FILES})
1117

arch_build.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
###########################################################
2+
#
3+
# HK App platform build setup
4+
#
5+
# This file is evaluated as part of the "prepare" stage
6+
# and can be used to set up prerequisites for the build,
7+
# such as generating header files
8+
#
9+
###########################################################
10+
11+
# The list of header files that control the app configuration
12+
set(HK_PLATFORM_CONFIG_FILE_LIST
13+
hk_internal_cfg_values.h
14+
hk_msgids.h
15+
hk_msgid_values.h
16+
hk_platform_cfg.h
17+
)
18+
19+
generate_configfile_set(${HK_PLATFORM_CONFIG_FILE_LIST})

config/default_hk_fcncode_values.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Public Definitions
22+
*
23+
* This provides default values for configurable items that affect
24+
* the interface(s) of this module. This includes the CMD/TLM message
25+
* interface, tables definitions, and/or the public API, if applicable.
26+
*
27+
* @note This file may be overridden/superceded by mission-provided defintions
28+
* either by overriding this header or by generating definitions from a command/data
29+
* dictionary tool.
30+
*/
31+
#ifndef DEFAULT_HK_FCNCODE_VALUES_H
32+
#define DEFAULT_HK_FCNCODE_VALUES_H
33+
34+
#define HK_CCVAL(x) HK_FunctionCode_##x
35+
36+
enum HK_FunctionCode
37+
{
38+
HK_FunctionCode_NOOP = 0,
39+
HK_FunctionCode_RESET_COUNTERS = 1
40+
};
41+
42+
#endif
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Public Definitions
22+
*
23+
* This provides default values for configurable items that affect
24+
* the interface(s) of this module. This includes the CMD/TLM message
25+
* interface, tables definitions, and/or the public API, if applicable.
26+
*
27+
* @note This file may be overridden/superceded by mission-provided defintions
28+
* either by overriding this header or by generating definitions from a command/data
29+
* dictionary tool.
30+
*/
31+
32+
#ifndef DEFAULT_HK_INTERFACE_CFG_VALUES_H
33+
#define DEFAULT_HK_INTERFACE_CFG_VALUES_H
34+
35+
/* Use the default configuration value for all */
36+
#define HK_INTERFACE_CFGVAL(x) DEFAULT_HK_INTERFACE_##x
37+
38+
#endif
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Config Definitions
22+
*
23+
* This is a compatibility header for the "platform_cfg.h" file that has
24+
* traditionally provided both public and private config definitions
25+
* for each CFS app.
26+
*
27+
* These definitions are now provided in two separate files, one for
28+
* the public/mission scope and one for internal scope.
29+
*
30+
* @note This file may be overridden/superceded by mission-provided defintions
31+
* either by overriding this header or by generating definitions from a command/data
32+
* dictionary tool.
33+
*/
34+
#ifndef DEFAULT_HK_INTERNAL_CFG_H
35+
#define DEFAULT_HK_INTERNAL_CFG_H
36+
37+
/* Use the default configuration value for all */
38+
#define HK_INTERNAL_CFGVAL(x) DEFAULT_HK_INTERNAL_##x
39+
40+
#endif

config/default_hk_mission_cfg.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Public Definitions
22+
*
23+
* This provides default values for configurable items that affect
24+
* the interface(s) of this module. This includes the CMD/TLM message
25+
* interface, tables definitions, and/or the public API, if applicable.
26+
*
27+
* @note This file may be overridden/superceded by mission-provided defintions
28+
* either by overriding this header or by generating definitions from a command/data
29+
* dictionary tool.
30+
*/
31+
32+
#ifndef DEFAULT_HK_MISSION_CONFIG_H
33+
#define DEFAULT_HK_MISSION_CONFIG_H
34+
35+
#include "hk_interface_cfg.h"
36+
37+
#endif /* DEFAULT_HK_MISSION_CONFIG_H */

config/default_hk_msg.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Message Structure Definition
22+
*
23+
* This is a compatibility header for the "hk_msg.h" file that has
24+
* traditionally provided the message definitions for cFS apps.
25+
*
26+
* @note This file may be overridden/superceded by mission-provided defintions
27+
* either by overriding this header or by generating definitions from a command/data
28+
* dictionary tool.
29+
*/
30+
#ifndef DEFAULT_HK_MSG_H
31+
#define DEFAULT_HK_MSG_H
32+
33+
#include "hk_fcncodes.h"
34+
#include "hk_msgdefs.h"
35+
#include "hk_msgstruct.h"
36+
37+
#endif

config/default_hk_msgdefs.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application function codes
22+
*
23+
*/
24+
#ifndef DEFAULT_HK_MSGDEFS_H
25+
#define DEFAULT_HK_MSGDEFS_H
26+
27+
#include "common_types.h"
28+
#include "cfe_es_extern_typedefs.h"
29+
30+
/**
31+
* \brief HK Application housekeeping Payload
32+
*/
33+
typedef struct
34+
{
35+
uint8 CmdCounter; /**< \brief Count of valid commands received */
36+
uint8 ErrCounter; /**< \brief Count of invalid commands received */
37+
uint16 Padding; /**< \brief Padding to force 32 bit alignment */
38+
uint16 CombinedPacketsSent; /**< \brief Count of combined tlm pkts sent */
39+
uint16 MissingDataCtr; /**< \brief Number of times missing data was detected */
40+
CFE_ES_MemHandle_t MemPoolHandle; /**< \brief Memory pool handle used to get mempool diags */
41+
} HK_HkTlm_Payload_t;
42+
43+
#endif

config/default_hk_msgid_values.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/************************************************************************
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
3+
*
4+
* Copyright (c) 2023 United States Government as represented by the
5+
* Administrator of the National Aeronautics and Space Administration.
6+
* All Rights Reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License. You may obtain
10+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
************************************************************************/
18+
19+
/**
20+
* @file
21+
* The CFS Housekeeping (HK) Application Message IDs header file
22+
*/
23+
#ifndef DEFAULT_HK_MSGID_VALUES_H
24+
#define DEFAULT_HK_MSGID_VALUES_H
25+
26+
#include "cfe_core_api_base_msgids.h"
27+
#include "hk_topicids.h"
28+
29+
#define CFE_PLATFORM_HK_CMD_MIDVAL(x) CFE_PLATFORM_CMD_TOPICID_TO_MIDV(CFE_MISSION_HK_##x##_TOPICID)
30+
#define CFE_PLATFORM_HK_TLM_MIDVAL(x) CFE_PLATFORM_TLM_TOPICID_TO_MIDV(CFE_MISSION_HK_##x##_TOPICID)
31+
32+
#endif
Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/************************************************************************
2-
* NASA Docket No. GSC-18,919-1, and identified as “Core Flight
3-
* System (cFS) Housekeeping (HK) Application version 2.5.1”
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
43
*
5-
* Copyright (c) 2021 United States Government as represented by the
4+
* Copyright (c) 2023 United States Government as represented by the
65
* Administrator of the National Aeronautics and Space Administration.
76
* All Rights Reserved.
87
*
@@ -21,18 +20,19 @@
2120
* @file
2221
* The CFS Housekeeping (HK) Application Message IDs header file
2322
*/
24-
#ifndef HK_MSGIDS_H
25-
#define HK_MSGIDS_H
23+
#ifndef DEFAULT_HK_MSGIDS_H
24+
#define DEFAULT_HK_MSGIDS_H
25+
26+
#include "hk_msgid_values.h"
2627

2728
/**
2829
* \defgroup cfshkcmdmid CFS Housekeeping Command Message IDs
2930
* \{
3031
*/
3132

32-
#define HK_CMD_MID 0x189A /**< \brief HK Ground Commands Message ID */
33-
#define HK_SEND_HK_MID 0x189B /**< \brief HK Send Housekeeping Data Cmd Message ID */
34-
35-
#define HK_SEND_COMBINED_PKT_MID 0x189C /**< \brief HK Send Combined Pkt Cmd Message ID */
33+
#define HK_CMD_MID CFE_PLATFORM_HK_CMD_MIDVAL(CMD)
34+
#define HK_SEND_HK_MID CFE_PLATFORM_HK_CMD_MIDVAL(SEND_HK)
35+
#define HK_SEND_COMBINED_PKT_MID CFE_PLATFORM_HK_CMD_MIDVAL(SEND_COMBINED_PKT)
3636

3737
/**\}*/
3838

@@ -41,12 +41,16 @@
4141
* \{
4242
*/
4343

44-
#define HK_HK_TLM_MID 0x089B /**< \brief HK Housekeeping Telemetry Message ID */
44+
#define HK_HK_TLM_MID CFE_PLATFORM_HK_TLM_MIDVAL(HK_TLM) /**< \brief HK Housekeeping Telemetry Message ID */
4545

46-
#define HK_COMBINED_PKT1_MID 0x089C /**< \brief HK Combined Packet 1 Message ID */
47-
#define HK_COMBINED_PKT2_MID 0x089D /**< \brief HK Combined Packet 2 Message ID */
48-
#define HK_COMBINED_PKT3_MID 0x089E /**< \brief HK Combined Packet 3 Message ID */
49-
#define HK_COMBINED_PKT4_MID 0x089F /**< \brief HK Combined Packet 4 Message ID */
46+
#define HK_COMBINED_PKT1_MID \
47+
CFE_PLATFORM_HK_TLM_MIDVAL(COMBINED_PKT1_TLM) /**< \brief HK Combined Packet 1 Message ID */
48+
#define HK_COMBINED_PKT2_MID \
49+
CFE_PLATFORM_HK_TLM_MIDVAL(COMBINED_PKT2_TLM) /**< \brief HK Combined Packet 2 Message ID */
50+
#define HK_COMBINED_PKT3_MID \
51+
CFE_PLATFORM_HK_TLM_MIDVAL(COMBINED_PKT3_TLM) /**< \brief HK Combined Packet 3 Message ID */
52+
#define HK_COMBINED_PKT4_MID \
53+
CFE_PLATFORM_HK_TLM_MIDVAL(COMBINED_PKT4_TLM) /**< \brief HK Combined Packet 4 Message ID */
5054

5155
/**\}*/
5256

0 commit comments

Comments
 (0)