Converting to a DynamicData object

2 posts / 0 new
Last post
Last seen: 10 years 1 month ago
Joined: 01/03/2014
Posts: 2
Converting to a DynamicData object

Is there a way to easily convert a user-defined topic sample as a DynamicData object?

It appears that the Routing Service Transform API only deals with DynamicData for input and output. The particular plugin I am trying to write should take in a serialized object, turn it into a user-defined object, and then send that out over DDS.

This seems to be the 'correct' way to do it, according to the few examples I've found (using the ShapeType.idl as the 'user type'):

  1. Serialized ShapeType is received by the RoutingService (and custom transform plugin)
  2. Data is deserialized into a ShapeType and now needs to be sent out as DynamicData. Note: serialization/deserialization is done with the autogenerated rtiddsgen functions for each type
  3. Use DynamicData object, bind to ShapeType typecode, and add 'color', 'x', 'y', and 'shapesize' variables explicitly

I'd like to replace step 3 with either converting the ShapeType into a DynamicData object directly somehow, or using typecode information to dyamically get the ShapeType members into the DynamicData buffer (or some other alternative method that could capture the intended functionality). We need the ability to replicate this functionality across many different topics, and I'd prefer to not hard-code every single member if possible (in case changes are made to the types).

Any help would be greatly appreciated. Let me know if anything needs further clarification.

Last seen: 3 years 11 months ago
Joined: 09/10/2010
Posts: 32


     For this issue, could you please contact me on email: