How to write objects to a file? PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Message/Author
Next message Omar G. Rodriguez  posted on Wednesday, June 25, 2008 - 06:35 am
Hi All,

I’d like to write the message the subscriber receives to a file in a readable format in a similar way the FooTypeSupport_print_data method displays the message. Is there a simple way of doing this?

Your help is greatly appreciated,
~Omar
Next message Niels Kortstee  posted on Wednesday, June 25, 2008 - 09:18 am
Hi Omar,

For the DDS implementations that support the persistence profile, you can set the durability QoS policy to PERSISTENT. This makes sure the data kept on permanent storage to outlive even a system session. However, this does not implicate a 'human readable' format on disk.

To write the data to a file in your own format you can consider:
1. Some DDS implementations provide DBMS integration, which allows you to store the data in database tables.
2. Generating type specific code from your IDL definition(s) to store data for that specific type.
3. When reflection is available (for instance in the Java language) resolving the attributes of your types in a generic manner is also an option.

Best regards, Niels
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action: