Hello, I'm trying to implement a small application that will detect publications and subscriptions to a particular topic: "Foo" - obviously.
The DCPSPublication and DCPSSubscription builtin topics provide the information I need, but I'm struggling to see how I can get to it using the ISO C++ API. (First, I'm using OpenSplice 6.3.1 on Linux RedHat 5.) Using the SACPP API, I would obtain the built in subscriber from the domain participant, and from this I would obtain the appropriate data readers for the two topics in question. Then I would create a QueryCondition with an expression something like "topic_name = Foo" and use read_w_condition on the two data readers to get the lists of subscribers and publishers. But using the ISP C++ API: 1. How do you get access to dds::sub::DataReader<xxx> objects for the built in types? I can't see anything that looks like the builtin subscriber present in the SACPP API. 2. I've tried to declare "dds::sub::DataReader<PublicationBuiltinTopicData> pubs;" but that does not work. Not too surprising since the template parameter needs to be a type derived from an IDL definition and pre-processed by "idlpp -l isocpp" So... Lets assume for now that one day I will be able to either create or obtain by some other means a dds::sub::DataReader object for a built in topic. In the mean time, I've tried to execute a query on an existing DataReader. dds:sub::DataReader<Payload> dr; Using the ISO C++ API, I can create a Query object. dds::sub::Query query(dr, "name = 'Foo'"); I've seen examples of how these can be used to create ContentFilteredTopics. (I did think of creating a ContentFilteredTopic to suit my needs, but since I don't have access to the definitions of the DCPSPublication or DCPSSubscription topics, I have nothing to base the ContentFilteredTopic on.) dds::sub::DataReader does not seem to have a read_w_condition method. I have tried: dr >> dds::sub::content(query) >> read >> samples; and dr >> dds::sub::filtered_content(query) >> read >> samples; But neither of these will compile. I seem to get the same error from both: error: class 'dds::sub::DataReader<Payload, dds::sub::detail::DataReader>::ManipulatorSelector' has no member named 'filter_content' So, in summary: 1. How do you get access to DataReaders for the Builtin topics using the ISO C++ API? 2. How do you use Query to perform a content filtered read/take using the ISO C++ API? Thanks in advance Dallas
_______________________________________________ OpenSplice DDS Developer Mailing List Developer@opensplice.org Subscribe / Unsubscribe http://dev.opensplice.org/mailman/listinfo/developer