serialization API

2 posts / 0 new
Last post
Offline
Last seen: 10 years 7 months ago
Joined: 03/31/2014
Posts: 1
serialization API

Does RTI Connext provide an API that I can call to serialize RTI DDS datastructure to get a network-byte-order binary data stream?  And vice versa, is there an API that I can call to deserialize a network-byte-order binary data stream back into RTI DDS datastructure?  I have a subscriber application that is receiving various Topics data.  This application also need to interface with another legacy application by saving some of the subscribed data onto a hard drive in a network-byte-order binary format.  I was hoping if my application could use the serialize feature that RTI provide to get access to the serialization/deserialization facilities.

sara's picture
Offline
Last seen: 1 year 11 months ago
Joined: 01/16/2013
Posts: 128

Hi Andrew,

I am not sure I understand your question correctly. From what I understand, you are trying to recover the data structures from the CDR (Common Data Representation) we use internally to store it in your hard drive. Is that correct?

The first approach is to use RTI Recording Service. This tool records DDS data into a database or a file in serialized/deserialized modes. This way, you don't need to re-implement this functionality.

Another option is to use the generated functions when using IDLs. If you generate your data types from an IDL using rtiddsgen, a set of files is generated, all of them starting with your idl name. I will use C++ as an example, but the behavior is similar in other languages. In <yourType>Plugin.cxx you will find serialization/deserialization functions for that type. Is this what you were looking for?

If you do not have access to an IDL, you will need to use Dynamic Data. You can find examples here.

Thanks and sorry for the delay,

Sara