Skip to content

Commit

Permalink
Merge pull request #137 from jphickey/fix-116-encode-decode-revamp
Browse files Browse the repository at this point in the history
Fix #116 (plus others), separate logical vs. network PDU buffers
  • Loading branch information
astrogeco authored Jan 6, 2022
2 parents ba10b0b + 3acc447 commit 72e0a02
Show file tree
Hide file tree
Showing 78 changed files with 13,945 additions and 27,938 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ set(APP_SRC_FILES
fsw/src/cf_app.c
fsw/src/cf_assert.c
fsw/src/cf_cfdp.c
fsw/src/cf_cfdp_helpers.c
fsw/src/cf_cfdp_r.c
fsw/src/cf_cfdp_s.c
fsw/src/cf_cfdp_sbintf.c
fsw/src/cf_cfdp_dispatch.c
fsw/src/cf_chunk.c
fsw/src/cf_clist.c
fsw/src/cf_codec.c
fsw/src/cf_cmd.c
fsw/src/cf_crc.c
fsw/src/cf_timer.c
Expand Down
6 changes: 3 additions & 3 deletions fsw/platform_inc/cf_tbldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ typedef struct CF_ConfigTable

CF_ChannelConfig_t chan[CF_NUM_CHANNELS];

uint32 ack_timer_s; /* in seconds */
uint32 nak_timer_s; /* in seconds */
uint32 inactivity_timer_s; /* in seconds */
uint32 ack_timer_s; /* in seconds */
uint32 nak_timer_s; /* in seconds */
uint32 inactivity_timer_s; /* in seconds */

uint8 ack_limit; /* number of times to retry ACK (for ex, send fin and wait for fin-ack) */
uint8 nak_limit; /* number of times to retry NAK before giving up (resets on a single response */
Expand Down
15 changes: 8 additions & 7 deletions fsw/src/cf_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "cf_perfids.h"
#include "cf_cfdp.h"
#include "cf_version.h"
#include "cf_cmd.h"

#include <string.h>

Expand All @@ -47,7 +48,7 @@ CF_AppData_t CF_AppData;
** None
**
*************************************************************************/
static void CF_HkCmd(void)
void CF_HkCmd(void)
{
CFE_MSG_SetMsgTime(&CF_AppData.hk.tlm_header.Msg, CFE_TIME_GetTime());
/* return value ignored */ CFE_SB_TransmitMsg(&CF_AppData.hk.tlm_header.Msg, true);
Expand All @@ -63,7 +64,7 @@ static void CF_HkCmd(void)
** None
**
*************************************************************************/
static void CF_CheckTables(void)
void CF_CheckTables(void)
{
CFE_Status_t status;

Expand Down Expand Up @@ -125,7 +126,7 @@ static void CF_CheckTables(void)
** \endreturns
**
*************************************************************************/
static int32 CF_ValidateConfigTable(void *tbl_ptr)
int32 CF_ValidateConfigTable(void *tbl_ptr)
{
CF_ConfigTable_t *tbl = (CF_ConfigTable_t *)tbl_ptr;
int32 ret; /* initialized below */
Expand Down Expand Up @@ -170,7 +171,7 @@ static int32 CF_ValidateConfigTable(void *tbl_ptr)
** \endreturns
**
*************************************************************************/
static int32 CF_TableInit(void)
int32 CF_TableInit(void)
{
int32 status = CFE_SUCCESS;

Expand Down Expand Up @@ -232,7 +233,7 @@ static int32 CF_TableInit(void)
** \endreturns
**
*************************************************************************/
static int32 CF_Init(void)
int32 CF_Init(void)
{
static CFE_EVS_BinFilter_t cf_event_filters[] = {
{CF_EID_ERR_ASSERT, 0x0000},
Expand Down Expand Up @@ -410,7 +411,7 @@ static int32 CF_Init(void)
** None
**
*************************************************************************/
static void CF_WakeUp(void)
void CF_WakeUp(void)
{
CFE_ES_PerfLogEntry(CF_PERF_ID_CYCLE_ENG);
CF_CFDP_CycleEngine();
Expand All @@ -428,7 +429,7 @@ static void CF_WakeUp(void)
** msg must not be NULL.
**
*************************************************************************/
static void CF_ProcessMsg(CFE_SB_Buffer_t *msg)
void CF_ProcessMsg(CFE_SB_Buffer_t *msg)
{
CFE_SB_MsgId_t msg_id;

Expand Down
10 changes: 9 additions & 1 deletion fsw/src/cf_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ typedef struct
CF_Engine_t engine;
} CF_AppData_t;

void CF_HkCmd(void);
void CF_CheckTables(void);
int32 CF_ValidateConfigTable(void *tbl_ptr);
int32 CF_TableInit(void);
int32 CF_Init(void);
void CF_WakeUp(void);
void CF_ProcessMsg(CFE_SB_Buffer_t *msg);
void CF_AppMain(void);

extern CF_AppData_t CF_AppData;

extern void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg);
#endif /* !CF_APP__H */
Loading

0 comments on commit 72e0a02

Please sign in to comment.