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'):
- Serialized ShapeType is received by the RoutingService (and custom transform plugin)
- 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
- 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.
Hello,
For this issue, could you please contact me on email: bertf@rti.com
Bert