Skip to content

Commit

Permalink
Fix nasa#3, Scrub for C++-style comments and redundant comments"
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 10, 2022
1 parent ce59162 commit df653d3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 62 deletions.
4 changes: 0 additions & 4 deletions fsw/custom/bp_semcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,3 @@
BP_Throttle_t BP_Throttles[BP_NUM_SEM_THROTTLES] = {
{CF_CHANNEL_0_SEM_NAME, CF_SPACE_TO_GND_PDU_MID0, BP_CF_SEM_MAX_COUNT, 0},
{CF_CHANNEL_1_SEM_NAME, CF_SPACE_TO_GND_PDU_MID1, BP_CF_SEM_MAX_COUNT, 0}};

/************************/
/* End of File Comment */
/************************/
4 changes: 0 additions & 4 deletions fsw/custom/bp_tlmcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@ void BP_ClearCustomTlm(BP_CustomTlm_t *custom_tlm)
(void)custom_tlm;
bplib_store_flash_stats(NULL, false, true);
}

/************************/
/* End of File Comment */
/************************/
14 changes: 0 additions & 14 deletions fsw/src/bp_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ CFE_Status_t BP_NoopCmd(const BP_NoopCmd_t *cmd)
"No operation command received for BP version %d.%d.%d.%d", BP_MAJOR_VERSION, BP_MINOR_VERSION,
BP_REVISION, BP_MISSION_REV);

/* Return Success */
return CFE_SUCCESS;
}

Expand All @@ -246,7 +245,6 @@ CFE_Status_t BP_ResetAppCmd(const BP_ResetAppCmd_t *cmd)
/* Issue Event */
CFE_EVS_SendEvent(BP_INFO_EID, CFE_EVS_EventType_INFORMATION, "BP Statistics: Cleared");

/* Return Success */
return CFE_SUCCESS;
}

Expand All @@ -273,7 +271,6 @@ CFE_Status_t BP_ReloadFlowTableCmd(const BP_ReloadFlowTableCmd_t *cmd)
BP_ForEachFlow(BP_RebuildBitmaskPerFlow, &EnableMask);
BP_GlobalData.HkPkt.EnableMask = EnableMask;

/* Return Status */
return status;
}

Expand Down Expand Up @@ -301,7 +298,6 @@ CFE_Status_t BP_EnableFlowCmd(const BP_EnableFlowCmd_t *cmd)
BP_ForEachFlow(BP_RebuildBitmaskPerFlow, &EnableMask);
BP_GlobalData.HkPkt.EnableMask = EnableMask;

/* Return Status */
return status;
}

Expand Down Expand Up @@ -329,7 +325,6 @@ CFE_Status_t BP_DisableFlowCmd(const BP_DisableFlowCmd_t *cmd)
BP_ForEachFlow(BP_RebuildBitmaskPerFlow, &EnableMask);
BP_GlobalData.HkPkt.EnableMask = EnableMask;

/* Return Status */
return status;
}

Expand All @@ -351,7 +346,6 @@ CFE_Status_t BP_FlushFlowCmd(const BP_FlushFlowCmd_t *cmd)
CFE_EVS_SendEvent(BP_INFO_EID, CFE_EVS_EventType_INFORMATION, "BP Flow %s: Flushed", BP_FlowGetName(flow));
}

/* Return Status */
return status;
}

Expand All @@ -373,7 +367,6 @@ CFE_Status_t BP_PauseFlowCmd(const BP_PauseFlowCmd_t *cmd)
CFE_EVS_SendEvent(BP_INFO_EID, CFE_EVS_EventType_INFORMATION, "BP Flow %s: Paused", BP_FlowGetName(flow));
}

/* Return Status */
return status;
}

Expand All @@ -395,7 +388,6 @@ CFE_Status_t BP_ResumeFlowCmd(const BP_ResumeFlowCmd_t *cmd)
CFE_EVS_SendEvent(BP_INFO_EID, CFE_EVS_EventType_INFORMATION, "BP Flow %s: Resumed", BP_FlowGetName(flow));
}

/* Return Status */
return status;
}

Expand All @@ -418,7 +410,6 @@ CFE_Status_t BP_OverrideTimeoutCmd(const BP_OverrideTimeoutCmd_t *cmd)
BP_FlowGetName(flow), (int)cmd->Payload.Timeout);
}

/* Return Status */
return status;
}

Expand All @@ -441,7 +432,6 @@ CFE_Status_t BP_DisableOverrideTimeoutCmd(const BP_DisableOverrideTimeoutCmd_t *
BP_FlowGetName(flow));
}

/* Return Status */
return status;
}

Expand All @@ -464,7 +454,6 @@ CFE_Status_t BP_OverridePriorityCmd(const BP_OverridePriorityCmd_t *cmd)
BP_FlowGetName(flow), (int)cmd->Payload.Priority);
}

/* Return Status */
return status;
}

Expand All @@ -487,7 +476,6 @@ CFE_Status_t BP_DisableOverridePriorityCmd(const BP_DisableOverridePriorityCmd_t
BP_FlowGetName(flow));
}

/* Return Status */
return status;
}

Expand Down Expand Up @@ -659,7 +647,6 @@ static CFE_Status_t ProcessCmd(const CFE_SB_Buffer_t *MsgBufPtr)
else
BP_GlobalData.HkPkt.InvalidCmdCnt++;

/* Return Results */
return cmd_result;
}

Expand Down Expand Up @@ -694,7 +681,6 @@ static CFE_Status_t ProcessHk(const CFE_SB_Buffer_t *MessagePtr)
status = CFE_STATUS_BAD_COMMAND_CODE;
}

/* Return Status */
return status;
}

Expand Down
15 changes: 1 addition & 14 deletions fsw/src/bp_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ static inline bool BP_FlowEntryIsMatch(const BP_FlowCtrlEntry_t *FlowPtr, BP_Flo
}

/*----------------------------------------------------------------
*
* Function: CFE_ES_CheckAppIdSlotUsed
*
* Application-scope internal function
* See description in header file for argument/return detail
Expand Down Expand Up @@ -208,7 +206,6 @@ static bool check_throttling(CFE_SB_MsgId_t MsgId)
}

/*-----------------------------------------------
* prioritize_flows
*
* note: the higher the priority value, the higher
* the priority of the flow (i.e. it will get
Expand All @@ -217,7 +214,7 @@ static bool check_throttling(CFE_SB_MsgId_t MsgId)
static void prioritize_flows(void)
{
int flow_idx;
// BP_FlowHandle_t level, prev_level;
/* BP_FlowHandle_t level, prev_level; */
BP_FlowCtrlEntry_t *FlowPtr;
BP_FlowCtrlEntry_t *LevelPtr;
BP_FlowCtrlEntry_t *PrevLevelPtr;
Expand Down Expand Up @@ -388,7 +385,6 @@ static int process_incoming_bundles(BP_FlowCtrlEntry_t *flow, uint32_t *flags, i
}
}

/* Return */
return cycles;
}

Expand Down Expand Up @@ -513,7 +509,6 @@ static int store_incoming_data(BP_FlowCtrlEntry_t *flow, uint32_t *flags, int ma
}
}

/* Return */
return cycles;
}

Expand Down Expand Up @@ -562,7 +557,6 @@ static int load_outgoing_bundles(BP_FlowCtrlEntry_t *flow, uint32_t *flags, int
}
}

/* Return */
return cycles;
}

Expand Down Expand Up @@ -664,7 +658,6 @@ static int accept_outgoing_data(BP_FlowCtrlEntry_t *flow, uint32_t *flags, int m
}
}

/* Return */
return cycles;
}

Expand Down Expand Up @@ -808,7 +801,6 @@ int32 BP_FlowLoad(const char *flow_table_filename)
"Table information unknown, %d flows enabled", num_flows);
}

/* Return Success */
return CFE_SUCCESS;
}

Expand Down Expand Up @@ -995,7 +987,6 @@ int32 BP_FlowEnable(BP_FlowHandle_t fh)
}
}

/* Return Status */
return status;
}

Expand Down Expand Up @@ -1362,7 +1353,6 @@ const char *BP_FlowGetName(BP_FlowHandle_t fh)
return "INVALID";
}

/* Return Name */
return FlowPtr->Config.Name;
}

Expand Down Expand Up @@ -1551,7 +1541,6 @@ int32 BP_FlowProcess(void)
/* Perform Throttling */
disperse_throttling();

/* Return Success */
return CFE_SUCCESS;
}

Expand Down Expand Up @@ -1590,7 +1579,6 @@ int32 BP_FlowDirectStore(BP_FlowHandle_t fh, uint8 *buffer, int len)
return BP_LIB_LOAD_ERR_EID;
}

/* Return success */
return CFE_SUCCESS;
}

Expand Down Expand Up @@ -1631,7 +1619,6 @@ int32 BP_FlowDirectConfig(BP_FlowHandle_t fh, int mode, int opt, int *val)
return BP_LIB_CONFIG_ERR_EID;
}

/* Return success */
return CFE_SUCCESS;
}

Expand Down
4 changes: 0 additions & 4 deletions fsw/src/bp_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ static bool parse_parameters(const char *cfgstr, BP_IOConfig_t *config)
}
}

/* Return Success */
return true;
}

Expand Down Expand Up @@ -302,7 +301,6 @@ int32 BP_IOOpen(const char *CfgStr, BP_IoHandle_t *Descriptor)
"Opened IO channel for using configuration: %s", CfgStr);
*Descriptor = IoPtr->Handle;

/* Return Success */
return CFE_SUCCESS;
}

Expand Down Expand Up @@ -468,7 +466,6 @@ bool BP_IOReadBundle(BP_IoHandle_t ioh, void **buf, size_t *bufsize)
}
}

/* Return Status */
return (SbStatus == CFE_SUCCESS);
}

Expand Down Expand Up @@ -538,6 +535,5 @@ bool BP_IOWriteBundle(BP_IoHandle_t ioh, const void *buf, size_t bufsize)
}
}

/* Return Status */
return (SbStatus == CFE_SUCCESS);
}
16 changes: 0 additions & 16 deletions fsw/src/bp_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,26 @@ typedef struct
************************************************/

/*-----------------------------------------------
* BP_IOInit
*
* Must be called before any other call
*----------------------------------------------*/
int32 BP_IOInit(void);

/*-----------------------------------------------
* BP_IOOpen
*
* Returns a decriptor to an IO control block
*----------------------------------------------*/
int32 BP_IOOpen(const char *IOParm, BP_IoHandle_t *ioh);

/*-----------------------------------------------
* BP_IOClose
*
* Close an IO control block
*----------------------------------------------*/
int32 BP_IOClose(BP_IoHandle_t ioh);

/*-----------------------------------------------
* BP_IOGetStats
*
* Gets counters and status flags.
*----------------------------------------------*/
int32 BP_IOGetStats(BP_IoHandle_t ioh, BP_IOStats_t *Stats);

/*-----------------------------------------------
* BP_IOClearStats
*
* Reset counters and status flags to a known reset state.
*
* Notes:
Expand All @@ -118,22 +108,16 @@ int32 BP_IOGetStats(BP_IoHandle_t ioh, BP_IOStats_t *Stats);
int32 BP_IOClearStats(BP_IoHandle_t ioh);

/*-----------------------------------------------
* BP_IOFlush
*
* Clear out any pending packets
*----------------------------------------------*/
int32 BP_IOFlush(BP_IoHandle_t ioh);

/*-----------------------------------------------
* BP_IOReadBundle
*
* Read bundles to be processed
*----------------------------------------------*/
bool BP_IOReadBundle(BP_IoHandle_t ioh, void **InBuf, size_t *InBufSize);

/*-----------------------------------------------
* BP_IOWriteBundle
*
* Write bundles
*----------------------------------------------*/
bool BP_IOWriteBundle(BP_IoHandle_t ioh, const void *OutBuf, size_t OutBufSize);
Expand Down
2 changes: 0 additions & 2 deletions fsw/src/bp_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ static inline bool BP_StorageEntryIsMatch(const BP_StorageService_t *StoragePtr,
}

/*----------------------------------------------------------------
*
* Function: BP_CheckStorageSlotUsed
*
* Application-scope internal function
* See description in header file for argument/return detail
Expand Down
4 changes: 0 additions & 4 deletions fsw/tables/bp_flowtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,3 @@ BP_FlowTbl_t BP_FlowTable = {
.Store = BP_FLASH_STORE,
.PktTbl = {{CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_EVENT_MSG_MID), 1, 1, BP_APP_READ_LIMIT}},
.IOParm = "OutMID=0x08BD&InMID=0x18C1&InDepth=32"}}};

/************************/
/* End of File Comment */
/************************/

0 comments on commit df653d3

Please sign in to comment.