annotate bin/subserver @ 222:bb4d1e9b30c1

outline of new subserver
author drewp@bigasterisk.com
date Wed, 20 Apr 2005 05:26:53 +0000
parents
children 6a4e99505164
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
222
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
1 # keep the database of submasters, and mix up the current client
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
2 # requests into dmx levels for dmxserver
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
3
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
4 class SubServe:
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
5 """call the server with these messages"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
6
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
7 def allSubs(self):
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
8 """list of all the known subs"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
9
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
10 def output(self,levels):
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
11 """pass a dict of {sub : level} mappings"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
12
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
13
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
14 class SubClient:
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
15 """each client can receive these messages"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
16
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
17 def subAdded(self,newsub):
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
18 """sub was just added to the db"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
19
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
20 def subRemove(self,pastsub):
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
21 """this sub is about to be removed from the db"""
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
22
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
23 def subChange(self,sub):
bb4d1e9b30c1 outline of new subserver
drewp@bigasterisk.com
parents:
diff changeset
24 """this is a new version of an existing sub"""