def _handshake(self): self._write_reg("main_control", "stop", expect_response=False) exp_addr = regmap.get_reg_addr("main_control") exp_enc_val = regmap.get_reg("main_control").encode("stop") exp_reg_val = protocol.RegVal(exp_addr, exp_enc_val) exp_packet = protocol.RegWriteResponse(exp_reg_val) exp_frame = protocol.insert_packet_into_frame(exp_packet) self._link.recv_until(exp_frame)
def test_insert_packet_into_frame(): frame = ptcl.insert_packet_into_frame(unp_reg_write_req) assert frame == pkd_reg_write_req_frame
def _send_packet(self, packet): frame = protocol.insert_packet_into_frame(packet) self._link.send(frame)