I wrote an IDL file that uses the serial number of a device for a key for a topic. All of the devices report to one main central device. How for keyed topics would I make the devices implement a filter such that they ignore messages not containg their serial number from the central device being used as a key in the code generated from the IDL and only read messages that contain their serial number as the key?
ContentFilterTopic
There are examples in the Documentation, the above link takes you to the java how to.
The central device will simply populate an instance with the data, including the target remote device's serial number. The remote device's subscriber will be based on the ContentFilterTopic, with the filter set to the key == it's own serial.
The syntax to filter on key fields is the same as for any other fields in the data.
You can also find an example on how to use content fintered topics from all the supported programming languages here: https://community.rti.com/examples/content-filtered-topic
Gerardo