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

Consistent uplink processing #146

Closed
skliper opened this issue Sep 27, 2023 · 0 comments · Fixed by #162
Closed

Consistent uplink processing #146

skliper opened this issue Sep 27, 2023 · 0 comments · Fixed by #162

Comments

@skliper
Copy link
Contributor

skliper commented Sep 27, 2023

Is your feature request related to a problem? Please describe.
Since uplink processing relies on CFE_SB_ReceiveBuffer return (either receive or timeout), actual uplink processing can not be synchronized or scheduled reliably and is inconsistent. Also could flood the interface by simply providing a CI_Lab cmd in each set of 10 msgs.

while (CFE_ES_RunLoop(&RunStatus) == true)
{
CFE_ES_PerfLogExit(CI_LAB_MAIN_TASK_PERF_ID);
/* Pend on receipt of command packet -- timeout set to 500 millisecs */
status = CFE_SB_ReceiveBuffer(&SBBufPtr, CI_LAB_Global.CommandPipe, 500);
CFE_ES_PerfLogEntry(CI_LAB_MAIN_TASK_PERF_ID);
if (status == CFE_SUCCESS)
{
CI_LAB_ProcessCommandPacket(SBBufPtr);
}
/* Regardless of packet vs timeout, always process uplink queue */
if (CI_LAB_Global.SocketConnected)
{
CI_LAB_ReadUpLink();
}
}

Also hard coded to process up to 10 messages per return from CFE_SB_ReceiveBuffer.

Describe the solution you'd like
Separate uplink processing from command processing by using a timer/callback and child task. Could then actually limit uplink processing and provide more consistent behavior.

Describe alternatives you've considered
Could add an uplink processing command that could come from a scheduler and/or support both commands and timer callback.

Additional context
Would simplify faster than real time (FRT) execution to remove dependency of uplink processing on CFE_SB_ReceiveBuffer timeout.

Requester Info
Jacob Hageman - NASA/GSFC

skliper added a commit to skliper/ci_lab that referenced this issue Nov 15, 2023
skliper added a commit to skliper/ci_lab that referenced this issue Nov 15, 2023
dzbaker added a commit that referenced this issue Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant