def __init__(self, window): MetaProtocolFactory.__init__(self) self.window = window self.logger = logging.getLogger('factory') if 0: # Wing IDE type hints import metasimulator isinstance(self.window, metasimulator.MainFrame)
def _compose_message(self, option_bits=None, payload=None, msgtype=None): message = MetaProtocolFactory._compose_message(self, option_bits, payload, msgtype) self.window.write_queue.put(message) self.logger.debug("Sent data: %s", ' '.join(["%02X" % byte for byte in message]))