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

Initial commit for Svc::CmdSplitter #2081

Merged
merged 2 commits into from Jun 15, 2023

Conversation

LeStarch
Copy link
Collaborator

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

Adding a command splitter for use with Svc::GenericHub.

U32 cmdSeq,
const Fw::CmdResponse& response) {
// Forward the command status
this->forwardSeqCmdStatus_out(portNum, opCode, cmdSeq, response);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter portNum has not been checked.
U32 cmdSeq,
const Fw::CmdResponse& response) {
// Forward the command status
this->forwardSeqCmdStatus_out(portNum, opCode, cmdSeq, response);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter opCode has not been checked.
U32 cmdSeq,
const Fw::CmdResponse& response) {
// Forward the command status
this->forwardSeqCmdStatus_out(portNum, opCode, cmdSeq, response);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter cmdSeq has not been checked.
U32 cmdSeq,
const Fw::CmdResponse& response) {
// Forward the command status
this->forwardSeqCmdStatus_out(portNum, opCode, cmdSeq, response);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter response has not been checked.

void CmdSplitter ::CmdBuff_handler(const NATIVE_INT_TYPE portNum, Fw::ComBuffer& data, U32 context) {
Fw::CmdPacket cmdPkt;
Fw::SerializeStatus stat = cmdPkt.deserialize(data);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter data has not been checked.

if (stat != Fw::FW_SERIALIZE_OK) {
// Let the local command dispatcher deal with it
this->LocalCmd_out(0, data, context);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter context has not been checked.
} else {
// Check if local or remote
if (cmdPkt.getOpCode() < CMD_SPLITTER_REMOTE_OPCODE_BASE) {
this->LocalCmd_out(0, data, context);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter context has not been checked.
if (cmdPkt.getOpCode() < CMD_SPLITTER_REMOTE_OPCODE_BASE) {
this->LocalCmd_out(0, data, context);
} else {
this->RemoteCmd_out(0, data, context);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter context has not been checked.
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------

void CmdSplitter ::CmdBuff_handler(const NATIVE_INT_TYPE portNum, Fw::ComBuffer& data, U32 context) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.

CmdSplitter ::CmdSplitter(const char* const compName) : CmdSplitterComponentBase(compName) {}

CmdSplitter ::~CmdSplitter() {}

Check notice

Code scanning / CodeQL

More than one statement per line Note

This line contains 2 statements; only one is allowed.
// Construction, initialization, and destruction
// ----------------------------------------------------------------------

CmdSplitter ::CmdSplitter(const char* const compName) : CmdSplitterComponentBase(compName) {}

Check notice

Code scanning / CodeQL

More than one statement per line Note

This line contains 2 statements; only one is allowed.
}
}

void CmdSplitter ::seqCmdStatus_handler(const NATIVE_INT_TYPE portNum,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

portNum uses the basic integral type int rather than a typedef with size and signedness.
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------

void CmdSplitter ::CmdBuff_handler(const NATIVE_INT_TYPE portNum, Fw::ComBuffer& data, U32 context) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

portNum uses the basic integral type int rather than a typedef with size and signedness.
// Construction, initialization, and destruction
// ----------------------------------------------------------------------

CmdSplitter ::CmdSplitter(const char* const compName) : CmdSplitterComponentBase(compName) {}

Check notice

Code scanning / CodeQL

Use of basic integral type Note

compName uses the basic integral type char rather than a typedef with size and signedness.
@timcanham timcanham merged commit 569a7d6 into nasa:devel Jun 15, 2023
23 checks passed
Boehm-Michael pushed a commit to Boehm-Michael/fprime that referenced this pull request Jun 22, 2023
* Initial commit for Svc::CmdSplitter

* sp
thomas-bc pushed a commit that referenced this pull request Aug 4, 2023
* Initial commit for Svc::CmdSplitter

* sp
thomas-bc added a commit that referenced this pull request Aug 4, 2023
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.

None yet

2 participants