Message with variable length PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Message/Author
Next message Robert Tseng  posted on Tuesday, July 20, 2010 - 12:15 am
Not sure if this is Opensplice specific but DDS requires each topic to have an unique message type but what if message size varies? (My first exposure to DDS is Opensplice therefore my experience is limited.)

A simple example will be sending text message, say stored in a char array. Naturally, each message will have variable length dependent on what I have to say.

When the message is sent over the wire, is the entire char array sent or or only up to a null termination token? How does DDS handles this problem?

Basically I have a message with a variable length field, which may be a non-standard type class defined by user. However since now the message varies from sample to sample. Does this break DDS?

I know a solution that is not particularly elegant but I can setup a second topic for the field that varies and send the elements of the field individually and use conditional to merge them back together.

Any comment, known solution or suggestion is welcomed. Thank you all!

However, if there are
Next message Robert Tseng  posted on Tuesday, July 20, 2010 - 11:58 pm
If anyone else runs into this problem it can be solved using IDL's unbounded sequence.
Next message Hans van 't Hag  posted on Wednesday, July 21, 2010 - 09:15 am
Hi Robert,

Apart from unbounded sequences you could also use an unbounded-string. For both, only the actual size will be sent over the wire.

Cheers,
Hans
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: