OpenCyphal / libudpard

A compact implementation of the Cyphal/UDP protocol in C for high-integrity real-time embedded systems
MIT License
10 stars 8 forks source link

Add RPC service support to the RX pipeline #47

Closed pavel-kirienko closed 10 months ago

pavel-kirienko commented 11 months ago

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:

sonarcloud[bot] commented 10 months ago

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