wiimote_node::OutputPattern Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def reduceTimer
def resetForRepeat
def timeRemaining

Public Attributes


Detailed Description

Instances encapsulate rumble or LED on/off time patterns as received from related ROS messages.

This class provides convenient encapsulation for the pattern arrays themselves,
for associated pointers into the arrays, and for status change and inquiry requests.
Terminology: 'Pattern Head' is the currently used time duration. A pattern is 'Spent'
if all the time sequences have run, and no repeats are left.

Public instance variables:
  o startOfRepeat    ; indicates whether pattern just starts to repeat. (see method reduceTimer())

Definition at line 1059 of file wiimote_node.py.

Member Function Documentation

def wiimote_node::OutputPattern::__init__ (   self,
Takes a TimedSwitch type ROS message (pattern and number of repeats), and initializes the pointers.

Definition at line 1072 of file wiimote_node.py.

def wiimote_node::OutputPattern::__repr__ (   self  ) 

Definition at line 1167 of file wiimote_node.py.

def wiimote_node::OutputPattern::reduceTimer (   self,
Given a float fractional number of seconds, subtract the time from the pattern head

Returns the remaining time, rounded to 100th of a second, or None. If the
remaining time after subtraction is <= 0, we check whether any repeats
are left. If so, we get ready for another repeat, and return the time of the
first pattern time. Else we return None, indicating that this pattern
is spent.

After this method returns, this instance's public startOfRepeat variable
will hold True or False, depending on whether the pattern is
just starting over.

Definition at line 1120 of file wiimote_node.py.

def wiimote_node::OutputPattern::resetForRepeat (   self  ) 
Get ready to repeat the pattern. Returns True if another repeat is allowed, else returns False

Definition at line 1099 of file wiimote_node.py.

def wiimote_node::OutputPattern::timeRemaining (   self  ) 
Return the time at the pattern head. If pattern is spent, return None instead.

Definition at line 1092 of file wiimote_node.py.

Member Data Documentation

Definition at line 1086 of file wiimote_node.py.

Definition at line 1078 of file wiimote_node.py.

Definition at line 1088 of file wiimote_node.py.

Definition at line 1089 of file wiimote_node.py.

Definition at line 1090 of file wiimote_node.py.

Definition at line 1085 of file wiimote_node.py.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator

Author(s): Andreas Paepcke
autogenerated on Fri Jan 11 09:15:28 2013