Exemplo n.º 1
0
    def __init__(self):
        """ Initializes RFID "device"
        """
        Handler.__init__(self)

        self._rfiddevice = RfidDevice()
        self.start()
Exemplo n.º 2
0
    def __init__(self):
        Handler.__init__(self)

        self.backend = PgImage()
        self.add_listener('start')
        self.add_listener('background')

        self.start()
Exemplo n.º 3
0
    def __init__(self):
        Handler.__init__(self)

        self.backend = DmxUniverse()

        self.add_listener("send")
        self.add_listener("clear")

        self.start()
Exemplo n.º 4
0
    def __init__(self):
        Handler.__init__(self)

        self.backend = DmxUniverse()

        self.add_listener('send')
        self.add_listener('clear')

        self.start()
Exemplo n.º 5
0
    def __init__(self):
        Handler.__init__(self)

        self._store_path = "%s/store.json" % self._config['storage']['store']
        self._store = self._thaw()

        #        self._ws = WebSocket(watchdog_interval=2)
        self.add_listener('set.*', callback=self._wscb_set)
        self.add_listener('get.*', callback=self._wscb_get)

        self.start()
Exemplo n.º 6
0
    def __init__(self):
        Handler.__init__(self)

        self._store_path = "%s/store.json" % self._config['storage']['store']
        self._store = self._thaw()

#        self._ws = WebSocket(watchdog_interval=2)
        self.add_listener('set.*', callback=self._wscb_set)
        self.add_listener('get.*', callback=self._wscb_get)

        self.start()
Exemplo n.º 7
0
    def __init__(self):
        Handler.__init__(self)

        self.backend = OMXPlayer(self.send_status)

        #self.add_listener('pause', callback=self._wscb_video_request)
        self.add_listener('pause')
        self.add_listener('start')
        self.add_listener('stop')
        self.add_listener('storage.command.set.sound_level', full_path=True)

        self.start()
Exemplo n.º 8
0
    def __init__(self):
        Handler.__init__(self)

        self._subsystems = dict()
        self._scenarios = dict()

        #self.ws = WebSocket(watchdog_interval=2)
        self.add_listener('start')
        self.add_listener('reload')
        self.add_listener('restart')
        self.add_listener('stop')
        self.add_listener('shutdown')
        self.add_listener('status')

        self.add_listener('*.event.pong', full_path=True, callback=self._wscb_pong)

        self._start()
        tornado.ioloop.IOLoop.instance().start()
Exemplo n.º 9
0
    def __init__(self):
        """ Initialize ADC subsystem and install websocket handlers

        AnalogHandler only listens to periodic_sample and profile for now.
        """
        Handler.__init__(self)

        self.analogdevice = AnalogDevice()

        for chan in self.analogdevice.device.channels():
            # self._ws.add_listener("analog.command." + chan + ".periodic_sample",
            #                      self._periodic_sample)
            # self._ws.add_listener("analog.command." + chan + ".profile",
            #                      self._profile)
            self.add_listener(chan + ".periodic_sample")
            self.add_listener(chan + ".profile")

        self.sample_delay = 1
        self.periodic_sampled_channels = []

        self.start()
Exemplo n.º 10
0
    def __init__(self):
        """ Initialize GPIO subsystem and install websocket handlers

        """
        Handler.__init__(self)

        # Install websocket & RPIO callbacks
        for port in GpioHandler.PORTS:
            pin = GpioHandler.PORTS[port]['bcm']
            self.add_listener(port + ".sample")
            self.add_listener(port + ".profile")

            logging.debug("installing RPIO handlers for pin %s", pin)
            # For now, we just set everything to input with pull up
            # we'll fix that with profiles later
            RPIO.setup(pin, RPIO.IN,
                       pull_up_down=RPIO.PUD_UP)
            RPIO.add_interrupt_callback(pin, self._edge,
                                        debounce_timeout_ms=50)

        self.start()
Exemplo n.º 11
0
    def __init__(self):
        """ Initialize ADC subsystem and install websocket handlers

        AnalogHandler only listens to periodic_sample and profile for now.
        """
        Handler.__init__(self)

        self.analogdevice = AnalogDevice()

        for chan in self.analogdevice.device.channels():
            # self._ws.add_listener("analog.command." + chan + ".periodic_sample",
            #                      self._periodic_sample)
            # self._ws.add_listener("analog.command." + chan + ".profile",
            #                      self._profile)
            self.add_listener(chan + ".periodic_sample")
            self.add_listener(chan + ".profile")

        self.sample_delay = 1
        self.periodic_sampled_channels = []

        self.start()