aboutsummaryrefslogtreecommitdiff
path: root/operationscore/Input.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-27 16:50:59 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-27 16:50:59 -0500
commit5fb3ea060025241105dc8e9a174513c112f9a133 (patch)
treee98b1b3eab0b05b0e518b08cbab086d224fd9250 /operationscore/Input.py
parent5d29906fff79bc6e4ba83be7028e1380a0014d21 (diff)
A metric $#%$-ton of changes. Added doc-strings to EVERYTHING. Phew. Fixed a massive bug that
increases performance in by up to a factor of 60. A bunch of new behaviors for the class.
Diffstat (limited to 'operationscore/Input.py')
-rw-r--r--operationscore/Input.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/operationscore/Input.py b/operationscore/Input.py
index 69375d3..d3d5644 100644
--- a/operationscore/Input.py
+++ b/operationscore/Input.py
@@ -1,16 +1,14 @@
import threading,time
from logger import main_log, exception_log
from operationscore.ThreadedSmootCoreObject import ThreadedSmootCoreObject
-#Abstract class for inputs. Inheriting classes should call "respond" to raise
-#their event. Inheriting classes MUST define sensingLoop. Called at the
-#interval specified in RefreshInterval while the input is active. For example, if you are writing
-#webserver, this is where the loop should go.
-#Inheriting classes MAY define inputInit. This is called before the loop
-#begins.
import pdb
class Input(ThreadedSmootCoreObject):
- #Event scope is a function pointer the function that will get called when
- #an Parent is raised.
+ """Abstract class for inputs. Inheriting classes should call "respond" to raise
+ their event. Inheriting classes MUST define sensingLoop. Called at the
+ interval specified in RefreshInterval while the input is active. For example, if you are writing
+ webserver, this is where the loop should go.
+ Inheriting classes MAY define inputInit. This is called before the loop
+ begins."""
def init(self):
self.eventQueue = []
if not 'RefreshInterval' in self.argDict: