Skip to content

Commit

Permalink
Fix #48, Remove 'end of function'-type comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 9, 2022
1 parent a96fa15 commit 272cc66
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 297 deletions.
17 changes: 6 additions & 11 deletions fsw/src/hs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ void HS_AppMain(void)
*/
RunStatus = CFE_ES_RunStatus_APP_ERROR;
}

} /* end CFS_ES_RunLoop while */

/*
Expand Down Expand Up @@ -192,7 +191,7 @@ void HS_AppMain(void)
** Exit the application
*/
CFE_ES_ExitApp(RunStatus);
} /* end HS_AppMain */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -339,7 +338,7 @@ int32 HS_AppInit(void)
HS_MAJOR_VERSION, HS_MINOR_VERSION, HS_REVISION, HS_MISSION_REV);

return Status;
} /* end HS_AppInit */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -412,7 +411,7 @@ int32 HS_SbInit(void)
*/

return Status;
} /* End of HS_SbInit() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -528,7 +527,7 @@ int32 HS_TblInit(void)
HS_AcquirePointers();

return CFE_SUCCESS;
} /* End of HS_TblInit() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -598,7 +597,7 @@ int32 HS_ProcessMain(void)
}

return Status;
} /* End of HS_ProcessMain() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -665,8 +664,4 @@ int32 HS_ProcessCommands(void)
}

return Status;
} /* End of HS_ProcessCommands() */

/************************/
/* End of File Comment */
/************************/
}
40 changes: 18 additions & 22 deletions fsw/src/hs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr)
break;

} /* end MessageID switch */
} /* End HS_AppPipe */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -291,7 +291,7 @@ void HS_HousekeepingReq(const CFE_SB_Buffer_t *BufPtr)
CFE_SB_TransmitMsg(&HS_AppData.HkPacket.TlmHeader.Msg, true);

} /* end HS_VerifyMsgLength if */
} /* end HS_HousekeepingCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -312,7 +312,7 @@ void HS_NoopCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(HS_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command: Version %d.%d.%d.%d",
HS_MAJOR_VERSION, HS_MINOR_VERSION, HS_REVISION, HS_MISSION_REV);
}
} /* end HS_NoopCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -332,7 +332,7 @@ void HS_ResetCmd(const CFE_SB_Buffer_t *BufPtr)

CFE_EVS_SendEvent(HS_RESET_DBG_EID, CFE_EVS_EventType_DEBUG, "Reset counters command");
}
} /* end HS_ResetCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -345,7 +345,7 @@ void HS_ResetCounters(void)
HS_AppData.CmdErrCount = 0;
HS_AppData.EventsMonitoredCount = 0;
HS_AppData.MsgActExec = 0;
} /* end HS_ResetCounters */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -366,7 +366,7 @@ void HS_EnableAppMonCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentAppMonState = HS_STATE_ENABLED;
CFE_EVS_SendEvent(HS_ENABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Enabled");
}
} /* end HS_EnableAppMonCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -386,7 +386,7 @@ void HS_DisableAppMonCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentAppMonState = HS_STATE_DISABLED;
CFE_EVS_SendEvent(HS_DISABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Disabled");
}
} /* end HS_DisableAppMonCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -443,7 +443,7 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CmdErrCount++;
}
}
} /* end HS_EnableEventMonCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -498,7 +498,7 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CmdErrCount++;
}
}
} /* end HS_DisableEventMonCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -518,7 +518,7 @@ void HS_EnableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentAlivenessState = HS_STATE_ENABLED;
CFE_EVS_SendEvent(HS_ENABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Enabled");
}
} /* end HS_EnableAlivenessCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -538,7 +538,7 @@ void HS_DisableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentAlivenessState = HS_STATE_DISABLED;
CFE_EVS_SendEvent(HS_DISABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Disabled");
}
} /* end HS_DisableAlivenessCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -558,7 +558,7 @@ void HS_EnableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentCPUHogState = HS_STATE_ENABLED;
CFE_EVS_SendEvent(HS_ENABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Enabled");
}
} /* end HS_EnableCPUHogCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -578,7 +578,7 @@ void HS_DisableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr)
HS_AppData.CurrentCPUHogState = HS_STATE_DISABLED;
CFE_EVS_SendEvent(HS_DISABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Disabled");
}
} /* end HS_DisableCPUHogCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -599,7 +599,7 @@ void HS_ResetResetsPerformedCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(HS_RESET_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG,
"Processor Resets Performed by HS Counter has been Reset");
}
} /* end HS_ResetResetsPerformedCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -624,7 +624,7 @@ void HS_SetMaxResetsCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(HS_SET_MAX_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG,
"Max Resets Performable by HS has been set to %d", HS_AppData.CDSData.MaxResets);
}
} /* end HS_SetMaxResetsCmd */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -829,7 +829,7 @@ void HS_AcquirePointers(void)
}

#endif
} /* End of HS_AcquirePointers */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -868,7 +868,7 @@ void HS_AppMonStatusRefresh(void)
(TableIndex % HS_BITS_PER_APPMON_ENABLE));
}
}
} /* end HS_AppMonStatusRefresh */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -886,8 +886,4 @@ void HS_MsgActsStatusRefresh(void)
{
HS_AppData.MsgActCooldown[TableIndex] = 0;
}
} /* end HS_MsgActsStatusRefresh */

/************************/
/* End of File Comment */
/************************/
}
26 changes: 11 additions & 15 deletions fsw/src/hs_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void HS_IdleTask(void)
/* Thread cancellation point/give up CPU */
OS_TaskDelay(0);
}
} /* End of HS_IdleTask() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -128,7 +128,7 @@ int32 HS_CustomInit(void)
HS_CustomData.UtilCallsPerMark = HS_UTIL_CALLS_PER_MARK;

return Status;
} /* end HS_CustomInit */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -153,7 +153,7 @@ void HS_CustomCleanup(void)
** Delete the Idle Task
*/
CFE_ES_DeleteChildTask(HS_CustomData.IdleTaskID);
} /* end HS_CustomCleanup */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -163,7 +163,7 @@ void HS_CustomCleanup(void)
void HS_UtilizationIncrement(void)
{
HS_CustomData.ThisIdleTaskExec++;
} /* end HS_UtilizationIncrement */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -182,7 +182,7 @@ void HS_UtilizationMark(void)
HS_CustomData.LastIdleTaskExec = HS_CustomData.ThisIdleTaskExec;
CycleCount = 0;
}
} /* end HS_UtilizationMark */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -195,7 +195,7 @@ void HS_MarkIdleCallback(void)
** Capture the CPU Utilization (at a consistant time)
*/
HS_UtilizationMark();
} /* End of HS_MarkIdleCallback() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -212,7 +212,7 @@ void HS_CustomMonitorUtilization(void)
HS_MonitorUtilization();
HS_CustomData.UtilCycleCounter = 0;
}
} /* End of HS_CustomMonitorUtilization() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -252,7 +252,7 @@ int32 HS_CustomCommands(const CFE_SB_Buffer_t *BufPtr)
} /* end CommandCode switch */

return Status;
} /* End of HS_CustomCommands() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -359,7 +359,7 @@ void HS_UtilDiagReport(void)
(unsigned int)HS_CustomData.UtilMask, (int)OutputValue[OutputOrdinal[0]], (int)OutputCount[OutputOrdinal[0]],
(int)OutputValue[OutputOrdinal[1]], (int)OutputCount[OutputOrdinal[1]], (int)OutputValue[OutputOrdinal[2]],
(int)OutputCount[OutputOrdinal[2]], (int)OutputValue[OutputOrdinal[3]], (int)OutputCount[OutputOrdinal[3]]);
} /* end HS_UtilDiagReport */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -412,7 +412,7 @@ void HS_SetUtilParamsCmd(const CFE_SB_Buffer_t *BufPtr)
(int)CmdPtr->Mult1, (int)CmdPtr->Div, (int)CmdPtr->Mult2);
}
}
} /* end HS_SetUtilParamsCmd */
}

void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr)
{
Expand All @@ -431,8 +431,4 @@ void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(HS_SET_UTIL_DIAG_DBG_EID, CFE_EVS_EventType_DEBUG,
"Utilization Diagnostics Mask has been set to %08X", (unsigned int)HS_CustomData.UtilMask);
}
} /* end HS_SetUtilDiagCmd */

/************************/
/* End of File Comment */
/************************/
}
20 changes: 8 additions & 12 deletions fsw/src/hs_monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void HS_MonitorApplications(void)
} /* end (HS_AppData.AppMonCheckInCountdown[TableIndex] != 0) if */

} /* end for loop */
} /* end HS_MonitorApplications */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -365,7 +365,7 @@ void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr)
} /* end EventID comparison */

} /* end for loop */
} /* end HS_MonitorEvent */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -442,7 +442,7 @@ void HS_MonitorUtilization(void)

HS_AppData.UtilCpuAvg = (CombinedUtil / HS_UTIL_AVERAGE_NUM_INTERVAL);
HS_AppData.UtilCpuPeak = PeakUtil;
} /* end HS_MonitorUtilization */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -533,7 +533,7 @@ int32 HS_ValidateAMTable(void *TableData)
(int)UnusedCount);

return TableResult;
} /* end HS_ValidateAMTable */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -624,7 +624,7 @@ int32 HS_ValidateEMTable(void *TableData)
(int)UnusedCount);

return TableResult;
} /* end HS_ValidateEMTable */
}

#if HS_MAX_EXEC_CNT_SLOTS != 0
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -716,7 +716,7 @@ int32 HS_ValidateXCTable(void *TableData)
(int)UnusedCount);

return TableResult;
} /* end HS_ValidateXCTable */
}
#endif

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -815,7 +815,7 @@ int32 HS_ValidateMATable(void *TableData)
(int)UnusedCount);

return TableResult;
} /* end HS_ValidateMATable */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -838,8 +838,4 @@ void HS_SetCDSData(uint16 ResetsPerformed, uint16 MaxResets)
{
CFE_ES_CopyToCDS(HS_AppData.MyCDSHandle, &HS_AppData.CDSData);
}
} /* end HS_SetCDSData */

/************************/
/* End of File Comment */
/************************/
}
Loading

0 comments on commit 272cc66

Please sign in to comment.