code: def _send_rpc(self, device_info, control_info, address, rpc_id, payload, poll_interval, timeout):
          
  
          write_address, write_data = control_info.format_rpc(address, rpc_id, payload)
          self._jlink.memory_write32(write_address, write_data)
  
          self._trigger_rpc(device_info)
  
          start = monotonic()
          now = start
  
          poll_address, poll_mask = control_info.poll_info()
  
          while (now - start) < timeout:
              time.sleep(poll_interval)
              value, = self._jlink.memory_read8(poll_address, 1)
  
              if value & poll_mask:
                  break
  
              now = monotonic()
  
          if (now - start) >= timeout:
              raise HardwareError("Timeout waiting for RPC response", timeout=timeout, poll_interval=poll_interval)
  
          read_address, read_length = control_info.response_info()
          read_data = self._read_memory(read_address, read_length, join=True)
  
          return control_info.format_response(read_data)
docs: Write and trigger an RPC.