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.
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.
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.
You could poll (or wait for changes in) the protocol status of the DataWriter using the operation get_datawriter_protocol_status() this will return you a DataWriterProtocolStatus with a lot of information and specifically the unacknowledged_sample_count can be used to see which is the lowest sequence number that remains unacknowledged.
Lastly, and perhaps the more robust and powerful way, you could configure the RELIABILITY Qos to perform "application-level" acknowledgments which get information not just on the reception of a sample at the DDS protocol level, but also whether the receiving application actually read and processed the sample. Tjis provies "end to end" reliability also knwon as "application-level reliability". You do this by setting the acknowledgment_kind within of the RELIABILITY Qos to either DDS_APPLICATION_AUTO_ACKNOWLEDGMENT_MODE or DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE. You can read more about this in the RTI Connext DDS User's Manual. Go to the section titled Guaranteed Delivery of Data.
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
Besides the RELIABILTY QOS, is there a function call that would indicate the message is delivered and read?
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:
Hope this helps,
Gerardo
Thanks for the helps Gerardo. Those are the exact answers I was looking for.