-
Notifications
You must be signed in to change notification settings - Fork 203
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 #2519, Add runtime TopicId conversion routines to SB #2520
Conversation
* 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
* Generated stub function for CFE_SB_CmdTopicIdToMsgId() | ||
* ---------------------------------------------------- | ||
*/ | ||
CFE_SB_MsgId_Atom_t CFE_SB_CmdTopicIdToMsgId(uint16 TopicId, uint16 InstanceNum) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* 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
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.
335bd4b
to
cdfa81b
Compare
* 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
*Combines:* cFE equuleus-rc1+dev100 osal equuleus-rc1+dev58 **Includes:** *cFE* - nasa/cFE#2520 *osal* - nasa/osal#1450 Co-authored by: Joseph Hickey <[email protected]>
*Combines:* cFE equuleus-rc1+dev100 osal equuleus-rc1+dev58 **Includes:** *cFE* - nasa/cFE#2520 *osal* - nasa/osal#1450 Co-authored by: Joseph Hickey <[email protected]>
Checklist (Please check before submitting)
Describe the contribution
Adds the following APIs to convert TopicID to MsgID values at runtime:
This includes coverage tests and stubs. If the config does not define the conversions, then these return the invalid msgID value.
Fixes #2519
Testing performed
Build and run all tests
Expected behavior changes
None (new APIs are not actively called by FSW, yet)
System(s) tested on
Debian
Additional context
EDS-based builds generally deal only in Topic IDs and convert to Msg IDs at runtime. These APIs are needed as a prerequisite to that model.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.