Goby3  3.1.4
2024.02.22
goby::middleware::Poller< Transporter > Class Template Reference

Utility class for allowing the various Goby middleware transporters to poll the underlying transport code for data. More...

#include <goby/middleware/transport/poller.h>

Inheritance diagram for goby::middleware::Poller< Transporter >:
goby::middleware::PollerInterface goby::middleware::NullTransporter

Protected Member Functions

 Poller (PollerInterface *inner_poller=nullptr)
 Construct this Poller with a pointer to the inner Poller (unless this is the innermost Poller) More...
 
PollerInterfaceinner_poller ()
 
- Protected Member Functions inherited from goby::middleware::PollerInterface
 PollerInterface (std::shared_ptr< std::timed_mutex > poll_mutex, std::shared_ptr< std::condition_variable_any > cv)
 

Additional Inherited Members

- Public Member Functions inherited from goby::middleware::PollerInterface
template<class Clock = std::chrono::system_clock, class Duration = typename Clock::duration>
int poll (const std::chrono::time_point< Clock, Duration > &timeout=std::chrono::time_point< Clock, Duration >::max())
 poll for data. Blocks until a data event occurs or a timeout when a particular time has been reached More...
 
template<class Clock = std::chrono::system_clock, class Duration = typename Clock::duration>
int poll (Duration wait_for)
 poll for data. Blocks until a data event occurs or a certain duration of time elapses (timeout) More...
 
std::shared_ptr< std::timed_mutex > poll_mutex ()
 access the mutex used for poll synchronization More...
 
std::shared_ptr< std::condition_variable_any > cv ()
 access the condition variable used for poll synchronization More...
 

Detailed Description

template<typename Transporter>
class goby::middleware::Poller< Transporter >

Utility class for allowing the various Goby middleware transporters to poll the underlying transport code for data.

This class is recursively instantiated with each inner poller passed as a parameter to the next outer poller. This allows the outermost Poller to poll all inner Poller instantiations as well as itself.

Definition at line 37 of file poller.h.

Constructor & Destructor Documentation

◆ Poller()

template<typename Transporter >
goby::middleware::Poller< Transporter >::Poller ( PollerInterface inner_poller = nullptr)
inlineprotected

Construct this Poller with a pointer to the inner Poller (unless this is the innermost Poller)

Definition at line 41 of file poller.h.

Member Function Documentation

◆ inner_poller()

template<typename Transporter >
PollerInterface* goby::middleware::Poller< Transporter >::inner_poller ( )
inlineprotected
Returns
Pointer to the inner Poller

Definition at line 51 of file poller.h.


The documentation for this class was generated from the following file: