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

Need appropriate method(s) to fabricate valid MsgIds #2476

Open
jphickey opened this issue Dec 7, 2023 · 0 comments
Open

Need appropriate method(s) to fabricate valid MsgIds #2476

jphickey opened this issue Dec 7, 2023 · 0 comments

Comments

@jphickey
Copy link
Contributor

jphickey commented Dec 7, 2023

Is your feature request related to a problem? Please describe.
In certain circumstances - particularly the SB functional tests - there is a need to subscribe to a large quantity of MsgIds. These don't need to be MsgIds on which data is actually published - in fact its preferable if its not.

Previously, the testcase code used the BASE msgid define, but this wasn't guaranteed to be there (user config dependent) so it was changed to simply 1 + NumSubs. However, this makes a different assumption that anything nonzero will pass the CFE_SB_IsValidMsgId() test.

Describe the solution you'd like
This should use a more robust method to generate MsgIds that are structurally valid (in terms of the bits/bit patterns) but not actually carrying live traffic.

Additional context
SB subscription test is here:

/* fabricate a msgid to subscribe to (this may overlap real msgids) */
TestMsgId = CFE_SB_ValueToMsgId(1 + NumSubs);
Status = CFE_SB_Subscribe(TestMsgId, PipeId);
if (Status != CFE_SUCCESS)
{
break;
}

Requester Info
Joseph Hickey, Vantage Systems, Inc.

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

No branches or pull requests

1 participant