-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 Router component in uplink #2766
Conversation
} | ||
|
||
// Send the buffer out | ||
bufferOut_out(0, packetBuffer); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FwPacketDescriptorType packetType = Fw::ComPacket::FW_PACKET_UNKNOWN; | ||
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; | ||
{ | ||
Fw::SerializeBufferBase& serial = packetBuffer.getSerializeRepr(); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
// Handler implementations for user-defined typed input ports | ||
// ---------------------------------------------------------------------- | ||
|
||
void Router ::bufferIn_handler(NATIVE_INT_TYPE portNum, Fw::Buffer& packetBuffer) { |
Check notice
Code scanning / CodeQL
Function too long Note
|
||
Router ::Router(const char* const compName) : RouterComponentBase(compName) {} | ||
|
||
Router ::~Router() {} |
Check notice
Code scanning / CodeQL
More than one statement per line Note
// Component construction and destruction | ||
// ---------------------------------------------------------------------- | ||
|
||
Router ::Router(const char* const compName) : RouterComponentBase(compName) {} |
Check notice
Code scanning / CodeQL
More than one statement per line Note
// Handler implementations for user-defined typed input ports | ||
// ---------------------------------------------------------------------- | ||
|
||
void Router ::bufferIn_handler(NATIVE_INT_TYPE portNum, Fw::Buffer& packetBuffer) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
} | ||
|
||
// Whether to deallocate the packet buffer | ||
bool deallocate = true; |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
} | ||
} | ||
|
||
void Router ::cmdResponseIn_handler(NATIVE_INT_TYPE portNum, |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
// Handler implementations for user-defined typed input ports | ||
// ---------------------------------------------------------------------- | ||
|
||
void Router ::bufferIn_handler(NATIVE_INT_TYPE portNum, Fw::Buffer& packetBuffer) { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
// Component construction and destruction | ||
// ---------------------------------------------------------------------- | ||
|
||
Router ::Router(const char* const compName) : RouterComponentBase(compName) {} |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
Router might be a bit of an overloaded name, since lots of things can be routed within fprime deployments. What about calling this FprimePktRouter - indicating this is a component for routing fprime packet formatted packets? (admittingly a bit of a mouthful, very open to different suggestions) |
Agreed! Router is a little too generic |
Change Description
Implements #2765
Rationale
See #2765
Testing/Review Recommendations
Deframer UTs are expected to fail at this point, since some functionality was removed.
We may want to work on a feature branch until all Router, Accumulator and Deframer-refactor are implemented and tests are adapted
Still opening this for preliminary review and CI checks
Future Work