def start(self): self._log.debug( 'starting' ) BaseHandler.start(self) self._upnpcfg['controlpoint'] = 'yes' # force it self._controlpoint = ControlPointWB() # subscribe to gateway events that are of interest self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/time/runtime' ) # subscribe to media control events self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/upnp/debug' ) self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/av/transport/control' ) self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/av/connection/control' ) # subscribe to brisa events events self._controlpoint.subscribe('new_device_event', self.on_new_device) self._controlpoint.subscribe('removed_device_event', self.on_removed_device) # start the control point self._controlpoint.start() # TODO: Does this have to be doen here or can we do this in the stop function? reactor.add_after_stop_func(self._controlpoint.destroy) # start seperate thread for brisa reactor threading.Thread.start(self)
def start(self): _log.debug( 'start' ) BaseHandler.start(self) self.__running = True # subscribe to runtime so we can update manifest self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/time/runtime' ) _log.debug( 'subscribed to runtime' ) threading.Thread.start(self)
def start(self): _log.debug( 'start' ) BaseHandler.start(self) self.running = True if not self._inFile or not self._outFile: # open serial port try: self._inFile = serial.Serial( port=self.serialPort, baudrate=4800, timeout=1 ) self._outFile = self._inFile except Exception, ex: self._inFile = None _log.exception( ex )
def start(self): _log.debug( 'start' ) BaseHandler.start(self) # subscribe to media control events self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/av/render/control' ) self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/av/transport/control' ) self._localRouter.subscribe( self._subscribeTime, self, 'http://id.webbrick.co.uk/events/av/connection/control' ) self.running = True self._thread = threading.Thread( target=self.run ) self._thread.setDaemon(True) self._thread.start()
def start(self): BaseHandler.start(self) threading.Thread.start(self) self._heatmiserDriver.open() self._taskList.put( ("start",) )
def start(self): BaseHandler.start(self) threading.Thread.start(self) self._LedLightingDriver.open() self._taskList.put( ("start",) )