libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
SlipStream Class Reference

Implement SLIP (serial line internet protocol). More...

#include <packetstream.hh>

Inheritance diagram for SlipStream:
Collaboration diagram for SlipStream:

Public Member Functions

 SlipStream (QIODevice *device, QObject *parent=nullptr)
 Constructor, takes ownership of the device.
bool isOpen () const override
 Returns true if the stream is open.
void close () override
 Closes the stream.
bool receive (QByteArray &buffer, int timeout=-1, const ErrorStack &err=ErrorStack()) override
 Receives a datagram.
bool send (const QByteArray &buffer, int timeout=-1, const ErrorStack &err=ErrorStack()) override
 Receives a datagram.
Public Member Functions inherited from PacketStream
virtual ~PacketStream ()
 Destructor.

Protected Attributes

QIODevice * _device
QByteArray _buffer

Additional Inherited Members

Protected Member Functions inherited from PacketStream
 PacketStream (QObject *parent=nullptr)
 Hidden constructor.

Detailed Description

Implement SLIP (serial line internet protocol).

Member Function Documentation

◆ close()

void SlipStream::close ( )
overridevirtual

Closes the stream.

Implements PacketStream.

◆ isOpen()

bool SlipStream::isOpen ( ) const
overridevirtual

Returns true if the stream is open.

Implements PacketStream.

◆ receive()

bool SlipStream::receive ( QByteArray & buffer,
int timeout = -1,
const ErrorStack & err = ErrorStack() )
overridevirtual

Receives a datagram.

Blocks for up to timeout milliseconds.

Implements PacketStream.

◆ send()

bool SlipStream::send ( const QByteArray & buffer,
int timeout = -1,
const ErrorStack & err = ErrorStack() )
overridevirtual

Receives a datagram.

Blocks for up to timeout milliseconds.

Implements PacketStream.


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