Skip to content

Conversation

@pavel-kirienko
Copy link
Member

This is the final feature.

This changeset slightly modifies the error handling behavior of udpardRxSubscriptionReceive such that the datagram is deallocated if the passed arguments are invalid, unless self is also invalid. This is needed to prevent memory leak when the function is invoked incorrectly. An alternative solution is to state it explicitly in the API that the caller is required to free the datagram memory if -UDPARD_ERROR_ARGUMENT is returned, but this convention is comparatively fragile. A new test is added for this.

UdpardRxRPC is renamed into UdpardRxRPCPort for clarity.

UdpardRxRPCDispatcher is extended with local_node_id to facilitate destination address check when accepting frames.

After this one is accepted, the next steps are:

  • The internal e2e test (I am currently working on it).
  • A demo application in C that also serves as a high-level integration test. My original plan was to make it interact with a PyCyphal script but I am now considering a slightly different approach where the interaction will be arranged with a simple bash script based on Yakut. Stay tuned.

@pavel-kirienko pavel-kirienko marked this pull request as ready for review August 11, 2023 17:24
Copy link
Member

@thirtytwobits thirtytwobits left a comment

Choose a reason for hiding this comment

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

Only the comment about the documented ownership model is blocking here. The rest of the comments are minor.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.8% 94.8% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@pavel-kirienko pavel-kirienko merged commit 2a9e52c into main2 Aug 18, 2023
@pavel-kirienko pavel-kirienko deleted the pavel branch August 18, 2023 18:33
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.

3 participants