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
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ set(APP_SRC_FILES
fsw/src/fm_app.c
fsw/src/fm_cmds.c
fsw/src/fm_child.c
fsw/src/fm_dispatch.c
fsw/src/fm_tbl.c
fsw/src/fm_table_utils.c
)

# If compression features are enabled, choose the adapter based on the selected implementation
Expand All @@ -41,6 +40,16 @@ else()

endif()

if (CFE_EDS_ENABLED)
list(APPEND APP_SRC_FILES
fsw/src/fm_eds_dispatch.c
)
else()
list(APPEND APP_SRC_FILES
fsw/src/fm_dispatch.c
)
endif()

# Create the app module
add_cfe_app(fm ${APP_SRC_FILES} ${FM_OPTION_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 @@
###########################################################
#
# FM 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 FM configuration
set(FM_PLATFORM_CONFIG_FILE_LIST
fm_internal_cfg_values.h
fm_platform_cfg.h
fm_msgid_values.h
fm_msgids.h
)

generate_configfile_set(${FM_PLATFORM_CONFIG_FILE_LIST})
64 changes: 64 additions & 0 deletions config/default_fm_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/************************************************************************
* 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.
************************************************************************/

#ifndef DEFAULT_FM_EXTERN_TYPEDEFS_H
#define DEFAULT_FM_EXTERN_TYPEDEFS_H

/* ======== */
/* Includes */
/* ======== */

#include "cfe.h"

/**
* \brief FM free space table entry state definitions
*/
#define FM_TABLE_ENTRY_DISABLED 0
#define FM_TABLE_ENTRY_ENABLED 1


/* ======== */
/* Typedefs */
/* ======== */

/**
* \brief FM enum used for verifying file name states
*/
typedef enum
{
FM_NAME_IS_INVALID = 0,
FM_NAME_IS_NOT_IN_USE = 1,
FM_NAME_IS_FILE_OPEN = 2,
FM_NAME_IS_FILE_CLOSED = 3,
FM_NAME_IS_DIRECTORY = 4,
} FM_FileNameStates_Enum_t;

/**
* \brief FM enum used for verifying file states
*/
typedef enum
{
FM_FILE_CLOSED, /**< \brief FM File Is Closed */
FM_FILE_EXISTS, /**< \brief FM File Exists */
FM_FILE_NOEXIST, /**< \brief FM File Does Not Exist */
FM_FILE_NOTOPEN, /**< \brief FM File Is Not Open */
FM_DIR_EXISTS, /**< \brief FM Directory Exists */
FM_DIR_NOEXIST /**< \brief FM Directory Does Not Exist */
} FM_FileStates_Enum_t;

#endif // DEFAULT_FM_EXTERN_TYPEDEFS_H
64 changes: 64 additions & 0 deletions config/default_fm_fcncode_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/************************************************************************
* 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 File Manager (FM) 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_FM_FCNCODE_VALUES_H
#define DEFAULT_FM_FCNCODE_VALUES_H

/* ====== */
/* Macros */
/* ====== */

#define FM_CCVAL(x) FM_FunctionCode_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

/* ================ */
/* Type Definitions */
/* ================ */

enum FM_FunctionCode
{
FM_FunctionCode_NOOP = 0,
FM_FunctionCode_RESET_COUNTERS = 1,
FM_FunctionCode_COPY_FILE = 2,
FM_FunctionCode_MOVE_FILE = 3,
FM_FunctionCode_RENAME_FILE = 4,
FM_FunctionCode_DELETE_FILE = 5,
FM_FunctionCode_DELETE_ALL_FILES = 7,
FM_FunctionCode_DECOMPRESS_FILE = 8,
FM_FunctionCode_CONCAT_FILES = 9,
FM_FunctionCode_GET_FILE_INFO = 10,
FM_FunctionCode_GET_OPEN_FILES = 11,
FM_FunctionCode_CREATE_DIRECTORY = 12,
FM_FunctionCode_DELETE_DIRECTORY = 13,
FM_FunctionCode_GET_DIR_LIST_FILE = 14,
FM_FunctionCode_GET_DIR_LIST_PKT = 15,
FM_FunctionCode_MONITOR_FILESYSTEM_SPACE = 16,
FM_FunctionCode_SET_TABLE_STATE = 17,
FM_FunctionCode_SET_PERMISSIONS = 19,
};

#endif /* DEFAULT_FM_FCNCODE_VALUES_H */
39 changes: 39 additions & 0 deletions config/default_fm_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
* CFS File Manager (FM) 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_FM_INTERFACE_CFG_VALUES_H
#define DEFAULT_FM_INTERFACE_CFG_VALUES_H

/** \brief Generates default configuration values */
#define FM_INTERFACE_CFGVAL(x) DEFAULT_FM_INTERFACE_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif /* DEFAULT_FM_INTERFACE_CFG_VALUES_H */
34 changes: 34 additions & 0 deletions config/default_fm_internal_cfg_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/************************************************************************
* 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 File Manager (FM) Application Private Config Definitions
*
* @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_FM_INTERNAL_CFG_VALUES_H
#define DEFAULT_FM_INTERNAL_CFG_VALUES_H

/** \brief Generates default configuration values */
#define FM_INTERNAL_CFGVAL(x) DEFAULT_FM_INTERNAL_##x

Check notice

Code scanning / CodeQL

Undisciplined macro Note

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

#endif /* DEFAULT_FM_INTERNAL_CFG_VALUES_H */
37 changes: 37 additions & 0 deletions config/default_fm_mission_cfg.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
*
* FM 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 definitions
* either by overriding this header or by generating definitions from a command/data
* dictionary tool.
*/

#ifndef DEFAULT_FM_MISSION_CFG_H
#define DEFAULT_FM_MISSION_CFG_H

#include "fm_interface_cfg.h"

#endif /* DEFAULT_FM_MISSION_CFG_H */
Loading
Loading