[Pybrainsim-activity] SF.net SVN: pybrainsim:[11] trunk/src/Stimulus.py
Status: Planning
Brought to you by:
rgoj
|
From: <rg...@us...> - 2009-07-24 13:20:18
|
Revision: 11
http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=11&view=rev
Author: rgoj
Date: 2009-07-24 13:20:10 +0000 (Fri, 24 Jul 2009)
Log Message:
-----------
* Adding sendOutput and receiveInput that should enable the Stimulus to zero the output of a generator
Modified Paths:
--------------
trunk/src/Stimulus.py
Modified: trunk/src/Stimulus.py
===================================================================
--- trunk/src/Stimulus.py 2009-07-24 13:10:51 UTC (rev 10)
+++ trunk/src/Stimulus.py 2009-07-24 13:20:10 UTC (rev 11)
@@ -28,13 +28,19 @@
class Stimulus(Generator):
def __init__(self):
- self.output = 0
+ self.connectedGeneratorOutput = 0
self.counter = 0
+ def sendOutput(self):
+ return -self.connectedGeneratorOutput
+
+ def receiveInput(self, input):
+ self.connectedGeneratorOutput = input
+
def runGenerator(self):
if self.counter == 10:
self.counter = 0;
else:
self.counter += 1
- return self.output
+ return 0 # This is necessary, because the output of this function is added to the recording in Head.py
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|