Custom Content Filtered Topic

2 posts / 0 new
Last post
Offline
Last seen: 2 years 7 months ago
Joined: 08/19/2014
Posts: 4
Custom Content Filtered Topic

My Organization is currently in the process of moving our creation of DataWriters and Readers to XML (QoS) file.  We howerver also need to have one of our readers be a custom content filtered object where we have a c++ file we want to pass to the participant to peform the filtering. I see I can add the following to my datareader in xml. and I know I can register my custom content filters with my participant.  What should I do to make this work. Meaning.... My customer content filter is named FooFilter, I register with my participant FootFilter. But what should the kind be?  Is this even possible?  Thanks in advance.

<datareader name="FooDataReader" topic_ref="FooTopic"
   <filter name="FooFilter" kind="builtin.sql" />
</datareader>
Howard's picture
Offline
Last seen: 7 hours 28 min ago
Joined: 11/29/2012
Posts: 605

So, I'm not sure how you expect to do what you want to do.  There's no way to register a custom-content-filter with a Participant via a DDS XML file. 

When using XML App creation, you can define data types, topics, datawriters, datareaders, publishers, subscribers, participants and domains in an XML file.

HOWEVER, you can only tell Connext DDS to create a DomainParticipant from that XML definition file.  There is no way to individually create a DataWriter or DataReader defined in that file.  When defining a DomainParticipant, you define what Publisher and Subscriber objects that it has.  When defining the Publisher or Subscriber objects, you define what DataWriters or DataReaders that it has.

So, when using the XML App creation API,

DomainParticipantFactory::create_participant_from_config()

what you get is a DomainParticipant AND all of it's defined objects (Publishers/Subscribers/DataWriters/DataReaders) already created.

Yes, in code, at that time, you can now register a custom content-filter.  But the DataReader that was defined in the XML file would have already been created with the participant and thus could not have used the custom content-filter in its creation.

Registering custom content-filters with the participant in the XML definition file is not supported.

Thus, what you want to do is not supported.