void wait_for_acknowledgments(Duration_t max_wait) that blocks where there is no writer

2 posts / 0 new
Last post
Offline
Last seen: 4 years 9 months ago
Joined: 05/21/2014
Posts: 46
void wait_for_acknowledgments(Duration_t max_wait) that blocks where there is no writer

I am using the following call in my application void wait_for_acknowledgments(Duration_t max_wait). However I noticed the call only blocks when there is a matched reader to my writer and when the reader isnt online for some reason, it just goes through as if the messages were sent to a reader and never blocks. Is there any API call for RTI that will sit and block until a reader comes online and then the message is sent? 

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

Hi,

You can wait until the DataWriter has some discovered and matched some DataReaders. This community posting describes some strategies for doing: https://community.rti.com/kb/why-does-my-dds-datareader-miss-first-few-samples

You can also take advantage of the "Required Subscripions" feature. See section "6.3.13 Required Subscriptions" of the Core Libraries and Utilities uses's manual (version 5.1) https://community.rti.com/rti-doc/510/ndds.5.1.0/doc/pdf/RTI_CoreLibrariesAndUtilities_UsersManual.pdf

Gerardo