Changeset - 3d28b1a54a29
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 6 years ago 2019-06-09 21:56:03
drewp@bigasterisk.com
2 files changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
bin/collector
Show inline comments
 
@@ -68,7 +68,10 @@ def launch(graph, doLoadTest=False):
 
        # todo: drive outputs with config files
 
        rate = 30
 
        outputs = [
 
            ArtnetDmx(L9['output/dmxA/'], host='127.0.0.1', port=6445, rate=rate),
 
            ArtnetDmx(L9['output/dmxA/'],
 
                      host='127.0.0.1',
 
                      port=6445,
 
                      rate=rate),
 
            #DummyOutput(L9['output/dmxA/']),
 
        ]
 
    except Exception:
bin/patchserver
Show inline comments
 
@@ -27,9 +27,11 @@ from rdfdb.patch import Patch
 
stats = scales.collection('/webServer', scales.PmfStat('setAttr',
 
                                                       recalcPeriod=1))
 

	
 

	
 
def launch(graph):
 
    if 0:
 
        reactor.listenTCP(networking.captureDevice.port,
 
        reactor.listenTCP(
 
            networking.captureDevice.port,
 
                          cyclone.web.Application(handlers=[
 
                              (r'/()', cyclone.web.StaticFileHandler, {
 
                                  "path": "light9/web",
 
@@ -47,7 +49,9 @@ def launch(graph):
 
        width = {}
 
        for dc in graph.subjects(RDF.type, L9['DeviceClass']):
 
            for attr in graph.objects(dc, L9['attr']):
 
                width[dc] = max(width.get(dc, 0), graph.value(attr, L9['dmxOffset']).toPython() + 1)
 
                width[dc] = max(
 
                    width.get(dc, 0),
 
                    graph.value(attr, L9['dmxOffset']).toPython() + 1)
 
        
 
        user = {} # chan: [dev]
 
        for dev in set(graph.subjects(L9['dmxBase'], None)):
 
@@ -60,8 +64,10 @@ def launch(graph):
 
        for chan in range(1, max(user) + 1):
 
            dev = user.get(chan, None)
 
            print(f'chan {chan} used by {dev}')
 

	
 
    graph.addHandler(prn)
 
    
 

	
 
def main():
 
    parser = optparse.OptionParser()
 
    parser.add_option("-v",
0 comments (0 inline, 0 general)