def start(self): def callback(value, channel): self.notified_sig_id = value self.send_signal(self.notified_sig_id) start_ir_sending = notification.StartIrSending(self._r) start_ir_sending.subscribe(callback) self.set_state("ready")
def stop(self): start_ir_sending = notification.StartIrSending(self._r) start_ir_sending.unsubscribe() self.set_state("dead")
def __init__(self, server): started_ir_sending = ir_sender_notification.StartIrSending(server) completed_ir_sending = ir_sender_notification.CompleteIrSending(server) super().__init__(started_ir_sending, completed_ir_sending)