def test_scp_read_memory_request_and_response_board(self): board_config.set_up_remote_board() connection = SCAMPConnection(remote_host=board_config.remotehost) scp_link = ReadMemory(0, 0, 0x70000000, 256) connection.send_scp_request(scp_link) result, _, _, _ = connection.receive_scp_response() self.assertEqual(result, SCPResult.RC_OK)
def test_send_scp_request_to_nonexistent_host(self): with self.assertRaises(SpinnmanTimeoutException): board_config.set_up_nonexistent_board() connection = SCAMPConnection(remote_host=board_config.remotehost) scp = ReadMemory(0, 0, 0, 256) connection.send_scp_request(scp) _, _, _, _ = connection.receive_scp_response(2)
def test_scp_version_request_and_response_board(self): board_config.set_up_remote_board() connection = SCAMPConnection(remote_host=board_config.remotehost) scp_req = GetVersion(0, 0, 0) scp_response = GetVersionResponse() connection.send_scp_request(scp_req) _, _, data, offset = connection.receive_scp_response() scp_response.read_bytestring(data, offset) print(scp_response.version_info) self.assertEqual(scp_response._scp_response_header._result, SCPResult.RC_OK)