Go to the documentation of this file.
25 #ifndef GOBY_MIDDLEWARE_TRANSPORT_POLLER_H
26 #define GOBY_MIDDLEWARE_TRANSPORT_POLLER_H
54 int _transporter_poll(std::unique_ptr<std::unique_lock<std::timed_mutex> >&
lock)
override
57 int inner_poll_items = 0;
63 if (!inner_poll_items)
64 poll_items +=
static_cast<Transporter*
>(
this)->_poll(
lock);
68 return inner_poll_items + poll_items;
PollerInterface(std::shared_ptr< std::timed_mutex > poll_mutex, std::shared_ptr< std::condition_variable_any > cv)
The global namespace for the Goby project.
Poller(PollerInterface *inner_poller=nullptr)
Construct this Poller with a pointer to the inner Poller (unless this is the innermost Poller)
Utility class for allowing the various Goby middleware transporters to poll the underlying transport ...
PollerInterface * inner_poller()
std::shared_ptr< std::timed_mutex > poll_mutex()
access the mutex used for poll synchronization
std::shared_ptr< std::condition_variable_any > cv()
access the condition variable used for poll synchronization
Defines the common interface for polling for data on Goby transporters.