libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
PacketStream Class Referenceabstract

Defines an interface for a datagram socket. More...

#include <packetstream.hh>

Inheritance diagram for PacketStream:
Collaboration diagram for PacketStream:

Public Member Functions

virtual ~PacketStream ()
 Destructor.
virtual bool isOpen () const =0
 Returns true if the stream is open.
virtual void close ()=0
 Closes the stream.
virtual bool receive (QByteArray &buffer, int timeout=-1, const ErrorStack &err=ErrorStack())=0
 Receives a datagram.
virtual bool send (const QByteArray &buffer, int timeout=-1, const ErrorStack &err=ErrorStack())=0
 Receives a datagram.

Protected Member Functions

 PacketStream (QObject *parent=nullptr)
 Hidden constructor.

Detailed Description

Defines an interface for a datagram socket.

That is, just some methods to send and receive packets.

Member Function Documentation

◆ close()

virtual void PacketStream::close ( )
pure virtual

Closes the stream.

Implemented in OpenRTXLinkDatagram, and SlipStream.

◆ isOpen()

virtual bool PacketStream::isOpen ( ) const
pure virtual

Returns true if the stream is open.

Implemented in OpenRTXLinkDatagram, and SlipStream.

◆ receive()

virtual bool PacketStream::receive ( QByteArray & buffer,
int timeout = -1,
const ErrorStack & err = ErrorStack() )
pure virtual

Receives a datagram.

Blocks for up to timeout milliseconds.

Implemented in OpenRTXLinkDatagram, and SlipStream.

◆ send()

virtual bool PacketStream::send ( const QByteArray & buffer,
int timeout = -1,
const ErrorStack & err = ErrorStack() )
pure virtual

Receives a datagram.

Blocks for up to timeout milliseconds.

Implemented in OpenRTXLinkDatagram, and SlipStream.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/packetstream.hh
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/packetstream.cc