posted on Tuesday, August 05, 2008 - 03:41 pm
I am trying to find a way of using a single topic, data writer and data reader to publish and subscribe to multiple data types. In the documentation it states that with both multitopics and type codes you can do this ( I'm using rti dds which doesn't support multitopics ) but I'm struggling to find a way of doing it. If anyone has any ideas that would be great.
Normally one would use multi-topics for that indeed. Another good option is using the Data Local Reconstruction Layer(DLRL), which is also part of DDS. This API allows you to define your own object model and map attributes to fields of different topics. Although I think rti does not support DLRL either. With both these features not available I cannot think of any other possibility.
Best regards, Niels
posted on Tuesday, August 12, 2008 - 01:32 pm
Thank you for your help. I have been in contact with someone from RTI and they have told me that It is possible to do this, but as it is quite involved I shall be leaving it for the time being.
If I understand your question correctly, you could also achieve something like that using a union. Every branch of the union would be representing a different type. Would that solve your problem as well? I assume that the RTI solution is outside the scope of the OMG DDS specification.