Skip to content

Commit

Permalink
EDS: Update to 2023-11-16 GSFC baseline
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'github-nasa/main' into techdev-sois-eds
  • Loading branch information
jphickey committed Nov 16, 2023
2 parents 4d64322 + 6e55bb4 commit 0edebfd
Show file tree
Hide file tree
Showing 29 changed files with 1,233 additions and 222 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: "CodeQL Analysis"
on:
push:
pull_request:

jobs:
codeql:
name: CodeQL Analysis
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
with:
with:
component-path: apps/ci_lab
make: 'make -C build/native/default_cpu1/apps/ci_lab'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Development Build: v2.5.0-rc4+dev69
- add decode hooks
- Add version information to NOOP event
- See <https://github.com/nasa/ci_lab/pull/152> and <https://github.com/nasa/ci_lab/pull/153>

## Development Build: v2.5.0-rc4+dev51
- reorganize source files
- See <https://github.com/nasa/ci_lab/pull/148>

## Development Build: v2.5.0-rc4+dev47
- Create Workflow for IC Bundle Generation
- See <https://github.com/nasa/ci_lab/pull/143>
Expand Down
20 changes: 15 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ project(CFS_CI_LAB C)

set(APP_SRC_FILES
fsw/src/ci_lab_app.c
fsw/src/ci_lab_eds_dispatch.c
fsw/src/ci_lab_cmds.c
)

if (CFE_EDS_ENABLED_BUILD)
list(APPEND APP_SRC_FILES
fsw/src/ci_lab_eds_dispatch.c
fsw/src/ci_lab_eds_decode.c
)
else()
list(APPEND APP_SRC_FILES
fsw/src/ci_lab_dispatch.c
fsw/src/ci_lab_passthru_decode.c
)
endif()


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

target_include_directories(ci_lab PUBLIC
fsw/mission_inc
fsw/platform_inc
)
target_include_directories(ci_lab PUBLIC fsw/inc)
40 changes: 40 additions & 0 deletions arch_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
###########################################################
#
# CI_LAB 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 CI_LAB configuration
set(CI_LAB_PLATFORM_CONFIG_FILE_LIST
ci_lab_internal_cfg.h
ci_lab_platform_cfg.h
ci_lab_perfids.h
ci_lab_msgids.h
)

if (CFE_EDS_ENABLED_BUILD)

# In an EDS-based build, these files come generated from the EDS tool
set(CI_LAB_CFGFILE_SRC_ci_lab_msgids "ci_lab_eds_msgids.h")

endif()

# Create wrappers around the all the config header files
# This makes them individually overridable by the missions, without modifying
# the distribution default copies
foreach(CI_LAB_CFGFILE ${CI_LAB_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${CI_LAB_CFGFILE}" NAME_WE)
if (DEFINED CI_LAB_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE "${CI_LAB_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE "${CI_LAB_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${CI_LAB_CFGFILE}"
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${DEFAULT_SOURCE}"
)
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* @file
* Define CI Lab Message IDs
* CI_LAB Application Message IDs
*/
#ifndef CI_LAB_MSGIDS_H
#define CI_LAB_MSGIDS_H
Expand Down
46 changes: 46 additions & 0 deletions config/default_ci_lab_fcncodes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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 CI_LAB 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 CI_LAB_FCNCODES_H
#define CI_LAB_FCNCODES_H

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

/*
** CI_LAB command codes
*/
#define CI_LAB_NOOP_CC 0
#define CI_LAB_RESET_COUNTERS_CC 1
#define CI_LAB_MODIFY_PDU_FILESIZE_CC 2
#define CI_LAB_CORRUPT_PDU_CHECKSUM_CC 3
#define CI_LAB_DROP_PDUS_CC 4
#define CI_LAB_CAPTURE_PDUS_CC 5
#define CI_LAB_STOP_PDU_CAPTURE_CC 6

#endif
50 changes: 50 additions & 0 deletions config/default_ci_lab_interface_cfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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
* CI_LAB 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 CI_LAB_INTERFACE_CFG_H
#define CI_LAB_INTERFACE_CFG_H

/**
* @brief The base UDP port where CI_LAB will listen for incoming messages
*
* In order to allow multiple instances of CFE to run on the same host, the
* processor number - 1 is added to this value. This, if this is set to
* "1234", then the following ports will be used at runtime:
*
* Processor 1: port 1234
* Processor 2: port 1235
* Processor 3: port 1236
*
* And so forth for however many processor numbers exist in the system
*/
#define CI_LAB_BASE_UDP_PORT 1234

#endif
50 changes: 50 additions & 0 deletions config/default_ci_lab_internal_cfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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
* CI_LAB 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 CI_LAB_INTERNAL_CFG_H
#define CI_LAB_INTERNAL_CFG_H

/**
* @brief The size of the input buffer
*
* This definition controls the maximum size message that can be ingested
* from the UDP socket
*/
#define CI_LAB_MAX_INGEST 768

/**
* @brief The depth of the command input pipe
*
* This controls the depth of the SB input pipe
*/
#define CI_LAB_PIPE_DEPTH 32

#endif
27 changes: 12 additions & 15 deletions fsw/src/ci_lab_events.h → config/default_ci_lab_mission_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,19 @@

/**
* @file
* Define CI Lab Events IDs
*
* CI_LAB Application Mission Configuration Header File
*
* This is a compatibility header for the "mission_cfg.h" file that has
* traditionally provided public config definitions for each CFS app.
*
* @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 CI_LAB_EVENTS_H
#define CI_LAB_EVENTS_H
#ifndef CI_LAB_MISSION_CFG_H
#define CI_LAB_MISSION_CFG_H

#define CI_LAB_RESERVED_EID 0
#define CI_LAB_SOCKETCREATE_ERR_EID 1
#define CI_LAB_SOCKETBIND_ERR_EID 2
#define CI_LAB_STARTUP_INF_EID 3
#define CI_LAB_COMMAND_ERR_EID 4
#define CI_LAB_COMMANDNOP_INF_EID 5
#define CI_LAB_COMMANDRST_INF_EID 6
#define CI_LAB_INGEST_INF_EID 7
#define CI_LAB_INGEST_LEN_ERR_EID 8
#define CI_LAB_INGEST_ALLOC_ERR_EID 9
#define CI_LAB_INGEST_SEND_ERR_EID 10
#define CI_LAB_LEN_ERR_EID 16
#include "ci_lab_interface_cfg.h"

#endif
38 changes: 38 additions & 0 deletions config/default_ci_lab_msg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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 CI_LAB command and telemetry
* message data types.
*
* This is a compatibility header for the "ci_lab_msg.h" file that has
* traditionally provided the message definitions for cFS apps.
*
* @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 CI_LAB_MSG_H
#define CI_LAB_MSG_H

#include "ci_lab_interface_cfg.h"
#include "ci_lab_msgdefs.h"
#include "ci_lab_msgstruct.h"

#endif
47 changes: 47 additions & 0 deletions config/default_ci_lab_msgdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 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 CI_LAB command and telemetry
* message constant definitions.
*
* For CI_LAB this is only the function/command code definitions
*/
#ifndef CI_LAB_MSGDEFS_H
#define CI_LAB_MSGDEFS_H

#include "ci_lab_fcncodes.h"

/*************************************************************************/
/*
** Payload definition (CI_LAB housekeeping)...
*/
typedef struct
{
uint8 CommandErrorCounter;
uint8 CommandCounter;
uint8 EnableChecksums;
uint8 SocketConnected;
uint8 Spare1[8];
uint32 IngestPackets;
uint32 IngestErrors;
uint32 Spare2;
} CI_LAB_HkTlm_Payload_t;

#endif
Loading

0 comments on commit 0edebfd

Please sign in to comment.