Exemplo n.º 1
0
 def hello( self, name, address ):
     new_channel = self.allocate_first_unused_channel( name, address )
     if new_channel is not None:
         n = token(new_channel)
         return ( [ n, 'name', name ], [n, 'vote', 0 ], [n, 'ip', address ], [n, 'port', 'connect', address, INSTRUMENT_PORT ] )
     else:
         pdgui.post( "Channel table is full, ignoring connection request from %s at %s." % (name, address) )
         return None
Exemplo n.º 2
0
 def hello(self, name, address):
     new_channel = self.allocate_first_unused_channel(name, address)
     if new_channel is not None:
         n = token(new_channel)
         return ([n, 'name', name], [n, 'vote', 0], [n, 'ip', address],
                 [n, 'port', 'connect', address, INSTRUMENT_PORT])
     else:
         pdgui.post(
             "Channel table is full, ignoring connection request from %s at %s."
             % (name, address))
         return None
Exemplo n.º 3
0
 def goto(self, location ):
     pdgui.post( "Python DemoClass object received goto message:" + location)
     return location
Exemplo n.º 4
0
 def symbol(self, string ):
     pdgui.post( "Python DemoClass object received symbol: '%s'." % string)
     return string
Exemplo n.º 5
0
 def list(self, *args ):
     # note that the *args form provides a tuple
     pdgui.post( "Python DemoClass object received list: %s." % str(args))
     return list(args)
Exemplo n.º 6
0
 def bang(self):
     pdgui.post( "Python DemoClass object received bang.")
     return True
Exemplo n.º 7
0
 def float(self, number):
     pdgui.post( "Python DemoClass object received %f." % number)
     return number
Exemplo n.º 8
0
 def tuple(self):
     pdgui.post( "Python DemoClass object received tuple message.")
     return ( ['element', 1], ['element', 2], ['element', 3],[ 'element',4 ] )
Exemplo n.º 9
0
 def __init__(self, *creation):
     pdgui.post("Creating DemoClass object with creation args: %s." %
                str(creation))
     return
Exemplo n.º 10
0
 def moveto(self, x, y, z):
     pdgui.post(
         "Python DemoClass object received move message with %f, %f, %f." %
         (x, y, z))
     return [x, y, z]
Exemplo n.º 11
0
 def blah(self):
     pdgui.post("Python DemoClass object received blah message.")
     return 42.0
Exemplo n.º 12
0
 def list(self, *args):
     # note that the *args form provides a tuple
     pdgui.post("Python DemoClass object received list: %s." % str(args))
     return list(args)
Exemplo n.º 13
0
 def goto(self, location):
     pdgui.post("Python DemoClass object received goto message:" + location)
     return location
Exemplo n.º 14
0
 def symbol(self, string):
     pdgui.post("Python DemoClass object received symbol: '%s'." % string)
     return string
Exemplo n.º 15
0
 def float(self, number):
     pdgui.post("Python DemoClass object received %f." % number)
     return number
Exemplo n.º 16
0
 def bang(self):
     pdgui.post("Python DemoClass object received bang.")
     return True
Exemplo n.º 17
0
 def moveto( self, x, y, z ):
     pdgui.post( "Python DemoClass object received move message with %f, %f, %f." % ( x, y, z))
     return [x, y, z]
Exemplo n.º 18
0
 def reload_demo_module(self):
     reload(dtw_distance)
     if (self.DEBUG) pdgui.post("done reloading")
     return
Exemplo n.º 19
0
 def blah(self):
     pdgui.post( "Python DemoClass object received blah message.")
     return 42.0
Exemplo n.º 20
0
 def __init__( self, *creation ):
     pdgui.post( "Creating DemoClass object with creation args: %s." % str(creation))
     return
Exemplo n.º 21
0
 def tuple(self):
     pdgui.post("Python DemoClass object received tuple message.")
     return (['element', 1], ['element', 2], ['element', 3], ['element', 4])
Exemplo n.º 22
0
 def __init__(self):
     if (self.DEBUG) pdgui.post("hello from reloader")
     pass