Skip to content

Commit

Permalink
Merge pull request #156 from thnkslprpt:fix-155-convert-int-32-return…
Browse files Browse the repository at this point in the history
…-codes-to-CFE_Status_t

Fix #155, Convert int32 return codes and variables to CFE_Status_t
  • Loading branch information
dzbaker committed Nov 13, 2023
2 parents 5d21890 + d7b7f46 commit 348f304
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
codeql:
name: Codeql
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
with:
with:
component-path: apps/to_lab
prep: 'make prep; make -C build/tools/elf2cfetbl'
make: 'make -C build/native/default_cpu1/apps/to_lab'
46 changes: 35 additions & 11 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,39 @@
*/
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_AppMain() -- Application entry point and main process loop */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void TO_LAB_AppMain(void)
{
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
int32 status;
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
CFE_Status_t status;

CFE_ES_PerfLogEntry(TO_LAB_MAIN_TASK_PERF_ID);

Expand Down Expand Up @@ -94,14 +118,14 @@ void TO_LAB_delete_callback(void)
/* TO_LAB_init() -- TO initialization */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 TO_LAB_init(void)
CFE_Status_t TO_LAB_init(void)
{
int32 status;
char PipeName[16];
uint16 PipeDepth;
uint16 i;
char ToTlmPipeName[16];
uint16 ToTlmPipeDepth;
CFE_Status_t status;
char PipeName[16];
uint16 PipeDepth;
uint16 i;
char ToTlmPipeName[16];
uint16 ToTlmPipeDepth;
void * TblPtr;
TO_LAB_Sub_t *SubEntry;

Expand Down Expand Up @@ -260,8 +284,8 @@ void TO_LAB_openTLM(void)
void TO_LAB_forward_telemetry(void)
{
OS_SockAddr_t d_addr;
int32 OsStatus;
CFE_Status_t CfeStatus;
CFE_Status_t status;
CFE_Status_t CFE_SB_status;
CFE_SB_Buffer_t *SBBufPtr;
const void * NetBufPtr;
size_t NetBufSize;
Expand Down

0 comments on commit 348f304

Please sign in to comment.