Function rmw_publisher_wait_for_all_acked
Defined in File rmw.h
Function Documentation
-
rmw_ret_t rmw_publisher_wait_for_all_acked(const rmw_publisher_t *publisher, rmw_time_t wait_timeout)
Wait until all published message data is acknowledged or until the specified timeout elapses.
This function waits until all published message data were acknowledged by peer node or timeout.
This function only works effectively while QOS profile of publisher is set to RELIABLE. Otherwise this function will immediately return RMW_RET_OK.
[1] rmw implementation defined, check the implementation documentationAttribute
Adherence
Allocates Memory
Maybe [1]
Thread-Safe
Yes
Uses Atomics
Maybe [1]
Lock-Free
Maybe [1]
- Runtime behavior
Waiting for all acknowledgments is synchronous operation. So the calling thread is blocked until all published message data is acknowledged or specified duration elapses.
- Thread-Safety
Publishers are thread-safe objects, and so are all operations on them except for finalization. Therefore, it is safe to call this function using the same publisher concurrently.
- Parameters:
publisher – [in] handle to the publisher that needs to wait for all acked.
wait_timeout – [in] represents the maximum amount of time to wait for all published message data were acknowledged.
- Pre:
Given
publishermust be a valid publisher, as returned by rmw_create_publisher().- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_TIMEOUTif wait timed out, or- Returns:
RMW_RET_INVALID_ARGUMENTifpublisherisNULL, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATIONif thepublisherimplementation identifier does not match this implementation, or- Returns:
RMW_RET_ERRORif an unspecified error occurs, or- Returns:
RMW_RET_UNSUPPORTEDif the rmw implementation is unimplemented.