APM:Libraries
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Linux::TimerPollable Class Reference

#include <PollerThread.h>

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

Classes

class  WrapperCb
 

Public Types

using PeriodicCb = AP_HAL::Device::PeriodicCb
 

Public Member Functions

virtual ~TimerPollable ()
 
void on_can_read () override
 
bool setup_timer (uint32_t timeout_usec)
 
bool adjust_timer (uint32_t timeout_usec)
 
- Public Member Functions inherited from Linux::Pollable
 Pollable (int fd)
 
 Pollable ()
 
virtual ~Pollable ()
 
int get_fd () const
 
virtual void on_can_write ()
 
virtual void on_error ()
 
virtual void on_hang_up ()
 

Protected Member Functions

 TimerPollable (PeriodicCb cb, WrapperCb *wrapper)
 

Protected Attributes

PeriodicCb _cb
 
WrapperCb_wrapper
 
bool _removeme = false
 
- Protected Attributes inherited from Linux::Pollable
int _fd = -1
 

Friends

class PollerThread
 

Detailed Description

Definition at line 29 of file PollerThread.h.

Member Typedef Documentation

◆ PeriodicCb

using Linux::TimerPollable::PeriodicCb = AP_HAL::Device::PeriodicCb

Definition at line 41 of file PollerThread.h.

Constructor & Destructor Documentation

◆ ~TimerPollable()

virtual Linux::TimerPollable::~TimerPollable ( )
inlinevirtual

Definition at line 43 of file PollerThread.h.

Here is the call graph for this function:

◆ TimerPollable()

Linux::TimerPollable::TimerPollable ( PeriodicCb  cb,
WrapperCb wrapper 
)
inlineprotected

Definition at line 51 of file PollerThread.h.

Referenced by Linux::PollerThread::add_timer().

Here is the caller graph for this function:

Member Function Documentation

◆ adjust_timer()

bool Linux::TimerPollable::adjust_timer ( uint32_t  timeout_usec)

Definition at line 71 of file PollerThread.cpp.

Referenced by setup_timer(), Linux::PollerThread::~PollerThread(), and ~TimerPollable().

Here is the caller graph for this function:

◆ on_can_read()

void Linux::TimerPollable::on_can_read ( )
overridevirtual

Reimplemented from Linux::Pollable.

Definition at line 28 of file PollerThread.cpp.

Referenced by ~TimerPollable().

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

◆ setup_timer()

bool Linux::TimerPollable::setup_timer ( uint32_t  timeout_usec)

Definition at line 51 of file PollerThread.cpp.

Referenced by Linux::PollerThread::add_timer(), and ~TimerPollable().

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

Friends And Related Function Documentation

◆ PollerThread

friend class PollerThread
friend

Definition at line 30 of file PollerThread.h.

Member Data Documentation

◆ _cb

PeriodicCb Linux::TimerPollable::_cb
protected

Definition at line 57 of file PollerThread.h.

Referenced by on_can_read().

◆ _removeme

bool Linux::TimerPollable::_removeme = false
protected

Definition at line 59 of file PollerThread.h.

Referenced by Linux::PollerThread::_cleanup_timers(), and on_can_read().

◆ _wrapper

WrapperCb* Linux::TimerPollable::_wrapper
protected

Definition at line 58 of file PollerThread.h.

Referenced by on_can_read().


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