OpenRTM_aist.Timer.Timer Class Reference

Timer class. More...

List of all members.

Classes

class  Task

Public Member Functions

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

Detailed Description

Timer class.

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

Since:
0.4.0

Member Function Documentation

def OpenRTM_aist.Timer.Timer.__del__ (   self  ) 

Destructor.

Destructor

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

Constructor.

Constructor

Parameters:
interval The interval of timer
def OpenRTM_aist.Timer.Timer.invoke (   self  ) 

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.

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:
listener Listener for the registration
tm The invocation interval of listener
Returns:
ID of the registerd listener

ListenerId registerListener(ListenerBase* listener, TimeValue tm);

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

Register listener.

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

Parameters:
cbf Target method for callback
tm The invocation interval of listener
Returns:
ID of the registerd listener

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

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:
obj Target object for callback
cbf Target method for callback
tm The invocation interval of listener
Returns:
ID of the registerd listener

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

def OpenRTM_aist.Timer.Timer.run (   self  ) 

Thread execution function for Timer.

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

Returns:
Execution result
def OpenRTM_aist.Timer.Timer.stop (   self  ) 

Stop Timer task.

def OpenRTM_aist.Timer.Timer.unregisterListener (   self,
  id 
)

Unregister listener.

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

Parameters:
id ID of the unregisterd listener
Returns:
Unregistration result

bool unregisterListener(ListenerId id);


The documentation for this class was generated from the following file:
Generated on Mon Mar 2 14:14:06 2015 for OpenRTM-aist-1.1.0-Python by  doxygen 1.6.3