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. --- .../SmootLight.behaviors.RecursiveDecay-pysrc.html | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 html/SmootLight.behaviors.RecursiveDecay-pysrc.html (limited to 'html/SmootLight.behaviors.RecursiveDecay-pysrc.html') diff --git a/html/SmootLight.behaviors.RecursiveDecay-pysrc.html b/html/SmootLight.behaviors.RecursiveDecay-pysrc.html new file mode 100644 index 0000000..ee3cc8a --- /dev/null +++ b/html/SmootLight.behaviors.RecursiveDecay-pysrc.html @@ -0,0 +1,131 @@ + + + + + SmootLight.behaviors.RecursiveDecay + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package behaviors :: + Module RecursiveDecay + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.behaviors.RecursiveDecay

+
+ 1  from operationscore.Behavior import * 
+ 2  import pdb 
+
3 -class RecursiveDecay(Behavior): +
4 """RecursiveDecay is an event to allow recursive hooks to stop recursing after a certain number + 5 of iterations specified in + 6 <InitialResponseCount> -- Int, number of total responses. + 7 Designed to be used as part of a recursive hook. + 8 """ +
9 - def processResponse(self, sensorInputs, recursiveInputs): +
10 ret = [] +11 for response in sensorInputs: +12 if not 'ResponsesLeft' in response: +13 response['ResponsesLeft'] = self['InitialResponseCount'] +14 else: +15 response['ResponsesLeft'] -= 1 +16 if response['ResponsesLeft'] > 0: +17 ret.append(response) +18 return (ret, []) #no direct ouput +
19 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3