Skip to content

Commit

Permalink
Merge pull request #184 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
sample_app Integration candidate: Caelum-rc4+dev23
  • Loading branch information
dzbaker authored Oct 3, 2022
2 parents a4dd1ce + ec6ed86 commit 3c2c9cb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ sample_app is an example for how to build and link an application in cFS. See al

## Version History

### Development Build: v1.3.0-rc4+dev27
- Misaligned comments
- Remove unnecessary parentheses around return values.
- Remove 'return;' from last line of void functions.
- See <https://github.com/nasa/sample_app/pull/177>, <https://github.com/nasa/sample_app/pull/179>, and <https://github.com/nasa/sample_app/pull/181>

### Development Build: v1.3.0-rc4+dev21

- Remove registration of empty event filters
Expand Down
39 changes: 15 additions & 24 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
SAMPLE_APP_Data_t SAMPLE_APP_Data;

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* SAMPLE_APP_Main() -- Application entry point and main process loop */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
Expand Down Expand Up @@ -135,7 +136,7 @@ int32 SAMPLE_APP_Init(void)
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Registering Events, RC = 0x%08lX\n", (unsigned long)status);
return (status);
return status;
}

/*
Expand All @@ -151,7 +152,7 @@ int32 SAMPLE_APP_Init(void)
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error creating pipe, RC = 0x%08lX\n", (unsigned long)status);
return (status);
return status;
}

/*
Expand All @@ -161,7 +162,7 @@ int32 SAMPLE_APP_Init(void)
if (status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("Sample App: Error Subscribing to HK request, RC = 0x%08lX\n", (unsigned long)status);
return (status);
return status;
}

/*
Expand All @@ -172,7 +173,7 @@ int32 SAMPLE_APP_Init(void)
{
CFE_ES_WriteToSysLog("Sample App: Error Subscribing to Command, RC = 0x%08lX\n", (unsigned long)status);

return (status);
return status;
}

/*
Expand All @@ -184,7 +185,7 @@ int32 SAMPLE_APP_Init(void)
{
CFE_ES_WriteToSysLog("Sample App: Error Registering Table, RC = 0x%08lX\n", (unsigned long)status);

return (status);
return status;
}
else
{
Expand All @@ -194,7 +195,7 @@ int32 SAMPLE_APP_Init(void)
CFE_EVS_SendEvent(SAMPLE_APP_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, "SAMPLE App Initialized.%s",
SAMPLE_APP_VERSION_STRING);

return (CFE_SUCCESS);
return CFE_SUCCESS;

} /* End of SAMPLE_APP_Init() */

Expand Down Expand Up @@ -227,9 +228,6 @@ void SAMPLE_APP_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr)
"SAMPLE: invalid command packet,MID = 0x%x", (unsigned int)CFE_SB_MsgIdToValue(MsgId));
break;
}

return;

} /* End SAMPLE_APP_ProcessCommandPacket */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
Expand Down Expand Up @@ -278,13 +276,10 @@ void SAMPLE_APP_ProcessGroundCommand(CFE_SB_Buffer_t *SBBufPtr)
"Invalid ground command code: CC = %d", CommandCode);
break;
}

return;

} /* End of SAMPLE_APP_ProcessGroundCommand() */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: SAMPLE_APP_ReportHousekeeping */
/* Name: SAMPLE_APP_ReportHousekeeping */
/* */
/* Purpose: */
/* This function is triggered in response to a task telemetry request */
Expand Down Expand Up @@ -322,7 +317,7 @@ int32 SAMPLE_APP_ReportHousekeeping(const CFE_MSG_CommandHeader_t *Msg)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* SAMPLE_APP_Noop -- SAMPLE NOOP commands */
/* SAMPLE_APP_Noop -- SAMPLE NOOP commands */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
int32 SAMPLE_APP_Noop(const SAMPLE_APP_NoopCmd_t *Msg)
Expand All @@ -338,7 +333,7 @@ int32 SAMPLE_APP_Noop(const SAMPLE_APP_NoopCmd_t *Msg)
} /* End of SAMPLE_APP_Noop */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: SAMPLE_APP_ResetCounters */
/* Name: SAMPLE_APP_ResetCounters */
/* */
/* Purpose: */
/* This function resets all the global counter variables that are */
Expand All @@ -358,7 +353,7 @@ int32 SAMPLE_APP_ResetCounters(const SAMPLE_APP_ResetCountersCmd_t *Msg)
} /* End of SAMPLE_APP_ResetCounters() */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: SAMPLE_APP_Process */
/* Name: SAMPLE_APP_Process */
/* */
/* Purpose: */
/* This function Process Ground Station Command */
Expand Down Expand Up @@ -400,7 +395,7 @@ int32 SAMPLE_APP_Process(const SAMPLE_APP_ProcessCmd_t *Msg)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* SAMPLE_APP_VerifyCmdLength() -- Verify command packet length */
/* SAMPLE_APP_VerifyCmdLength() -- Verify command packet length */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
bool SAMPLE_APP_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
Expand Down Expand Up @@ -430,13 +425,13 @@ bool SAMPLE_APP_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength
SAMPLE_APP_Data.ErrCounter++;
}

return (result);
return result;

} /* End of SAMPLE_APP_VerifyCmdLength() */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* SAMPLE_APP_TblValidationFunc -- Verify contents of First Table */
/* SAMPLE_APP_TblValidationFunc -- Verify contents of First Table */
/* buffer contents */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand All @@ -460,8 +455,7 @@ int32 SAMPLE_APP_TblValidationFunc(void *TblData)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* SAMPLE_APP_GetCrc -- Output CRC */
/* */
/* SAMPLE_APP_GetCrc -- Output CRC */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void SAMPLE_APP_GetCrc(const char *TableName)
Expand All @@ -480,7 +474,4 @@ void SAMPLE_APP_GetCrc(const char *TableName)
Crc = TblInfoPtr.Crc;
CFE_ES_WriteToSysLog("Sample App: CRC: 0x%08lX\n\n", (unsigned long)Crc);
}

return;

} /* End of SAMPLE_APP_GetCrc */
2 changes: 1 addition & 1 deletion fsw/src/sample_app_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/* Development Build Macro Definitions */

#define SAMPLE_APP_BUILD_NUMBER 21 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_NUMBER 27 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_BASELINE \
"v1.3.0-rc4" /*!< Development Build: git tag that is the base for the current development */

Expand Down

0 comments on commit 3c2c9cb

Please sign in to comment.