From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- ...tLight.behaviors.ExpandingColorZones-pysrc.html | 220 +++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 html/SmootLight.behaviors.ExpandingColorZones-pysrc.html (limited to 'html/SmootLight.behaviors.ExpandingColorZones-pysrc.html') diff --git a/html/SmootLight.behaviors.ExpandingColorZones-pysrc.html b/html/SmootLight.behaviors.ExpandingColorZones-pysrc.html new file mode 100644 index 0000000..9826689 --- /dev/null +++ b/html/SmootLight.behaviors.ExpandingColorZones-pysrc.html @@ -0,0 +1,220 @@ + + + + + SmootLight.behaviors.ExpandingColorZones + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package behaviors :: + Module ExpandingColorZones + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.behaviors.ExpandingColorZones

+
+ 1  from operationscore.Behavior import * 
+ 2  from logger import main_log 
+
3 -class ExpandingColorZones(Behavior): +
4 - def behaviorInit(self): +
5 self.mapping = {'s001':[(132,0),(255,0,0)], 's002':[(400,0), (0,255,0)], + 6 's003':[(668,0), + 7 (0,0,255)]} + 8 self.mappingkey = 'data' +
9 - def processResponse(self, sensorInputs, recursiveInputs): +
10 ret = [] +11 for data in sensorInputs: +12 print data +13 data = dict(data) +14 if self.mappingkey in data: +15 try: +16 data['Location'], data['Color'] =\ +17 self.mapping[data[self.mappingkey]] +18 ret.append(data) +19 except: +20 main_log.warn('Bad mapping key. Expanding Color Zones.') +21 return (ret,[]) +
22 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3