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

Limit SBR message id loops for reasonable test times #2022

Closed
skliper opened this issue Jan 18, 2022 · 0 comments · Fixed by #2023 or #2019
Closed

Limit SBR message id loops for reasonable test times #2022

skliper opened this issue Jan 18, 2022 · 0 comments · Fixed by #2023 or #2019
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jan 18, 2022

Is your feature request related to a problem? Please describe.
Loops over CFE_PLATFOR_SB_HIGHEST_VALID_MSGID can take a long time on some systems (many minutes). Unit tests that cover the full range for the default setting is sufficient to show proper operation.

for (msgidx = 0; msgidx <= CFE_PLATFORM_SB_HIGHEST_VALID_MSGID; msgidx++)
{
if (!CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(msgidx))))
{
count++;
}
}

for (msgidx = 0; msgidx <= CFE_PLATFORM_SB_HIGHEST_VALID_MSGID; msgidx++)
{
if (!CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(msgidx))))
{
count++;
}
}

for (msgidx = 0; msgidx <= CFE_PLATFORM_SB_HIGHEST_VALID_MSGID; msgidx++)
{
if (!CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(msgidx))))
{
count++;
}
}

Describe the solution you'd like
Limit the loops.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman NASA/GSFC

@excaliburtb

@skliper skliper added this to the Draco milestone Jan 18, 2022
@skliper skliper self-assigned this Jan 18, 2022
skliper added a commit to skliper/cFE that referenced this issue Jan 18, 2022
astrogeco added a commit that referenced this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant