Hi there,
are you planning to make available the Request/Reply pattern implementation also for Modern C++ ?
In case is there any idea about when the implementation will be available ?
Personally I don't like the idea of mixing modern and traditional C++.
Best Regards
There's also an additional problem that prevents the mixing of Modern C++ and Traditional C++ caused by the compilation of the idl files with rtiddsgen.
We compile for language C+11 (all our application is written to use c++ 2011 features) and therefore the generated C++ classes cannot be used in traditional C++ modules.
Hi Massimo,
We plan to release the modern C++ request-reply API with our next major release, in 2017.
In the meantime, this solution may help you, although you may already have seen it: How do I use the Traditional C++ and Modern C++ APIs in the same application?
Unfortunately, if you want to publish and/or subscribe to the same types in both APIs, you will have to generate and compile the type plugin separately for each.
I hope this helps.
Alex
Hi Alex,
we are currently using only few of the request-reply API features: basically a single requestor and a single replier. The replier can send back multiple responses to a requestor. Requestors/repliers may be written in C++ and java.
I guess that the implementation is not so complicated (considering this reduced use case) and I was wondering if there's any technical information available that will allow me to implement a simplified version of the request-reply API.
Basically I guess I would only need to understand how the correlation id is generated (the flag for the intermediate reply is already described in the Connext User Manual as well as how the topic names are generated from the service name).
Let me know if this is feasible or not
Thank you very much
Massimo
As you said, the key element to the request-reply pattern is the correlation between replies and the request that originated them.
The correlation process is as follows:
* The following code generates the CFT expression you need:
This is enough to make sure the Requester only receives replies directed to it. This is not enough to allow sample-level correlation—that is, waiting for a reply to a specific request.
I hope this helps.
Alex
Thank you very much Alex.
I think this should allow me to implement an intermin solution waiting for the next major release of RTI Connext DDS coming in 2017.
best regards
Massimo
Hi Alex,
I'm testing the replier side written in Modern C++ using a Java client program as Requester.
I had to use the DataWriterImpl since I found no DataWriter write methods that accepts a WriteParams object as argument.
I got the following error from DDS when try to send back the reply to the requester:
This is the piece of code that initialize the WriteParams:
I have no idea how to initialise the sequence number of the sample identity so I used an automatic value provided by RTI Connext.
I also how to initialize have no idea how to initialize any other WriteParams attribute.
I'm also wondering if there's any to be done on WriteParams on the Requester side of the application.
Could you please help ?
thank you very much for your kind support
Massimo
Hi Massimo,
1) The write overload that receives
WriteParams
is an RTI extension, so the standard requires to access it with "->
"2) Writing with
related_sample_identity
requires a concrete guid and a concrete sequence number. You can get both packed in a SampleIdentity instance:Dear all,
following the descriptions above, I managed to create a CFT that filters samples according to a given GUID, so this is nice. However, I fail to create a QueryCondition that would allow me to use a WaitSet for a specific sample with a given "sequence_number". My naive approach is as follows:
When I execute this, I get the following error:
It seems that the ".value" part of the sequence number is not recognized. I also tried to remove the ".value" part in the query expression and then I get this error:
So comparing the sequence_number directly also doesn't seem to work. What am I missing here? Can anybody help me?
Cheers
Alex