$search

wiimote_node::OutputPattern Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def reduceTimer
def resetForRepeat
def timeRemaining

Public Attributes

 numReps
 origTimePattern
 patternPt
 patternSpent
 startOfRepeat
 timePattern

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 1058 of file wiimote_node.py.


Member Function Documentation

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

Definition at line 1071 of file wiimote_node.py.

def wiimote_node::OutputPattern::__repr__ (   self  ) 

Definition at line 1166 of file wiimote_node.py.

def wiimote_node::OutputPattern::reduceTimer (   self,
  time 
)
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 1119 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 1098 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 1091 of file wiimote_node.py.


Member Data Documentation

Definition at line 1085 of file wiimote_node.py.

Definition at line 1077 of file wiimote_node.py.

Definition at line 1087 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 1084 of file wiimote_node.py.


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


wiimote
Author(s): Andreas Paepcke and Melonee Wise
autogenerated on Fri Mar 1 15:54:47 2013