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

cFE Integration candidate: Equuleus-rc1+dev6 #2522

Merged
merged 3 commits into from
Feb 29, 2024
Merged

Conversation

dzbaker
Copy link
Collaborator

@dzbaker dzbaker commented Feb 29, 2024

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

jphickey and others added 3 commits February 28, 2024 15:56
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

Use of conditional compilation must be kept to a minimum.
#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

Use of conditional compilation must be kept to a minimum.
#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

Use of conditional compilation must be kept to a minimum.
#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

Use of conditional compilation must be kept to a minimum.
uint16 TopicId;
uint16 InstanceNum;

if (!UT_Stub_GetInt32StatusCode(Context, NULL))

Check warning

Code scanning / CodeQL

Side effect in a Boolean expression Warning

This Boolean expression is not side-effect free.
* 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

All functions of more than 10 lines should have at least one assertion.
* 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

All functions of more than 10 lines should have at least one assertion.
* 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

All functions of more than 10 lines should have at least one assertion.
* 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

All functions of more than 10 lines should have at least one assertion.
* 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

All functions of more than 10 lines should have at least one assertion.
@dzbaker dzbaker merged commit 4577b78 into main Feb 29, 2024
40 of 41 checks passed
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 this pull request may close these issues.

2 participants