-
Notifications
You must be signed in to change notification settings - Fork 201
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
cFE Integration candidate: Equuleus-rc1+dev6 #2522
Conversation
Adds the following APIs to convert TopicID to MsgID values at runtime: - CFE_SB_CmdTopicIdToMsgId() - CFE_SB_TlmTopicIdToMsgId() - CFE_SB_GlobalCmdTopicIdToMsgId() - CFE_SB_GlobalTlmTopicIdToMsgId() - CFE_SB_LocalCmdTopicIdToMsgId() - CFE_SB_LocalTlmTopicIdToMsgId() This includes coverage tests and stubs. If the config does not define the conversions, then these return the invalid msgID value.
Fix #2519, Add runtime TopicId conversion routines to SB
* relies on the run-time conversions. | ||
*/ | ||
|
||
#ifndef CFE_PLATFORM_CMD_TOPICID_TO_MIDV |
Check notice
Code scanning / CodeQL
Conditional compilation Note
#define CFE_PLATFORM_CMD_TOPICID_TO_MIDV(x) 0 | ||
#endif | ||
|
||
#ifndef CFE_PLATFORM_TLM_TOPICID_TO_MIDV |
Check notice
Code scanning / CodeQL
Conditional compilation Note
#define CFE_PLATFORM_TLM_TOPICID_TO_MIDV(x) 0 | ||
#endif | ||
|
||
#ifndef CFE_GLOBAL_CMD_TOPICID_TO_MIDV |
Check notice
Code scanning / CodeQL
Conditional compilation Note
#define CFE_GLOBAL_CMD_TOPICID_TO_MIDV(x) 0 | ||
#endif | ||
|
||
#ifndef CFE_GLOBAL_TLM_TOPICID_TO_MIDV |
Check notice
Code scanning / CodeQL
Conditional compilation Note
uint16 TopicId; | ||
uint16 InstanceNum; | ||
|
||
if (!UT_Stub_GetInt32StatusCode(Context, NULL)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
* See description in header file for argument/return detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
CFE_SB_MsgId_Atom_t CFE_SB_CmdTopicIdToMsgId(uint16 TopicId, uint16 InstanceNum) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Default handler for CFE_SB_TlmTopicIdToMsgId coverage stub function | ||
* | ||
*------------------------------------------------------------*/ | ||
void UT_DefaultHandler_CFE_SB_TlmTopicIdToMsgId(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* to pass the "CFE_SB_IsValidMsgId()" test. | ||
* | ||
*------------------------------------------------------------*/ | ||
static void UT_CFE_SB_FabricateMsgIdValue(UT_EntryKey_t FuncKey, bool IsCmd, uint16 TopicId, uint16 InstanceNum) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Default handler for CFE_SB_CmdTopicIdToMsgId coverage stub function | ||
* | ||
*------------------------------------------------------------*/ | ||
void UT_DefaultHandler_CFE_SB_CmdTopicIdToMsgId(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* See description in header file for argument/return detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
size_t CFE_SB_MsgHdrSize(const CFE_MSG_Message_t *MsgPtr) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
Checklist (Please check before submitting)
Describe the contribution
Testing performed
cFS Bundle Checks
cFE Checks
Expected behavior changes
See PRs
System(s) tested on
Ubuntu 20.04
Additional context
Add any other context about the contribution here.
Third party code
If included, identify any third party code and provide text file of license
Contributor Info - All information REQUIRED for consideration of pull request
@jphickey