Skip to content

Commit

Permalink
Merge pull request #101 from thnkslprpt/fix-100-convert-int32-return-…
Browse files Browse the repository at this point in the history
…codes-to-CFE_Status_t

Fix #100, Convert `int32` return codes and variables to `CFE_Status_t`
  • Loading branch information
dzbaker authored May 18, 2023
2 parents fd3b17f + 50b2f33 commit 2658ad8
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 98 deletions.
30 changes: 15 additions & 15 deletions fsw/src/hs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ HS_AppData_t HS_AppData;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_AppMain(void)
{
int32 Status;
CFE_Status_t Status;
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;
CFE_SB_Buffer_t *BufPtr = NULL;

Expand Down Expand Up @@ -199,9 +199,9 @@ void HS_AppMain(void)
/* HS initialization */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_AppInit(void)
CFE_Status_t HS_AppInit(void)
{
int32 Status;
CFE_Status_t Status;

/*
** Initialize operating data to default states...
Expand Down Expand Up @@ -341,9 +341,9 @@ int32 HS_AppInit(void)
/* Initialize the software bus interface */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_SbInit(void)
CFE_Status_t HS_SbInit(void)
{
int32 Status;
CFE_Status_t Status;

/* Initialize housekeeping packet */
CFE_MSG_Init(CFE_MSG_PTR(HS_AppData.HkPacket.TelemetryHeader), CFE_SB_ValueToMsgId(HS_HK_TLM_MID),
Expand Down Expand Up @@ -415,11 +415,11 @@ int32 HS_SbInit(void)
/* Initialize the table interface */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_TblInit(void)
CFE_Status_t HS_TblInit(void)
{
uint32 TableSize = 0;
uint32 TableIndex = 0;
int32 Status;
uint32 TableSize = 0;
uint32 TableIndex = 0;
CFE_Status_t Status;

/* Register The HS Applications Monitor Table */
TableSize = HS_MAX_MONITORED_APPS * sizeof(HS_AMTEntry_t);
Expand Down Expand Up @@ -529,11 +529,11 @@ int32 HS_TblInit(void)
/* Main Processing Loop */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_ProcessMain(void)
CFE_Status_t HS_ProcessMain(void)
{
int32 Status = CFE_SUCCESS;
const char *AliveString = HS_CPU_ALIVE_STRING;
uint32 i = 0;
CFE_Status_t Status = CFE_SUCCESS;
const char * AliveString = HS_CPU_ALIVE_STRING;
uint32 i = 0;

/*
** Get Tables
Expand Down Expand Up @@ -601,9 +601,9 @@ int32 HS_ProcessMain(void)
/* Process any Commands and Event Messages received this cycle */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HS_ProcessCommands(void)
CFE_Status_t HS_ProcessCommands(void)
{
int32 Status = CFE_SUCCESS;
CFE_Status_t Status = CFE_SUCCESS;
CFE_SB_Buffer_t *BufPtr = NULL;

/*
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/hs_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void HS_AppMain(void);
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 HS_AppInit(void);
CFE_Status_t HS_AppInit(void);

/**
* \brief Initialize Software Bus
Expand All @@ -198,7 +198,7 @@ int32 HS_AppInit(void);
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 HS_SbInit(void);
CFE_Status_t HS_SbInit(void);

/**
* \brief Initialize cFE Table Services
Expand All @@ -213,7 +213,7 @@ int32 HS_SbInit(void);
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 HS_TblInit(void);
CFE_Status_t HS_TblInit(void);

/**
* \brief Perform Normal Periodic Processing
Expand All @@ -230,7 +230,7 @@ int32 HS_TblInit(void);
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 HS_ProcessMain(void);
CFE_Status_t HS_ProcessMain(void);

/**
* \brief Process commands received from cFE Software Bus
Expand All @@ -245,6 +245,6 @@ int32 HS_ProcessMain(void);
* \return Execution status, see \ref CFEReturnCodes
* \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
*/
int32 HS_ProcessCommands(void);
CFE_Status_t HS_ProcessCommands(void);

#endif
4 changes: 2 additions & 2 deletions fsw/src/hs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr)
{
int32 Status = CFE_SUCCESS;
CFE_Status_t Status = CFE_SUCCESS;

/*
** Unsubscribe from Event Messages if currently enabled
Expand Down Expand Up @@ -430,7 +430,7 @@ void HS_SetMaxResetsCmd(const CFE_SB_Buffer_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_AcquirePointers(void)
{
int32 Status;
CFE_Status_t Status;

/*
** Release the table (AppMon)
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/hs_monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void HS_MonitorApplications(void)
{
CFE_ES_AppInfo_t AppInfo;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
int32 Status;
CFE_Status_t Status;
uint32 TableIndex = 0;
uint16 ActionType;
uint32 MsgActsIndex = 0;
Expand Down Expand Up @@ -222,7 +222,7 @@ void HS_MonitorApplications(void)
void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr)
{
uint32 TableIndex = 0;
int32 Status = CFE_SUCCESS;
CFE_Status_t Status = CFE_SUCCESS;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
uint16 ActionType;
uint32 MsgActsIndex = 0;
Expand Down
8 changes: 4 additions & 4 deletions fsw/src/hs_sysmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
* Initialize The System Monitor functions
* --------------------------------------------------------
*/
int32 HS_SysMonInit(void)
CFE_Status_t HS_SysMonInit(void)
{
CFE_PSP_IODriver_Location_t Location;
int32 StatusCode;
CFE_Status_t StatusCode;

if (CFE_PSP_IODriver_FindByName(HS_SYSTEM_MONITOR_DEVICE, &HS_AppData.SysMonPspModuleId) != CFE_PSP_SUCCESS)
{
Expand Down Expand Up @@ -134,14 +134,14 @@ void HS_SysMonCleanup(void)
* Obtain the System CPU utilization information
* --------------------------------------------------------
*/
int32 HS_SysMonGetCpuUtilization(void)
CFE_Status_t HS_SysMonGetCpuUtilization(void)
{
const CFE_PSP_IODriver_Location_t Location = {.PspModuleId = HS_AppData.SysMonPspModuleId,
.SubsystemId = HS_AppData.SysMonSubsystemId,
.SubchannelId = HS_AppData.SysMonSubchannelId};
CFE_PSP_IODriver_AdcCode_t Sample = 0;
CFE_PSP_IODriver_AnalogRdWr_t RdWr = {.NumChannels = 1, .Samples = &Sample};
int32 StatusCode;
CFE_Status_t StatusCode;
int32 Value;

if (HS_AppData.SysMonPspModuleId == 0)
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/hs_sysmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ void HS_SysMonCleanup(void);
*
* \return Utilization value as fixed-point integer
*/
int32 HS_SysMonGetCpuUtilization(void);
CFE_Status_t HS_SysMonGetCpuUtilization(void);

#endif
Loading

0 comments on commit 2658ad8

Please sign in to comment.