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

Add stream crossover component #2070

Merged
merged 7 commits into from
Jun 10, 2023
Merged

Conversation

ethancheez
Copy link
Contributor

@ethancheez ethancheez commented Jun 5, 2023

Originating Project/Creator @ethancheez
Affected Component StreamCrossover
Affected Architectures(s) All
Related Issue(s) N/A
Has Unit Tests (y/n) No
Builds Without Errors (y/n) Yes
Unit Tests Pass (y/n) N/A
Documentation Included (y/n) Yes

Change Description

Add stream crossover component as Drv::StreamCrossover

Rationale

Allow connection from ByteStreamRecv to ByteStreamSend

Testing/Review Recommendations

Implement unit tests.

@ethancheez ethancheez requested a review from LeStarch June 5, 2023 16:34
Drv/StreamCrossover/StreamCrossover.cpp Fixed Show resolved Hide resolved
Drv/StreamCrossover/StreamCrossover.cpp Fixed Show fixed Hide fixed
Drv/StreamCrossover/StreamCrossover.cpp Fixed Show fixed Hide fixed

StreamCrossover ::
StreamCrossover(
const char *const compName

Check notice

Code scanning / CodeQL

Use of basic integral type

compName uses the basic integral type char rather than a typedef with size and signedness.
@timcanham
Copy link
Collaborator

image

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do the following:

  1. Fix this spelling error (add ethanechee to expect.txt)
  2. Handle the send return value: emit an event.
  3. Could we add a UT to test this?

Drv/StreamCrossover/StreamCrossover.cpp Fixed Show resolved Hide resolved
Comment on lines +35 to +36
void StreamCrossover ::
streamIn_handler(

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
Drv/StreamCrossover/StreamCrossover.cpp Show resolved Hide resolved
Drv/StreamCrossover/docs/sdd.md Outdated Show resolved Hide resolved
Drv/StreamCrossover/test/ut/Tester.cpp Outdated Show resolved Hide resolved

void StreamCrossover ::
streamIn_handler(
const NATIVE_INT_TYPE portNum,

Check notice

Code scanning / CodeQL

Use of basic integral type

portNum uses the basic integral type int rather than a typedef with size and signedness.
if(recvStatus == Drv::RecvStatus::RECV_ERROR || recvBuffer.getSize() == 0)
{
this->log_WARNING_HI_StreamOutError(Drv::SendStatus::SEND_ERROR);
this->errorDeallocate_out(0, recvBuffer);

Check warning

Code scanning / CodeQL

Unchecked function argument

This use of parameter recvBuffer has not been checked.
@LeStarch LeStarch merged commit 415cb7f into nasa:devel Jun 10, 2023
Boehm-Michael pushed a commit to Boehm-Michael/fprime that referenced this pull request Jun 22, 2023
* stream crossover component

* Add StreamCrossover Documentation

* Add unit tests, update expect.txt

* Add coverage for send error

* update test name from ToDo to TestBuffer

* Check recvStatus, and deallocate on error

* Check recvBuffer size, rename errorDeallocate
thomas-bc pushed a commit that referenced this pull request Aug 4, 2023
* stream crossover component

* Add StreamCrossover Documentation

* Add unit tests, update expect.txt

* Add coverage for send error

* update test name from ToDo to TestBuffer

* Check recvStatus, and deallocate on error

* Check recvBuffer size, rename errorDeallocate
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.

4 participants