-
Notifications
You must be signed in to change notification settings - Fork 802
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
[22682] Add RPCDDS internal API #5638
Merged
MiguelCompany
merged 33 commits into
feature/rpc/main
from
feature/rpc/requester-replier-fixed
Mar 5, 2025
Merged
[22682] Add RPCDDS internal API #5638
MiguelCompany
merged 33 commits into
feature/rpc/main
from
feature/rpc/requester-replier-fixed
Mar 5, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
…ities Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
58631df
to
6c708b5
Compare
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
…d inconsistent statuses when unregister types methods fail Signed-off-by: Carlosespicur <[email protected]>
56b9b72
to
723ae39
Compare
Signed-off-by: Carlosespicur <[email protected]>
MiguelCompany
requested changes
Feb 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some initial architectural concerns
…arams classes Signed-off-by: Carlosespicur <[email protected]>
…eplier take/send methods Signed-off-by: Carlosespicur <[email protected]>
…assignment Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
8 tasks
Signed-off-by: Carlosespicur <[email protected]>
77236b4
to
5dc3dd5
Compare
MiguelCompany
requested changes
Mar 3, 2025
…ster/Replier public API Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
MiguelCompany
requested changes
Mar 3, 2025
Signed-off-by: Carlosespicur <[email protected]>
MiguelCompany
requested changes
Mar 3, 2025
Signed-off-by: Carlosespicur <[email protected]>
b2dded8
to
c07201f
Compare
Signed-off-by: Carlosespicur <[email protected]>
c07201f
to
6285bf7
Compare
Signed-off-by: Carlosespicur <[email protected]>
Signed-off-by: Carlosespicur <[email protected]>
MiguelCompany
approved these changes
Mar 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
Failures unrelated. Going in! |
MiguelCompany
pushed a commit
that referenced
this pull request
Mar 5, 2025
* Refs #22682: Add public interfaces of RPC Entities Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add RequestInfo class Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add ServiceTypeSupport interface Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add Requester/Replier parameter classes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add private headers and implement RPC methods Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Expose Requester/Replier endpoint getters to public API Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add public methods for deleting requester/replier entities Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Allow calling get_statuscondition method on constant entities Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Refactor blackbox tests Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Avoid sample filtering on request topic Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix segFault error due to deleting endpoints manually Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix TCPRequester params Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Enable type() method for const DataReader objects Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add unit tests for Requester/Replier parameters validation Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add unit tests for DomainParticipant public API methods Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix test errors. Add service/participant checks and avoid inconsistent statuses when unregister types methods fail Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Update versions.md Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes. Remove RequesterParams/ReplierParams classes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes. Unify parameters in Requester/Replier take/send methods Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix RequesterImpl::send_request related_sample_identity assignment Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix typos Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Uncrustify Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Avoid creating unnecesary RequestReplyContentFilter instances Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Add suggested changes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes. Add return_load method to Requester/Replier public API Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes. Blackbox tests classes Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Apply suggested changes. Update send_reply signature. Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix blackbox tests Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix notation errors in Requester/Replier Signed-off-by: Carlosespicur <[email protected]> * Refs #22682: Fix memory leaks in RequestReplyContentFilterFactory Signed-off-by: Carlosespicur <[email protected]> --------- Signed-off-by: Carlosespicur <[email protected]>
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a set of classes that represent all entities required to establish an RPC over DDS Request/Reply communication. All RPC entities should be created from DomainParticipant, so a list of methods has been implemented for this purpose. The main additions are detailed below:
Requester/Replier/Service interfaces and implementations added. Each Service represent the subset of DDS entities (Topic/Publisher/DataWriter/Subscriber/DataReader) required to establish an RPC Request Reply communication. When a Service is instantiated by a DomainParticipant, Request and Reply topics are created. Each service can instantiate Requester and Replier entities, which are internally registered for entity ownership checking and memory managing. When a Requester is instantiated by a service, a Request Topic DataWriter and Reply Topic DataReader are created. When a Reply is instantiated by a Service, a Request Topic DataReader and Reply Topic DataWriter are created. Both Service and Requester/Replier entities have internal methods to check if all DDS entities are correctly created.
Requester and Replier objects are created from an instance of
RequesterQos
andReplierQos
classes respectively. These objects contain the parameters used to configure a Requester/Replier. Before instantiation, a parameter validation at Service level is made. In RPC context, dds entities only acceptRELIABLE_RELIABILITY_QOS
for reliability QoS.Requester/Replier/Service public APIs are represented with abstract classes. Requester/Replier/Service implementation classes inherit from them and implement their own set of methods used for DDS entities creation and internal registering/checking processes.
Content filtering: Reply samples sent by a replier are filtered by participant using the SampleIdentity's GuidPrefix of its associated request sample. It could be improved adding an internal common identifier for all DDS entities on a given Requester
Type registering: A ServiceTypeSupport interface has been added for registering service types. In the Request/Reply context, a service type is represented as a pair of topic types (request topic type and reply topic type), so register a service type consists on register both types in DomainParticipant. Registered service types are stored in DomainParticipant and can be accessed by name.
register_service_type
andunregister_service_type
methods have been implemented on DomainParticipant public APIRPC communication methods: Request and Replier public APIs have methods for sending and taking samples (
send_request
,send_reply
,take_request
,take_reply
). Send methods call DataWriterwrite
method and Take methods call DataReadertake
method. The additional information of each request sample sent is represented byRequestInfo
class.Testing: RPC Blackbox tests refactored to use the new API. Unit tests for service and DomainParticipant added.
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist