libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
ChirpReader Class Reference

Implements the CHIRP CSV reader. More...

#include <chirpformat.hh>

Inheritance diagram for ChirpReader:
Collaboration diagram for ChirpReader:

Static Public Member Functions

static bool read (QTextStream &stream, Config *config, const ErrorStack &err=ErrorStack())
 Reads a CHIRP CSV file from the given stream and updates the given configuration.
 

Static Protected Member Functions

static bool readLine (QTextStream &stream, QStringList &list, const ErrorStack &err=ErrorStack())
 Internal used method to read a line from the given stream.
 
static bool processLine (const QStringList &header, const QStringList &line, Config *config, const ErrorStack &err=ErrorStack())
 Line parser, the header must be read before and passed to this method.
 
static bool processDuplex (const QString &code, Duplex &duplex, const ErrorStack &err=ErrorStack())
 Helper function to parse a duplex column.
 
static bool processMode (const QString &code, Mode &mode, const ErrorStack &err=ErrorStack())
 Helper function to parse a mode column.
 
static bool processToneMode (const QString &code, ToneMode &mode, const ErrorStack &err=ErrorStack())
 Helper function to parse a tone mode column.
 
static bool processPolarity (const QString &code, Polarity &txPol, Polarity &rxPol, const ErrorStack &err=ErrorStack())
 Helper function to parse a polarity column.
 
static bool processCrossMode (const QString &code, CrossMode &crossMode, const ErrorStack &err=ErrorStack())
 Helper function to parse a cross mode column.
 

Additional Inherited Members

- Protected Types inherited from ChirpFormat
enum class  Duplex {
  None , Positive , Negative , Split ,
  Off
}
 Possible values for the "duplex" column. More...
 
enum class  Mode {
  FM , NFM , WFM , AM ,
  DV , DN
}
 Possible CHIRP channel modes. More...
 
enum class  ToneMode {
  None , Tone , TSQL , TSQL_R ,
  DTCS , DTCS_R , Cross
}
 Possible modes for transmitting and processing sub tones. More...
 
enum class  Polarity { Normal , Reversed }
 Polarity of DCS codes. More...
 
enum class  CrossMode {
  NoneTone , NoneDTCS , ToneNone , ToneTone ,
  ToneDTCS , DTCSNone , DTCSTone , DTCSDTCS
}
 Generic mode for sub tones. More...
 
- Static Protected Attributes inherited from ChirpFormat
static const QSet< QString > _mandatoryHeaders
 Internal set of mandatory headers.
 
static const QSet< QString > _knownHeaders
 Internal used set of known headers.
 
static const QHash< QString, Duplex_duplexCodes
 Mapping of duplex codes.
 
static const QHash< QString, Mode_modeCodes
 Mapping of mode codes.
 
static const QHash< QString, ToneMode_toneModeCodes
 Mapping of tone mode codes.
 
static const QHash< QString, CrossMode_crossModes
 Mapping of cross mode codes.
 

Detailed Description

Implements the CHIRP CSV reader.

Member Function Documentation

◆ processLine()

bool ChirpReader::processLine ( const QStringList & header,
const QStringList & line,
Config * config,
const ErrorStack & err = ErrorStack() )
staticprotected

Line parser, the header must be read before and passed to this method.

The parsed channel is added to the configuration.

◆ read()

bool ChirpReader::read ( QTextStream & stream,
Config * config,
const ErrorStack & err = ErrorStack() )
static

Reads a CHIRP CSV file from the given stream and updates the given configuration.

Please note, that the CHRIP generic CSV does not contain a functional DMR codeplug.

◆ readLine()

bool ChirpReader::readLine ( QTextStream & stream,
QStringList & list,
const ErrorStack & err = ErrorStack() )
staticprotected

Internal used method to read a line from the given stream.

This method also implements the proper quotation parsing of strings.


The documentation for this class was generated from the following files: