Skip to content

Commit

Permalink
Merge branch 'main' into fix-43-comment-and-empty-line-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt authored Oct 9, 2022
2 parents 4f49318 + b41dbd7 commit a2a446a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 43 deletions.
6 changes: 3 additions & 3 deletions docs/dox_src/cfs_lc.dox
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
#CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and
actionpoints are needed, keep in mind the the entire WDT is sequentially searched
whenever a message that may contain watchpoints is received. Likewise the entire
ADT will be processed whenever a #LC_SAMPLE_AP_MID message is recieved. While it
ADT will be processed whenever a #LC_SAMPLE_AP_MID message is received. While it
is desirable to leave unused entries in both tables for later updates, large tables
will increase search time which may be undesirable depending on the telemetry and
actionpoint sample rates required. LC defines the performance ID #LC_WDT_SEARCH_PERF_ID
Expand Down Expand Up @@ -429,7 +429,7 @@
#LC_WATCH_STALE is an initialization value for the Watchpoint
Results Table. If a watchpoint has this WatchResult then the watchpoint
is unused (the DataType in the WDT is set to #LC_WATCH_NOT_USED) or a
message that contains the watchpoint has not yet been recieved by LC and
message that contains the watchpoint has not yet been received by LC and
evaluated.
</I>

Expand Down Expand Up @@ -526,7 +526,7 @@
#LC_ACTION_NOT_USED).

2) An actionpoint sample request (#LC_SAMPLE_AP_MID) targeting the AP has not
yet been recieved by LC so the AP has not yet been evaluated.
yet been received by LC so the AP has not yet been evaluated.

3) One or more of the watchpoints that this AP depends on (as defined by
the RPN expression) has a current WatchResult of #LC_WATCH_STALE
Expand Down
6 changes: 3 additions & 3 deletions fsw/src/lc_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ uint8 LC_EvaluateRPN(uint16 APNumber)
EvalResult = LC_ACTION_FAIL;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -600,7 +600,7 @@ int32 LC_ValidateADT(void *TableData)
"ADT verify results: good = %d, bad = %d, unused = %d", (int)GoodCount, (int)BadCount,
(int)UnusedCount);

return (TableResult);
return TableResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -699,5 +699,5 @@ int32 LC_ValidateRPN(const uint16 *RPNPtr, int32 *IndexValue, int32 *StackDepthV
*StackDepthValue = StackDepth;
}

return (Result);
return Result;
}
32 changes: 16 additions & 16 deletions fsw/src/lc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int32 LC_AppInit(void)
LC_MAJOR_VERSION, LC_MINOR_VERSION, LC_REVISION, LC_MISSION_REV);
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -247,7 +247,7 @@ int32 LC_EvsInit(void)
CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", (unsigned int)Status);
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -316,7 +316,7 @@ int32 LC_SbInit(void)
}
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -379,7 +379,7 @@ int32 LC_TableInit(void)
*/
if ((Result = LC_CreateResultTables()) != CFE_SUCCESS)
{
return (Result);
return Result;
}

/*
Expand All @@ -399,7 +399,7 @@ int32 LC_TableInit(void)
*/
if ((Result = LC_CreateDefinitionTables()) != CFE_SUCCESS)
{
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -431,7 +431,7 @@ int32 LC_TableInit(void)
{
CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting WDT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -443,15 +443,15 @@ int32 LC_TableInit(void)
{
CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting ADT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}
}
else
{
Result = LC_LoadDefaultTables();
if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED))
{
return (Result);
return Result;
}
}

Expand Down Expand Up @@ -484,7 +484,7 @@ int32 LC_TableInit(void)
(unsigned int)LC_OperData.TableResults);
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -560,7 +560,7 @@ int32 LC_CreateResultTables(void)
LC_OperData.TableResults |= LC_ART_TBL_CREATED;
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -716,7 +716,7 @@ int32 LC_CreateDefinitionTables(void)
}
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -761,7 +761,7 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering WRT CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -795,7 +795,7 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering ART CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -840,10 +840,10 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering application data CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -962,5 +962,5 @@ int32 LC_LoadDefaultTables(void)
}
}

return (Result);
return Result;
}
2 changes: 1 addition & 1 deletion fsw/src/lc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int32 LC_AppPipe(const CFE_SB_Buffer_t *BufPtr)

} /* end MessageID switch */

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/lc_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ uint8 LC_CustomFunction(uint16 WatchIndex, uint32 ProcessedWPData, const CFE_SB_

} /* end WatchIndex switch */

return (EvalResult);
return EvalResult;
}
16 changes: 8 additions & 8 deletions fsw/src/lc_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool LC_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
result = false;
}

return (result);
return result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -144,7 +144,7 @@ int32 LC_ManageTables(void)
{
CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting WDT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle);
Expand All @@ -160,10 +160,10 @@ int32 LC_ManageTables(void)
{
CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting ADT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand All @@ -185,7 +185,7 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update watchpoint results in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -197,7 +197,7 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update actionpoint results in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -214,10 +214,10 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update application data in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down
24 changes: 13 additions & 11 deletions fsw/src/lc_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID)
}

/* Return pointer to last link in watchpoint linked list */
return (WatchPtLink);

return WatchPtLink;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -535,7 +536,7 @@ uint8 LC_OperatorCompare(uint16 WatchIndex, uint32 ProcessedWPData)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -588,7 +589,7 @@ uint8 LC_SignedCompare(uint16 WatchIndex, int32 WPValue, int32 CompareValue)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -641,7 +642,7 @@ uint8 LC_UnsignedCompare(uint16 WatchIndex, uint32 WPValue, uint32 CompareValue)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -727,7 +728,7 @@ uint8 LC_FloatCompare(uint16 WatchIndex, LC_MultiType_t *WPMultiType, LC_MultiTy
EvalResult = LC_WATCH_ERROR;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -787,7 +788,7 @@ bool LC_WPOffsetValid(uint16 WatchIndex, const CFE_SB_Buffer_t *BufPtr)
LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR;
LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0;

return (false);
return false;
break;

} /* end switch */
Expand All @@ -811,7 +812,7 @@ bool LC_WPOffsetValid(uint16 WatchIndex, const CFE_SB_Buffer_t *BufPtr)
LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0;
}

return (OffsetValid);
return OffsetValid;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -923,7 +924,8 @@ bool LC_GetSizedWPData(uint16 WatchIndex, const uint8 *WPDataPtr, uint32 *SizedD
/*
** Return success flag
*/
return (Success);

return Success;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1057,7 +1059,7 @@ int32 LC_ValidateWDT(void *TableData)
"WDT verify results: good = %d, bad = %d, unused = %d", (int)GoodCount, (int)BadCount,
(int)UnusedCount);

return (TableResult);
return TableResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1091,7 +1093,7 @@ bool LC_Uint32IsNAN(uint32 Data)
}
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1126,5 +1128,5 @@ bool LC_Uint32IsInfinite(uint32 Data)
}
}

return (Result);
return Result;
}

0 comments on commit a2a446a

Please sign in to comment.