Classes | Public Member Functions | Private Attributes
OpenRTM_aist.Timer.Timer Class Reference

Timer class. More...

List of all members.

Classes

class  Task

Public Member Functions

def __del__
 Destructor.
def __init__
 Constructor.
def invoke
 Invoke Timer task.
def join
def registerListener
 Register listener.
def registerListenerFunc
 Register listener.
def registerListenerObj
 Register listener.
def run
 Thread execution function for Timer.
def start
def stop
def unregisterListener
 Unregister listener.

Private Attributes

 _interval
 _running
 _runningMutex
 _taskMutex
 _tasks
 _thread

Detailed Description

Timer class.

Invoke the callback function of registered listener periodically at the set cycle.

Since:
0.4.0

Definition at line 44 of file Timer.py.


Constructor & Destructor Documentation

def OpenRTM_aist.Timer.Timer.__init__ (   self,
  interval 
)

Constructor.

Constructor

Parameters:
intervalThe interval of timer

Definition at line 66 of file Timer.py.

Destructor.

Destructor

Definition at line 88 of file Timer.py.


Member Function Documentation

Invoke Timer task.

Subtract the interval of timer from the waiting time for invocation of each registered listener. If the listener whose waiting time reached 0 exists, invoke the callback function.

Definition at line 199 of file Timer.py.

Definition at line 96 of file Timer.py.

def OpenRTM_aist.Timer.Timer.registerListener (   self,
  listener,
  tm 
)

Register listener.

Register the listener of callback function invoked from this Timer by specifying the interval. If the same listener has already been regiseterd, the value specified the invocation interval of listener will be updated.

Parameters:
listenerListener for the registration
tmThe invocation interval of listener
Returns:
ID of the registerd listener

ListenerId registerListener(ListenerBase* listener, TimeValue tm);

Definition at line 241 of file Timer.py.

def OpenRTM_aist.Timer.Timer.registerListenerFunc (   self,
  cbf,
  tm 
)

Register listener.

Register listener by specifying the method for callback and the invocation interval.

Parameters:
cbfTarget method for callback
tmThe invocation interval of listener
Returns:
ID of the registerd listener

ListenerId registerListenerFunc(void (*cbf)(), TimeValue tm)

Definition at line 315 of file Timer.py.

def OpenRTM_aist.Timer.Timer.registerListenerObj (   self,
  obj,
  cbf,
  tm 
)

Register listener.

Register listener by specifying the object for callback, the method for callback and the invocation interval.

Parameters:
objTarget object for callback
cbfTarget method for callback
tmThe invocation interval of listener
Returns:
ID of the registerd listener

template <class listenerclass>=""> ListenerId registerListenerObj(ListenerClass* obj, void (ListenerClass::*cbf)(), TimeValue tm)

Definition at line 285 of file Timer.py.

Thread execution function for Timer.

Thread execution function for Timer. Invoke the callback function of registered listener.

Returns:
Execution result

Definition at line 123 of file Timer.py.

Definition at line 148 of file Timer.py.

Stop Timer task.

Definition at line 171 of file Timer.py.

Unregister listener.

Unregister the listener specified by ID. If the listener specified by ID is not registerd, false will be returned.

Parameters:
idID of the unregisterd listener
Returns:
Unregistration result

bool unregisterListener(ListenerId id);

Definition at line 344 of file Timer.py.


Member Data Documentation

Definition at line 66 of file Timer.py.

Definition at line 66 of file Timer.py.

Definition at line 66 of file Timer.py.

Definition at line 66 of file Timer.py.

Definition at line 66 of file Timer.py.

Definition at line 66 of file Timer.py.


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


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:30