APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Linux::PollerThread Class Reference

#include <PollerThread.h>

Inheritance diagram for Linux::PollerThread:
[legend]
Collaboration diagram for Linux::PollerThread:
[legend]

Public Member Functions

 PollerThread ()
 
virtual ~PollerThread ()
 
TimerPollableadd_timer (TimerPollable::PeriodicCb cb, TimerPollable::WrapperCb *wrapper, uint32_t timeout_usec)
 
bool adjust_timer (TimerPollable *p, uint32_t timeout_usec)
 
void mainloop ()
 
bool stop () override
 
- Public Member Functions inherited from Linux::Thread
 FUNCTOR_TYPEDEF (task_t, void)
 
 Thread (task_t t)
 
virtual ~Thread ()
 
bool start (const char *name, int policy, int prio)
 
bool is_current_thread ()
 
bool is_started () const
 
size_t get_stack_usage ()
 
bool set_stack_size (size_t stack_size)
 
bool join ()
 

Protected Member Functions

void _cleanup_timers ()
 
- Protected Member Functions inherited from Linux::Thread
virtual bool _run ()
 
void _poison_stack ()
 

Protected Attributes

Poller _poller {}
 
std::vector< TimerPollable * > _timers {}
 
- Protected Attributes inherited from Linux::Thread
task_t _task
 
bool _started = false
 
bool _should_exit = false
 
pthread_t _ctx = 0
 
struct Linux::Thread::stack_debug _stack_debug
 
size_t _stack_size = 0
 

Additional Inherited Members

- Static Protected Member Functions inherited from Linux::Thread
static void * _run_trampoline (void *arg)
 

Detailed Description

Definition at line 63 of file PollerThread.h.

Constructor & Destructor Documentation

◆ PollerThread()

Linux::PollerThread::PollerThread ( )
inline

Definition at line 65 of file PollerThread.h.

Here is the call graph for this function:

◆ ~PollerThread()

virtual Linux::PollerThread::~PollerThread ( )
inlinevirtual

Definition at line 66 of file PollerThread.h.

Here is the call graph for this function:

Member Function Documentation

◆ _cleanup_timers()

void Linux::PollerThread::_cleanup_timers ( )
protected

Definition at line 119 of file PollerThread.cpp.

◆ add_timer()

TimerPollable * Linux::PollerThread::add_timer ( TimerPollable::PeriodicCb  cb,
TimerPollable::WrapperCb wrapper,
uint32_t  timeout_usec 
)

Definition at line 89 of file PollerThread.cpp.

Referenced by Linux::SPIDevice::register_periodic_callback(), and Linux::I2CDevice::register_periodic_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust_timer()

bool Linux::PollerThread::adjust_timer ( TimerPollable p,
uint32_t  timeout_usec 
)

Definition at line 108 of file PollerThread.cpp.

Referenced by Linux::SPIDevice::adjust_periodic_callback(), and Linux::I2CDevice::adjust_periodic_callback().

Here is the caller graph for this function:

◆ mainloop()

void Linux::PollerThread::mainloop ( )

Definition at line 135 of file PollerThread.cpp.

Referenced by PollerThread().

Here is the caller graph for this function:

◆ stop()

bool Linux::PollerThread::stop ( )
overridevirtual

Reimplemented from Linux::Thread.

Definition at line 150 of file PollerThread.cpp.

Referenced by TEST().

Here is the caller graph for this function:

Member Data Documentation

◆ _poller

Poller Linux::PollerThread::_poller {}
protected

Definition at line 80 of file PollerThread.h.

◆ _timers

std::vector<TimerPollable*> Linux::PollerThread::_timers {}
protected

Definition at line 81 of file PollerThread.h.


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