diff --git a/fsw/src/ci_lab_app.c b/fsw/src/ci_lab_app.c index 909c8c8..8028a8f 100644 --- a/fsw/src/ci_lab_app.c +++ b/fsw/src/ci_lab_app.c @@ -33,37 +33,11 @@ #include "ci_lab_version.h" /* -** CI global data... +** CI Global Data */ -typedef struct -{ - bool SocketConnected; - CFE_SB_PipeId_t CommandPipe; - osal_id_t SocketID; - OS_SockAddr_t SocketAddress; - - CI_LAB_HkTlm_t HkTlm; - - CFE_SB_Buffer_t *NextIngestBufPtr; - -} CI_LAB_GlobalData_t; - CI_LAB_GlobalData_t CI_LAB_Global; -/* - * Individual message handler function prototypes - * - * Per the recommended code pattern, these should accept a const pointer - * to a structure type which matches the message, and return an int32 - * where CFE_SUCCESS (0) indicates successful handling of the message. - */ -int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data); -int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data); - -/* Housekeeping message handler */ -int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data); - /** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* Application entry point and main process loop */ diff --git a/fsw/src/ci_lab_app.h b/fsw/src/ci_lab_app.h index 16e245f..c4fac58 100644 --- a/fsw/src/ci_lab_app.h +++ b/fsw/src/ci_lab_app.h @@ -31,11 +31,15 @@ #include "osapi.h" +#include "ci_lab_msg.h" + #include #include #include -/****************************************************************************/ +/************************************************************************ + * Macro Definitions + ************************************************************************/ #define CI_LAB_BASE_UDP_PORT 1234 #define CI_LAB_MAX_INGEST 768 @@ -45,13 +49,28 @@ ** Type Definitions *************************************************************************/ -/****************************************************************************/ -/* -** Local function prototypes... -** -** Note: Except for the entry point (CI_LAB_AppMain), these -** functions are not called from any other source module. -*/ +/** + * CI global data structure + */ +typedef struct +{ + bool SocketConnected; + CFE_SB_PipeId_t CommandPipe; + osal_id_t SocketID; + OS_SockAddr_t SocketAddress; + + CI_LAB_HkTlm_t HkTlm; + + CFE_SB_Buffer_t *NextIngestBufPtr; +} CI_LAB_GlobalData_t; + +/************************************************************************ + * Function Prototypes + * + * Note: Except for the entry point (CI_Lab_AppMain), these + * functions are not called from any other source module. + ************************************************************************/ + void CI_Lab_AppMain(void); void CI_LAB_TaskInit(void); void CI_LAB_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr); @@ -61,4 +80,17 @@ void CI_LAB_ReadUpLink(void); bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength); +/* + * Individual message handler function prototypes + * + * Per the recommended code pattern, these should accept a const pointer + * to a structure type which matches the message, and return an int32 + * where CFE_SUCCESS (0) indicates successful handling of the message. + */ +int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data); +int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data); + +/* Housekeeping message handler */ +int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data); + #endif diff --git a/fsw/src/ci_lab_msg.h b/fsw/src/ci_lab_msg.h index c72335e..c82562b 100644 --- a/fsw/src/ci_lab_msg.h +++ b/fsw/src/ci_lab_msg.h @@ -36,7 +36,6 @@ typedef struct { CFE_MSG_CommandHeader_t CmdHeader; - } CI_LAB_NoArgsCmd_t; /* @@ -63,7 +62,6 @@ typedef struct uint32 IngestPackets; uint32 IngestErrors; uint32 Spare2; - } CI_LAB_HkTlm_Payload_t; typedef struct