I just have an application which is going to publish very long text using the StringDataWriter class. How can I get rid of the serializable error using only QoS (if possible), without me having to chunk the text before publishing.
I'm totally new to DDS
Thank you
Hi,
How did you define your type in IDL? If you defined the sting as unbounded (i.e. without an explicit maximum length), then rtiddsgen will automatically assume a maximum length of 255 characters and that will produce an errior if you try to send a longer string.
Assuming this was the situation, you could use the command-lien option
-stringSize
when you call rtiddsgen to override this maximum limit. But it is better that you make the limit explicit in the IDL as in:In addition, note that if you are trying to send data whose serialized size exceeds the maximum that can be sent over the underlying transport (e.g. UDP), then you need to enable the use of asynchronous publishing.
This forum thread on transport-size messages discusses a similar subject. You may want to take a look at it first.
You may want to take a look at this knowledge-base article explainig how to configure UDP to be able to send up to the underlying maximum of 64KB and configure DDS to write asynchronously.
The FileExchange also has an example on how to send/receive large data.
Gerardo