libdrmconf
0.12.0
A library to program DMR radios.
|
Implements the CHIRP CSV reader. More...
#include <chirpformat.hh>
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static const QSet< QString > | _knownHeaders |
Internal used set of known headers. More... | |
static const QHash< QString, Duplex > | _duplexCodes |
Mapping of duplex codes. More... | |
static const QHash< QString, Mode > | _modeCodes |
Mapping of mode codes. More... | |
static const QHash< QString, ToneMode > | _toneModeCodes |
Mapping of tone mode codes. More... | |
static const QHash< QString, CrossMode > | _crossModes |
Mapping of cross mode codes. More... | |
Implements the CHIRP CSV reader.
|
staticprotected |
Line parser, the header must be read before and passed to this method.
The parsed channel is added to the configuration.
|
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.
|
staticprotected |
Internal used method to read a line from the given stream.
This method also implements the proper quotation parsing of strings.