def isNsmLocked(self): if self.is_dummy: return False server = OscServerThread.getInstance() if not server: return False return server.is_nsm_locked
def set_server_status(self, server_status: int): if self.is_dummy: return server = OscServerThread.getInstance() if not server: return server.set_server_status(server_status)
def getServerStatus(self): if self.is_dummy: return -1 server = OscServerThread.getInstance() if not server: return -1 return server.server_status
def sendGui(self, *args): if self.is_dummy: return server = OscServerThread.getInstance() if not server: return server.sendGui(*args)
def getServerPort(self): server = OscServerThread.getInstance() if server: return server.port return 0
def getServerUrl(self): server = OscServerThread.getInstance() if server: return server.url return ''
def getServer(self): return OscServerThread.getInstance()
def sendGuiMessage(self, message): self.sendGui('/ray/gui/server/message', message) server = OscServerThread.getInstance() if server: server.sendControllerMessage(message)
def send_gui_message(self, message: str): self.send_gui('/ray/gui/server/message', message) server = OscServerThread.getInstance() if server: server.send_controller_message(message)
def sendEvenDummy(self, *args): server = OscServerThread.getInstance() if not server: return server.send(*args)
def hasServer(self): if not OscServerThread.getInstance(): return False return not self.is_dummy
session_root) sys.exit(1) try: os.makedirs(session_root) except: sys.stderr.write("impossible to make dir %s , aborted !\n" % session_root) sys.exit(1) #create session session = SignaledSession(session_root) #create and start server if CommandLineArgs.findfreeport: server = OscServerThread( session, ray.get_free_osc_port(CommandLineArgs.osc_port)) else: if ray.is_osc_port_free(CommandLineArgs.osc_port): server = OscServerThread(session, CommandLineArgs.osc_port) else: sys.stderr.write( _translate('daemon', 'port %i is not free, try another one\n') % CommandLineArgs.osc_port) sys.exit() server.start() if CommandLineArgs.hidden: server.not_default = True #announce server to GUI if CommandLineArgs.gui_url:
def get_server_even_dummy(self): return OscServerThread.getInstance()
def get_server(self): if self.is_dummy: return None return OscServerThread.getInstance()
def informCopytoGui(self, copy_state): server = OscServerThread.getInstance() if not server: return server.informCopytoGui(copy_state)
session_root) sys.exit(1) try: os.makedirs(session_root) except: sys.stderr.write("impossible to make dir %s , aborted !\n" % session_root) sys.exit(1) #create session session = SignaledSession(session_root) #create and start server if CommandLineArgs.findfreeport: server = OscServerThread(session, ray.getFreeOscPort(CommandLineArgs.osc_port)) else: if ray.isOscPortFree(CommandLineArgs.osc_port): server = OscServerThread(session, CommandLineArgs.osc_port) else: sys.stderr.write( _translate('daemon', 'port %i is not free, try another one\n') % CommandLineArgs.osc_port) sys.exit() server.start() if CommandLineArgs.hidden: server.setAsNotDefault() #announce server to GUI if CommandLineArgs.gui_url:
def get_client_templates_database(self, base: str) -> list: server = OscServerThread.getInstance() if server: return server.client_templates_database[base] return []