Skip to content

Commit

Permalink
Merge pull request #158 from thnkslprpt:fix-157-move-prototypes-to-he…
Browse files Browse the repository at this point in the history
…ader-file

Fix #157, Move function prototypes to header file
  • Loading branch information
dzbaker committed Nov 13, 2023
2 parents 348f304 + d81ddd3 commit 089b2d0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 26 deletions.
28 changes: 3 additions & 25 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,11 @@
#include "to_lab_tbl.h"

/*
** Global Data Section
** TO Global Data Section
*/
TO_LAB_GlobalData_t TO_LAB_Global;

TO_LAB_Subs_t * TO_LAB_Subs;
CFE_TBL_Handle_t TO_SubTblHandle;

/*
** Prototypes Section
*/
void TO_LAB_openTLM(void);
CFE_Status_t TO_LAB_init(void);
void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr);
void TO_LAB_process_commands(void);
void TO_LAB_forward_telemetry(void);

/*
* Individual Command Handler prototypes
*/
CFE_Status_t TO_LAB_AddPacket(const TO_LAB_AddPacketCmd_t *data);
CFE_Status_t TO_LAB_Noop(const TO_LAB_NoopCmd_t *data);
CFE_Status_t TO_LAB_EnableOutput(const TO_LAB_EnableOutputCmd_t *data);
CFE_Status_t TO_LAB_RemoveAll(const TO_LAB_RemoveAllCmd_t *data);
CFE_Status_t TO_LAB_RemovePacket(const TO_LAB_RemovePacketCmd_t *data);
CFE_Status_t TO_LAB_ResetCounters(const TO_LAB_ResetCountersCmd_t *data);
CFE_Status_t TO_LAB_SendDataTypes(const TO_LAB_SendDataTypesCmd_t *data);
CFE_Status_t TO_LAB_SendHousekeeping(const CFE_MSG_CommandHeader_t *data);
TO_LAB_Subs_t * TO_LAB_Subs;
CFE_TBL_Handle_t TO_SubTblHandle;

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down
31 changes: 30 additions & 1 deletion fsw/src/to_lab_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,36 @@
#include "to_lab_msg.h"
#include "to_lab_tbl.h"

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

/**
* CI global data structure
*/
typedef struct
{
CFE_SB_PipeId_t Tlm_pipe;
CFE_SB_PipeId_t Cmd_pipe;
osal_id_t TLMsockid;
bool downlink_on;
char tlm_dest_IP[17];
bool suppress_sendto;

TO_LAB_HkTlm_t HkTlm;
TO_LAB_DataTypesTlm_t DataTypesTlm;
} TO_LAB_GlobalData_t;

/************************************************************************
* Function Prototypes
************************************************************************/

void TO_LAB_AppMain(void);
void TO_LAB_openTLM(void);
int32 TO_LAB_init(void);
void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr);
void TO_LAB_process_commands(void);
void TO_LAB_forward_telemetry(void);

typedef struct
{
Expand Down

0 comments on commit 089b2d0

Please sign in to comment.