~hmatuschek/+junk/qdmr-package

« back to all changes in this revision

Viewing changes to lib/csvreader.hh

  • Committer: Hannes Matuschek
  • Date: 2020-07-07 14:34:22 UTC
  • mto: (17.1.1 qdmr-package)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: hmatuschek@gmail.com-20200707143422-1djcxrjkem3k5kb1
Tags: upstream-0.3.0
ImportĀ upstreamĀ versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 * IntroLine2: "MY0CALL"
65
65
 * @endcode
66
66
 *
67
 
 * The VOX level is a number between 1 and 10, that indicates the sensitivity of the VOX (voice
68
 
 * operated switch). This feature (if present and enabled) allows to automatically switch to
69
 
 * transmit if you speak into the microphone. The threshold for switching is set by the VOX
70
 
 * sensitivity. This value may vary heavily from model to model.
71
 
 * @code{.py}
72
 
 * VoxLevel: 3
73
 
 * @endcode
74
 
 *
75
67
 * The microphone sensitivity/amplification can also be set (on some radios) using the MicLevel
76
68
 * entry. This entry is also a number between 1 and 10. The larger the level the larger the
77
69
 * microphone amplification. This value may vary heavily from model to model.
78
70
 * @code{.py}
79
71
 * MicLevel: 2
80
72
 * @endcode
 
73
 * The "Speech" option enables the speech synthesis of the radio if supported. Possible settings
 
74
 * are "on" and "off".
 
75
 * @code{.py}
 
76
 * # Speech-synthesis ('On' or 'Off'):
 
77
 * Speech: Off
 
78
 * @endcode
81
79
 *
82
80
 * @subsection confcont Contact table
83
81
 * The contact table is a list of DMR contacts like
147
145
 *
148
146
 * The digital channel table has the form
149
147
 * @code
150
 
 * Digital Name             Receive   Transmit  Power Scan TOT RO Admit  Color Slot RxGL TxContact
151
 
 * 11      "DM0TT Ref"      439.0870  -7.6000   High  1    -   -  Free   1     1    7    12   #    Regional
152
 
 * 12      "DM0TT BB"       439.0875  -7.6000   High  -    -   -  Free   1     2    7    15   #    Berlin/Brand
153
 
 * 84      "DMR_S0"         433.4500  433.4500  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
154
 
 * 85      "DMR_S1"         433.6120  433.6120  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
155
 
 * 86      "DMR_S2"         433.6250  433.6250  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
156
 
 * 87      "DMR_S3"         433.6380  433.6380  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
157
 
 * 88      "DMR_S4"         433.6500  433.6500  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
158
 
 * 89      "DMR_S5"         433.6630  433.6630  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
159
 
 * 90      "DMR_S6"         433.6750  433.6750  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
160
 
 * 91      "DMR_S7"         433.6880  433.6880  High  2    -   -  Free   1     1    6    9    #    Simplex TG99
 
148
 * Digital Name             Receive   Transmit  Power Scan TOT RO Admit  CC TS RxGL TxC GPS
 
149
 * 11      "DM0TT Ref"      439.0870  -7.6000   High  1    -   -  Free   1  1  7    12  -  #    Regional
 
150
 * 12      "DM0TT BB"       439.0875  -7.6000   High  -    -   -  Free   1  2  7    15  1  #    Berlin/Brand
 
151
 * 84      "DMR_S0"         433.4500  433.4500  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
152
 * 85      "DMR_S1"         433.6120  433.6120  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
153
 * 86      "DMR_S2"         433.6250  433.6250  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
154
 * 87      "DMR_S3"         433.6380  433.6380  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
155
 * 88      "DMR_S4"         433.6500  433.6500  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
156
 * 89      "DMR_S5"         433.6630  433.6630  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
157
 * 90      "DMR_S6"         433.6750  433.6750  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
 
158
 * 91      "DMR_S7"         433.6880  433.6880  High  2    -   -  Free   1  1  6    9   -  #    Simplex TG99
161
159
 * @endcode
162
160
 * The digital-channel table starts with the keyword "Digital" and ends with an empty line. The
163
 
 * next keywords (Name, Receive, Transmit, Power, Scan, TOT, RO, Admit, Color, Slot, RxGL and
164
 
 * TxContact) are ignored and are maintained for the self-documentation of the configuraion file.
 
161
 * next keywords (Name, Receive, Transmit, Power, Scan, TOT, RO, Admit, CC, TS, RxGL and
 
162
 * TxC) are ignored and are maintained for the self-documentation of the configuraion file.
165
163
 *
166
164
 * Each channel is defined within a single line. The first column is the unique channel
167
165
 * identifier (any unique number among analog AND digital channels). The second column specifies the
179
177
 * pressed. The "Free" keyword indicates that the radio will only transmit if the channel is free.
180
178
 * The "Color" keyword indicates that the radio will only transmit if the channel is free and the
181
179
 * colorcode of the repeater matches the specified color-code of the channel (see next column). The
182
 
 * 10th column specifies the colorcode of the channel. The 10th (Color) column specifies the
 
180
 * 10th column specifies the colorcode of the channel. The 10th (CC) column specifies the
183
181
 * color-code of the channel. To avoid interference between neighbouring radios and repreaters on
184
182
 * the same frequency (in case of DX conditions), the repeater and radio will only react to
185
183
 * tranmissions on a channel with the matching color-code. The color-code can be any number between
186
 
 * 0 and 15. The 11th (Slot) column specifies the time-slot for this channel. Due to the audio
 
184
 * 0 and 15. The 11th (TS) column specifies the time-slot for this channel. Due to the audio
187
185
 * compression used in DMR, it is possible to operate two independent channels on a single
188
186
 * frequency by using time-sliceing. DMR uses two time-slots. This option specifies which of the
189
187
 * two time-slots is used for the channel. On simplex channels, this time-sliceing is irrelevant, as
190
 
 * there is no central instance (the repeater) that defines what time-slot 1 or 2 is.
 
188
 * there is no central instance (the repeater) that defines what time-slot 1 or 2 is. The 12th (GPS)
 
189
 * column specifies the GPS system (see below) to use on that channel.
191
190
 *
192
191
 * @subsection confana Analog channel table
193
192
 * The analog channel table collects all analog (FM) channels. As digital channels have some
272
271
 * A reference to any channel-type can be used here, analog and digital.
273
272
 *
274
273
 * @subsection confscan Scan lists
275
 
 * Finally a scan list is list of channels, that are scanned whenever scanning is started on a
 
274
 * A scan list is list of channels, that are scanned whenever scanning is started on a
276
275
 * channel the scan list is associated with. A single scan list might be associated with several
277
276
 * channels. For example, all channels within that scan list.
278
277
 *
297
296
 * that the radio will transmit on the channel at which the scan stopped on, while specifying any
298
297
 * channel index implies, that the radio will transmit on that channel. Finally the 6th column
299
298
 * specifies the comma-separated list of channels that form the scan list.
 
299
 *
 
300
 * @subsection confgps GPS Systems
 
301
 * The GPS System list just specifies the contact to which some positional information is send to
 
302
 * (which usually gets forwarded to the APRS system) and at which period this information is send.
 
303
 * @code
 
304
 * GPS  Name                Dest Period Revert
 
305
 * 1    "BM APRS"           20   300    -
 
306
 * @endcode
 
307
 * The first column specifies the ID of the GPS system. This can be any number >0. The second column
 
308
 * (Name) specifies the name of the GPS system. The third column specifies the destination contact
 
309
 * ID (see Contacts above), the position information is send to. The fourth column (Period) specifies
 
310
 * the update period in seconds. The fifth column (Revert) specifies the revert channel. In amateur
 
311
 * radio, this can be left blank ("-").
300
312
 */
301
313
 
302
314
#ifndef CSVREADER_HH
429
441
  virtual bool handleMicLevel(uint level, qint64 line, qint64 column, QString &errorMessage);
430
442
  /** Gets called once the Speech flag has been parsed. */
431
443
  virtual bool handleSpeech(bool speech, qint64 line, qint64 column, QString &errorMessage);
 
444
  /** Gets called once the UserDB flag has been parsed. */
 
445
  virtual bool handleUserDB(bool userdb, qint64 line, qint64 column, QString &errorMessage);
432
446
  /** Gets called once a DTMF contact has been parsed. */
433
447
  virtual bool handleDTMFContact(qint64 idx, const QString &name, const QString &num, bool rxTone,
434
448
                                 qint64 line, qint64 column, QString &errorMessage);
491
505
  bool _parse_mic_level(CSVLexer &lexer);
492
506
  /** Internal function to parse Speech flag. */
493
507
  bool _parse_speech(CSVLexer &lexer);
 
508
  /** Internal function to parse UserDB flag. */
 
509
  bool _parse_userdb(CSVLexer &lexer);
494
510
  /** Internal function to parse a digital contact list. */
495
511
  bool _parse_contacts(CSVLexer &lexer);
496
512
  /** Internal function to parse digital contact. */
550
566
  virtual bool handleIntroLine2(const QString &text, qint64 line, qint64 column, QString &errorMessage);
551
567
  virtual bool handleMicLevel(uint level, qint64 line, qint64 column, QString &errorMessage);
552
568
  virtual bool handleSpeech(bool speech, qint64 line, qint64 column, QString &errorMessage);
 
569
  virtual bool handleUserDB(bool userdb, qint64 line, qint64 column, QString &errorMessage);
553
570
  virtual bool handleDTMFContact(qint64 idx, const QString &name, const QString &num, bool rxTone,
554
571
                                 qint64 line, qint64 column, QString &errorMessage);
555
572
  virtual bool handleDigitalContact(