def __init__(self, device, conf):
super(EspHandler, self).__init__()
self.daemon = True
self.conf = conf
self.sender = None
self.device = None
self.in_queue = None
self.pin_last_command = {}
if (device > 0) and (self.conf.ipNetwork is not None) and (device < self.conf.ipNetwork.size):
self.device = device
self.sender = EspSender(device, self.conf)
self.sender.start()
self.in_queue = Queue.Queue()
print "#" + str(device) + " Handler to " + str(self.getIp())
else:
print "#" + str(device) + " Invalid device or net: " + str(self.conf.ipNetwork)
评论列表
文章目录