What is the best practise if a content filter is used to select individual instances of a topic
to read. Also, this content filter may be required to change frequently - a use case for this might
be a HMI application that reads from DDS which switch to different instances. The content filtered
topic and reader will also be transient in this case.
Is it a heavy weight operation to create and delete content filtered topics and associated readers
on a frequent basis ? Or is there a other, better practise to approach this ?
Thanks
Nico.
Hi Nico,
The Content Filter expression parameters can be changed dynamically while the DataReader is operating.
It's much lighter to change the expression parameters of a ContentFilteredTopic than creating and deleting the Topics and DataReaders dynamically.
Recall, however, that the Content Filter expression itself cannot be modified dynamically once it has been created.
Hope this helps.
Thanks,
Juanlu
Hi Juanlu,
Ok, thanks.
Nico
Depending on which version of Connext you are using, 5.1.0 removes the restriction on the expression.
See What's New for 5.1.0, Chapter 8:
8.1 Ability to Change Expression in ContentFilteredTopic
In previous releases, the filter expression in a ContentFilteredTopic was immutable and you could only change the expression parameters. This limitation has been removed. Now you can change the filter expression by means of the DDS_ContentFilteredTopic’s set_expression() operation.
Thanks for pointing out the new feature. It may turn out to be very useful.
Nico.