Skip to content

Commit

Permalink
Fix #95, Update command handler function message pointers and return
Browse files Browse the repository at this point in the history
types
  • Loading branch information
thnkslprpt committed Apr 5, 2023
1 parent 7611550 commit a0fcee1
Show file tree
Hide file tree
Showing 24 changed files with 599 additions and 549 deletions.
8 changes: 4 additions & 4 deletions fsw/src/fm_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ void FM_AppMain(void)
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

int32 FM_AppInit(void)
CFE_Status_t FM_AppInit(void)
{
const char *ErrText = "Initialization error:";
int32 Result = CFE_SUCCESS;
const char * ErrText = "Initialization error:";
CFE_Status_t Result = CFE_SUCCESS;

/* Initialize global data */
memset(&FM_GlobalData, 0, sizeof(FM_GlobalData));
Expand Down Expand Up @@ -246,7 +246,7 @@ int32 FM_AppInit(void)
/* FM application -- housekeeping request packet processor */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void FM_SendHkCmd(const CFE_SB_Buffer_t *BufPtr)
void FM_SendHkCmd(const FM_SendHkCmd_t *BufPtr)
{
FM_HousekeepingPkt_Payload_t *PayloadPtr;

Expand Down
11 changes: 8 additions & 3 deletions fsw/src/fm_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- application global constants */
/* FM -- Macro Definitions */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

Expand All @@ -43,6 +43,11 @@
*/
#define FM_SB_TIMEOUT 1000

/**
* \brief FM Error Codes
*/
#define FM_ERROR -1 /**< \brief Generic FM error return code */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM -- application global data structure */
Expand Down Expand Up @@ -159,7 +164,7 @@ void FM_AppMain(void);
*
* \sa #CFE_EVS_Register, #CFE_SB_CreatePipe, #CFE_SB_Subscribe
*/
int32 FM_AppInit(void);
CFE_Status_t FM_AppInit(void);

/**
* \brief Housekeeping Request Command Handler
Expand All @@ -178,7 +183,7 @@ int32 FM_AppInit(void);
*
* \sa #FM_SendHkCmd_t, #FM_HousekeepingPkt_t
*/
void FM_SendHkCmd(const CFE_SB_Buffer_t *BufPtr);
void FM_SendHkCmd(const FM_SendHkCmd_t *BufPtr);

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/fm_child.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

int32 FM_ChildInit(void)
CFE_Status_t FM_ChildInit(void)
{
int32 TaskTextLen = OS_MAX_PATH_LEN;
char TaskText[OS_MAX_PATH_LEN] = "\0";
int32 Result = CFE_SUCCESS;
uint32 TaskEID = 0;
int32 TaskTextLen = OS_MAX_PATH_LEN;
char TaskText[OS_MAX_PATH_LEN] = "\0";
CFE_Status_t Result = CFE_SUCCESS;
uint32 TaskEID = 0;

/* Create counting semaphore (given by parent to wake-up child) */
Result = OS_CountSemCreate(&FM_GlobalData.ChildSemaphore, FM_CHILD_SEM_NAME, 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/fm_child.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*
* \sa #FM_AppInit
*/
int32 FM_ChildInit(void);
CFE_Status_t FM_ChildInit(void);

/**
* \brief Child Task Entry Point Function
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/fm_cmd_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,13 @@ int32 FM_GetVolumeFreeSpace(const char *FileSys, uint64 *BlockCount, uint64 *Byt
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

int32 FM_GetDirectorySpaceEstimate(const char *Directory, uint64 *BlockCount, uint64 *ByteCount)
CFE_Status_t FM_GetDirectorySpaceEstimate(const char *Directory, uint64 *BlockCount, uint64 *ByteCount)
{
osal_id_t DirId;
os_dirent_t DirEntry;
os_fstat_t FileStat;
osal_status_t OS_Status;
int32 Result;
CFE_Status_t Result;
char FullPath[OS_MAX_PATH_LEN];
uint64 TotalBytes;
size_t DirLen;
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/fm_cmd_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,6 @@ int32 FM_GetVolumeFreeSpace(const char *FileSys, uint64 *BlockCount, uint64 *Byt
* \returns Status code
* \retval CFE_SUCCESS if successful
*/
int32 FM_GetDirectorySpaceEstimate(const char *Directory, uint64 *BlockCount, uint64 *ByteCount);
CFE_Status_t FM_GetDirectorySpaceEstimate(const char *Directory, uint64 *BlockCount, uint64 *ByteCount);

#endif
Loading

0 comments on commit a0fcee1

Please sign in to comment.