Home | Trees | Indices | Help |
---|
|
object --+ | operationscore.SmootCoreObject.SmootCoreObject --+ | Behavior
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
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|
|||
Inherited from |
|
|
Override to modify state. For example: if you are using a behavior that does uses strings for location specification, you will want to override this to point to a single location. Make sure you keep lastState as a [] of {}. (List of dicts). Additonally, ensure that you call Behavior.deepCopyPacket on the packet before hand to avoid inadvertent down-stream modifications. Look at Square.py for an example of this. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Feb 18 16:55:25 2011 | http://epydoc.sourceforge.net |