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

Implements the OpenRTX link protocol. More...

#include <openrtx_link.hh>

Inheritance diagram for OpenRTXLink:
Collaboration diagram for OpenRTXLink:

Public Member Functions

 OpenRTXLink (PacketStream *link, QObject *parent=nullptr)
 Constructor.
virtual bool isOpen () const
virtual void close ()
OpenRTXLinkStreamstdio () const
 Returns a stream to the stdio of the radio.
OpenRTXCATcat () const
 The CAT interface to the radio.
OpenRTXLinkDatagramfmp () const
 The file-system management protocol interface to the radio.
OpenRTXLinkStreamxmodem () const
 An XMODEM channel to transfer files.
unsigned int timeout () const
 Returns the timeout in milliseconds.

Protected Types

enum class  Protocol { Stdio = 0 , CAT = 1 , FMP = 2 , XMODEM = 3 }
 The possible protocols, encapsulated in OpenRTX link.

Protected Member Functions

bool receive (Protocol proto, QByteArray &data, int timeout=-1, const ErrorStack &err=ErrorStack())
 Dispatcher to receive datagrams over OpenRTXLink.
bool send (Protocol proto, const QByteArray &data, int timeout=-1, const ErrorStack &err=ErrorStack())
 Dispatcher to send datagrams over OpenRTXLink.

Static Protected Member Functions

static uint16_t crc16 (const QByteArray &data)

Protected Attributes

PacketStream_link
 Owns the packet stream to the device.
QHash< unsigned int, QList< QByteArray > > _inBuffers
OpenRTXLinkStream_stdio
OpenRTXCAT_cat
OpenRTXLinkDatagram_fmp
OpenRTXLinkStream_xmodem
unsigned int _timeout

Friends

class OpenRTXLinkStream
class OpenRTXLinkDatagram
class OpenRTXCAT

Detailed Description

Implements the OpenRTX link protocol.

This is a datagram-oriented protocol, that dispatches several different protocols to talk to the radio. It provides a stream, to the stdio of the radio, a CAT interface, a file-system management protocol (FMP) as well as XMODEM to transfer files. The file transfer must be initialized via the FMP.

All these protocols are exposed through specialized interface objects, accessible through this classs.

+------------------+-------------------+-------------------+------------------+
| stdio | CAT | FMP | XMODEM |
+------------------+-------------------+-------------------+------------------+
+-----------------------------------------------------------------------------+
| SLIP (SlipStream) |
+-----------------------------------------------------------------------------+
| USB CDC-ACM (VCOM/Serial-over-USB, USBSerial) |
+-----------------------------------------------------------------------------+
Implement SLIP (serial line internet protocol).
Definition packetstream.hh:39
Implements a serial connection to a radio via USB.
Definition usbserial.hh:16

Constructor & Destructor Documentation

◆ OpenRTXLink()

OpenRTXLink::OpenRTXLink ( PacketStream * link,
QObject * parent = nullptr )
explicit

Constructor.

Parameters
linkSpecifies the datagram socket to talk to the radio (SLIP).
parentSpecifies the QObject parent.

Member Function Documentation

◆ stdio()

OpenRTXLinkStream * OpenRTXLink::stdio ( ) const

Returns a stream to the stdio of the radio.

Implements the QIODevice interface.


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