Sample ToString()

2 posts / 0 new
Last post
Offline
Last seen: 10 years 1 month ago
Joined: 06/25/2013
Posts: 5
Sample ToString()

This should be an easy one.

I'm using DDS in C#, an am looking to output the contents of a sample to a string, in the same format as TypeSupport.print_data() does. Essentially I'm looking for a way to use the output of print_data(), instead of just sending it to the console. Unfortunately a generated type's ToString() method is not overridden.

Any help is appreciated and thanks in advance.

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

Hi jsacks,

Sorry for the delay. There's not such a function in the API right now. There's a request to do it and, hopefully, it will be available in a future release.

The only workaround that comes up to my mind is to capture the stdout stream and save it in string. Is that feasible in your system?

Thanks,

Sara