Changeset - 1a84c5e83d3e
[Not reviewed]
default
13 0 14
drewp@bigasterisk.com - 20 years ago 2005-04-10 19:12:57
drewp@bigasterisk.com
dmxserver and subcomposer work in new layout
14 files changed with 20 insertions and 20 deletions:
0 comments (0 inline, 0 general)
bin/dmxserver
Show inline comments
 
file renamed from light8/dmxserver.py to bin/dmxserver
 
@@ -18,26 +18,27 @@ clients shall connect to the xmlrpc serv
 
server is port 8030; xmlrpc method is called outputlevels(pid,levellist).
 

	
 
todo:
 
  save dmx on quit and restore on restart
 
  if parport fails, run in dummy mode (and make an option for that too)
 
"""
 

	
 
from __future__ import division
 
from twisted.internet import reactor
 
from twisted.web import xmlrpc, server
 
import sys,time,os
 
from optparse import OptionParser
 
from io import ParportDMX
 
from updatefreq import Updatefreq
 
import run_local
 
from light9.io import ParportDMX
 
from light9.updatefreq import Updatefreq
 

	
 
class XMLRPCServe(xmlrpc.XMLRPC):
 
    def __init__(self,options):
 

	
 
        xmlrpc.XMLRPC.__init__(self)
 
        
 
        self.clientlevels={} # clientID : list of levels
 
        self.lastseen={} # clientID : time last seen
 
        self.clientfreq={} # clientID : updatefreq
 
        
 
        self.combinedlevels=[] # list of levels, after max'ing the clients
 
        self.clientschanged=1 # have clients sent anything since the last send?
bin/run_local.py
Show inline comments
 
new file 100644
 
# allows bin/* to work without installation
 

	
 
# this should be turned off when the programs are installed
 

	
 
import sys,os
 
sys.path.insert(0,os.path.join(os.path.dirname(sys.argv[0]),".."))
 

	
 

	
bin/subcomposer
Show inline comments
 
file renamed from flax/Subcomposer.py to bin/subcomposer
 
#!/usr/bin/python
 

	
 
from __future__ import division, nested_scopes
 
import sys,os,time,atexit
 
import Tkinter as tk
 
from dmxchanedit import Levelbox
 
import sys,os,time,atexit
 
sys.path.append("../light8")
 
import dmxclient
 
import Patch
 
import Submaster
 
from dispatch import dispatcher
 

	
 
from dispatch import dispatcher
 
import run_local
 
from light9.dmxchanedit import Levelbox
 
from light9 import dmxclient, Patch, Submaster
 

	
 
class Subcomposer(tk.Frame):
 
    def __init__(self, master, levelboxopts=None, dmxdummy=0, numchannels=68,
 
        use_persistentlevels=0):
 
        tk.Frame.__init__(self, master, bg='black')
 
        self.dmxdummy = dmxdummy
 
        self.numchannels = numchannels
 

	
 
        self.levels = [0]*68 # levels should never get overwritten, just edited
 

	
 
        self.levelbox = Levelbox(self)
 
        self.levelbox.pack(side='top')
light9/Patch.py
Show inline comments
 
file renamed from light8/Patch.py to light9/Patch.py
light9/Submaster.py
Show inline comments
 
file renamed from flax/Submaster.py to light9/Submaster.py
 
from __future__ import division
 
from TLUtility import dict_scale, dict_max
 

	
 
import sys
 
sys.path.append('../light8')
 

	
 
import Patch
 
from light9.TLUtility import dict_scale, dict_max
 
from light9 import Patch
 

	
 
class Submaster:
 
    "Contain a dictionary of levels, but you didn't need to know that"
 
    def __init__(self, name, leveldict=None, temporary=0):
 
        self.name = name
 
        self.temporary = temporary
 
        if leveldict:
 
            self.levels = leveldict
 
        else:
 
            self.levels = {}
 
            self.reload()
 
    def reload(self):
light9/TLUtility.py
Show inline comments
 
file renamed from flax/TLUtility.py to light9/TLUtility.py
light9/dmxchanedit.py
Show inline comments
 
file renamed from flax/dmxchanedit.py to light9/dmxchanedit.py
light9/dmxclient.py
Show inline comments
 
file renamed from light8/dmxclient.py to light9/dmxclient.py
light9/io/Makefile
Show inline comments
 
file renamed from light8/Makefile to light9/io/Makefile
 
LIB=/usr/local/lib
 
INC=-I/usr/local/include/python2.2
 
INC=-I/usr/local/include/python2.3
 

	
 
go: _parport.so FlyingFader.py _serport.so
 
go: _parport.so _serport.so
 
	result="your modules and links are now up to date"
 

	
 
FlyingFader.py:
 
	ln -s ../Widgets/FlyingFader.py
 

	
 
_parport.so: parport_wrap.c
 
	gcc -shared ${INC} parport_wrap.c parport.c -o _parport.so 
 

	
 
parport_wrap.c: parport.c parport.i
 
	swig -python parport.i
 

	
 
_serport.so: serport_wrap.c
 
	gcc -shared -O ${INC} serport_wrap.c -o _serport.so 
 

	
 
serport_wrap.c: serport.i
 
	swig -python serport.i
 

	
light9/io/__init__.py
Show inline comments
 
file renamed from light8/io.py to light9/io/__init__.py
light9/io/parport.c
Show inline comments
 
file renamed from light8/parport.c to light9/io/parport.c
light9/io/parport.i
Show inline comments
 
file renamed from light8/parport.i to light9/io/parport.i
light9/io/serport.i
Show inline comments
 
file renamed from light8/serport.i to light9/io/serport.i
light9/updatefreq.py
Show inline comments
 
file renamed from light8/updatefreq.py to light9/updatefreq.py
0 comments (0 inline, 0 general)