def sendMsg(self, msg): self.started() iofun.addListener(self) if self.timer: self.timer.cancel() self.timer = Timer(5.0, self.giveUp) self.timer.start() iofun.writeMsg(msg) out("sent msg: " + msg.toString())
def start(self): self.db.clear() iofun.addListener(self) msg = message.createExtendedMsg(InsteonAddress(self.addr), 0x2f, 0, []) msg.setByte("userData1", 0); msg.setByte("userData2", 0); msg.setByte("userData3", 0); msg.setByte("userData4", 0); msg.setByte("userData5", 0); iofun.writeMsg(msg) outchars("sent db query msg, incoming records: ") self.timer = Timer(20.0, self.giveUp) self.timer.start()
def start(self): self.db.clear() iofun.addListener(self) msg = message.createExtendedMsg(InsteonAddress(self.addr), 0x2f, 0, []) msg.setByte("userData1", 0) msg.setByte("userData2", 0) msg.setByte("userData3", 0) msg.setByte("userData4", 0) msg.setByte("userData5", 0) iofun.writeMsg(msg) outchars("sent db query msg, incoming records: ") self.timer = Timer(20.0, self.giveUp) self.timer.start()
def addListener(listener): iofun.addListener(listener)
def start(self): self.db.clear() self.keepRunning = True iofun.addListener(self) iofun.writeMsg(Msg.s_makeMessage("GetFirstALLLinkRecord"))
def startWait(self, time): iofun.addListener(self) if self.timer: self.timer.cancel() self.timer = Timer(time, self.giveUp) self.timer.start()