Example #1
0
def _reconfigure():
    try:
        from echomesh.base import Settings
    except:
        _SETTINGS.settings_update(None)
    else:
        Settings.add_client(_SETTINGS)
Example #2
0
def _reconfigure():
    try:
        from echomesh.base import Settings
    except:
        _SETTINGS.settings_update(None)
    else:
        Settings.add_client(_SETTINGS)
Example #3
0
 def __init__(self, instance, peers, settings_name):
     super(PeerSocketBase, self).__init__()
     self.instance = instance
     self.peers = peers
     self.settings_name = settings_name
     self.add_slave(self.peers)
     self.port = -1
     self.socket = None
     Settings.add_client(self)
Example #4
0
 def __init__(self, port, bind_port, hostname, socket_type):
     super(Socket, self).__init__()
     self.port = port
     self.bind_port = bind_port
     self.hostname = hostname
     self.socket_type = socket_type
     self.socket = None
     self.buffer = ''
     self.queue = queue.Queue()
     self.max_size = MAX_SIZE
     Settings.add_client(self)
Example #5
0
    def __init__(self, count=None, order='rgb', device=DEFAULT_SPI_DEVICE,
                 gamma=DEFAULT_GAMMA, period=None, **description):
        self.enabled = SetupDebianSpiLights.lights_enabled()
        if not self.enabled:
            LOGGER.info('SPI running in emulation mode.')
        self.gamma = gamma
        self.order = cechomesh.get_spi_order(order)
        self.period = period
        self.period_set = period is not None

        self.count_set = count is not None
        if self.count_set:
            self._set_count(count)
        Settings.add_client(self)
        if self.enabled:
            self._device = open(device, 'wb')
        super(Spi, self).__init__(
          is_redirect=False, period=self.period, **description)
Example #6
0
    def __init__(self):
        super(Pi3dDisplay, self).__init__()
        self.timeout = Expression.convert(Settings.get('network', 'timeout'))
        keywords = {}

        background = Settings.get('pi3d', 'background')
        if background:
            keywords.update(background=background)

        dimensions = Settings.get('pi3d', 'dimensions')
        if dimensions:
            x, y, width, height = dimensions
            keywords.update(x=x, y=y, width=width, height=height)

        for k in ['aspect', 'depth', 'far', 'near', 'tk', 'window_title']:
            keywords[k] = Settings.get('pi3d', k)

        from pi3d import Display
        self.display = Display.create(**keywords)
        Settings.add_client(self)
        Shader.SHADER()
Example #7
0
    def __init__(self):
        super(Pi3dDisplay, self).__init__()
        self.timeout = Expression.convert(Settings.get('network', 'timeout'))
        keywords = {}

        background = Settings.get('pi3d', 'background')
        if background:
            keywords.update(background=background)

        dimensions = Settings.get('pi3d', 'dimensions')
        if dimensions:
            x, y, width, height = dimensions
            keywords.update(x=x, y=y, width=width, height=height)

        for k in ['aspect', 'depth', 'far', 'near', 'tk', 'window_title']:
            keywords[k] = Settings.get('pi3d', k)

        from pi3d import Display
        self.display = Display.create(**keywords)
        Settings.add_client(self)
        Shader.SHADER()
Example #8
0
    def __init__(self,
                 count=None,
                 order='rgb',
                 device=DEFAULT_SPI_DEVICE,
                 gamma=DEFAULT_GAMMA,
                 period=None,
                 **description):
        self.enabled = SetupDebianSpiLights.lights_enabled()
        if not self.enabled:
            LOGGER.info('SPI running in emulation mode.')
        self.gamma = gamma
        self.order = cechomesh.get_spi_order(order)
        self.period = period
        self.period_set = period is not None

        self.count_set = count is not None
        if self.count_set:
            self._set_count(count)
        Settings.add_client(self)
        if self.enabled:
            self._device = open(device, 'wb')
        super(Spi, self).__init__(is_redirect=False,
                                  period=self.period,
                                  **description)
Example #9
0
 def __init__(self):
     super(OscServer, self).__init__()
     self.server = None
     self.port = None
     Settings.add_client(self)
Example #10
0
def initialize():
    cechomesh.LOADED and cechomesh.init_log()
    Settings.add_client(_Redirector())
Example #11
0
def initialize():
    cechomesh.LOADED and cechomesh.init_log()
    Settings.add_client(_Redirector())
Example #12
0
 def __init__(self):
     self.clients = {}
     self.lock = Lock.Lock()
     Settings.add_client(self)
Example #13
0
 def __init__(self, *sockets):
     super(SelectLoop, self).__init__(name='SelectLoop')
     self.sockets = dict((s.socket, s) for s in sockets)
     Settings.add_client(self)
Example #14
0
 def __init__(self):
     self.clients = {}
     self.lock = Lock.Lock()
     Settings.add_client(self)
Example #15
0
 def __init__(self, *sockets):
     super(SelectLoop, self).__init__(name='SelectLoop')
     self.sockets = dict((s.socket, s) for s in sockets)
     Settings.add_client(self)
Example #16
0
 def _on_run(self):
     super(OscClient, self)._on_run()
     self.client = None
     self.port = None
     self.host = None
     Settings.add_client(self)
Example #17
0
 def __init__(self):
     Settings.add_client(self)
Example #18
0
 def __init__(self):
     super(OscServer, self).__init__()
     self.server = None
     self.port = None
     Settings.add_client(self)
Example #19
0
 def _on_run(self):
     super(OscClient, self)._on_run()
     self.client = None
     self.port = None
     self.host = None
     Settings.add_client(self)
Example #20
0
 def __init__(self):
     Settings.add_client(self)