aboutsummaryrefslogtreecommitdiff
path: root/operationscore/Behavior.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
commit5a97e7548b0ec44f0d61a724903748197e69df7c (patch)
tree7bb6b8ea7e488949eeb16ae18b0ad2230f1f7c9b /operationscore/Behavior.py
parent082e4b0c53123dd377da148541f7d98516716862 (diff)
parent482a94fd48627153b923931d6ff21ebf57fad6f7 (diff)
Merge branch 'osc' of github.com:rcoh/SmootLight into osc
Diffstat (limited to 'operationscore/Behavior.py')
-rw-r--r--operationscore/Behavior.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/operationscore/Behavior.py b/operationscore/Behavior.py
index b3f7342..6424842 100644
--- a/operationscore/Behavior.py
+++ b/operationscore/Behavior.py
@@ -1,11 +1,3 @@
-#Abstract class for a behavior. On every time step, the behavior is passed the
-#inputs from all sensors it is bound to as well as any recursive inputs that it
-#spawned during the last time step. Inheriting classes MUST define
-#processResponse. processResponse should return a list of dictionaries which
-#define the properties of the light response, (outputs, recursions). They must give a location and
-#color. They may define a PixelEvent to more closely control the outgoing
-#data, however, this is normally handled by routing the event to a behavior
-#specifically designed to do this (like DecayBehavior).
import pdb
from operationscore.SmootCoreObject import *
@@ -13,6 +5,16 @@ from logger import main_log
#timeStep is called on every iteration of the LightInstallation
#addInput is called on each individual input received, and the inputs queue
class Behavior(SmootCoreObject):
+ """Abstract class for a behavior. On every time step, the behavior is passed the
+ inputs from all sensors it is bound to as well as any recursive inputs that it
+ spawned during the last time step. Inheriting classes MUST define
+ processResponse. processResponse should return a list of dictionaries which
+ define the properties of the light response, (outputs, recursions). They must give a location and
+ color. They may define a PixelEvent to more closely control the outgoing
+ data, however, this is normally handled by routing the event to a behavior
+ specifically designed to do this (like AddPixelEvent).
+ timeStep is called on every iteration of the LightInstallation
+ addInput is called on each individual input received, and the inputs queue"""
def init(self):
self.validateArgs('Behavior.params')
if type(self['Inputs']) != type([]):