changeset 1605:64c1bcff604e

dummyoutput for collector Ignore-this: 76040039af77a9c73c655278584ea376
author drewp@bigasterisk.com
date Mon, 05 Jun 2017 04:36:43 +0000
parents d372508bec98
children cb396a0ff04b
files bin/collector light9/collector/output.py
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/collector	Sun Jun 04 22:51:14 2017 +0000
+++ b/bin/collector	Mon Jun 05 04:36:43 2017 +0000
@@ -21,7 +21,7 @@
 
 from run_local import log
 from lib.cycloneerr import PrettyErrorHandler
-from light9.collector.output import EnttecDmx, Udmx
+from light9.collector.output import EnttecDmx, Udmx, DummyOutput
 from light9.collector.collector import Collector
 from light9.namespaces import L9
 from light9 import networking
--- a/light9/collector/output.py	Sun Jun 04 22:51:14 2017 +0000
+++ b/light9/collector/output.py	Mon Jun 05 04:36:43 2017 +0000
@@ -53,6 +53,21 @@
         """short string to distinguish outputs"""
         raise NotImplementedError
 
+class DummyOutput(Output):
+    def __init__(self, uri, *args):
+        self.uri = uri
+        self.numChannels = args[-1]
+    
+    def update(self, values):
+        pass
+
+    def flush(self):
+        pass
+
+    def shortId(self):
+        return repr(self)
+
+        
 class DmxOutput(Output):
     def __init__(self, uri, numChannels):
         self.uri = uri