code: def _send_packet(self):
          
          cmd = self._crnt_cmd
          if cmd.get_empty():
              return
  
          max_packets = self._interface.get_packet_count()
          if len(self._commands_to_read) >= max_packets:
              self._read_packet()
          data = cmd.encode_data()
          try:
              self._interface.write(list(data))
          except Exception as exception:
              self._abort_all_transfers(exception)
              raise
          self._commands_to_read.append(cmd)
          self._crnt_cmd = _Command(self._packet_size)
docs: Send a single packet to the interface
  
          This function guarentees that the number of packets
          that are stored in daplink's buffer (the number of
          packets written but not read) does not exceed the
          number supported by the given device.