Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #122, Remove redundant comments #123

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data);
int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data);

/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* CI_Lab_AppMain() -- Application entry point and main process loop */
/* */
/* Application entry point and main process loop */
/* Purpose: This is the Main task event loop for the Command Ingest Task */
/* The task handles all interfaces to the data system through */
/* the software bus. There is one pipeline into this task */
/* The task is scheduled by input into this pipeline. */
/* The task is scheduled by input into this pipeline. */
/* It can receive Commands over this pipeline */
/* and acts accordingly to process them. */
/* */
Expand Down Expand Up @@ -109,8 +110,7 @@ void CI_Lab_AppMain(void)
}

CFE_ES_ExitApp(RunStatus);

} /* End of CI_Lab_AppMain() */
}

/*
** CI delete callback function.
Expand All @@ -125,7 +125,7 @@ void CI_LAB_delete_callback(void)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* CI_LAB_TaskInit() -- CI initialization */
/* CI initialization */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
void CI_LAB_TaskInit(void)
Expand Down Expand Up @@ -179,11 +179,9 @@ void CI_LAB_TaskInit(void)

CFE_EVS_SendEvent(CI_LAB_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s",
CI_LAB_VERSION_STRING);

} /* End of CI_LAB_TaskInit() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: CI_LAB_ProcessCommandPacket */
/* */
/* Purpose: */
/* This routine will process any packet that is received on the CI command*/
Expand Down Expand Up @@ -216,11 +214,11 @@ void CI_LAB_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr)
(unsigned int)CFE_SB_MsgIdToValue(MsgId));
break;
}
} /* End CI_LAB_ProcessCommandPacket */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* CI_LAB_ProcessGroundCommand() -- CI ground commands */
/* CI ground commands */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/

Expand Down Expand Up @@ -251,10 +249,9 @@ void CI_LAB_ProcessGroundCommand(CFE_SB_Buffer_t *SBBufPtr)
default:
break;
}
} /* End of CI_LAB_ProcessGroundCommand() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Name: CI_LAB_Noop */
/* */
/* Purpose: */
/* Handle NOOP command packets */
Expand All @@ -271,7 +268,6 @@ int32 CI_LAB_Noop(const CI_LAB_NoopCmd_t *data)
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Name: CI_LAB_ResetCounters */
/* */
/* Purpose: */
/* Handle ResetCounters command packets */
Expand All @@ -285,25 +281,23 @@ int32 CI_LAB_ResetCounters(const CI_LAB_ResetCountersCmd_t *data)
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: CI_LAB_ReportHousekeeping */
/* */
/* Purpose: */
/* This function is triggered in response to a task telemetry request */
/* from the housekeeping task. This function will gather the CI task */
/* telemetry, packetize it and send it to the housekeeping task via */
/* the software bus */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 CI_LAB_ReportHousekeeping(const CFE_MSG_CommandHeader_t *data)
{
CI_LAB_Global.HkTlm.Payload.SocketConnected = CI_LAB_Global.SocketConnected;
CFE_SB_TimeStampMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader));
CFE_SB_TransmitMsg(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), true);
return CFE_SUCCESS;

} /* End of CI_LAB_ReportHousekeeping() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* Name: CI_LAB_ResetCounters_Internal */
/* */
/* Purpose: */
/* This function resets all the global counter variables that are */
Expand All @@ -319,11 +313,11 @@ void CI_LAB_ResetCounters_Internal(void)
/* Status of packets ingested by CI task */
CI_LAB_Global.HkTlm.Payload.IngestPackets = 0;
CI_LAB_Global.HkTlm.Payload.IngestErrors = 0;
} /* End of CI_LAB_ResetCounters() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* CI_LAB_ReadUpLink() -- */
/* -- */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
void CI_LAB_ReadUpLink(void)
Expand Down Expand Up @@ -380,11 +374,11 @@ void CI_LAB_ReadUpLink(void)
break; /* no (more) messages */
}
}
} /* End of CI_LAB_ReadUpLink() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
/* */
/* CI_LAB_VerifyCmdLength() -- Verify command packet length */
/* Verify command packet length */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
Expand Down Expand Up @@ -413,5 +407,4 @@ bool CI_LAB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
}

return result;

} /* End of CI_LAB_VerifyCmdLength() */
}