Beispiel #1
0
    def __init__(self, main_object):
        Server.__init__(self)
        self.add_method('/ray/patchbay/add_gui', 's',
                        self._ray_patchbay_add_gui)
        self.add_method('/ray/patchbay/gui_disannounce', '',
                        self._ray_patchbay_gui_disannounce)
        self.add_method('ray/patchbay/port/set_alias', 'sis',
                        self._ray_patchbay_port_set_alias)
        self.add_method('/ray/patchbay/connect', 'ss',
                        self._ray_patchbay_connect)
        self.add_method('/ray/patchbay/disconnect', 'ss',
                        self._ray_patchbay_disconnect)
        self.add_method('/ray/patchbay/set_buffer_size', 'i',
                        self._ray_patchbay_set_buffersize)
        self.add_method('/ray/patchbay/refresh', '',
                        self._ray_patchbay_refresh)
        self.add_method('/ray/patchbay/set_metadata', 'hss',
                        self._ray_patchbay_set_metadata)

        self.main_object = main_object
        self.jack_client = main_object.jack_client
        self.port_list = main_object.port_list
        self.connection_list = main_object.connection_list
        self.metadata_list = main_object.metadata_list
        self.client_list = main_object.client_list
        self.gui_list = []
        self._tmp_gui_url = ''
        self._terminate = False
Beispiel #2
0
    def __init__(self, host):
        Server.__init__(self, proto=LO_UDP)

        if False:
            host = CarlaHostOSC()

        self.host = host
Beispiel #3
0
    def __init__(self, host, rhost):
        Server.__init__(self, proto=LO_TCP)

        if False:
            host = CarlaHostOSC()

        self.host = host
        self.rhost = rhost
class MyServer(Server):
    def __init__(self, port, pymol_handler=None, flask_server=None):
        """
        Initialize an OSC server to listen to specific port
        :param port: OSC port
        :param pymol_handler: PyMol associated app
        :param flask_server: Flask web server
        """
        logging.info("***************")
        logging.info("1) Free the desired port")
        try:
            server = Server(port)
            server.free()
        except ServerError, err:
            logging.info(str(err))
            sys.exit()
        logging.info("Port %s now free" % port)
        logging.info("2) Initialization of OSC server on port: %d " % port)
        try:
            Server.__init__(self, port)
        except ServerError, err:
            logging.info(str(err))
            sys.exit()
Beispiel #5
0
    def __init__(self, host, mode):
        Server.__init__(self, 8998 + int(random()*9000), mode)

        self.host = host
Beispiel #6
0
    def __init__(self, host, mode):
        Server.__init__(self, 8998 + int(random() * 9000), mode)

        self.host = host