Skip to content

Commit

Permalink
Merge branch 'main' into fix-109-variable-declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt authored Dec 26, 2022
2 parents e151abd + 8368adc commit 57ab176
Show file tree
Hide file tree
Showing 60 changed files with 2,321 additions and 1,365 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
project(CFS_CF C)

include_directories(fsw/src)
include_directories(fsw/mission_inc)
include_directories(fsw/platform_inc)
include_directories(${CFS_IO_LIB_MISSION_DIR}/fsw/public_inc)

set(APP_SRC_FILES
Expand All @@ -24,6 +21,9 @@ set(APP_SRC_FILES
# Create the app module
add_cfe_app(cf ${APP_SRC_FILES})

# This permits direct access to public headers in the fsw/inc directory
target_include_directories(cf PUBLIC fsw/inc)

# configuration table
add_cfe_tables(cf fsw/tables/cf_def_config.c)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#core Flight System (cFS) CFDP Application (CF)
# core Flight System (cFS) CFDP Application (CF)

## Introduction

Expand Down
137 changes: 73 additions & 64 deletions docs/cf_FunctionalRequirements.csv

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions docs/dox_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ configure_file(
@ONLY
)

add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/html/index.html" "${CMAKE_CURRENT_BINARY_DIR}/ALWAYSBUILD"
add_custom_target(cf-usersguide-html
COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/cf-usersguide.doxyfile
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)

# This requires some of the intermediate files from the CFE doc build to be
# in place prior to running doxygen for CF
add_dependencies(cf-usersguide-html doc-prebuild)

add_custom_target(cf-usersguide
COMMAND echo "CF UsersGuide: file://${CMAKE_CURRENT_BINARY_DIR}/html/index.html"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/ALWAYSBUILD"
DEPENDS cf-usersguide-html
)
1,338 changes: 1,272 additions & 66 deletions docs/dox_src/cfs_cf.dox

Large diffs are not rendered by default.

File renamed without changes.
73 changes: 73 additions & 0 deletions fsw/inc/cf_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/************************************************************************
* NASA Docket No. GSC-18,447-1, and identified as “CFS CFDP (CF)
* Application version 3.0.0”
*
* Copyright (c) 2019 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
*
* Declarations and prototypes for cf_extern_typedefs module
*/

#ifndef CF_EXTERN_TYPEDEFS_H
#define CF_EXTERN_TYPEDEFS_H

#include "cf_platform_cfg.h"

/**
* @brief Values for CFDP file transfer class
*
* The CFDP specification prescribes two classes/modes of file
* transfer protocol operation - unacknowledged/simple or
* acknowledged/reliable.
*
* Defined per section 7.1 of CCSDS 727.0-B-5
*/
typedef enum
{
CF_CFDP_CLASS_1 = 0, /**< \brief CFDP class 1 - Unreliable transfer */
CF_CFDP_CLASS_2 = 1, /**< \brief CFDP class 2 - Reliable transfer */
} CF_CFDP_Class_t;

/**
* @brief CF queue identifiers
*/
typedef enum
{
CF_QueueIdx_PEND = 0, /**< \brief first one on this list is active */
CF_QueueIdx_TXA = 1,
CF_QueueIdx_TXW = 2,
CF_QueueIdx_RX = 3,
CF_QueueIdx_HIST = 4,
CF_QueueIdx_HIST_FREE = 5,
CF_QueueIdx_FREE = 6,
CF_QueueIdx_NUM = 7,
} CF_QueueIdx_t;

/**
* @brief Cache of source and destination filename
*
* This pairs a source and destination file name together
* to be retained for future reference in the transaction/history
*/
typedef struct CF_TxnFilenames
{
char src_filename[CF_FILENAME_MAX_LEN];
char dst_filename[CF_FILENAME_MAX_LEN];
} CF_TxnFilenames_t;

#endif /* CF_EXTERN_TYPEDEFS_H */
5 changes: 2 additions & 3 deletions fsw/src/cf_msg.h → fsw/inc/cf_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "cfe.h"
#include "cf_platform_cfg.h"
#include "cf_cfdp.h"
#include "cf_extern_typedefs.h"
#include "cf_tbldefs.h"

#define CF_ALL_CHANNELS (255)
Expand Down Expand Up @@ -139,7 +139,7 @@ typedef struct CF_EotPacket
uint32 channel; /**< \brief Channel number */
uint32 direction; /**< \brief direction of this transaction */
uint32 state; /**< \brief Transaction state */
uint32 cc; /**< \brief final condition code of operation */
uint32 txn_stat; /**< \brief final status code of transaction (extended CFDP CC) */
CF_EntityId_t src_eid; /**< \brief the source eid of the transaction */
CF_EntityId_t peer_eid; /**< \brief peer_eid is always the "other guy", same src_eid for RX */
uint32 fsize; /**< \brief File size */
Expand Down Expand Up @@ -167,7 +167,6 @@ typedef union
*/
typedef enum
{

/**
* \brief No-op
*
Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions fsw/platform_inc/cf_platform_cfg.h → fsw/inc/cf_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,28 @@ typedef uint32 CF_TransactionSeq_t;
*/
#define CF_RCVMSG_TIMEOUT (100)

/**
* @brief Limits the number of retries to obtain the CF throttle sem
*
* @par Description
* If the CF throttle sem is not available during CF startup, the initialization
* will retry after a short delay.
*
* @sa CF_STARTUP_SEM_TASK_DELAY
*/
#define CF_STARTUP_SEM_MAX_RETRIES 25

/**
* @brief Number of milliseconds to wait if CF throttle sem is not available
*
* @par Description
* If the CF throttle sem is not available during CF startup, the initialization
* will delay for this period of time before trying again
*
* @sa CF_STARTUP_SEM_MAX_RETRIES
*/
#define CF_STARTUP_SEM_TASK_DELAY 100

/**
* \brief Mission specific version number
*
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/cf_tbldefs.h → fsw/inc/cf_tbldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define CF_TBLDEFS_H

#include "cf_platform_cfg.h"
#include "cf_cfdp_pdu.h"
#include "cf_extern_typedefs.h"

/**
* \brief Configuration entry for directory polling
Expand Down
16 changes: 0 additions & 16 deletions fsw/src/cf_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
CF_AppData_t CF_AppData;

/*----------------------------------------------------------------
*
* Function: CF_HkCmd
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand All @@ -53,8 +51,6 @@ void CF_HkCmd(void)
}

/*----------------------------------------------------------------
*
* Function: CF_CheckTables
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand Down Expand Up @@ -108,8 +104,6 @@ void CF_CheckTables(void)
}

/*----------------------------------------------------------------
*
* Function: CF_ValidateConfigTable
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand Down Expand Up @@ -149,8 +143,6 @@ int32 CF_ValidateConfigTable(void *tbl_ptr)
}

/*----------------------------------------------------------------
*
* Function: CF_TableInit
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand Down Expand Up @@ -206,8 +198,6 @@ int32 CF_TableInit(void)
}

/*----------------------------------------------------------------
*
* Function: CF_Init
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand Down Expand Up @@ -277,8 +267,6 @@ int32 CF_Init(void)
}

/*----------------------------------------------------------------
*
* Function: CF_WakeUp
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand All @@ -292,8 +280,6 @@ void CF_WakeUp(void)
}

/*----------------------------------------------------------------
*
* Function: CF_ProcessMsg
*
* Application-scope internal function
* See description in cf_app.h for argument/return detail
Expand Down Expand Up @@ -329,8 +315,6 @@ void CF_ProcessMsg(CFE_SB_Buffer_t *msg)
}

/*----------------------------------------------------------------
*
* Function: CF_AppMain
*
* Entry point function
* See description in cf_app.h for argument/return detail
Expand Down
Loading

0 comments on commit 57ab176

Please sign in to comment.