Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CallbackPollThread Class Reference

#include <CallbackThread.h>

Inheritance diagram for CallbackPollThread:

Detailed Description

Templates specify the type of user data (C) and the type of the callback function (F). F defaults to take a std::mem_fun call on C, so that it is used with a class method, but you could just as well use a standard c-style static function.

Definition at line 109 of file CallbackThread.h.

List of all members.

Public Types

enum  ReturnHandle_t { IGNORE_RETURN, STOP_FALSE, STOP_TRUE }

Public Member Functions

template<typename F >
 CallbackPollThread (const F &cb, const TimeET &initial, const TimeET &freq, bool countPollTime, ReturnHandle_t stopCond, bool autoStart=false)
template<typename F , typename C >
 CallbackPollThread (const F &cb, C &userdata, const TimeET &initial, const TimeET &freq, bool countPollTime, ReturnHandle_t stopCond, bool autoStart=false)
template<typename F , typename C >
 CallbackPollThread (const F &cb, const C &userdata, const TimeET &initial, const TimeET &freq, bool countPollTime, ReturnHandle_t stopCond, bool autoStart=false)
 ~CallbackPollThread ()
void resetPeriod (const TimeET &p, bool immediate=true)
 sets the polling frequency to p, if immediate is set then it will call interrupt() so the period takes effect on the current cycle

Protected Member Functions

virtual bool poll ()

Protected Attributes

FunctorAdapter * fun
 function to be called from within new thread

Private Member Functions

 CallbackPollThread (const CallbackPollThread &)
 don't call
CallbackPollThreadoperator= (const CallbackPollThread &)
 don't call

Member Enumeration Documentation

Enumerator:
IGNORE_RETURN 
STOP_FALSE 
STOP_TRUE 

Definition at line 111 of file CallbackThread.h.


Constructor & Destructor Documentation

template<typename F >
CallbackPollThread::CallbackPollThread ( const F &  cb,
const TimeET &  initial,
const TimeET &  freq,
bool  countPollTime,
ReturnHandle_t  stopCond,
bool  autoStart = false 
)

Definition at line 119 of file CallbackThread.h.

template<typename F , typename C >
CallbackPollThread::CallbackPollThread ( const F &  cb,
C &  userdata,
const TimeET &  initial,
const TimeET &  freq,
bool  countPollTime,
ReturnHandle_t  stopCond,
bool  autoStart = false 
)

Definition at line 132 of file CallbackThread.h.

template<typename F , typename C >
CallbackPollThread::CallbackPollThread ( const F &  cb,
const C &  userdata,
const TimeET &  initial,
const TimeET &  freq,
bool  countPollTime,
ReturnHandle_t  stopCond,
bool  autoStart = false 
)

Definition at line 145 of file CallbackThread.h.

CallbackPollThread::~CallbackPollThread (  ) 

Definition at line 156 of file CallbackThread.h.

CallbackPollThread::CallbackPollThread ( const CallbackPollThread  )  [private]

don't call


Member Function Documentation

CallbackPollThread& CallbackPollThread::operator= ( const CallbackPollThread  )  [private]

don't call

virtual bool CallbackPollThread::poll (  )  [protected, virtual]

Reimplemented from PollThread.

Definition at line 255 of file CallbackThread.h.

void CallbackPollThread::resetPeriod ( const TimeET &  p,
bool  immediate = true 
)

sets the polling frequency to p, if immediate is set then it will call interrupt() so the period takes effect on the current cycle

Definition at line 159 of file CallbackThread.h.


Member Data Documentation

FunctorAdapter* CallbackPollThread::fun [protected]

function to be called from within new thread

Definition at line 257 of file CallbackThread.h.

Referenced by CallbackPollThread(), poll(), and ~CallbackPollThread().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:05 2016 by Doxygen 1.6.3