Linux RTI DDS TCP/IP Ack message

5 posts / 0 new
Last post
Offline
Last seen: 8 years 5 months ago
Joined: 04/23/2013
Posts: 17
Linux RTI DDS TCP/IP Ack message

Could someone show me the code how to get the Linux DDS TCP/IP ack message? I see some example code, but not sure if those are using the UDP or TCP transport. 

Thank you!

Gerardo Pardo's picture
Offline
Last seen: 1 week 1 day ago
Joined: 06/02/2010
Posts: 602

Hi,

I do not really understand the question. The ACK messages are something internal used by the DDS protocol to ensure reliability in the cases where you specify the RELIABILITY QosPolicy to be of kind RELIABLE. This will work over UDP/IP, TCP/IP, Shared Memory and any other transport. There is nothing that you must do explicitly to get this other than specify the RELIABILITY Qos policy.

Gerardo

 

Offline
Last seen: 8 years 5 months ago
Joined: 04/23/2013
Posts: 17

Besides the RELIABILTY QOS, is there a function call that would indicate the message is delivered and read?

Gerardo Pardo's picture
Offline
Last seen: 1 week 1 day ago
Joined: 06/02/2010
Posts: 602

Ah OK. Now I think I get it what you are trying to do...

If you want confirmation that message is delivered/read/processed you have different options:

  • You could either call the DataWriter operation wait_for_acknowledgments() which blcoks the calling thread until all previously-written samples have been acknowledged by all matched reliable DataReaders.
  • You could poll (or wait for changes in) the reliable cache status of the DataWriter using the operation get_reliable_writer_cache_changed_status() this will return a ReliableWriterCacheChangedStatus  within it the unacknowledged_sample_count field will tell you know many samples remain un-acknowledged by the reliable readers. SInce samples are aknowledged in order you can use this as a basis to determine which samples are still left to be acknowledged.

Hope this helps,

Gerardo

Offline
Last seen: 8 years 5 months ago
Joined: 04/23/2013
Posts: 17

Thanks for the helps Gerardo. Those are the exact answers I was looking for.