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
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
def goto(self, location ): pdgui.post( "Python DemoClass object received goto message:" + location) return location
def symbol(self, string ): pdgui.post( "Python DemoClass object received symbol: '%s'." % string) return string
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)
def bang(self): pdgui.post( "Python DemoClass object received bang.") return True
def float(self, number): pdgui.post( "Python DemoClass object received %f." % number) return number
def tuple(self): pdgui.post( "Python DemoClass object received tuple message.") return ( ['element', 1], ['element', 2], ['element', 3],[ 'element',4 ] )
def __init__(self, *creation): pdgui.post("Creating DemoClass object with creation args: %s." % str(creation)) return
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]
def blah(self): pdgui.post("Python DemoClass object received blah message.") return 42.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)
def goto(self, location): pdgui.post("Python DemoClass object received goto message:" + location) return location
def symbol(self, string): pdgui.post("Python DemoClass object received symbol: '%s'." % string) return string
def float(self, number): pdgui.post("Python DemoClass object received %f." % number) return number
def bang(self): pdgui.post("Python DemoClass object received bang.") return True
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]
def reload_demo_module(self): reload(dtw_distance) if (self.DEBUG) pdgui.post("done reloading") return
def blah(self): pdgui.post( "Python DemoClass object received blah message.") return 42.0
def __init__( self, *creation ): pdgui.post( "Creating DemoClass object with creation args: %s." % str(creation)) return
def tuple(self): pdgui.post("Python DemoClass object received tuple message.") return (['element', 1], ['element', 2], ['element', 3], ['element', 4])
def __init__(self): if (self.DEBUG) pdgui.post("hello from reloader") pass