def wait_response (self): link = self.link for buf in link.dump_rx_buffer( ): resp = Packet.fromBuffer(buf) if self.responds_to(resp): print "READ" print lib.hexdump(buf) return resp
def wait_for_ack (self): link = self.link # while not self.done( ): for buf in link.dump_rx_buffer( ): print "wait_for_ack" resp = Packet.fromBuffer(buf) if self.responds_to(resp): print lib.hexdump(buf) if resp.op == 0x06: # self.unframe(resp) print "found valid ACK" return resp