libdrmconf  0.12.0
A library to program DMR radios.
anytone_codeplug.hh
1 #ifndef ANYTONECODEPLUG_HH
2 #define ANYTONECODEPLUG_HH
3 
4 #include "codeplug.hh"
5 #include <QGeoCoordinate>
6 #include "channel.hh"
7 #include "contact.hh"
8 
9 class RadioSettings;
10 
11 
19 class AnytoneCodeplug : public Codeplug
20 {
21  Q_OBJECT
22 
23 public:
25  class BitmapElement: public Element
26  {
27  protected:
29  BitmapElement(uint8_t *ptr, size_t size);
30 
31  public:
33  void clear();
34 
36  virtual bool isEncoded(unsigned int idx) const ;
38  virtual void setEncoded(unsigned int idx, bool enable);
40  virtual void enableFirst(unsigned int n);
41  };
42 
45  {
46  protected:
48  InvertedBitmapElement(uint8_t *ptr, size_t size);
49 
50  public:
52  void clear();
53 
55  virtual bool isEncoded(unsigned int idx) const ;
57  virtual void setEncoded(unsigned int idx, bool enable);
59  virtual void enableFirst(unsigned int n);
60  };
61 
69  {
70  protected:
72  InvertedBytemapElement(uint8_t *ptr, size_t size);
73 
74  public:
76  void clear();
77 
79  virtual bool isEncoded(unsigned int idx) const ;
81  virtual void setEncoded(unsigned int idx, bool enable);
83  virtual void enableFirst(unsigned int n);
84  };
85 
91  class ChannelElement: public Element
92  {
93  public:
95  enum class Mode {
96  Analog = 0,
97  Digital = 1,
98  MixedAnalog = 2,
99  MixedDigital = 3
100  };
101 
103  enum Power {
104  POWER_LOW = 0,
107  POWER_TURBO = 3
108  };
109 
111  enum class RepeaterMode {
112  Simplex = 0,
113  Positive = 1,
114  Negative = 2
115  };
116 
118  enum class SignalingMode {
119  None = 0,
120  CTCSS = 1,
121  DCS = 2
122  };
123 
125  enum class Admit {
126  Always = 0,
127  Free = 1,
128  DifferentColorCode = 2,
129  SameColorCode = 3,
130  Tone = 1,
131  Busy = 2
132  };
133 
135  enum class OptSignaling {
136  Off = 0,
137  DTMF = 1,
138  TwoTone = 2,
139  FiveTone = 3
140  };
141 
142  protected:
144  ChannelElement(uint8_t *ptr, unsigned size);
145 
146  public:
148  ChannelElement(uint8_t *ptr);
150  virtual ~ChannelElement();
151 
153  static constexpr unsigned int size() { return 0x0040; }
154 
156  void clear();
157 
159  virtual unsigned rxFrequency() const;
161  virtual void setRXFrequency(unsigned hz);
162 
166  virtual unsigned txOffset() const;
170  virtual void setTXOffset(unsigned hz);
172  virtual unsigned txFrequency() const;
175  virtual void setTXFrequency(unsigned hz);
176 
178  virtual Mode mode() const;
180  virtual void setMode(Mode mode);
181 
183  virtual Channel::Power power() const;
185  virtual void setPower(Channel::Power power);
186 
188  virtual FMChannel::Bandwidth bandwidth() const;
190  virtual void setBandwidth(FMChannel::Bandwidth bw);
191 
193  virtual RepeaterMode repeaterMode() const;
195  virtual void setRepeaterMode(RepeaterMode mode);
196 
198  virtual SignalingMode rxSignalingMode() const;
200  virtual void setRXSignalingMode(SignalingMode mode);
202  virtual Signaling::Code rxTone() const;
204  virtual void setRXTone(Signaling::Code code);
205 
207  virtual SignalingMode txSignalingMode() const;
209  virtual void setTXSignalingMode(SignalingMode mode);
211  virtual Signaling::Code txTone() const;
213  virtual void setTXTone(Signaling::Code code);
214 
216  virtual bool ctcssPhaseReversal() const;
218  virtual void enableCTCSSPhaseReversal(bool enable);
219 
221  virtual bool rxOnly() const;
223  virtual void enableRXOnly(bool enable);
225  virtual bool callConfirm() const;
227  virtual void enableCallConfirm(bool enable);
229  virtual bool talkaround() const;
231  virtual void enableTalkaround(bool enable);
232 
234  virtual bool txCTCSSIsCustom() const;
236  virtual Signaling::Code txCTCSS() const;
238  virtual void setTXCTCSS(Signaling::Code tone);
240  virtual void enableTXCustomCTCSS();
242  virtual bool rxCTCSSIsCustom() const;
244  virtual Signaling::Code rxCTCSS() const;
246  virtual void setRXCTCSS(Signaling::Code tone);
248  virtual void enableRXCustomCTCSS();
249 
251  virtual Signaling::Code txDCS() const;
253  virtual void setTXDCS(Signaling::Code code);
255  virtual Signaling::Code rxDCS() const;
257  virtual void setRXDCS(Signaling::Code code);
258 
260  virtual double customCTCSSFrequency() const;
262  virtual void setCustomCTCSSFrequency(double hz);
263 
265  virtual unsigned twoToneDecodeIndex() const;
267  virtual void setTwoToneDecodeIndex(unsigned idx);
268 
270  virtual unsigned contactIndex() const;
272  virtual void setContactIndex(unsigned idx);
273 
275  virtual unsigned radioIDIndex() const;
277  virtual void setRadioIDIndex(unsigned idx);
278 
283 
285  virtual Admit admit() const;
287  virtual void setAdmit(Admit admit);
288 
290  virtual OptSignaling optionalSignaling() const;
292  virtual void setOptionalSignaling(OptSignaling sig);
293 
295  virtual bool hasScanListIndex() const;
297  virtual unsigned scanListIndex() const;
299  virtual void setScanListIndex(unsigned idx);
301  virtual void clearScanListIndex();
302 
304  virtual bool hasGroupListIndex() const;
306  virtual unsigned groupListIndex() const;
308  virtual void setGroupListIndex(unsigned idx);
310  virtual void clearGroupListIndex();
311 
313  virtual unsigned twoToneIDIndex() const;
315  virtual void setTwoToneIDIndex(unsigned idx);
317  virtual unsigned fiveToneIDIndex() const;
319  virtual void setFiveToneIDIndex(unsigned idx);
321  virtual unsigned dtmfIDIndex() const;
323  virtual void setDTMFIDIndex(unsigned idx);
324 
326  virtual unsigned colorCode() const;
328  virtual void setColorCode(unsigned code);
329 
331  virtual DMRChannel::TimeSlot timeSlot() const;
333  virtual void setTimeSlot(DMRChannel::TimeSlot ts);
334 
336  virtual bool smsConfirm() const;
338  virtual void enableSMSConfirm(bool enable);
340  virtual bool simplexTDMA() const;
342  virtual void enableSimplexTDMA(bool enable);
344  virtual bool adaptiveTDMA() const;
346  virtual void enableAdaptiveTDMA(bool enable);
348  virtual bool rxAPRS() const;
350  virtual void enableRXAPRS(bool enable);
352  virtual bool enhancedEncryption() const;
354  virtual void enableEnhancedEncryption(bool enable);
356  virtual bool loneWorker() const;
358  virtual void enableLoneWorker(bool enable);
359 
361  virtual bool hasEncryptionKeyIndex() const;
363  virtual unsigned encryptionKeyIndex() const;
365  virtual void setEncryptionKeyIndex(unsigned idx);
367  virtual void clearEncryptionKeyIndex();
368 
370  virtual QString name() const;
372  virtual void setName(const QString &name);
373 
375  virtual Channel *toChannelObj(Context &ctx) const;
377  virtual bool linkChannelObj(Channel *c, Context &ctx) const;
379  virtual bool fromChannelObj(const Channel *c, Context &ctx);
380 
381  protected:
383  struct Offset {
385  };
386  };
387 
390  {
391  protected:
393  ChannelBitmapElement(uint8_t *ptr, size_t size);
394 
395  public:
397  ChannelBitmapElement(uint8_t *ptr);
398 
400  static constexpr unsigned int size() { return 0x0200; }
401  };
402 
408  class ContactElement: public Element
409  {
410  protected:
412  ContactElement(uint8_t *ptr, unsigned size);
413 
414  public:
416  explicit ContactElement(uint8_t *ptr);
418  virtual ~ContactElement();
419 
421  static constexpr unsigned int size() { return 0x0064; }
422 
424  void clear();
426  bool isValid() const;
427 
429  virtual DMRContact::Type type() const;
431  virtual void setType(DMRContact::Type type);
432 
434  virtual QString name() const;
436  virtual void setName(const QString &name);
437 
439  virtual unsigned number() const;
441  virtual void setNumber(unsigned number);
442 
447 
449  virtual DMRContact *toContactObj(Context &ctx) const;
451  virtual bool fromContactObj(const DMRContact *contact, Context &ctx);
452  };
453 
456  {
457  protected:
459  ContactBitmapElement(uint8_t *ptr, size_t size);
460 
461  public:
463  ContactBitmapElement(uint8_t *ptr);
464 
466  static constexpr unsigned int size() { return 0x0500; }
467  };
468 
474  {
475  protected:
477  DTMFContactElement(uint8_t *ptr, unsigned size);
478 
479  public:
481  explicit DTMFContactElement(uint8_t *ptr);
483  virtual ~DTMFContactElement();
484 
486  static constexpr unsigned int size() { return 0x0018; }
487 
489  void clear();
490 
492  virtual QString number() const;
494  virtual void setNumber(const QString &number);
495 
497  virtual QString name() const;
499  virtual void setName(const QString &name);
500 
502  virtual DTMFContact *toContact() const;
504  virtual bool fromContact(const DTMFContact *contact);
505 
506  public:
508  struct Limit {
509  static constexpr unsigned int digitCount() { return 14; }
510  static constexpr unsigned int nameLength() { return 15; }
511  };
512 
513  protected:
515  struct Offset {
517  static constexpr unsigned int digits() { return 0x0000; }
518  static constexpr unsigned int numDigits() { return 0x0007; }
519  static constexpr unsigned int name() { return 0x0008; }
521  };
522  };
523 
526  {
527  protected:
529  DTMFContactBytemapElement(uint8_t *ptr, size_t size);
530 
531  public:
533  explicit DTMFContactBytemapElement(uint8_t *ptr);
534 
536  static constexpr unsigned int size() { return 0x0100; }
537  };
538 
543  class GroupListElement: public Element
544  {
545  protected:
547  GroupListElement(uint8_t *ptr, unsigned size);
548 
549  public:
551  GroupListElement(uint8_t *ptr);
552 
554  static constexpr unsigned int size() { return 0x0120; }
555 
557  void clear();
559  bool isValid() const;
560 
562  virtual QString name() const;
564  virtual void setName(const QString &name);
565 
567  virtual bool hasMemberIndex(unsigned n) const;
569  virtual unsigned memberIndex(unsigned n) const;
571  virtual void setMemberIndex(unsigned n, unsigned idx);
573  virtual void clearMemberIndex(unsigned n);
574 
578  virtual RXGroupList *toGroupListObj() const;
581  virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const;
583  virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx);
584  };
585 
588  {
589  protected:
591  GroupListBitmapElement(uint8_t *ptr, size_t size);
592 
593  public:
595  explicit GroupListBitmapElement(uint8_t *ptr);
596 
598  static constexpr unsigned int size() { return 0x0020; }
599  };
600 
605  class ScanListElement: public Element
606  {
607  public:
609  enum class PriChannel {
610  Off = 0,
611  Primary = 1,
612  Secondary = 2,
613  Both = 3
614  };
615 
617  enum class RevertChannel {
618  Selected = 0,
619  SelectedActive = 1,
620  Primary = 2,
621  Secondary = 3,
622  LastCalled = 4,
623  LastUsed = 5,
624  PrimaryActive = 6,
625  SecondaryActive = 7
626  };
627 
628  protected:
630  ScanListElement(uint8_t *ptr, unsigned size);
631 
632  public:
634  ScanListElement(uint8_t *ptr);
635 
637  static constexpr unsigned int size() { return 0x0090; }
638 
640  void clear();
641 
643  virtual PriChannel priorityChannels() const;
645  virtual void setPriorityChannels(PriChannel sel);
646 
648  virtual bool hasPrimary() const;
650  virtual bool primaryIsSelected() const;
652  virtual unsigned primary() const;
654  virtual void setPrimary(unsigned idx);
656  virtual void setPrimarySelected();
658  virtual void clearPrimaryChannel();
659 
661  virtual bool hasSecondary() const;
663  virtual bool secondaryIsSelected() const;
665  virtual unsigned secondary() const;
667  virtual void setSecondary(unsigned idx);
669  virtual void setSecondarySelected();
671  virtual void clearSecondaryChannel();
672 
674  virtual unsigned lookBackTimeA() const;
676  virtual void setLookBackTimeA(unsigned sec);
678  virtual unsigned lookBackTimeB() const;
680  virtual void setLookBackTimeB(unsigned sec);
682  virtual unsigned dropOutDelay() const;
684  virtual void setDropOutDelay(unsigned sec);
686  virtual unsigned dwellTime() const;
688  virtual void setDwellTime(unsigned sec);
689 
691  virtual RevertChannel revertChannel() const;
693  virtual void setRevertChannel(RevertChannel type);
694 
696  virtual QString name() const;
698  virtual void setName(const QString &name);
699 
701  virtual bool hasMemberIndex(unsigned n) const;
703  virtual unsigned memberIndex(unsigned n) const;
705  virtual void setMemberIndex(unsigned n, unsigned idx);
707  virtual void clearMemberIndex(unsigned n);
708 
711  virtual ScanList *toScanListObj() const;
713  virtual bool linkScanListObj(ScanList *lst, Context &ctx) const;
715  virtual bool fromScanListObj(ScanList *lst, Context &ctx);
716  };
717 
720  {
721  protected:
723  ScanListBitmapElement(uint8_t *ptr, size_t size);
724 
725  public:
727  ScanListBitmapElement(uint8_t *ptr);
728 
730  static constexpr unsigned int size() { return 0x00000020; }
731  };
732 
737  class RadioIDElement: public Element
738  {
739  protected:
741  RadioIDElement(uint8_t *ptr, unsigned size);
742 
743  public:
745  RadioIDElement(uint8_t *ptr);
746 
748  static constexpr unsigned int size() { return 0x0020; }
749 
751  void clear();
752 
754  virtual unsigned number() const;
756  virtual void setNumber(unsigned number);
757 
759  virtual QString name() const;
761  virtual void setName(const QString &name);
762 
764  virtual bool fromRadioID(DMRRadioID *id);
766  virtual DMRRadioID *toRadioID() const;
767  };
768 
771  {
772  protected:
774  RadioIDBitmapElement(uint8_t *ptr, size_t size);
775 
776  public:
778  RadioIDBitmapElement(uint8_t *ptr);
779 
781  static constexpr unsigned int size() { return 0x0020; }
782  };
783 
792  {
793  public:
795  enum class AutoShutdown {
796  Off = 0, After10min = 1, After30min = 2, After60min = 3, After120min = 4,
797  };
798 
799  protected:
801  GeneralSettingsElement(uint8_t *ptr, unsigned size);
802 
803  public:
805  void clear();
806 
808  virtual bool keyToneEnabled() const = 0;
810  virtual void enableKeyTone(bool enable) = 0;
811 
813  virtual bool displayFrequency() const;
815  virtual void enableDisplayFrequency(bool enable);
817  virtual bool autoKeyLock() const;
819  virtual void enableAutoKeyLock(bool enable);
821  virtual Interval autoShutdownDelay() const;
823  virtual void setAutoShutdownDelay(Interval min);
829  virtual bool bootPassword() const;
831  virtual void enableBootPassword(bool enable);
833  virtual unsigned squelchLevelA() const;
835  virtual void setSquelchLevelA(unsigned level);
837  virtual unsigned squelchLevelB() const;
839  virtual void setSquelchLevelB(unsigned level);
840 
846  virtual unsigned dmrMicGain() const = 0;
848  virtual void setDMRMicGain(unsigned int gain) = 0;
849 
870 
891 
893  virtual Interval longPressDuration() const = 0;
895  virtual void setLongPressDuration(Interval ms) = 0;
896 
898  virtual bool knobLock() const = 0;
900  virtual void enableKnobLock(bool enable) = 0;
902  virtual bool keypadLock() const = 0;
904  virtual void enableKeypadLock(bool enable) = 0;
906  virtual bool sidekeysLock() const = 0;
908  virtual void enableSidekeysLock(bool enable) = 0;
910  virtual bool keyLockForced() const = 0;
912  virtual void enableKeyLockForced(bool enable) = 0;
913 
914  public:
916  virtual bool vfoModeA() const = 0;
918  virtual void enableVFOModeA(bool enable) = 0;
920  virtual bool vfoModeB() const = 0;
922  virtual void enableVFOModeB(bool enable) = 0;
923 
925  virtual unsigned memoryZoneA() const = 0;
927  virtual void setMemoryZoneA(unsigned zone) = 0;
929  virtual unsigned memoryZoneB() const = 0;
931  virtual void setMemoryZoneB(unsigned zone) = 0;
932 
934  virtual bool recording() const = 0;
936  virtual void enableRecording(bool enable) = 0;
937 
939  virtual unsigned brightness() const = 0;
941  virtual void setBrightness(unsigned level) = 0;
942 
944  virtual bool gps() const = 0;
946  virtual void enableGPS(bool enable) = 0;
948  virtual bool smsAlert() const = 0;
950  virtual void enableSMSAlert(bool enable) = 0;
952  virtual bool activeChannelB() const = 0;
954  virtual void enableActiveChannelB(bool enable) = 0;
956  virtual bool subChannel() const = 0;
958  virtual void enableSubChannel(bool enable) = 0;
960  virtual bool callAlert() const = 0;
962  virtual void enableCallAlert(bool enable) = 0;
963 
965  virtual QTimeZone gpsTimeZone() const = 0;
967  virtual void setGPSTimeZone(const QTimeZone &zone) = 0;
969  virtual bool dmrTalkPermit() const = 0;
971  virtual bool fmTalkPermit() const = 0;
973  virtual void enableDMRTalkPermit(bool enable) = 0;
975  virtual void enableFMTalkPermit(bool enable) = 0;
977  virtual bool dmrResetTone() const = 0;
979  virtual void enableDMRResetTone(bool enable) = 0;
980 
982  virtual bool idleChannelTone() const = 0;
984  virtual void enableIdleChannelTone(bool enable) = 0;
986  virtual Interval menuExitTime() const = 0;
988  virtual void setMenuExitTime(Interval intv) = 0;
990  virtual bool startupTone() const = 0;
992  virtual void enableStartupTone(bool enable) = 0;
994  virtual bool callEndPrompt() const = 0;
996  virtual void enableCallEndPrompt(bool enable) = 0;
998  virtual unsigned maxSpeakerVolume() const = 0;
1000  virtual void setMaxSpeakerVolume(unsigned level) = 0;
1002  virtual bool getGPSPosition() const = 0;
1004  virtual void enableGetGPSPosition(bool enable) = 0;
1005 
1007  virtual bool volumeChangePrompt() const = 0;
1009  virtual void enableVolumeChangePrompt(bool enable) = 0;
1018 
1020  virtual bool displayClock() const = 0;
1022  virtual void enableDisplayClock(bool enable) = 0;
1024  virtual bool enhanceAudio() const = 0;
1026  virtual void enableEnhancedAudio(bool enable) = 0;
1028  virtual Frequency minVFOScanFrequencyUHF() const = 0;
1030  virtual void setMinVFOScanFrequencyUHF(Frequency hz) = 0;
1032  virtual Frequency maxVFOScanFrequencyUHF() const = 0;
1034  virtual void setMaxVFOScanFrequencyUHF(Frequency hz) = 0;
1035 
1037  virtual Frequency minVFOScanFrequencyVHF() const = 0;
1039  virtual void setMinVFOScanFrequencyVHF(Frequency hz) = 0;
1041  virtual Frequency maxVFOScanFrequencyVHF() const = 0;
1043  virtual void setMaxVFOScanFrequencyVHF(Frequency hz) = 0;
1044 
1046  virtual bool hasAutoRepeaterOffsetFrequencyIndexUHF() const = 0;
1048  virtual unsigned autoRepeaterOffsetFrequencyIndexUHF() const = 0;
1050  virtual void setAutoRepeaterOffsetFrequenyIndexUHF(unsigned idx) = 0;
1054  virtual bool hasAutoRepeaterOffsetFrequencyIndexVHF() const = 0;
1056  virtual unsigned autoRepeaterOffsetFrequencyIndexVHF() const = 0;
1058  virtual void setAutoRepeaterOffsetFrequenyIndexVHF(unsigned idx) = 0;
1061 
1063  virtual bool showCurrentContact() const = 0;
1065  virtual void enableShowCurrentContact(bool enable) = 0;
1066 
1068  virtual void callToneMelody(Melody &melody) const = 0;
1070  virtual void setCallToneMelody(const Melody &melody) = 0;
1072  virtual void idleToneMelody(Melody &melody) const = 0;
1074  virtual void setIdleToneMelody(const Melody &melody) = 0;
1076  virtual void resetToneMelody(Melody &melody) const = 0;
1078  virtual void setResetToneMelody(const Melody &melody) = 0;
1079 
1081  virtual bool defaultChannel() const = 0;
1083  virtual void enableDefaultChannel(bool enable) = 0;
1085  virtual unsigned defaultZoneIndexA() const = 0;
1087  virtual void setDefaultZoneIndexA(unsigned idx) = 0;
1089  virtual unsigned defaultZoneIndexB() const = 0;
1091  virtual void setDefaultZoneIndexB(unsigned idx) = 0;
1093  virtual bool defaultChannelAIsVFO() const = 0;
1096  virtual unsigned defaultChannelAIndex() const = 0;
1098  virtual void setDefaultChannelAIndex(unsigned idx) = 0;
1100  virtual void setDefaultChannelAToVFO() = 0;
1102  virtual bool defaultChannelBIsVFO() const = 0;
1105  virtual unsigned defaultChannelBIndex() const = 0;
1107  virtual void setDefaultChannelBIndex(unsigned idx) = 0;
1109  virtual void setDefaultChannelBToVFO() = 0;
1110 
1112  virtual bool displayCall() const = 0;
1114  virtual void enableDisplayCall(bool enable) = 0;
1115 
1120 
1122  virtual bool gpsUnitsImperial() const = 0;
1124  virtual void enableGPSUnitsImperial(bool enable) = 0;
1125 
1134 
1147 
1149  virtual bool showLastHeard() const = 0;
1151  virtual void enableShowLastHeard(bool enable) = 0;
1152 
1154  virtual bool keepLastCaller() const = 0;
1156  virtual void enableKeepLastCaller(bool enable) = 0;
1157 
1159  virtual bool fromConfig(const Flags &flags, Context &ctx);
1161  virtual bool updateConfig(Context &ctx);
1163  virtual bool linkSettings(RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack());
1164 
1165  protected:
1167  struct Offset {
1169  static constexpr unsigned int displayMode() { return 0x0001; }
1170  static constexpr unsigned int autoKeyLock() { return 0x0002; }
1171  static constexpr unsigned int autoShutDown() { return 0x0003; }
1172  static constexpr unsigned int bootDisplay() { return 0x0006; }
1173  static constexpr unsigned int bootPassword() { return 0x0007; }
1174  static constexpr unsigned int squelchLevelA() { return 0x0009; }
1175  static constexpr unsigned int squelchLevelB() { return 0x000a; }
1177  };
1178  };
1179 
1187  {
1188  protected:
1190  ExtendedSettingsElement(uint8_t *ptr, unsigned size);
1191 
1192  public:
1194  virtual bool sendTalkerAlias() const = 0;
1196  virtual void enableSendTalkerAlias(bool enable) = 0;
1197 
1199  virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource() const = 0;
1201  virtual void setTalkerAliasSource(AnytoneDMRSettingsExtension::TalkerAliasSource mode) = 0;
1202 
1204  virtual AnytoneDMRSettingsExtension::TalkerAliasEncoding talkerAliasEncoding() const = 0;
1206  virtual void setTalkerAliasEncoding(AnytoneDMRSettingsExtension::TalkerAliasEncoding encoding) = 0;
1207 
1212 
1217 
1222 
1224  virtual bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
1226  virtual bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1228  virtual bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1229  };
1230 
1237  {
1238  protected:
1240  ZoneChannelListElement(uint8_t *ptr, unsigned size);
1241 
1242  public:
1244  ZoneChannelListElement(uint8_t *ptr);
1245 
1247  static constexpr unsigned int size() { return 0x0400; }
1248 
1250  void clear();
1251 
1253  virtual bool hasChannelA(unsigned n) const;
1255  virtual unsigned channelIndexA(unsigned n) const;
1257  virtual void setChannelIndexA(unsigned n, unsigned idx);
1259  virtual void clearChannelIndexA(unsigned n);
1260 
1262  virtual bool hasChannelB(unsigned n) const;
1264  virtual unsigned channelIndexB(unsigned n) const;
1266  virtual void setChannelIndexB(unsigned n, unsigned idx);
1268  virtual void clearChannelIndexB(unsigned n);
1269  };
1270 
1273  {
1274  protected:
1276  ZoneBitmapElement(uint8_t *ptr, size_t size);
1277 
1278  public:
1280  ZoneBitmapElement(uint8_t *ptr);
1281 
1283  static constexpr unsigned int size() { return 0x0020; }
1284  };
1285 
1291  {
1292  protected:
1294  BootSettingsElement(uint8_t *ptr, unsigned size);
1295 
1296  public:
1298  BootSettingsElement(uint8_t *ptr);
1299 
1301  static constexpr unsigned int size() { return 0x0030; }
1302 
1304  void clear();
1305 
1307  virtual QString introLine1() const;
1309  virtual void setIntroLine1(const QString &txt);
1311  virtual QString introLine2() const;
1313  virtual void setIntroLine2(const QString &txt);
1314 
1316  virtual QString password() const;
1318  virtual void setPassword(const QString &txt);
1319 
1321  virtual bool fromConfig(const Flags &flags, Context &ctx);
1323  virtual bool updateConfig(Context &ctx);
1324  };
1325 
1331  {
1332  protected:
1334  DMRAPRSSettingsElement(uint8_t *ptr, unsigned size);
1335 
1336  public:
1338  explicit DMRAPRSSettingsElement(uint8_t *ptr);
1339 
1341  static constexpr unsigned int size() { return 0x0030; }
1342 
1344  void clear();
1345 
1347  virtual unsigned manualInterval() const;
1349  virtual void setManualInterval(unsigned sec);
1350 
1352  virtual bool automatic() const;
1354  virtual unsigned automaticInterval() const;
1356  virtual void setAutomaticInterval(unsigned sec);
1358  virtual void disableAutomatic();
1359 
1361  virtual bool fixedLocation() const;
1363  virtual QGeoCoordinate location() const;
1365  virtual void setLocation(const QGeoCoordinate &pos);
1367  virtual void enableFixedLocation(bool enable);
1368 
1370  virtual Channel::Power power() const;
1372  virtual void setPower(Channel::Power power);
1373 
1375  virtual bool hasChannel(unsigned n) const;
1377  virtual bool channelIsVFOA(unsigned n) const;
1379  virtual bool channelIsVFOB(unsigned n) const;
1381  virtual bool channelIsSelected(unsigned n) const;
1383  virtual unsigned channelIndex(unsigned n) const;
1385  virtual void setChannelIndex(unsigned n, unsigned idx);
1387  virtual void setChannelVFOA(unsigned n);
1389  virtual void setChannelVFOB(unsigned n);
1391  virtual void setChannelSelected(unsigned n);
1393  virtual void clearChannel(unsigned n);
1394 
1396  virtual unsigned destination() const;
1398  virtual void setDestination(unsigned id);
1399 
1401  virtual DMRContact::Type callType() const;
1403  virtual void setCallType(DMRContact::Type type);
1404 
1406  virtual bool timeSlotOverride() const;
1408  virtual DMRChannel::TimeSlot timeslot() const;
1410  virtual void overrideTimeSlot(DMRChannel::TimeSlot ts);
1412  virtual void disableTimeSlotOverride();
1413 
1415  virtual bool fromConfig(const Flags &flags, Context &ctx);
1417  virtual bool createGPSSystem(uint8_t i, Context &ctx);
1419  virtual bool linkGPSSystem(uint8_t i, Context &ctx);
1420  };
1421 
1424  {
1425  protected:
1427  DMRAPRSMessageElement(uint8_t *ptr, size_t size);
1428 
1429  public:
1431  DMRAPRSMessageElement(uint8_t *ptr);
1432 
1434  static constexpr unsigned int size() { return 0x0030; }
1435 
1436  void clear();
1437 
1439  virtual QString message() const;
1441  void setMessage(const QString &message);
1442 
1444  virtual bool fromConfig(Codeplug::Flags flags, Context &ctx);
1446  virtual bool updateConfig(Context &ctx) const;
1447 
1448  public:
1450  struct Limit {
1451  static constexpr unsigned int length() { return 32; }
1452  };
1453 
1454  protected:
1456  struct Offset {
1458  static constexpr unsigned int message() { return 0x0000; }
1460  };
1461  };
1462 
1468  {
1469  protected:
1471  RepeaterOffsetListElement(uint8_t *ptr, size_t size);
1472 
1473  public:
1475  explicit RepeaterOffsetListElement(uint8_t *ptr);
1476 
1478  static constexpr unsigned int size() { return 0x03f0; }
1479 
1480  void clear();
1481 
1483  virtual bool isSet(unsigned int n) const;
1485  virtual Frequency offset(unsigned int n) const;
1487  virtual void setOffset(unsigned int n, Frequency freq);
1489  virtual void clearOffset(unsigned int n);
1490 
1491  public:
1493  struct Limit {
1494  static constexpr unsigned int numEntries() { return 250; }
1495  };
1496 
1497  protected:
1499  struct Offset {
1501  static constexpr unsigned int frequencies() { return 0x0000; }
1502  static constexpr unsigned int betweenFrequencies() { return sizeof(uint32_t); }
1504  };
1505  };
1506 
1514  {
1515  protected:
1517  MessageListElement(uint8_t *ptr, unsigned size);
1518 
1519  public:
1521  explicit MessageListElement(uint8_t *ptr);
1522 
1524  static constexpr unsigned int size() { return 0x0010; }
1525 
1527  void clear();
1528 
1530  virtual bool hasNext() const;
1532  virtual unsigned next() const;
1534  virtual void setNext(unsigned idx);
1536  virtual void clearNext();
1537 
1539  virtual bool hasIndex() const;
1541  virtual unsigned index() const;
1543  virtual void setIndex(unsigned idx);
1545  virtual void clearIndex();
1546  };
1547 
1552  class MessageElement: public Element
1553  {
1554  protected:
1556  MessageElement(uint8_t *ptr, unsigned size);
1557 
1558  public:
1560  MessageElement(uint8_t *ptr);
1561 
1563  static constexpr unsigned int size() { return 0x0100; }
1564 
1566  void clear();
1567 
1569  virtual QString message() const;
1571  virtual void setMessage(const QString &msg);
1572  };
1573 
1576  {
1577  protected:
1579  MessageBytemapElement(uint8_t *ptr, size_t size);
1580 
1581  public:
1583  MessageBytemapElement(uint8_t *ptr);
1584 
1586  static constexpr unsigned int size() { return 0x0090; }
1587  };
1588 
1594  {
1595  public:
1597  enum class Type {
1598  None = 0,
1599  DTMF = 1,
1600  TwoTone = 2,
1601  FiveTone = 3
1602  };
1603 
1604  protected:
1606  AnalogQuickCallElement(uint8_t *ptr, unsigned size);
1607 
1608  public:
1610  explicit AnalogQuickCallElement(uint8_t *ptr);
1611 
1613  static constexpr unsigned int size() { return 0x0002; }
1614 
1616  void clear();
1617 
1619  virtual Type type() const;
1621  virtual void setType(Type type);
1622 
1624  virtual bool hasContactIndex() const;
1626  virtual unsigned contactIndex() const;
1628  virtual void setContactIndex(unsigned idx);
1630  virtual void clearContactIndex();
1631  };
1632 
1638  {
1639  protected:
1641  AnalogQuickCallsElement(uint8_t *ptr, size_t size);
1642 
1643  public:
1645  AnalogQuickCallsElement(uint8_t *ptr);
1646 
1648  static constexpr unsigned int size() { return 0x0100; }
1649 
1651  void clear();
1652 
1654  uint8_t *quickCall(unsigned int n) const;
1655 
1656  public:
1658  struct Limit {
1659  static constexpr unsigned int numEntries() { return 4; }
1660  };
1661 
1662  protected:
1664  struct Offset {
1666  static constexpr unsigned int quickCalls() { return 0x0000; }
1668  };
1669  };
1670 
1676  {
1677  protected:
1679  StatusMessagesElement(uint8_t *ptr, size_t size);
1680 
1681  public:
1683  StatusMessagesElement(uint8_t *ptr);
1684 
1686  static constexpr unsigned int size() { return 0x0400; }
1687 
1688  void clear();
1689 
1691  virtual QString message(unsigned int n) const;
1693  virtual void setMessage(unsigned int n, const QString &msg);
1694 
1695  public:
1697  struct Limit {
1698  static constexpr unsigned int numMessages() { return 32; }
1699  static constexpr unsigned int messageLength() { return 32; }
1700  };
1701 
1702  protected:
1704  struct Offset {
1706  static constexpr unsigned int messages() { return 0x0000; }
1707  static constexpr unsigned int betweenMessages() { return 0x0020; }
1709  };
1710  };
1711 
1714  {
1715  protected:
1717  StatusMessageBitmapElement(uint8_t *ptr, size_t size);
1718 
1719  public:
1721  StatusMessageBitmapElement(uint8_t *ptr);
1722 
1724  static constexpr unsigned int size() { return 0x0010; }
1725  };
1726 
1731  class HotKeyElement: public Element
1732  {
1733  public:
1735  enum class Type {
1736  Call = 0,
1737  Menu = 1
1738  };
1739 
1741  enum class MenuItem {
1742  SMS = 1,
1743  NewSMS = 2,
1744  HotText = 3,
1745  Inbox = 4,
1746  Outbox = 5,
1747  Contacts = 6,
1748  ManualDial = 7,
1749  CallLog = 8
1750  };
1751 
1753  enum class CallType {
1754  Analog = 0,
1755  Digital = 1
1756  };
1757 
1759  enum class DigiCallType {
1760  Off = 0xff,
1761  GroupCall = 0,
1762  PrivateCall= 1,
1763  AllCall = 2,
1764  HotText = 3,
1765  CallTip = 4,
1766  StatusMessage = 5
1767  };
1768 
1769  protected:
1771  HotKeyElement(uint8_t *ptr, unsigned size);
1772 
1773  public:
1775  explicit HotKeyElement(uint8_t *ptr);
1776 
1778  static constexpr unsigned int size() { return 0x0030; }
1779 
1781  void clear();
1782 
1784  virtual Type type() const;
1786  virtual void setType(Type type);
1787 
1789  virtual MenuItem menuItem() const;
1792  virtual void setMenuItem(MenuItem item);
1793 
1795  virtual CallType callType() const;
1798  virtual void setCallType(CallType type);
1799 
1802  virtual DigiCallType digiCallType() const;
1805  virtual void setDigiCallType(DigiCallType type);
1806 
1808  virtual bool hasContactIndex() const;
1812  virtual unsigned contactIndex() const;
1815  virtual void setContactIndex(unsigned idx);
1817  virtual void clearContactIndex();
1818 
1820  virtual bool hasMessageIndex() const;
1823  virtual unsigned messageIndex() const;
1825  virtual void setMessageIndex(unsigned idx);
1827  virtual void clearMessageIndex();
1828  };
1829 
1837  {
1838  protected:
1840  HotKeySettingsElement(uint8_t *ptr, size_t size);
1841 
1842  public:
1844  HotKeySettingsElement(uint8_t *ptr);
1845 
1847  static constexpr unsigned int size() { return 0x0360; }
1848 
1849  void clear();
1850 
1852  virtual uint8_t *hotKeySetting(unsigned int n) const;
1853 
1854  public:
1856  struct Limit {
1857  static constexpr unsigned int numEntries() { return 18; }
1858  };
1859 
1860  protected:
1862  struct Offset {
1864  static constexpr unsigned int hotKeySettings() { return 0x0000; }
1865  static constexpr unsigned int betweenHotKeySettings() { return HotKeySettingsElement::size(); }
1867  };
1868  };
1869 
1875  {
1876  public:
1881  class AnalogAlarm: public Element
1882  {
1883  public:
1885  enum class Action {
1886  None = 0,
1887  Background = 1,
1888  TXAlarm = 2,
1889  Both = 3,
1890  };
1891 
1893  enum class ENIType {
1894  None = 0,
1895  DTMF = 1,
1896  FiveTone = 2
1897  };
1898 
1899  protected:
1901  AnalogAlarm(uint8_t *ptr, unsigned size);
1902 
1903  public:
1905  AnalogAlarm(uint8_t *ptr);
1906 
1908  static constexpr unsigned int size() { return 0x000a; }
1909 
1911  void clear();
1912 
1914  virtual Action action() const;
1916  virtual void setAction(Action action);
1917 
1919  virtual ENIType encodingType() const;
1921  virtual void setEncodingType(ENIType type);
1922 
1924  virtual unsigned emergencyIndex() const;
1926  virtual void setEmergencyIndex(unsigned idx);
1927 
1929  virtual unsigned duration() const;
1931  virtual void setDuration(unsigned sec);
1933  virtual unsigned txDuration() const;
1935  virtual void setTXDuration(unsigned sec);
1937  virtual unsigned rxDuration() const;
1939  virtual void setRXDuration(unsigned sec);
1940 
1942  virtual bool channelIsSelected() const;
1944  virtual unsigned channelIndex() const;
1946  virtual void setChannelIndex(unsigned idx);
1948  virtual void setChannelSelected();
1949 
1951  virtual bool repeatContinuously() const;
1953  virtual unsigned repetitions() const;
1955  virtual void setRepetitions(unsigned num);
1957  virtual void setRepatContinuously();
1958  };
1959 
1964  class DigitalAlarm: public Element
1965  {
1966  public:
1968  enum class Action {
1969  None = 0,
1970  Background = 1,
1971  NonLocal = 2,
1972  Local = 3,
1973  };
1974 
1975  protected:
1977  DigitalAlarm(uint8_t *ptr, unsigned size);
1978 
1979  public:
1981  explicit DigitalAlarm(uint8_t *ptr);
1982 
1984  static constexpr unsigned int size() { return 0x000c; }
1985 
1987  void clear();
1988 
1990  virtual Action action() const;
1992  virtual void setAction(Action action);
1993 
1995  virtual unsigned duration() const;
1997  virtual void setDuration(unsigned sec);
1999  virtual unsigned txDuration() const;
2001  virtual void setTXDuration(unsigned sec);
2003  virtual unsigned rxDuration() const;
2005  virtual void setRXDuration(unsigned sec);
2006 
2008  virtual bool channelIsSelected() const;
2010  virtual unsigned channelIndex() const;
2012  virtual void setChannelIndex(unsigned idx);
2014  virtual void setChannelSelected();
2015 
2017  virtual bool repeatContinuously() const;
2019  virtual unsigned repetitions() const;
2021  virtual void setRepetitions(unsigned num);
2023  virtual void setRepatContinuously();
2024 
2026  virtual unsigned voiceBroadcastDuration() const;
2028  virtual void setVoiceBroadcastDuration(unsigned min);
2030  virtual unsigned areaBroadcastDuration() const;
2032  virtual void setAreaBroadcastDuration(unsigned min);
2033 
2035  virtual bool vox() const;
2037  virtual void enableVOX(bool enable);
2039  virtual bool rxAlarm() const;
2041  virtual void enableRXAlarm(bool enable);
2042  };
2043 
2044  protected:
2046  AlarmSettingElement(uint8_t *ptr, unsigned size);
2047 
2048  public:
2050  AlarmSettingElement(uint8_t *ptr);
2051 
2053  static constexpr unsigned int size() { return 0x0020; }
2054 
2056  void clear();
2057 
2059  virtual uint8_t *analog() const;
2061  virtual uint8_t *digital() const;
2062 
2063  protected:
2065  struct Offset {
2067  static constexpr unsigned int analog() { return 0x0000; }
2068  static constexpr unsigned int digital() { return 0x000a; }
2070  };
2071  };
2072 
2078  {
2079  protected:
2081  DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size);
2082 
2083  public:
2085  DigitalAlarmExtensionElement(uint8_t *ptr);
2086 
2088  static constexpr unsigned int size() { return 0x0030; }
2089 
2091  void clear();
2092 
2094  virtual DMRContact::Type callType() const;
2096  virtual void setCallType(DMRContact::Type type);
2097 
2099  virtual unsigned destination() const;
2101  virtual void setDestination(unsigned number);
2102 
2103  protected:
2105  struct Offset {
2107  static constexpr unsigned int callType() { return 0x0000; }
2108  static constexpr unsigned int destination() { return 0x0023; }
2110  };
2111  };
2112 
2118  {
2119  public:
2121  enum class Standard {
2122  ZVEI1 = 0, ZVEI2, ZVEI3, PZVEI, DZVEI, PDZVEI, CCIR1, CCIR2, PCCIR, EEA, EuroSignal, NATEL,
2123  MODAT, CCITT, EIA
2124  };
2125 
2126  protected:
2128  FiveToneIDElement(uint8_t *ptr, unsigned size);
2129 
2130  public:
2132  FiveToneIDElement(uint8_t *ptr);
2133 
2135  static constexpr unsigned int size() { return 0x0020; }
2136 
2138  void clear();
2139 
2141  virtual Standard standard() const;
2143  virtual void setStandard(Standard std);
2144 
2146  virtual unsigned toneDuration() const;
2148  virtual void setToneDuration(unsigned ms);
2149 
2151  virtual QString id() const;
2153  virtual void setID(const QString &id);
2154 
2156  virtual QString name() const;
2158  virtual void setName(const QString &name);
2159  };
2160 
2163  {
2164  protected:
2166  FiveToneIDBitmapElement(uint8_t *ptr, size_t size);
2167 
2168  public:
2170  FiveToneIDBitmapElement(uint8_t *ptr);
2171 
2173  static constexpr unsigned int size() { return 0x0010; }
2174  };
2175 
2181  {
2182  protected:
2184  FiveToneIDListElement(uint8_t *ptr, size_t size);
2185 
2186  public:
2188  FiveToneIDListElement(uint8_t *ptr);
2189 
2191  static constexpr unsigned int size() { return 0x0c80; }
2192 
2193  void clear();
2194 
2196  virtual uint8_t *member(unsigned int n) const;
2197 
2198  public:
2200  struct Limit {
2201  static constexpr unsigned int numEntries() { return 100; }
2202  };
2203  };
2204 
2210  {
2211  public:
2213  enum class Function {
2214  OpenSquelch=0, CallAll, EmergencyAlarm, RemoteKill, RemoteStun, RemoteWakeup,
2215  GroupCall
2216  };
2217 
2219  enum class Response {
2220  None=0, Tone, ToneRespond
2221  };
2222 
2223  protected:
2225  FiveToneFunctionElement(uint8_t *ptr, unsigned size);
2226 
2227  public:
2229  explicit FiveToneFunctionElement(uint8_t *ptr);
2230 
2232  static constexpr unsigned int size() { return 0x0020; }
2233 
2235  void clear();
2236 
2238  virtual Function function() const;
2240  virtual void setFunction(Function function);
2242  virtual Response response() const;
2244  virtual void setResponse(Response response);
2245 
2247  virtual QString id() const;
2249  virtual void setID(const QString &id);
2250 
2252  virtual QString name() const;
2254  virtual void setName(const QString &name);
2255  };
2256 
2262  {
2263  protected:
2265  FiveToneFunctionListElement(uint8_t *ptr, size_t size);
2266 
2267  public:
2269  FiveToneFunctionListElement(uint8_t *ptr);
2270 
2272  static constexpr unsigned int size() { return 0x0200; }
2273 
2274  void clear();
2275 
2277  virtual uint8_t *function(unsigned int n) const;
2278 
2279  public:
2281  struct Limit {
2282  static constexpr unsigned int numFunctions() { return 16; }
2283  };
2284  };
2285 
2291  {
2292  public:
2294  enum class Response {
2295  None = 0, Tone, ToneRespond
2296  };
2299 
2300  protected:
2302  FiveToneSettingsElement(uint8_t *ptr, unsigned size);
2303 
2304  public:
2306  FiveToneSettingsElement(uint8_t *ptr);
2307 
2309  static constexpr unsigned int size() { return 0x0080; }
2310 
2312  void clear();
2313 
2315  virtual Response decodingResponse() const;
2317  virtual void setDecodingResponse(Response response);
2318 
2320  virtual Standard decodingStandard() const;
2322  virtual void setDecodingStandard(Standard standard);
2323 
2325  virtual unsigned decodingToneDuration() const;
2327  virtual void setDecodingToneDuration(unsigned ms);
2328 
2330  virtual QString id() const;
2332  virtual void setID(const QString &id);
2333 
2335  virtual unsigned postEncodeDelay() const;
2337  virtual void setPostEncodeDelay(unsigned ms);
2338 
2340  virtual bool hasPTTID() const;
2342  virtual unsigned pttID() const;
2344  virtual void setPTTID(unsigned id);
2346  virtual void clearPTTID();
2347 
2349  virtual unsigned autoResetTime() const;
2351  virtual void setAutoResetTime(unsigned s);
2352 
2354  virtual unsigned firstDelay() const;
2356  virtual void setFirstDelay(unsigned ms);
2357 
2359  virtual bool sidetoneEnabled() const;
2361  virtual void enableSidetone(bool enable);
2363  virtual unsigned stopCode() const;
2365  virtual void setStopCode(unsigned code);
2367  virtual unsigned stopTime() const;
2369  virtual void setStopTime(unsigned ms);
2371  virtual unsigned decodeTime() const;
2373  virtual void setDecodeTime(unsigned ms);
2375  virtual unsigned delayAfterStop() const;
2377  virtual void setDelayAfterStop(unsigned ms);
2379  virtual unsigned preTime() const;
2381  virtual void setPreTime(unsigned ms);
2382 
2384  virtual Standard botStandard() const;
2386  virtual void setBOTStandard(Standard standard);
2388  virtual unsigned botToneDuration() const;
2390  virtual void setBOTToneDuration(unsigned ms);
2392  virtual QString botID() const;
2394  virtual void setBOTID(const QString &id);
2395 
2397  virtual Standard eotStandard() const;
2399  virtual void setEOTStandard(Standard standard);
2401  virtual unsigned eotToneDuration() const;
2403  virtual void setEOTToneDuration(unsigned ms);
2405  virtual QString eotID() const;
2407  virtual void setEOTID(const QString &id);
2408  };
2409 
2415  {
2416  protected:
2418  TwoToneIDElement(uint8_t *ptr, unsigned size);
2419 
2420  public:
2422  TwoToneIDElement(uint8_t *ptr);
2423 
2425  static constexpr unsigned int size() { return 0x0010; }
2426 
2428  void clear();
2429 
2431  virtual double firstTone() const;
2433  virtual void setFirstTone(double f);
2434 
2436  virtual double secondTone() const;
2438  virtual void setSecondTone(double f);
2439 
2441  virtual QString name() const;
2443  virtual void setName(const QString &name);
2444 
2445  public:
2447  struct Limit {
2448  static constexpr unsigned int nameLength() { return 7; }
2449  };
2450 
2451  protected:
2453  struct Offset {
2455  static constexpr unsigned int firstTone() { return 0x0000; }
2456  static constexpr unsigned int secondTone() { return 0x0002; }
2457  static constexpr unsigned int name() { return 0x0008; }
2459  };
2460  };
2461 
2464  {
2465  protected:
2467  TwoToneIDBitmapElement(uint8_t *ptr, size_t size);
2468 
2469  public:
2471  TwoToneIDBitmapElement(uint8_t *ptr);
2472 
2474  static constexpr unsigned int size() { return 0x0010; }
2475  };
2476 
2482  {
2483  public:
2485  enum class Response {
2486  None = 0, Tone, ToneRespond
2487  };
2488 
2489  protected:
2491  TwoToneFunctionElement(uint8_t *ptr, unsigned size);
2492 
2493  public:
2495  TwoToneFunctionElement(uint8_t *ptr);
2496 
2498  static constexpr unsigned int size() { return 0x0020; }
2499 
2501  void clear();
2502 
2504  virtual double firstTone() const;
2506  virtual void setFirstTone(double f);
2507 
2509  virtual double secondTone() const;
2511  virtual void setSecondTone(double f);
2512 
2514  virtual Response response() const;
2516  virtual void setResponse(Response resp);
2517 
2519  virtual QString name() const;
2521  virtual void setName(const QString &name);
2522 
2523  public:
2525  struct Limit {
2526  static constexpr unsigned int nameLength() { return 7; }
2527  };
2528 
2529  protected:
2531  struct Offset {
2533  static constexpr unsigned int firstTone() { return 0x0000; }
2534  static constexpr unsigned int secondTone() { return 0x0002; }
2535  static constexpr unsigned int response() { return 0x0004; }
2536  static constexpr unsigned int name() { return 0x0005; }
2538  };
2539  };
2540 
2543  {
2544  protected:
2546  TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size);
2547 
2548  public:
2550  TwoToneFunctionBitmapElement(uint8_t *ptr);
2551 
2553  static constexpr unsigned int size() { return 0x0010; }
2554  };
2555 
2561  {
2562  protected:
2564  TwoToneSettingsElement(uint8_t *ptr, unsigned size);
2565 
2566  public:
2568  TwoToneSettingsElement(uint8_t *ptr);
2569 
2571  static constexpr unsigned int size() { return 0x0010; }
2572 
2574  void clear();
2575 
2577  virtual unsigned firstToneDuration() const;
2579  virtual void setFirstToneDuration(unsigned ms);
2580 
2582  virtual unsigned secondToneDuration() const;
2584  virtual void setSecondToneDuration(unsigned ms);
2585 
2587  virtual unsigned longToneDuration() const;
2589  virtual void setLongToneDuration(unsigned ms);
2590 
2592  virtual unsigned gapDuration() const;
2594  virtual void setGapDuration(unsigned ms);
2595 
2597  virtual unsigned autoResetTime() const;
2599  virtual void setAutoResetTime(unsigned sec);
2600 
2602  virtual bool sidetone() const;
2604  virtual void enableSidetone(bool enable);
2605  };
2606 
2612  {
2613  public:
2615  enum Response {
2616  None=0, Tone, ToneRespond
2617  };
2618 
2619  protected:
2621  DTMFSettingsElement(uint8_t *ptr, unsigned size);
2622 
2623  public:
2625  explicit DTMFSettingsElement(uint8_t *ptr);
2626 
2628  static constexpr unsigned int size() { return 0x0050; }
2629 
2631  void clear();
2632 
2634  virtual unsigned intervalSymbol() const;
2636  virtual void setIntervalSymbol(unsigned symb);
2637 
2639  virtual unsigned groupCode() const;
2641  virtual void setGroupCode(unsigned symb);
2642 
2644  virtual Response response() const;
2646  virtual void setResponse(Response resp);
2647 
2649  virtual unsigned preTime() const;
2651  virtual void setPreTime(unsigned ms);
2652 
2654  virtual unsigned firstDigitDuration() const;
2656  virtual void setFirstDigitDuration(unsigned ms);
2657 
2659  virtual unsigned autoResetTime() const;
2661  virtual void setAutoResetTime(unsigned sec);
2662 
2664  virtual QString id() const;
2666  virtual void setID(const QString &id);
2667 
2669  virtual unsigned postEncodingDelay() const;
2671  virtual void setPostEncodingDelay(unsigned ms);
2672 
2674  virtual unsigned pttIDPause() const;
2676  virtual void setPTTIDPause(unsigned sec);
2677 
2679  virtual bool pttIDEnabled() const;
2681  virtual void enablePTTID(bool enable);
2682 
2684  virtual unsigned dCodePause() const;
2686  virtual void setDCodePause(unsigned sec);
2687 
2689  virtual bool sidetone() const;
2691  virtual void enableSidetone(bool enable);
2692 
2694  virtual QString botID() const;
2696  virtual void setBOTID(const QString &id);
2697 
2699  virtual QString eotID() const;
2701  virtual void setEOTID(const QString &id);
2702 
2704  virtual QString remoteKillID() const;
2706  virtual void setRemoteKillID(const QString &id);
2707 
2709  virtual QString remoteStunID() const;
2711  virtual void setRemoteStunID(const QString &id);
2712  };
2713 
2719  {
2720  protected:
2722  DTMFIDListElement(uint8_t *ptr, size_t size);
2723 
2724  public:
2726  DTMFIDListElement(uint8_t *ptr);
2727 
2729  static constexpr unsigned int size() { return 0x0100; }
2730 
2731  void clear();
2732 
2734  virtual bool hasNumber(unsigned int n) const;
2736  virtual QString number(unsigned int n) const;
2738  virtual void setNumber(unsigned int n, const QString &number);
2740  virtual void clearNumber(unsigned int n);
2741 
2742  public:
2744  struct Limit {
2745  static constexpr unsigned int numEntries() { return 16; }
2746  static constexpr unsigned int numberLength() { return 16; }
2747  };
2748  };
2749 
2755  {
2756  protected:
2758  WFMChannelListElement(uint8_t *ptr, size_t size);
2759 
2760  public:
2762  explicit WFMChannelListElement(uint8_t *ptr);
2763 
2765  static constexpr unsigned int size() { return 0x0200; }
2766 
2767  void clear();
2768 
2770  virtual bool hasChannel(unsigned int n) const;
2772  virtual Frequency channel(unsigned int n) const;
2774  virtual void setChannel(unsigned int n, Frequency freq);
2776  virtual void clearChannel(unsigned int n);
2777 
2778  public:
2780  struct Limit {
2781  static constexpr unsigned int numEntries() { return 100; }
2782  };
2783 
2784  protected:
2786  struct Offset {
2788  static constexpr unsigned int betweenChannels() { return 0x0004; }
2790  };
2791  };
2792 
2795  {
2796  protected:
2798  WFMChannelBitmapElement(uint8_t *ptr, size_t size);
2799 
2800  public:
2802  WFMChannelBitmapElement(uint8_t *ptr);
2803 
2805  static constexpr unsigned int size() { return 0x0020; }
2806  };
2807 
2809  class WFMVFOElement: public Element
2810  {
2811  protected:
2813  WFMVFOElement(uint8_t *ptr, size_t size);
2814 
2815  public:
2817  WFMVFOElement(uint8_t *ptr);
2818 
2820  static constexpr unsigned int size() { return 0x0010; }
2821 
2822  void clear();
2823 
2825  virtual Frequency frequency() const;
2827  virtual void setFrequency(Frequency freq);
2828  };
2829 
2832  {
2833  protected:
2835  DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size);
2836 
2837  public:
2839  DMREncryptionKeyIDListElement(uint8_t *ptr);
2840 
2842  static constexpr unsigned int size() { return 0x0040; }
2843 
2844  void clear();
2845 
2847  virtual bool hasID(unsigned int n) const;
2849  virtual uint16_t id(unsigned int n) const;
2851  virtual void setID(unsigned int n, uint16_t id);
2853  virtual void clearID(unsigned int n);
2854 
2855  public:
2857  struct Limit {
2858  static constexpr unsigned int numEntries() { return 32; }
2859  };
2860 
2861  protected:
2863  struct Offset {
2865  static constexpr unsigned int betweenIDs() { return 0x0002; }
2867  };
2868  };
2869 
2872  {
2873  protected:
2875  DMREncryptionKeyListElement(uint8_t *ptr, size_t size);
2876 
2877  public:
2879  DMREncryptionKeyListElement(uint8_t *ptr);
2880 
2882  static constexpr unsigned int size() { return 0x0500; }
2883 
2884  void clear();
2885 
2887  QByteArray key(unsigned int n) const;
2889  void setKey(unsigned int n, const QByteArray &key);
2890 
2891  public:
2893  struct Limit {
2894  static constexpr unsigned numEntries() { return DMREncryptionKeyIDListElement::Limit::numEntries(); }
2895  };
2896 
2897  protected:
2899  struct Offset {
2901  static constexpr unsigned int keys() { return 0x0010; }
2902  static constexpr unsigned int betweenKeys() { return 0x0028; }
2904  };
2905  };
2906 
2912  {
2913  protected:
2915  ContactMapElement(uint8_t *ptr, unsigned size);
2916 
2917  public:
2919  ContactMapElement(uint8_t *ptr);
2920 
2922  static constexpr unsigned int size() { return 0x0008; }
2923 
2925  void clear();
2927  bool isValid() const;
2928 
2930  virtual bool isGroup() const;
2932  virtual unsigned id() const;
2934  virtual void setID(unsigned id, bool group=false);
2936  virtual unsigned index() const;
2938  virtual void setIndex(unsigned idx);
2939  };
2940 
2941 protected:
2943  AnytoneCodeplug(const QString &label, QObject *parent=nullptr);
2944 
2945 public:
2947  virtual ~AnytoneCodeplug();
2948 
2950  virtual void clear();
2951 
2952  Config *preprocess(Config *config, const ErrorStack &err) const;
2953  bool encode(Config *config, const Flags &flags, const ErrorStack &err);
2954 
2955  bool decode(Config *config, const ErrorStack &err);
2956  bool postprocess(Config *config, const ErrorStack &err) const;
2957 
2958 protected:
2959  virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
2960 
2962  virtual bool allocateBitmaps() = 0;
2964  virtual void setBitmaps(Context &ctx) = 0;
2965 
2968  virtual void allocateUpdated() = 0;
2971  virtual void allocateForDecoding() = 0;
2973  virtual void allocateForEncoding() = 0;
2974 
2976  virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2978  virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2979 
2980 protected:
2982  QString _label;
2983 
2984  // Allow access to protected allocation methods.
2985  friend class AnytoneRadio;
2986 };
2987 
2988 #endif // ANYTONECODEPLUG_HH
Direction
Encodes the auto-repeater offset sign.
Definition: anytone_extension.hh:1420
BootDisplay
What to display during boot.
Definition: anytone_extension.hh:383
Represents the base class of an analog alarm setting for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1882
virtual void setAction(Action action)
Sets the alarm action.
Definition: anytone_codeplug.cc:2998
virtual void setEmergencyIndex(unsigned idx)
Sets the emergency ID index.
Definition: anytone_codeplug.cc:3016
virtual unsigned emergencyIndex() const
Returns the emergency ID index.
Definition: anytone_codeplug.cc:3012
virtual void setEncodingType(ENIType type)
Sets the encoding type.
Definition: anytone_codeplug.cc:3007
AnalogAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2975
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition: anytone_codeplug.cc:3056
Action
Possible analog alarm types.
Definition: anytone_codeplug.hh:1885
virtual Action action() const
Returns the alarm action.
Definition: anytone_codeplug.cc:2994
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition: anytone_codeplug.cc:3066
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1908
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition: anytone_codeplug.cc:3043
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition: anytone_codeplug.cc:3021
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition: anytone_codeplug.cc:3030
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition: anytone_codeplug.cc:3078
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition: anytone_codeplug.cc:3061
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition: anytone_codeplug.cc:3039
ENIType
Possible alarm signalling types.
Definition: anytone_codeplug.hh:1893
void clear()
Resets the alarm.
Definition: anytone_codeplug.cc:2988
virtual unsigned channelIndex() const
Returns the channel index.
Definition: anytone_codeplug.cc:3052
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition: anytone_codeplug.cc:3025
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition: anytone_codeplug.cc:3070
virtual ENIType encodingType() const
Returns the encoding type.
Definition: anytone_codeplug.cc:3003
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition: anytone_codeplug.cc:3074
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition: anytone_codeplug.cc:3034
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition: anytone_codeplug.cc:3048
Represents the base class of an digital alarm setting for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1965
virtual void enableRXAlarm(bool enable)
Enables/disables the reception of alarms.
Definition: anytone_codeplug.cc:3208
virtual void enableVOX(bool enable)
Enables/disables the VOX for alarms.
Definition: anytone_codeplug.cc:3199
virtual bool rxAlarm() const
Returns true if alarms gets received enabled.
Definition: anytone_codeplug.cc:3204
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition: anytone_codeplug.cc:3170
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition: anytone_codeplug.cc:3162
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition: anytone_codeplug.cc:3117
Action
Possible alarm types.
Definition: anytone_codeplug.hh:1968
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition: anytone_codeplug.cc:3140
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition: anytone_codeplug.cc:3166
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1984
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition: anytone_codeplug.cc:3158
virtual void setAreaBroadcastDuration(unsigned min)
Sets area broadcast duration in minutes.
Definition: anytone_codeplug.cc:3189
DigitalAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3085
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition: anytone_codeplug.cc:3131
virtual Action action() const
Returns the alarm action.
Definition: anytone_codeplug.cc:3104
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition: anytone_codeplug.cc:3148
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition: anytone_codeplug.cc:3113
virtual bool vox() const
Returns true if the VOX gets enabled.
Definition: anytone_codeplug.cc:3195
virtual void setAction(Action action)
Sets the alarm action.
Definition: anytone_codeplug.cc:3108
virtual unsigned areaBroadcastDuration() const
Returns area broadcast duration in minutes.
Definition: anytone_codeplug.cc:3185
virtual unsigned channelIndex() const
Returns the channel index.
Definition: anytone_codeplug.cc:3144
virtual void setVoiceBroadcastDuration(unsigned min)
Sets voice broadcast duration in minutes.
Definition: anytone_codeplug.cc:3179
virtual unsigned voiceBroadcastDuration() const
Returns voice broadcast duration in minutes.
Definition: anytone_codeplug.cc:3175
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition: anytone_codeplug.cc:3153
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition: anytone_codeplug.cc:3135
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition: anytone_codeplug.cc:3126
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition: anytone_codeplug.cc:3122
void clear()
Resets the digital alarm settings.
Definition: anytone_codeplug.cc:3098
Represents the base class of alarm setting entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1875
virtual uint8_t * digital() const
Returns a pointer to the digital alarm settings.
Definition: anytone_codeplug.cc:3239
void clear()
Clears the alarm settings.
Definition: anytone_codeplug.cc:3229
virtual uint8_t * analog() const
Returns a pointer to the analog alarm settings.
Definition: anytone_codeplug.cc:3235
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2053
AlarmSettingElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3216
Represents base class of a analog quick call entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1594
Type
Analog quick-call types.
Definition: anytone_codeplug.hh:1597
AnalogQuickCallElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2726
virtual void setContactIndex(unsigned idx)
Sets the analog contact index.
Definition: anytone_codeplug.cc:2762
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1613
virtual void clearContactIndex()
Clears the contact index.
Definition: anytone_codeplug.cc:2766
virtual unsigned contactIndex() const
Returns the analog contact index.
Definition: anytone_codeplug.cc:2758
void clear()
Resets the quick call entry.
Definition: anytone_codeplug.cc:2739
virtual bool hasContactIndex() const
Returns true if an analog contact index is set.
Definition: anytone_codeplug.cc:2754
virtual void setType(Type type)
Sets the type of the quick call.
Definition: anytone_codeplug.cc:2749
virtual Type type() const
Returns the call type.
Definition: anytone_codeplug.cc:2745
Implements the list of analog quick-call settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1638
uint8_t * quickCall(unsigned int n) const
Returns a pointer to the n-th entry.
Definition: anytone_codeplug.cc:2794
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1648
void clear()
Clears the quick calls.
Definition: anytone_codeplug.cc:2787
AnalogQuickCallsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2774
Represents the base class for bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:26
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:94
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:85
BitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:67
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:79
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:74
Represents the base class of the boot settings for all AnyTone codeplug.
Definition: anytone_codeplug.hh:1291
virtual bool updateConfig(Context &ctx)
Updates the abstract configuration from this general settings.
Definition: anytone_codeplug.cc:2253
virtual void setIntroLine2(const QString &txt)
Sets the second intro line.
Definition: anytone_codeplug.cc:2222
virtual void setIntroLine1(const QString &txt)
Sets the first intro line.
Definition: anytone_codeplug.cc:2214
void clear()
Resets the boot settings.
Definition: anytone_codeplug.cc:2205
virtual QString introLine2() const
Returns the second intro line.
Definition: anytone_codeplug.cc:2218
BootSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2192
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1301
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the general settings from the given abstract configuration.
Definition: anytone_codeplug.cc:2238
virtual QString password() const
Returns the password.
Definition: anytone_codeplug.cc:2227
virtual QString introLine1() const
Returns the first intro line.
Definition: anytone_codeplug.cc:2210
virtual void setPassword(const QString &txt)
Sets the password.
Definition: anytone_codeplug.cc:2231
Represents the channel bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:390
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:400
ChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:929
Represents the base class for channel encodings in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:92
virtual bool talkaround() const
Returns true if the talkaround is enabled.
Definition: anytone_codeplug.cc:396
virtual void setTXOffset(unsigned hz)
Sets the TX frequency offset in Hz.
Definition: anytone_codeplug.cc:221
virtual void setScanListIndex(unsigned idx)
Sets the scan list index (0-based).
Definition: anytone_codeplug.cc:543
virtual void setTXTone(Signaling::Code code)
Sets the RX signaling (tone).
Definition: anytone_codeplug.cc:359
virtual void setGroupListIndex(unsigned idx)
Sets the group list index (0-based).
Definition: anytone_codeplug.cc:560
virtual bool simplexTDMA() const
Returns true if simplex TDMA is enabled.
Definition: anytone_codeplug.cc:625
virtual unsigned twoToneIDIndex() const
Returns the two-tone ID index (0-based).
Definition: anytone_codeplug.cc:569
virtual bool adaptiveTDMA() const
Returns true if adaptive TDMA is enabled.
Definition: anytone_codeplug.cc:633
virtual unsigned scanListIndex() const
Returns the scan list index (0-based).
Definition: anytone_codeplug.cc:539
virtual void setTwoToneDecodeIndex(unsigned idx)
Sets the 2-tone decode index (0-based).
Definition: anytone_codeplug.cc:485
virtual SignalingMode rxSignalingMode() const
Returns the RX signaling mode.
Definition: anytone_codeplug.cc:308
virtual void enableEnhancedEncryption(bool enable)
Enables/disables enhanced encryption.
Definition: anytone_codeplug.cc:653
virtual bool rxAPRS() const
Returns true if RX APRS is enabled.
Definition: anytone_codeplug.cc:641
virtual void setPower(Channel::Power power)
Sets the channel power.
Definition: anytone_codeplug.cc:266
virtual void enableCTCSSPhaseReversal(bool enable)
Enables/disables CTCSS phase reversal.
Definition: anytone_codeplug.cc:376
virtual unsigned twoToneDecodeIndex() const
Returns the 2-tone decode index (0-based).
Definition: anytone_codeplug.cc:481
virtual void setDTMFIDIndex(unsigned idx)
Sets the DTMF ID index (0-based).
Definition: anytone_codeplug.cc:589
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition: anytone_codeplug.cc:603
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition: anytone_codeplug.cc:609
virtual OptSignaling optionalSignaling() const
Returns the optional signalling type.
Definition: anytone_codeplug.cc:526
Mode
Defines all possible channel modes, see channelMode.
Definition: anytone_codeplug.hh:95
@ Digital
Digital (DMR) channel.
@ MixedAnalog
Mixed, analog channel with digital RX.
@ MixedDigital
Mixed, digital channel with analog RX.
virtual void setTXFrequency(unsigned hz)
Sets the TX frequency indirectly.
Definition: anytone_codeplug.cc:235
virtual bool ctcssPhaseReversal() const
Returns true if the CTCSS phase reversal is enabled.
Definition: anytone_codeplug.cc:372
virtual void setTXDCS(Signaling::Code code)
Sets the TX DCS code.
Definition: anytone_codeplug.cc:445
virtual void setContactIndex(unsigned idx)
Sets the transmit contact index (0-based).
Definition: anytone_codeplug.cc:494
virtual Signaling::Code rxTone() const
Simplified access to RX signaling (tone).
Definition: anytone_codeplug.cc:317
virtual ~ChannelElement()
Destructor.
Definition: anytone_codeplug.cc:191
virtual void setColorCode(unsigned code)
Sets the color code.
Definition: anytone_codeplug.cc:598
virtual QString name() const
Returns the channel name.
Definition: anytone_codeplug.cc:683
virtual Channel * toChannelObj(Context &ctx) const
Constructs a generic Channel object from the codeplug channel.
Definition: anytone_codeplug.cc:693
virtual void setTXCTCSS(Signaling::Code tone)
Sets the TX CTCSS tone.
Definition: anytone_codeplug.cc:413
virtual Mode mode() const
Returns the channel mode (analog, digtital, etc).
Definition: anytone_codeplug.cc:247
virtual bool loneWorker() const
Returns true if lone worker is enabled.
Definition: anytone_codeplug.cc:657
virtual void enableRXCustomCTCSS()
Enables RX custom CTCSS frequency.
Definition: anytone_codeplug.cc:433
virtual void enableSimplexTDMA(bool enable)
Enables/disables simplex TDMA confirmation.
Definition: anytone_codeplug.cc:629
virtual unsigned txFrequency() const
Returns the TX frequency in Hz.
Definition: anytone_codeplug.cc:226
virtual void setMode(Mode mode)
Sets the channel mode.
Definition: anytone_codeplug.cc:251
Power
Defines all possible power settings.
Definition: anytone_codeplug.hh:103
@ POWER_HIGH
High power, usually 5W.
Definition: anytone_codeplug.hh:106
@ POWER_LOW
Low power, usually 1W.
Definition: anytone_codeplug.hh:104
@ POWER_MIDDLE
Medium power, usually 2.5W.
Definition: anytone_codeplug.hh:105
@ POWER_TURBO
Higher power, usually 7W on VHF and 6W on UHF.
Definition: anytone_codeplug.hh:107
virtual unsigned dtmfIDIndex() const
Returns the DTFM ID index (0-based).
Definition: anytone_codeplug.cc:585
virtual void setRXSignalingMode(SignalingMode mode)
Sets the RX signaling mode.
Definition: anytone_codeplug.cc:312
virtual bool hasGroupListIndex() const
Returns true, if a group list index is set.
Definition: anytone_codeplug.cc:552
ChannelElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:179
virtual Signaling::Code txDCS() const
Returns the TX DCS code.
Definition: anytone_codeplug.cc:438
virtual bool callConfirm() const
Returns true if the call confirm is enabled.
Definition: anytone_codeplug.cc:388
virtual unsigned txOffset() const
Returns the TX frequency offset in Hz.
Definition: anytone_codeplug.cc:217
virtual unsigned encryptionKeyIndex() const
Returns the AES (enhanced) encryption key index (0-based).
Definition: anytone_codeplug.cc:670
virtual Admit admit() const
Returns the admit criterion.
Definition: anytone_codeplug.cc:517
virtual void setRXCTCSS(Signaling::Code tone)
Sets the RX CTCSS tone.
Definition: anytone_codeplug.cc:429
virtual void setEncryptionKeyIndex(unsigned idx)
Sets the AES (enahnced) encryption key index (0-based).
Definition: anytone_codeplug.cc:674
virtual bool hasScanListIndex() const
Returns true, if a scan list index is set.
Definition: anytone_codeplug.cc:535
virtual void setRXDCS(Signaling::Code code)
Sets the RX DCS code.
Definition: anytone_codeplug.cc:462
virtual void setCustomCTCSSFrequency(double hz)
Sets the custom CTCSS frequency in Hz.
Definition: anytone_codeplug.cc:476
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:153
virtual SignalingMode txSignalingMode() const
Returns the TX signaling mode.
Definition: anytone_codeplug.cc:340
RepeaterMode
Defines all possible repeater modes.
Definition: anytone_codeplug.hh:111
@ Simplex
Simplex mode, that is TX frequency = RX frequency. tx_offset is ignored.
@ Positive
Repeater mode with positive tx_offset.
@ Negative
Repeater mode with negative tx_offset.
virtual void enableSMSConfirm(bool enable)
Enables/disables SMS confirmation.
Definition: anytone_codeplug.cc:621
virtual unsigned rxFrequency() const
Returns the RX frequency in Hz.
Definition: anytone_codeplug.cc:208
virtual void setTXSignalingMode(SignalingMode mode)
Sets the TX signaling mode.
Definition: anytone_codeplug.cc:344
virtual void setRXFrequency(unsigned hz)
Sets the RX frequency in Hz.
Definition: anytone_codeplug.cc:212
virtual bool smsConfirm() const
Returns true if SMS confirmation is enabled.
Definition: anytone_codeplug.cc:617
virtual AnytoneFMChannelExtension::SquelchMode squelchMode() const
Returns true if the sequelch is silent and false if open.
Definition: anytone_codeplug.cc:508
virtual void enableAdaptiveTDMA(bool enable)
Enables/disables adaptive TDMA.
Definition: anytone_codeplug.cc:637
virtual void enableCallConfirm(bool enable)
Enables/disables call confirm.
Definition: anytone_codeplug.cc:392
virtual bool rxCTCSSIsCustom() const
Returns true if the RX CTCSS tone frequency is custom (non standard).
Definition: anytone_codeplug.cc:421
virtual Signaling::Code txTone() const
Simplified access to TX signaling (tone).
Definition: anytone_codeplug.cc:349
virtual void setRXTone(Signaling::Code code)
Sets the RX signaling (tone).
Definition: anytone_codeplug.cc:327
virtual bool enhancedEncryption() const
Returns true if enhanced encryption is enabled.
Definition: anytone_codeplug.cc:649
virtual void enableRXAPRS(bool enable)
Enables/disables RX APRS.
Definition: anytone_codeplug.cc:645
virtual void setSquelchMode(AnytoneFMChannelExtension::SquelchMode mode)
Enables/disables silent squelch.
Definition: anytone_codeplug.cc:512
virtual bool fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: anytone_codeplug.cc:821
virtual void setRepeaterMode(RepeaterMode mode)
Sets the transmit offset direction.
Definition: anytone_codeplug.cc:303
Admit
Defines possible admit criteria.
Definition: anytone_codeplug.hh:125
@ DifferentColorCode
For digital channels.
@ SameColorCode
For digital channels.
@ Always
For both channel types.
virtual void setFiveToneIDIndex(unsigned idx)
Sets the five-tone ID index (0-based).
Definition: anytone_codeplug.cc:581
virtual bool linkChannelObj(Channel *c, Context &ctx) const
Links a previously constructed channel to the rest of the configuration.
Definition: anytone_codeplug.cc:779
virtual unsigned contactIndex() const
Returns the transmit contact index (0-based).
Definition: anytone_codeplug.cc:490
virtual void clearScanListIndex()
Clears the scan list index.
Definition: anytone_codeplug.cc:547
OptSignaling
Defines all possible optional signalling settings.
Definition: anytone_codeplug.hh:135
virtual void clearGroupListIndex()
Clears the group list index.
Definition: anytone_codeplug.cc:564
virtual unsigned radioIDIndex() const
Returns the radio ID index (0-based).
Definition: anytone_codeplug.cc:499
virtual void enableRXOnly(bool enable)
Enables/disables RX only.
Definition: anytone_codeplug.cc:384
virtual double customCTCSSFrequency() const
Returns the custom CTCSS frequency in Hz.
Definition: anytone_codeplug.cc:472
virtual unsigned fiveToneIDIndex() const
Returns the five-tone ID index (0-based).
Definition: anytone_codeplug.cc:577
virtual Channel::Power power() const
Returns the channel power.
Definition: anytone_codeplug.cc:256
virtual Signaling::Code rxCTCSS() const
Returns the RX CTCSS tone.
Definition: anytone_codeplug.cc:425
virtual FMChannel::Bandwidth bandwidth() const
Returns the band width of the channel.
Definition: anytone_codeplug.cc:285
virtual bool txCTCSSIsCustom() const
Returns true if the TX CTCSS tone frequency is custom (non standard).
Definition: anytone_codeplug.cc:405
virtual RepeaterMode repeaterMode() const
Returns the transmit offset direction.
Definition: anytone_codeplug.cc:299
virtual void enableTXCustomCTCSS()
Enables TX custom CTCSS frequency.
Definition: anytone_codeplug.cc:417
virtual void setAdmit(Admit admit)
Sets the admit criterion.
Definition: anytone_codeplug.cc:521
virtual void setName(const QString &name)
Sets the channel name.
Definition: anytone_codeplug.cc:687
virtual void enableLoneWorker(bool enable)
Enables/disables lone worker.
Definition: anytone_codeplug.cc:661
virtual void setTwoToneIDIndex(unsigned idx)
Sets the two-tone ID index (0-based).
Definition: anytone_codeplug.cc:573
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the band width of the channel.
Definition: anytone_codeplug.cc:291
virtual Signaling::Code rxDCS() const
Returns the RX DCS code.
Definition: anytone_codeplug.cc:455
virtual void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition: anytone_codeplug.cc:678
virtual unsigned colorCode() const
Returns the color code.
Definition: anytone_codeplug.cc:594
virtual void setOptionalSignaling(OptSignaling sig)
Sets the optional signaling type.
Definition: anytone_codeplug.cc:530
virtual void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition: anytone_codeplug.cc:400
virtual void setRadioIDIndex(unsigned idx)
Sets the radio ID index (0-based).
Definition: anytone_codeplug.cc:503
virtual bool hasEncryptionKeyIndex() const
Returns true if an encryption key is set.
Definition: anytone_codeplug.cc:666
virtual Signaling::Code txCTCSS() const
Returns the TX CTCSS tone.
Definition: anytone_codeplug.cc:409
virtual unsigned groupListIndex() const
Returns the scan list index (0-based).
Definition: anytone_codeplug.cc:556
SignalingMode
Possible analog signaling modes.
Definition: anytone_codeplug.hh:118
void clear()
Resets the channel.
Definition: anytone_codeplug.cc:196
virtual bool rxOnly() const
Returns true if the RX only is enabled.
Definition: anytone_codeplug.cc:380
Represents the contact bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:456
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:466
ContactBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1071
Represents the base class for conacts in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:409
virtual void setNumber(unsigned number)
Sets the contact number.
Definition: anytone_codeplug.cc:1003
virtual void setName(const QString &name)
Sets the name of the contact.
Definition: anytone_codeplug.cc:994
virtual ~ContactElement()
Destructor.
Definition: anytone_codeplug.cc:957
virtual bool fromContactObj(const DMRContact *contact, Context &ctx)
Constructs this contact from the give DigitalContact.
Definition: anytone_codeplug.cc:1049
ContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:945
virtual DMRContact::Type type() const
Returns the contact type.
Definition: anytone_codeplug.cc:972
virtual void setType(DMRContact::Type type)
Sets the contact type.
Definition: anytone_codeplug.cc:981
virtual DMRContact * toContactObj(Context &ctx) const
Assembles a DigitalContact from this contact.
Definition: anytone_codeplug.cc:1030
virtual void setAlertType(AnytoneContactExtension::AlertType type)
Sets the alert type.
Definition: anytone_codeplug.cc:1025
virtual unsigned number() const
Returns the contact number.
Definition: anytone_codeplug.cc:999
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:421
virtual QString name() const
Returns the name of the contact.
Definition: anytone_codeplug.cc:990
bool isValid() const
Returns true if the element is valid.
Definition: anytone_codeplug.cc:967
virtual AnytoneContactExtension::AlertType alertType() const
Returns the alert type.
Definition: anytone_codeplug.cc:1008
void clear()
Resets the contact element.
Definition: anytone_codeplug.cc:962
Represents the base class for entries to the contact indices in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2912
virtual void setIndex(unsigned idx)
Sets the index.
Definition: anytone_codeplug.cc:4480
virtual unsigned id() const
Returns the id.
Definition: anytone_codeplug.cc:4463
bool isValid() const
Returns true if the contact map is valid.
Definition: anytone_codeplug.cc:4453
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2922
virtual bool isGroup() const
Returns true if the entry is a group call.
Definition: anytone_codeplug.cc:4458
void clear()
Clears the entry.
Definition: anytone_codeplug.cc:4448
virtual void setID(unsigned id, bool group=false)
Encodes ID and group call flag.
Definition: anytone_codeplug.cc:4469
ContactMapElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:4435
virtual unsigned index() const
Returns the index.
Definition: anytone_codeplug.cc:4476
Represents the base class of a DMR APRS message for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1424
virtual QString message() const
Returns the message.
Definition: anytone_codeplug.cc:2543
virtual bool updateConfig(Context &ctx) const
Decodes the message.
Definition: anytone_codeplug.cc:2559
void setMessage(const QString &message)
Sets the message.
Definition: anytone_codeplug.cc:2548
virtual bool fromConfig(Codeplug::Flags flags, Context &ctx)
Encodes the message.
Definition: anytone_codeplug.cc:2553
DMRAPRSMessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2525
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2538
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1434
Represents the base class of DMR APRS settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1331
virtual Channel::Power power() const
Returns the transmit power.
Definition: anytone_codeplug.cc:2350
virtual bool automatic() const
Returns true if the automatic APRS is enabled.
Definition: anytone_codeplug.cc:2299
virtual void setManualInterval(unsigned sec)
Sets the manual TX interval in seconds.
Definition: anytone_codeplug.cc:2294
virtual void setChannelSelected(unsigned n)
Sets the n-th channel to selected channel.
Definition: anytone_codeplug.cc:2411
virtual void setDestination(unsigned id)
Sets the destination DMR ID to send the APRS information to.
Definition: anytone_codeplug.cc:2424
virtual void overrideTimeSlot(DMRChannel::TimeSlot ts)
Sets the timeslot.
Definition: anytone_codeplug.cc:2459
virtual unsigned manualInterval() const
Returns the Manual TX interval in seconds.
Definition: anytone_codeplug.cc:2290
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition: anytone_codeplug.cc:2438
virtual bool fixedLocation() const
Returns true if the fixed location beacon is enabled.
Definition: anytone_codeplug.cc:2318
virtual void setChannelIndex(unsigned n, unsigned idx)
Sets the n-th channel index.
Definition: anytone_codeplug.cc:2399
virtual bool hasChannel(unsigned n) const
Returns true if the n-th channel is set.
Definition: anytone_codeplug.cc:2379
virtual void setLocation(const QGeoCoordinate &pos)
Sets the location of the fixed position.
Definition: anytone_codeplug.cc:2330
virtual void disableAutomatic()
Disables the automatic APRS.
Definition: anytone_codeplug.cc:2313
virtual void setAutomaticInterval(unsigned sec)
Sets the automatic transmit interval in seconds.
Definition: anytone_codeplug.cc:2307
virtual bool channelIsSelected(unsigned n) const
Returns true if the n-th channel is selected channel.
Definition: anytone_codeplug.cc:2391
virtual void enableFixedLocation(bool enable)
Enables/disables fixed location beacon.
Definition: anytone_codeplug.cc:2345
virtual bool timeSlotOverride() const
Returns true if the timeslot of the channel is overridden.
Definition: anytone_codeplug.cc:2447
virtual DMRChannel::TimeSlot timeslot() const
Returns the timeslot (only valid if timeSlotOverride returns true).
Definition: anytone_codeplug.cc:2451
virtual DMRContact::Type callType() const
Returns the call type.
Definition: anytone_codeplug.cc:2429
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1341
virtual void disableTimeSlotOverride()
Disables TS override.
Definition: anytone_codeplug.cc:2466
void clear()
Resets the APRS settings.
Definition: anytone_codeplug.cc:2285
virtual bool channelIsVFOB(unsigned n) const
Returns true if the n-th channel is VFO B.
Definition: anytone_codeplug.cc:2387
virtual void setChannelVFOA(unsigned n)
Sets the n-th channel to VFO A.
Definition: anytone_codeplug.cc:2403
DMRAPRSSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2272
virtual void clearChannel(unsigned n)
Resets the n-th channel.
Definition: anytone_codeplug.cc:2415
virtual unsigned automaticInterval() const
Returns the automatic transmit interval in seconds.
Definition: anytone_codeplug.cc:2303
virtual void setPower(Channel::Power power)
Sets the transmit power.
Definition: anytone_codeplug.cc:2360
virtual unsigned destination() const
Returns the destination DMR ID to send the APRS information to.
Definition: anytone_codeplug.cc:2420
virtual bool channelIsVFOA(unsigned n) const
Returns true if the n-th channel is VFO A.
Definition: anytone_codeplug.cc:2383
virtual QGeoCoordinate location() const
Returns the location of the fixed position.
Definition: anytone_codeplug.cc:2322
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the GPS settings from the given config.
Definition: anytone_codeplug.cc:2471
virtual bool linkGPSSystem(uint8_t i, Context &ctx)
Links GPS system from this GPS settings.
Definition: anytone_codeplug.cc:2504
virtual unsigned channelIndex(unsigned n) const
Returns the index of the n-th channel.
Definition: anytone_codeplug.cc:2395
virtual void setChannelVFOB(unsigned n)
Sets the n-th channel to VFO B.
Definition: anytone_codeplug.cc:2407
virtual bool createGPSSystem(uint8_t i, Context &ctx)
Creates GPS system from this GPS settings.
Definition: anytone_codeplug.cc:2497
Represents a list of DMR encryption key IDs.
Definition: anytone_codeplug.hh:2832
virtual bool hasID(unsigned int n) const
Returns true if the n-th id is set.
Definition: anytone_codeplug.cc:4366
virtual uint16_t id(unsigned int n) const
Returns the ID of the encryption key.
Definition: anytone_codeplug.cc:4373
DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4348
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4361
virtual void clearID(unsigned int n)
Clears the n-th id.
Definition: anytone_codeplug.cc:4387
virtual void setID(unsigned int n, uint16_t id)
Sets the ID of the encryption key.
Definition: anytone_codeplug.cc:4380
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2842
Represents a list of DMR encryption keys.
Definition: anytone_codeplug.hh:2872
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4410
QByteArray key(unsigned int n) const
Returns the n-th key.
Definition: anytone_codeplug.cc:4418
DMREncryptionKeyListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4397
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2882
void setKey(unsigned int n, const QByteArray &key)
Sets the n-th key.
Definition: anytone_codeplug.cc:4425
Represents the DTMF contact byte map, indicating which contacts are valid.
Definition: anytone_codeplug.hh:526
DTMFContactBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1161
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:536
Represents the base class for analog (DTMF) contacts in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:474
virtual bool fromContact(const DTMFContact *contact)
Encodes an DTMF contact from the given one.
Definition: anytone_codeplug.cc:1151
virtual void setNumber(const QString &number)
Sets the number of the contact.
Definition: anytone_codeplug.cc:1122
virtual DTMFContact * toContact() const
Creates an DTMF contact from the entry.
Definition: anytone_codeplug.cc:1146
DTMFContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1087
virtual QString number() const
Returns the number of the contact.
Definition: anytone_codeplug.cc:1109
virtual void setName(const QString &name)
Sets the name of the contact.
Definition: anytone_codeplug.cc:1141
void clear()
Resets the contact element.
Definition: anytone_codeplug.cc:1104
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:486
virtual ~DTMFContactElement()
Destructor.
Definition: anytone_codeplug.cc:1099
virtual QString name() const
Returns the name of the contact.
Definition: anytone_codeplug.cc:1137
Represents a list of DTMF IDs to be send.
Definition: anytone_codeplug.hh:2719
virtual void clearNumber(unsigned int n)
Clears the n-th number.
Definition: anytone_codeplug.cc:4240
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2729
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4212
virtual bool hasNumber(unsigned int n) const
Returns true, if the n-th number is set.
Definition: anytone_codeplug.cc:4217
DTMFIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4199
virtual QString number(unsigned int n) const
Returns the n-th number.
Definition: anytone_codeplug.cc:4224
virtual void setNumber(unsigned int n, const QString &number)
Sets the n-th number.
Definition: anytone_codeplug.cc:4232
Represents the base class of DTMF settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2612
Response
Possible responses to a DTMF decode.
Definition: anytone_codeplug.hh:2615
virtual void setFirstDigitDuration(unsigned ms)
Sets the first digit duration in ms.
Definition: anytone_codeplug.cc:4056
virtual QString botID() const
Returns the BOT ID.
Definition: anytone_codeplug.cc:4131
virtual void setPostEncodingDelay(unsigned ms)
Sets the post encoding delay in ms.
Definition: anytone_codeplug.cc:4090
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2628
virtual void setDCodePause(unsigned sec)
Sets the D-code pause in seconds.
Definition: anytone_codeplug.cc:4117
virtual unsigned groupCode() const
Returns the group code [0,15].
Definition: anytone_codeplug.cc:4025
virtual unsigned dCodePause() const
Returns the D-code pause in seconds.
Definition: anytone_codeplug.cc:4113
virtual void setRemoteStunID(const QString &id)
Sets the remote stun ID.
Definition: anytone_codeplug.cc:4188
DTMFSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3997
virtual QString id() const
Returns the radio ID.
Definition: anytone_codeplug.cc:4070
virtual void setResponse(Response resp)
Sets the response to a DTMF decode.
Definition: anytone_codeplug.cc:4038
virtual unsigned preTime() const
Returns the pre time in ms.
Definition: anytone_codeplug.cc:4043
virtual unsigned pttIDPause() const
Returns the PTT ID pause in seconds.
Definition: anytone_codeplug.cc:4095
virtual void setGroupCode(unsigned symb)
Sets the group code [0,15].
Definition: anytone_codeplug.cc:4029
virtual void enablePTTID(bool enable)
Enables/disables the PTT ID.
Definition: anytone_codeplug.cc:4108
virtual bool pttIDEnabled() const
Returns true if the PTT ID is enabled.
Definition: anytone_codeplug.cc:4104
virtual void setIntervalSymbol(unsigned symb)
Sets the interval/repeat symbol [0,15].
Definition: anytone_codeplug.cc:4020
virtual void setRemoteKillID(const QString &id)
Sets the remote kill ID.
Definition: anytone_codeplug.cc:4171
virtual void setID(const QString &id)
Sets the radio ID.
Definition: anytone_codeplug.cc:4078
virtual unsigned autoResetTime() const
Returns the auto reset time in seconds.
Definition: anytone_codeplug.cc:4061
virtual unsigned firstDigitDuration() const
Returns the first digit duration in ms.
Definition: anytone_codeplug.cc:4052
virtual void setBOTID(const QString &id)
Sets the BOT ID.
Definition: anytone_codeplug.cc:4139
virtual unsigned postEncodingDelay() const
Returns the post encoding delay in ms.
Definition: anytone_codeplug.cc:4086
virtual QString eotID() const
Returns the EOT ID.
Definition: anytone_codeplug.cc:4147
virtual QString remoteKillID() const
Returns the remote kill ID.
Definition: anytone_codeplug.cc:4163
virtual void setPTTIDPause(unsigned sec)
Sets the PTT ID pause in seconds.
Definition: anytone_codeplug.cc:4099
virtual QString remoteStunID() const
Returns the remote stun ID.
Definition: anytone_codeplug.cc:4180
void clear()
Resets the settings.
Definition: anytone_codeplug.cc:4010
virtual void setAutoResetTime(unsigned sec)
Sets the auto reset time in seconds.
Definition: anytone_codeplug.cc:4065
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition: anytone_codeplug.cc:4047
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:4122
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition: anytone_codeplug.cc:4126
virtual Response response() const
Returns the response to a DMTF decode.
Definition: anytone_codeplug.cc:4034
virtual unsigned intervalSymbol() const
Returns the interval/repeat symbol [0,15].
Definition: anytone_codeplug.cc:4016
virtual void setEOTID(const QString &id)
Sets the EOT ID.
Definition: anytone_codeplug.cc:4155
Represents the base class of digital alarm setting extension for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2078
virtual DMRContact::Type callType() const
Returns the call type.
Definition: anytone_codeplug.cc:3265
virtual unsigned destination() const
Returns the destination DMR number.
Definition: anytone_codeplug.cc:3283
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2088
void clear()
Clears the settings.
Definition: anytone_codeplug.cc:3260
virtual void setDestination(unsigned number)
Sets the destination DMR number.
Definition: anytone_codeplug.cc:3287
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition: anytone_codeplug.cc:3274
DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3247
Represents the base class for the extended settings element in many AnyTone codeplugs.
Definition: anytone_codeplug.hh:1187
virtual void setChannelBNameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the channel name color for the VFO B.
virtual bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Link config from settings extension.
Definition: anytone_codeplug.cc:2104
virtual void setZoneBNameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the zone name color for the VFO B.
virtual bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the config.
Definition: anytone_codeplug.cc:2052
virtual AnytoneDisplaySettingsExtension::Color zoneBNameColor() const =0
Returns the color of the zone name for VFO B.
virtual void setTalkerAliasEncoding(AnytoneDMRSettingsExtension::TalkerAliasEncoding encoding)=0
Sets the talker alias encoding.
virtual bool sendTalkerAlias() const =0
Returns true if the talker alias is sent.
virtual bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Update config from settings.
Definition: anytone_codeplug.cc:2080
virtual void setZoneANameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the zone name color for the VFO A.
virtual void enableSendTalkerAlias(bool enable)=0
Enables/disables sending the talker alias.
virtual AnytoneDisplaySettingsExtension::Color zoneANameColor() const =0
Returns the color of the zone name for VFO A.
virtual AnytoneDMRSettingsExtension::TalkerAliasEncoding talkerAliasEncoding() const =0
Returns the talker alias encoding.
virtual AnytoneDisplaySettingsExtension::Color channelBNameColor() const =0
Returns the color of the channel name for VFO B.
virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource() const =0
Returns the talker alias source.
virtual void setTalkerAliasSource(AnytoneDMRSettingsExtension::TalkerAliasSource mode)=0
Sets the talker alias source.
ExtendedSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2045
Represents the base-class for 5Tone function for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2210
virtual void setFunction(Function function)
Sets the function.
Definition: anytone_codeplug.cc:3437
virtual QString name() const
Returns the name.
Definition: anytone_codeplug.cc:3479
void clear()
Clears the function settings.
Definition: anytone_codeplug.cc:3428
Function
Possible function being performed on 5-tone decoding.
Definition: anytone_codeplug.hh:2213
Response
Possible responses to 5-tone decoding.
Definition: anytone_codeplug.hh:2219
virtual void setName(const QString &name)
Sets the name.
Definition: anytone_codeplug.cc:3483
virtual void setID(const QString &id)
Sets the ID.
Definition: anytone_codeplug.cc:3464
virtual void setResponse(Response response)
Sets the response.
Definition: anytone_codeplug.cc:3446
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2232
virtual Response response() const
Returns the response.
Definition: anytone_codeplug.cc:3442
FiveToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3415
virtual QString id() const
Returns the ID.
Definition: anytone_codeplug.cc:3451
Represents the list of five-tone functions for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2262
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:3504
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2272
FiveToneFunctionListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3491
Represents the bitmap indicating which five-tone IDs are valid.
Definition: anytone_codeplug.hh:2163
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2173
FiveToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3371
Represents the base-class for 5Tone IDs for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2118
virtual void setStandard(Standard std)
Sets the encoding standard.
Definition: anytone_codeplug.cc:3317
FiveToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3295
void clear()
Clears the ID.
Definition: anytone_codeplug.cc:3308
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2135
virtual void setID(const QString &id)
Sets the ID.
Definition: anytone_codeplug.cc:3344
virtual QString name() const
Returns the name.
Definition: anytone_codeplug.cc:3359
virtual unsigned toneDuration() const
Returns the tone duration in ms.
Definition: anytone_codeplug.cc:3322
Standard
Possible 5-tone encoding standards.
Definition: anytone_codeplug.hh:2121
virtual void setName(const QString &name)
Sets the name.
Definition: anytone_codeplug.cc:3363
virtual Standard standard() const
Returns the 5Tone encoding standard.
Definition: anytone_codeplug.cc:3313
virtual void setToneDuration(unsigned ms)
Sets the tone duration in ms.
Definition: anytone_codeplug.cc:3326
virtual QString id() const
Returns the ID.
Definition: anytone_codeplug.cc:3331
Represents the list of five-tone IDs.
Definition: anytone_codeplug.hh:2181
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2191
FiveToneIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3387
virtual uint8_t * member(unsigned int n) const
Returns a pointer to the n-th five-tone ID.
Definition: anytone_codeplug.cc:3405
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:3400
Represents the base-class for 5Tone settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2291
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3618
virtual Standard decodingStandard() const
Returns the decoding standard.
Definition: anytone_codeplug.cc:3546
virtual unsigned eotToneDuration() const
Returns the EOT tone duration in ms.
Definition: anytone_codeplug.cc:3745
void clear()
Resets the 5tone settings.
Definition: anytone_codeplug.cc:3532
enum FiveToneIDElement::Standard Standard
Possible 5-tone encoding standards.
Definition: anytone_codeplug.hh:2298
virtual QString eotID() const
Returns the 5tone EOT ID.
Definition: anytone_codeplug.cc:3754
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2309
virtual void setEOTToneDuration(unsigned ms)
Sets the EOT tone duration in ms.
Definition: anytone_codeplug.cc:3749
FiveToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3519
virtual unsigned stopCode() const
Returns the stop code [0,15].
Definition: anytone_codeplug.cc:3645
virtual unsigned postEncodeDelay() const
Returns the post-encode delay in ms.
Definition: anytone_codeplug.cc:3592
virtual void setAutoResetTime(unsigned s)
Sets the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3622
virtual void setStopCode(unsigned code)
Sets the stop code.
Definition: anytone_codeplug.cc:3649
virtual void setDecodingResponse(Response response)
Sets the decoding response.
Definition: anytone_codeplug.cc:3541
virtual void setStopTime(unsigned ms)
Sets the stop time in ms.
Definition: anytone_codeplug.cc:3658
virtual QString botID() const
Returns the 5tone BOT ID.
Definition: anytone_codeplug.cc:3708
virtual bool hasPTTID() const
Returns true if the PTT ID is set.
Definition: anytone_codeplug.cc:3601
virtual void setID(const QString &id)
Sets the 5tone radio ID.
Definition: anytone_codeplug.cc:3577
virtual void setDelayAfterStop(unsigned ms)
Sets the delay after stop in ms.
Definition: anytone_codeplug.cc:3676
virtual unsigned decodingToneDuration() const
Returns the decoding tone duration in ms.
Definition: anytone_codeplug.cc:3555
virtual QString id() const
Returns the 5tone radio ID.
Definition: anytone_codeplug.cc:3564
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition: anytone_codeplug.cc:3685
virtual bool sidetoneEnabled() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:3636
virtual void setDecodeTime(unsigned ms)
Sets the decode time in ms.
Definition: anytone_codeplug.cc:3667
virtual void setPostEncodeDelay(unsigned ms)
Sets the post-encode delay in ms.
Definition: anytone_codeplug.cc:3596
virtual void enableSidetone(bool enable)
Enables/disables side tone.
Definition: anytone_codeplug.cc:3640
virtual void setDecodingStandard(Standard standard)
Sets the decoding standard.
Definition: anytone_codeplug.cc:3550
virtual unsigned firstDelay() const
Returns the first delay in ms.
Definition: anytone_codeplug.cc:3627
virtual void setEOTID(const QString &id)
Sets the 5tone EOT ID.
Definition: anytone_codeplug.cc:3767
virtual void setBOTStandard(Standard standard)
Sets the BOT standard.
Definition: anytone_codeplug.cc:3694
virtual void setDecodingToneDuration(unsigned ms)
Sets the decoding tone duration in ms.
Definition: anytone_codeplug.cc:3559
virtual void setPTTID(unsigned id)
Sets the PTT ID [5,75].
Definition: anytone_codeplug.cc:3609
virtual unsigned preTime() const
Returns the pre time in ms.
Definition: anytone_codeplug.cc:3681
virtual unsigned pttID() const
Returns the PTT ID.
Definition: anytone_codeplug.cc:3605
virtual Response decodingResponse() const
Returns the decoding response.
Definition: anytone_codeplug.cc:3537
virtual unsigned botToneDuration() const
Returns the BOT tone duration in ms.
Definition: anytone_codeplug.cc:3699
virtual void setBOTToneDuration(unsigned ms)
Sets the BOT tone duration in ms.
Definition: anytone_codeplug.cc:3703
virtual void setFirstDelay(unsigned ms)
Sets the first delay in ms.
Definition: anytone_codeplug.cc:3631
virtual void setBOTID(const QString &id)
Sets the 5tone BOT ID.
Definition: anytone_codeplug.cc:3721
virtual void setEOTStandard(Standard standard)
Sets the EOT standard.
Definition: anytone_codeplug.cc:3740
virtual unsigned stopTime() const
Returns the stop time in ms.
Definition: anytone_codeplug.cc:3654
virtual Standard botStandard() const
Returns the BOT standard.
Definition: anytone_codeplug.cc:3690
Response
Possible responses to decoded 5-tone codes.
Definition: anytone_codeplug.hh:2294
virtual Standard eotStandard() const
Returns the EOT standard.
Definition: anytone_codeplug.cc:3736
virtual unsigned delayAfterStop() const
Returns the delay after stop in ms.
Definition: anytone_codeplug.cc:3672
virtual void clearPTTID()
Clears the PTT ID.
Definition: anytone_codeplug.cc:3613
virtual unsigned decodeTime() const
Returns the decode time in ms.
Definition: anytone_codeplug.cc:3663
Represents the base class for the settings elements in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:792
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyALong() const =0
Returns the key function for a long press on the function key 1.
virtual bool updateConfig(Context &ctx)
Updates the abstract config from general settings.
Definition: anytone_codeplug.cc:1853
virtual Interval menuExitTime() const =0
Returns the menu exit time in seconds.
virtual unsigned squelchLevelB() const
Squelch level of VFO B, (0=off).
Definition: anytone_codeplug.cc:1688
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyBShort() const =0
Returns the key function for a short press on the function key 2/B.
virtual bool autoKeyLock() const
Returns true if auto key-lock is enabled.
Definition: anytone_codeplug.cc:1628
virtual void enableSMSAlert(bool enable)=0
Enables/disables SMS alert.
virtual void enableEnhancedAudio(bool enable)=0
Enables/disables "enhanced" audio.
virtual void enableShowCurrentContact(bool enable)=0
Enables/disables display of current contact.
virtual void setFuncKey2Long(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 2.
virtual unsigned maxSpeakerVolume() const =0
Returns the maximum volume.
virtual void enableVolumeChangePrompt(bool enable)=0
Enables/disables the volume change prompt.
virtual void resetToneMelody(Melody &melody) const =0
Returns the reset-tone melody.
virtual void enableShowLastHeard(bool enable)=0
Enables/disables showing last heard.
virtual bool keyLockForced() const =0
Returns true if the "professional" key is locked.
virtual void enableGPSUnitsImperial(bool enable)=0
Enables/disables imperial GPS units.
virtual void setMenuExitTime(Interval intv)=0
Sets the menu exit time in seconds.
virtual unsigned dmrMicGain() const =0
Returns the mirophone gain.
virtual void setAutoRepeaterMinFrequencyVHF(Frequency Hz)=0
Sets the minimum frequency in Hz for the auto-repeater range in VHF band.
virtual bool defaultChannelAIsVFO() const =0
Returns true if the default channel for VFO A is VFO.
virtual void callToneMelody(Melody &melody) const =0
Returns the call-tone melody.
virtual bool fmTalkPermit() const =0
Returns true if the talk permit tone is enabled for digital channels.
virtual void setDefaultChannelAIndex(unsigned idx)=0
Sets the default channel index for VFO A.
virtual void setDefaultZoneIndexA(unsigned idx)=0
Sets the default zone (0-based) for VFO A.
virtual void enableStartupTone(bool enable)=0
Enables/disables the startup tone.
virtual unsigned defaultChannelAIndex() const =0
Returns the default channel index for VFO A.
virtual bool enhanceAudio() const =0
Returns true if the audio is "enhanced".
virtual void setVFOScanType(AnytoneSettingsExtension::VFOScanType type)=0
Sets the VFO scan type.
virtual void setIdleToneMelody(const Melody &melody)=0
Sets the idle-tone melody.
virtual void enableDMRTalkPermit(bool enable)=0
Enables/disables the talk permit tone for digital channels.
virtual void enableGPS(bool enable)=0
Enables/disables recording.
virtual void setDefaultZoneIndexB(unsigned idx)=0
Sets the default zone (0-based) for VFO B.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyAShort() const =0
Returns the key function for a short press on the function key 1/A.
virtual void setAutoRepeaterOffsetFrequenyIndexUHF(unsigned idx)=0
Sets the auto-repeater offset frequency index for UHF.
virtual bool smsAlert() const =0
Returns true if SMS alert is enabled.
virtual Frequency maxVFOScanFrequencyUHF() const =0
Returns the maximum VFO scan frequency for the UHF band in Hz.
virtual void setCallToneMelody(const Melody &melody)=0
Sets the call-tone melody.
virtual bool displayClock() const =0
Returns true if the clock is shown.
virtual void enableDisplayCall(bool enable)=0
Enables/disables call display.
virtual bool defaultChannel() const =0
Returns true if the default boot channel is enabled.
virtual Frequency autoRepeaterMinFrequencyVHF() const =0
Returns the minimum frequency in Hz for the auto-repeater range in VHF band.
virtual bool volumeChangePrompt() const =0
Returns true if the volume change prompt is enabled.
virtual void enableDefaultChannel(bool enable)=0
Enables/disables default boot channel.
virtual void setDefaultChannelBIndex(unsigned idx)=0
Sets the default channel index for VFO B.
virtual void enableKeypadLock(bool enable)=0
Enables/disables the keypad lock.
virtual void enableIdleChannelTone(bool enable)=0
Enables/disables the idle channel tone.
virtual bool keyToneEnabled() const =0
Returns true, if the key tone is enabled.
virtual void enableFMTalkPermit(bool enable)=0
Enables/disables the talk permit tone for analog channels.
virtual bool vfoModeA() const =0
Returns true if the VFO A is in VFO mode.
virtual void enableDisplayClock(bool enable)=0
Enables/disables clock display.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey2Long() const =0
Returns the key function for a long press on the function key 2.
virtual bool gpsUnitsImperial() const =0
Returns true if the GPS units are imperial.
virtual void enableDisplayFrequency(bool enable)
Enables/disables the frequency display.
Definition: anytone_codeplug.cc:1623
virtual void setFuncKeyCLong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 3.
virtual QTimeZone gpsTimeZone() const =0
Returns the GPS time zone.
virtual unsigned brightness() const =0
Returns the display brightness.
virtual void setAutoRepeaterMinFrequencyUHF(Frequency Hz)=0
Sets the minimum frequency in Hz for the auto-repeater range in UHF band.
virtual Frequency autoRepeaterMaxFrequencyVHF() const =0
Returns the maximum frequency in Hz for the auto-repeater range in VHF band.
virtual void enableVFOModeA(bool enable)=0
Enables/disables VFO mode for VFO A.
virtual bool callAlert() const =0
Returns true if call alert is enabled.
virtual unsigned autoRepeaterOffsetFrequencyIndexVHF() const =0
Returns the auto-repeater offset frequency index for UHF.
AutoShutdown
Possible automatic shutdown delays.
Definition: anytone_codeplug.hh:795
virtual void setAutoRepeaterOffsetFrequenyIndexVHF(unsigned idx)=0
Sets the auto-repeater offset frequency index for VHF.
virtual void setDefaultChannelAToVFO()=0
Sets the default channel for VFO A to be VFO.
virtual bool dmrTalkPermit() const =0
Returns true if the talk permit tone is enabled for digital channels.
GeneralSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1607
virtual void setMinVFOScanFrequencyVHF(Frequency hz)=0
Sets the minimum VFO scan frequency for the VHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey1Long() const =0
Returns the key function for a long press on the function key 1.
virtual void setSquelchLevelA(unsigned level)
Returns the squelch level for VFO A, (0=off).
Definition: anytone_codeplug.cc:1685
virtual Interval longPressDuration() const =0
Returns the long-press duration in ms.
virtual bool keypadLock() const =0
Returns true if the keypad is locked.
virtual bool recording() const =0
Returns true if recording is enabled.
virtual bool displayFrequency() const
Returns true if the radio displays frequecies instead of channels is enabled.
Definition: anytone_codeplug.cc:1619
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyCLong() const =0
Returns the key function for a long press on the function key 3.
virtual bool showLastHeard() const =0
Returns true if the last heard is shown while pressing PTT.
virtual void enableSubChannel(bool enable)=0
Enables/disables sub channel.
virtual unsigned defaultZoneIndexB() const =0
Returns the default zone index (0-based) for VFO B.
virtual void setFuncKeyAShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 1/A.
virtual void clearAutoRepeaterOffsetFrequencyIndexUHF()=0
Clears the auto-repeater offset frequency index for UHF.
virtual bool dmrResetTone() const =0
Returns true if the reset tone is enabled for digital calls.
virtual void enableKeepLastCaller(bool enable)=0
Enables/disables keeping the last caller when changing the channel.
virtual AnytoneSettingsExtension::VFOScanType vfoScanType() const =0
Returns the VFO scan type.
virtual void setMemoryZoneB(unsigned zone)=0
Sets the memory zone for VFO B.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyCShort() const =0
Returns the key function for a short press on the function key 3/C.
virtual void setLastCallerDisplayMode(AnytoneDisplaySettingsExtension::LastCallerDisplayMode mode)=0
Sets the last-caller display mode.
virtual bool linkSettings(RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack())
Links the general settings.
Definition: anytone_codeplug.cc:1955
virtual bool hasAutoRepeaterOffsetFrequencyIndexUHF() const =0
Returns true if the auto-repeater offset frequency for UHF is set.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey1Short() const =0
Returns the key function for a short press on the function key 1.
virtual void setBrightness(unsigned level)=0
Sets the display brightness.
virtual void setBootDisplay(AnytoneBootSettingsExtension::BootDisplay mode)
Sets the boot display mode.
Definition: anytone_codeplug.cc:1667
virtual void enableActiveChannelB(bool enable)=0
Enables/disables VFO B as the active channel.
virtual bool subChannel() const =0
Returns true if sub channel is enabled.
virtual AnytoneDisplaySettingsExtension::LastCallerDisplayMode lastCallerDisplayMode() const =0
Returns the last-caller display mode.
virtual void enableCallEndPrompt(bool enable)=0
Enables/disables the call-end prompt.
virtual void setMinVFOScanFrequencyUHF(Frequency hz)=0
Sets the minimum VFO scan frequency for the UHF band in Hz.
virtual void setFuncKeyBShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 2/B.
virtual bool knobLock() const =0
Returns true if the knob is locked.
virtual bool vfoModeB() const =0
Returns true if the VFO B is in VFO mode.
virtual void setMaxVFOScanFrequencyUHF(Frequency hz)=0
Sets the maximum VFO scan frequency for the UHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey2Short() const =0
Returns the key function for a short press on the function key 2.
virtual bool defaultChannelBIsVFO() const =0
Returns true if the default channel for VFO B is VFO.
virtual void setCallDisplayColor(AnytoneDisplaySettingsExtension::Color color)=0
Sets the display color for callsigns.
virtual void setGPSTimeZone(const QTimeZone &zone)=0
Sets the GPS time zone.
virtual void enableKeyTone(bool enable)=0
Enables/disables the key-tone.
virtual unsigned memoryZoneA() const =0
Returns the memory zone for VFO A.
virtual void setFuncKeyALong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 1.
virtual void enableKnobLock(bool enable)=0
Enables/disables the knob lock.
virtual Frequency minVFOScanFrequencyVHF() const =0
Returns the minimum VFO scan frequency for the VHF band in Hz.
virtual bool callEndPrompt() const =0
Returns true if the call-end prompt is enabled.
virtual void enableVFOModeB(bool enable)=0
Enables/disables VFO mode for VFO B.
virtual AnytoneAutoRepeaterSettingsExtension::Direction autoRepeaterDirectionA() const =0
Returns the auto repeater offset direction for VFO A.
virtual unsigned defaultChannelBIndex() const =0
Returns the default channel index for VFO B.
virtual bool getGPSPosition() const =0
Returns true if get GPS position is enabled.
virtual Frequency maxVFOScanFrequencyVHF() const =0
Returns the maximum VFO scan frequency for the VHF band in Hz.
virtual AnytoneAutoRepeaterSettingsExtension::Direction autoRepeaterDirectionB() const =0
Returns the auto-repeater direction for VFO B.
virtual AnytoneBootSettingsExtension::BootDisplay bootDisplay() const
Returns the boot display mode.
Definition: anytone_codeplug.cc:1663
virtual bool fromConfig(const Flags &flags, Context &ctx)
Encodes the general settings.
Definition: anytone_codeplug.cc:1697
virtual void setDefaultChannelBToVFO()=0
Sets the default channel for VFO B to be VFO.
virtual void setFuncKeyBLong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 2.
virtual void clearAutoRepeaterOffsetFrequencyIndexVHF()=0
Clears the auto-repeater offset frequency index for VHF.
virtual unsigned autoRepeaterOffsetFrequencyIndexUHF() const =0
Returns the auto-repeater offset frequency index for UHF.
virtual void idleToneMelody(Melody &melody) const =0
Returns the idle-tone melody.
virtual void setResetToneMelody(const Melody &melody)=0
Sets the reset-tone melody.
virtual void setAutoRepeaterDirectionA(AnytoneAutoRepeaterSettingsExtension::Direction dir)=0
Sets the auto-repeater offset direction for VFO A.
virtual bool idleChannelTone() const =0
Returns true if the idle channel tone is enabled.
virtual bool startupTone() const =0
Returns true if the startup tone is enabled.
virtual void setDMRMicGain(unsigned int gain)=0
Sets the microphone gain.
virtual void setAutoRepeaterMaxFrequencyVHF(Frequency Hz)=0
Sets the maximum frequency in Hz for the auto-repeater range in VHF band.
virtual AnytoneDisplaySettingsExtension::Color callDisplayColor() const =0
Returns the display color for callsigns.
virtual void enableSidekeysLock(bool enable)=0
Enables/disables the sidekeys lock.
virtual void setLongPressDuration(Interval ms)=0
Sets the long-press duration in ms.
virtual void setFuncKey2Short(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 2.
virtual void setFuncKey1Long(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 1.
virtual void setFuncKey1Short(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 1.
virtual bool sidekeysLock() const =0
Returns true if the sidekeys are locked.
virtual void setAutoRepeaterDirectionB(AnytoneAutoRepeaterSettingsExtension::Direction dir)=0
Sets the auto-repeater direction for VFO B.
virtual Frequency autoRepeaterMinFrequencyUHF() const =0
Returns the minimum frequency in Hz for the auto-repeater range in UHF band.
virtual void enableBootPassword(bool enable)
Enables/disables boot password.
Definition: anytone_codeplug.cc:1676
void clear()
Resets the general settings.
Definition: anytone_codeplug.cc:1614
virtual void enableKeyLockForced(bool enable)=0
Enables/disables the "professional" key lock.
virtual void setSquelchLevelB(unsigned level)
Returns the squelch level for VFO B, (0=off).
Definition: anytone_codeplug.cc:1692
virtual bool activeChannelB() const =0
Returns true if the active channel is VFO B.
virtual bool keepLastCaller() const =0
Returns true if the last caller is kept when changing channel.
virtual bool showCurrentContact() const =0
Returns true if the current contact is shown.
virtual void setAutoRepeaterMaxFrequencyUHF(Frequency Hz)=0
Sets the maximum frequency in Hz for the auto-repeater range in UHF band.
virtual bool displayCall() const =0
Returns true if the call is displayed instead of the name.
virtual void enableCallAlert(bool enable)=0
Enables/disables call alert.
virtual bool hasAutoRepeaterOffsetFrequencyIndexVHF() const =0
Returns true if the auto-repeater offset frequency for VHF is set.
virtual unsigned memoryZoneB() const =0
Returns the memory zone for VFO B.
virtual Frequency minVFOScanFrequencyUHF() const =0
Returns the minimum VFO scan frequency for the UHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyBLong() const =0
Returns the key function for a long press on the function key 2.
virtual void setMaxSpeakerVolume(unsigned level)=0
Sets the maximum volume.
virtual bool gps() const =0
Returns true if GPS is enabled.
virtual void setMemoryZoneA(unsigned zone)=0
Sets the memory zone for VFO A.
virtual Frequency autoRepeaterMaxFrequencyUHF() const =0
Returns the maximum frequency in Hz for the auto-repeater range in UHF band.
virtual void setMaxVFOScanFrequencyVHF(Frequency hz)=0
Sets the maximum VFO scan frequency for the VHF band in Hz.
virtual unsigned defaultZoneIndexA() const =0
Returns the default zone index (0-based) for VFO A.
virtual void setAutoShutdownDelay(Interval min)
Sets the auto-shutdown delay in minutes.
Definition: anytone_codeplug.cc:1648
virtual void enableRecording(bool enable)=0
Enables/disables recording.
virtual Interval autoShutdownDelay() const
Returns the auto-shutdown delay in minutes.
Definition: anytone_codeplug.cc:1637
virtual void enableDMRResetTone(bool enable)=0
Enables/disables the reset tone for digital calls.
virtual void enableAutoKeyLock(bool enable)
Enables/disables auto key-lock.
Definition: anytone_codeplug.cc:1632
virtual void enableGetGPSPosition(bool enable)=0
Enables/disables get GPS position.
virtual bool bootPassword() const
Returns true if boot password is enabled.
Definition: anytone_codeplug.cc:1672
virtual void setFuncKeyCShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 3/C.
virtual unsigned squelchLevelA() const
Squelch level of VFO A, (0=off).
Definition: anytone_codeplug.cc:1681
Represents the bitmap indicating which group list element is valid.
Definition: anytone_codeplug.hh:588
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:598
GroupListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1280
Represents the base class for group lists in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:544
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition: anytone_codeplug.cc:1215
virtual RXGroupList * toGroupListObj() const
Constructs a new RXGroupList from this group list.
Definition: anytone_codeplug.cc:1228
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is valid.
Definition: anytone_codeplug.cc:1211
virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx)
Constructs this group list from the given RXGroupList.
Definition: anytone_codeplug.cc:1250
void clear()
Clears the group list.
Definition: anytone_codeplug.cc:1190
GroupListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1177
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:554
bool isValid() const
Returns true if the group list is valid.
Definition: anytone_codeplug.cc:1197
virtual void setName(const QString &name)
Sets the name of the group list.
Definition: anytone_codeplug.cc:1206
virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const
Populates the RXGroupList from this group list.
Definition: anytone_codeplug.cc:1233
virtual QString name() const
Returns the name of the group list.
Definition: anytone_codeplug.cc:1202
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition: anytone_codeplug.cc:1223
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition: anytone_codeplug.cc:1219
Represents the base class of a hot-key setting entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1732
virtual DigiCallType digiCallType() const
If type returns Type::Call and callType CalLType::Digital, returns the digital call type.
Definition: anytone_codeplug.cc:2900
virtual void setContactIndex(unsigned idx)
Sets the contact index.
Definition: anytone_codeplug.cc:2917
Type
Hot-key types.
Definition: anytone_codeplug.hh:1735
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1778
void clear()
Resets the hot-key entry.
Definition: anytone_codeplug.cc:2866
virtual Type type() const
Returns the type of the hot-key entry.
Definition: anytone_codeplug.cc:2873
virtual void setMessageIndex(unsigned idx)
Sets the message index.
Definition: anytone_codeplug.cc:2934
virtual void clearContactIndex()
Clears the contact index.
Definition: anytone_codeplug.cc:2921
DigiCallType
Possible digital call sub-types.
Definition: anytone_codeplug.hh:1759
virtual unsigned contactIndex() const
If type is Type::Call, returns the contact index.
Definition: anytone_codeplug.cc:2913
virtual void clearMessageIndex()
Clears the message index.
Definition: anytone_codeplug.cc:2938
virtual CallType callType() const
If type returns Type::Call, returns the type of the call.
Definition: anytone_codeplug.cc:2891
virtual void setMenuItem(MenuItem item)
Sets the menu item.
Definition: anytone_codeplug.cc:2886
virtual bool hasContactIndex() const
Returns true if the contact index is set.
Definition: anytone_codeplug.cc:2909
HotKeyElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2853
virtual void setCallType(CallType type)
Sets the call type.
Definition: anytone_codeplug.cc:2895
CallType
Possible call types.
Definition: anytone_codeplug.hh:1753
virtual unsigned messageIndex() const
Returns the message index.
Definition: anytone_codeplug.cc:2930
virtual void setType(Type type)
Sets the type of the hot-key entry.
Definition: anytone_codeplug.cc:2877
virtual MenuItem menuItem() const
If type returns Type::Menu, returns the menu item.
Definition: anytone_codeplug.cc:2882
MenuItem
Possible menu items.
Definition: anytone_codeplug.hh:1741
virtual bool hasMessageIndex() const
Returns true if a message index is set.
Definition: anytone_codeplug.cc:2926
virtual void setDigiCallType(DigiCallType type)
Sets the digital call type.
Definition: anytone_codeplug.cc:2904
Represents the list of hot-key settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1837
HotKeySettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2946
virtual uint8_t * hotKeySetting(unsigned int n) const
Returns a pointer to the n-th hot key setting.
Definition: anytone_codeplug.cc:2966
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2959
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1847
Represents the base class for inverted bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:45
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:113
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:118
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:133
InvertedBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:106
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:124
Represents the base class for inverted bytemaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:69
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:164
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:157
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:171
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:152
InvertedBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:145
Represents the bytemap indicating which message is valid.
Definition: anytone_codeplug.hh:1576
MessageBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2710
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1586
Represents base class of a preset message for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1553
MessageElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2680
virtual QString message() const
Returns the message text.
Definition: anytone_codeplug.cc:2698
void clear()
Resets the message.
Definition: anytone_codeplug.cc:2693
virtual void setMessage(const QString &msg)
Sets the message text.
Definition: anytone_codeplug.cc:2702
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1563
Represents the base class of prefabricated message linked list for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1514
virtual void setIndex(unsigned idx)
Sets the index of the message.
Definition: anytone_codeplug.cc:2668
virtual bool hasIndex() const
Returns true if there is a message index.
Definition: anytone_codeplug.cc:2660
virtual unsigned next() const
Returns the index of the next message in list.
Definition: anytone_codeplug.cc:2647
virtual unsigned index() const
Returns the index of the message.
Definition: anytone_codeplug.cc:2664
void clear()
Clears the message list item.
Definition: anytone_codeplug.cc:2636
virtual void setNext(unsigned idx)
Sets the index of the next message in list.
Definition: anytone_codeplug.cc:2651
MessageListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2623
virtual void clearNext()
Clears the next message index.
Definition: anytone_codeplug.cc:2655
virtual bool hasNext() const
Returns true if there is a next message (EOL otherwise).
Definition: anytone_codeplug.cc:2643
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1524
virtual void clearIndex()
Clears the index of the message.
Definition: anytone_codeplug.cc:2672
Represents the bitmap indicating which radio IDs are valid.
Definition: anytone_codeplug.hh:771
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:781
RadioIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1591
Represents the base class for radio IDs in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:738
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:748
virtual bool fromRadioID(DMRRadioID *id)
Encodes the given RadioID.
Definition: anytone_codeplug.cc:1581
virtual void setName(const QString &name)
Sets the name of the radio ID.
Definition: anytone_codeplug.cc:1572
void clear()
Resets the radio ID.
Definition: anytone_codeplug.cc:1555
RadioIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1542
virtual DMRRadioID * toRadioID() const
Constructs a new radio id.
Definition: anytone_codeplug.cc:1577
virtual void setNumber(unsigned number)
Sets the number of the radio ID.
Definition: anytone_codeplug.cc:1563
virtual QString name() const
Returns the name of the radio ID.
Definition: anytone_codeplug.cc:1568
virtual unsigned number() const
Returns the number of the radio ID.
Definition: anytone_codeplug.cc:1559
Represents the table of repeater offset frequencies.
Definition: anytone_codeplug.hh:1468
virtual bool isSet(unsigned int n) const
Returns true, if the n-th offset frequency is set.
Definition: anytone_codeplug.cc:2588
virtual Frequency offset(unsigned int n) const
Returns the n-th offset frequency.
Definition: anytone_codeplug.cc:2595
virtual void setOffset(unsigned int n, Frequency freq)
Sets the n-th offset frequency.
Definition: anytone_codeplug.cc:2605
RepeaterOffsetListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2568
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2581
virtual void clearOffset(unsigned int n)
Clears the n-th offset frequency.
Definition: anytone_codeplug.cc:2613
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1478
Represents the bitmap indicating which scanlist elements are valid.
Definition: anytone_codeplug.hh:720
ScanListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1526
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:730
Represents the base class for scan lists in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:606
virtual void setSecondarySelected()
Sets the secondary channel to be selected channel.
Definition: anytone_codeplug.cc:1374
virtual bool fromScanListObj(ScanList *lst, Context &ctx)
Constructs the binary representation from the give config.
Definition: anytone_codeplug.cc:1486
virtual void setSecondary(unsigned idx)
Sets the secondary channel index.
Definition: anytone_codeplug.cc:1370
virtual PriChannel priorityChannels() const
Returns the priority channel selection.
Definition: anytone_codeplug.cc:1324
ScanListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1296
virtual QString name() const
Returns the name of the scan list.
Definition: anytone_codeplug.cc:1425
virtual void setDropOutDelay(unsigned sec)
Sets the drop out delay in seconds.
Definition: anytone_codeplug.cc:1403
virtual bool hasSecondary() const
Returns true if the secondary channel is set.
Definition: anytone_codeplug.cc:1358
virtual bool hasPrimary() const
Returns true if the primary channel is set.
Definition: anytone_codeplug.cc:1333
virtual bool primaryIsSelected() const
Returns true if the primary channel is set to the selected channel.
Definition: anytone_codeplug.cc:1337
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition: anytone_codeplug.cc:1438
virtual void setRevertChannel(RevertChannel type)
Sets the revert channel type.
Definition: anytone_codeplug.cc:1420
virtual ScanList * toScanListObj() const
Constructs a ScanList object from this definition.
Definition: anytone_codeplug.cc:1451
virtual unsigned lookBackTimeA() const
Returns the look back time A in seconds.
Definition: anytone_codeplug.cc:1383
virtual void setPrimary(unsigned idx)
Sets the primary channel index.
Definition: anytone_codeplug.cc:1345
virtual void setPrimarySelected()
Sets the primary channel to be selected channel.
Definition: anytone_codeplug.cc:1349
virtual void setDwellTime(unsigned sec)
Sets the dwell time in seconds.
Definition: anytone_codeplug.cc:1411
virtual unsigned primary() const
Returns the primary channel index.
Definition: anytone_codeplug.cc:1341
PriChannel
Defines all possible priority channel selections.
Definition: anytone_codeplug.hh:609
@ Secondary
Priority Channel Select 2.
@ Both
Priority Channel Select 1 + Priority Channel Select 2.
virtual void setName(const QString &name)
Sets the name of the scan list.
Definition: anytone_codeplug.cc:1429
virtual bool secondaryIsSelected() const
Returns true if the secondary channel is set to the selected channel.
Definition: anytone_codeplug.cc:1362
virtual void setPriorityChannels(PriChannel sel)
Sets the priority channel selection.
Definition: anytone_codeplug.cc:1328
virtual void clearSecondaryChannel()
Clears the secondary channel index.
Definition: anytone_codeplug.cc:1378
virtual RevertChannel revertChannel() const
Returns the revert channel type.
Definition: anytone_codeplug.cc:1416
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is set.
Definition: anytone_codeplug.cc:1434
virtual unsigned lookBackTimeB() const
Returns the look back time B in seconds.
Definition: anytone_codeplug.cc:1391
virtual void clearPrimaryChannel()
Clears the primary channel index.
Definition: anytone_codeplug.cc:1353
virtual void setLookBackTimeA(unsigned sec)
Sets the look back time A in seconds.
Definition: anytone_codeplug.cc:1387
RevertChannel
Defines all possible reply channel selections.
Definition: anytone_codeplug.hh:617
@ SecondaryActive
Secondary + active channel.
@ SelectedActive
Selected + active channel.
void clear()
Resets the scan list.
Definition: anytone_codeplug.cc:1309
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition: anytone_codeplug.cc:1442
virtual unsigned dropOutDelay() const
Returns the drop out delay in seconds.
Definition: anytone_codeplug.cc:1399
virtual void setLookBackTimeB(unsigned sec)
Sets the look back time B in seconds.
Definition: anytone_codeplug.cc:1395
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition: anytone_codeplug.cc:1446
virtual unsigned secondary() const
Returns the secondary channel index.
Definition: anytone_codeplug.cc:1366
virtual bool linkScanListObj(ScanList *lst, Context &ctx) const
Links all channels (members and primary channels) with the given scan-list object.
Definition: anytone_codeplug.cc:1456
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:637
virtual unsigned dwellTime() const
Returns the dwell time in seconds.
Definition: anytone_codeplug.cc:1407
Represents the bitmap, indicating which status messages are valid.
Definition: anytone_codeplug.hh:1714
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1724
StatusMessageBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2837
Implements the list of status messages for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1676
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1686
virtual QString message(unsigned int n) const
Returns the n-th status message.
Definition: anytone_codeplug.cc:2821
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2816
StatusMessagesElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2803
virtual void setMessage(unsigned int n, const QString &msg)
Sets the n-th status message.
Definition: anytone_codeplug.cc:2827
Rerpesents the two-tone function bitmap, indicating which two-tone functions are valid.
Definition: anytone_codeplug.hh:2543
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2553
TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3906
Represents the base-class for a 2-tone function for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2482
virtual Response response() const
Returns the response.
Definition: anytone_codeplug.cc:3885
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition: anytone_codeplug.cc:3880
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition: anytone_codeplug.cc:3871
Response
Possible responses to a decode.
Definition: anytone_codeplug.hh:2485
void clear()
Resets the function.
Definition: anytone_codeplug.cc:3862
virtual void setResponse(Response resp)
Sets the response.
Definition: anytone_codeplug.cc:3889
virtual QString name() const
Returns the name of the function.
Definition: anytone_codeplug.cc:3894
virtual double secondTone() const
Returns the second tone of the sequence.
Definition: anytone_codeplug.cc:3876
virtual void setName(const QString &name)
Sets the name of the function.
Definition: anytone_codeplug.cc:3898
TwoToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3849
virtual double firstTone() const
Returns the first tone of the sequence.
Definition: anytone_codeplug.cc:3867
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2498
Represents the two-tone ID bitmap, indicating the which two-tone IDs are valid.
Definition: anytone_codeplug.hh:2464
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2474
TwoToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3833
Represents the base-class for a 2-tone ID for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2415
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition: anytone_codeplug.cc:3816
virtual QString name() const
Returns the name of the function.
Definition: anytone_codeplug.cc:3821
void clear()
Resets the ID.
Definition: anytone_codeplug.cc:3798
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2425
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition: anytone_codeplug.cc:3807
virtual double firstTone() const
Returns the first tone of the sequence.
Definition: anytone_codeplug.cc:3803
virtual void setName(const QString &name)
Sets the name of the function.
Definition: anytone_codeplug.cc:3825
TwoToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3785
virtual double secondTone() const
Returns the second tone of the sequence.
Definition: anytone_codeplug.cc:3812
Represents the base class of 2-tone settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2561
virtual unsigned gapDuration() const
Returns the gap duration in ms.
Definition: anytone_codeplug.cc:3967
virtual void setFirstToneDuration(unsigned ms)
Sets the first tone duration in ms.
Definition: anytone_codeplug.cc:3944
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:3985
virtual void setSecondToneDuration(unsigned ms)
Sets the second tone duration in ms.
Definition: anytone_codeplug.cc:3953
virtual unsigned firstToneDuration() const
Returns the first tone duration in ms.
Definition: anytone_codeplug.cc:3940
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition: anytone_codeplug.cc:3989
virtual void setLongToneDuration(unsigned ms)
Sets the long tone duration in ms.
Definition: anytone_codeplug.cc:3962
virtual void setAutoResetTime(unsigned sec)
Sets the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3980
TwoToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3922
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3976
virtual unsigned longToneDuration() const
Returns the long tone duration in ms.
Definition: anytone_codeplug.cc:3958
virtual unsigned secondToneDuration() const
Returns the second tone duration in ms.
Definition: anytone_codeplug.cc:3949
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2571
void clear()
Resets the settings.
Definition: anytone_codeplug.cc:3935
virtual void setGapDuration(unsigned ms)
Sets the gap duration in ms.
Definition: anytone_codeplug.cc:3971
Represents the bitmap, indicating which WFM (FM broadcast) channels are valid.
Definition: anytone_codeplug.hh:2795
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2805
WFMChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4300
Represents a list of 100 FM broad cast channels.
Definition: anytone_codeplug.hh:2755
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2765
virtual void clearChannel(unsigned int n)
Clears the n-th channel frequency.
Definition: anytone_codeplug.cc:4290
WFMChannelListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4251
virtual void setChannel(unsigned int n, Frequency freq)
Sets the n-th channel frequency.
Definition: anytone_codeplug.cc:4283
virtual Frequency channel(unsigned int n) const
Returns the n-th channel frequency.
Definition: anytone_codeplug.cc:4276
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4264
virtual bool hasChannel(unsigned int n) const
Returns true, if the n-th channel is set.
Definition: anytone_codeplug.cc:4269
Represents the WFM (FM broadcast) VFO frquency.
Definition: anytone_codeplug.hh:2810
virtual Frequency frequency() const
Returns the VFO frequency.
Definition: anytone_codeplug.cc:4335
WFMVFOElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4316
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4329
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2820
virtual void setFrequency(Frequency freq)
Sets the VFO frequency.
Definition: anytone_codeplug.cc:4340
Represents the bitmap indcating which zones are valid.
Definition: anytone_codeplug.hh:1273
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1283
ZoneBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2176
Represents the base class for zone channel list for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1237
virtual unsigned channelIndexA(unsigned n) const
Returns the channel index (0-based) for VFO A for the n-th zone.
Definition: anytone_codeplug.cc:2143
virtual void setChannelIndexB(unsigned n, unsigned idx)
Sets the channel index (0-based) for VFO B for the n-th zone.
Definition: anytone_codeplug.cc:2164
virtual bool hasChannelB(unsigned n) const
Returns true if the channel index for VFO B is set for the n-th zone.
Definition: anytone_codeplug.cc:2156
void clear()
Resets the zone channel list.
Definition: anytone_codeplug.cc:2132
ZoneChannelListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2119
virtual bool hasChannelA(unsigned n) const
Returns true if the channel index for VFO A is set for the n-th zone.
Definition: anytone_codeplug.cc:2139
virtual void clearChannelIndexA(unsigned n)
Clears the channel index (0-based) for VFO A for the n-th zone.
Definition: anytone_codeplug.cc:2151
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1247
virtual void setChannelIndexA(unsigned n, unsigned idx)
Sets the channel index (0-based) for VFO A for the n-th zone.
Definition: anytone_codeplug.cc:2147
virtual void clearChannelIndexB(unsigned n)
Clears the channel index (0-based) for VFO B for the n-th zone.
Definition: anytone_codeplug.cc:2168
virtual unsigned channelIndexB(unsigned n) const
Returns the channel index (0-based) for VFO B for the n-th zone.
Definition: anytone_codeplug.cc:2160
Base class interface for all Anytone radio codeplugs.
Definition: anytone_codeplug.hh:20
AnytoneCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition: anytone_codeplug.cc:4488
virtual void setBitmaps(Context &ctx)=0
Sets all bitmaps for the given config.
bool encode(Config *config, const Flags &flags, const ErrorStack &err)
Encodes a given abstract configuration (config) to the device specific binary code-plug.
Definition: anytone_codeplug.cc:4619
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition: anytone_codeplug.cc:4499
virtual void allocateUpdated()=0
Allocate all code-plug elements that must be written back to the device to maintain a working codeplu...
virtual void allocateForEncoding()=0
Allocate all code-plug elements that are defined through the common Config.
virtual ~AnytoneCodeplug()
Destructor.
Definition: anytone_codeplug.cc:4494
virtual void allocateForDecoding()=0
Allocate all code-plug elements that must be downloaded for decoding.
bool postprocess(Config *config, const ErrorStack &err) const
Retruns a post-processed configuration of the decoded config.
Definition: anytone_codeplug.cc:4602
virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes the downloaded codeplug.
Config * preprocess(Config *config, const ErrorStack &err) const
Retruns a prepared configuration for this particular radio.
Definition: anytone_codeplug.cc:4583
virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes the given config (via context) to the binary codeplug.
bool decode(Config *config, const ErrorStack &err)
Decodes a binary codeplug to the given abstract configuration config.
Definition: anytone_codeplug.cc:4649
virtual bool allocateBitmaps()=0
Allocates the bitmaps.
QString _label
Holds the image label.
Definition: anytone_codeplug.hh:2982
virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition: anytone_codeplug.cc:4510
AlertType
Possible ring-tone types.
Definition: anytone_extension.hh:322
Color
Possible display colors.
Definition: anytone_extension.hh:975
LastCallerDisplayMode
What to show from the last caller.
Definition: anytone_extension.hh:969
SquelchMode
Possible squelch mode settings.
Definition: anytone_extension.hh:142
KeyFunction
All possible key functions.
Definition: anytone_extension.hh:586
Implements an interface to Anytone radios.
Definition: anytone_radio.hh:34
VFOScanType
Encodes the possible VFO scan types.
Definition: anytone_extension.hh:2149
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition: channel.hh:61
Base class for all codeplug contexts.
Definition: codeplug.hh:238
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:51
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:25
This class defines the interface all device-specific code-plugs must implement.
Definition: codeplug.hh:19
The config class, representing the codeplug configuration.
Definition: config.hh:70
uint32_t size() const
Returns the total size of the DFU file.
Definition: dfufile.cc:52
TimeSlot
Possible timeslots for digital channels.
Definition: channel.hh:389
Represents a digital contact, that is a DMR number.
Definition: contact.hh:141
Type
Possible call types for a contact.
Definition: contact.hh:155
Represents a DMR radio ID within the abstract config.
Definition: radioid.hh:33
Represents an analog contact, that is a DTMF number.
Definition: contact.hh:89
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Bandwidth
Possible bandwidth of an analog channel.
Definition: channel.hh:240
Represents a time interval.
Definition: interval.hh:11
A config item that encodes a melody.
Definition: melody.hh:20
Generic representation of a RX group list.
Definition: rxgrouplist.hh:14
Represents the common radio-global settings.
Definition: radiosettings.hh:15
Generic representation of a scan list.
Definition: scanlist.hh:15
Code
This huge enum lists all possible RX/TX tones that can be associated with analog channels.
Definition: signaling.hh:18
Internal offsets within the element.
Definition: anytone_codeplug.hh:2065
Some limits for the quick calls.
Definition: anytone_codeplug.hh:1658
static constexpr unsigned int numEntries()
The maximum number of quick-call entries.
Definition: anytone_codeplug.hh:1659
Some offsets within the element.
Definition: anytone_codeplug.hh:1664
Internal used offsets within the channel element.
Definition: anytone_codeplug.hh:383
Some limits for the message.
Definition: anytone_codeplug.hh:1450
static constexpr unsigned int length()
Maximum message length.
Definition: anytone_codeplug.hh:1451
Some internal used offset.
Definition: anytone_codeplug.hh:1456
Some limits for the list.
Definition: anytone_codeplug.hh:2857
static constexpr unsigned int numEntries()
Maximum number of DMR encryption key IDs.
Definition: anytone_codeplug.hh:2858
Some internal used offsets within the element.
Definition: anytone_codeplug.hh:2863
Some limits of the list.
Definition: anytone_codeplug.hh:2893
static constexpr unsigned numEntries()
Maximum number of keys.
Definition: anytone_codeplug.hh:2894
Some offsets within the element.
Definition: anytone_codeplug.hh:2899
Some limits for the element.
Definition: anytone_codeplug.hh:508
static constexpr unsigned int digitCount()
The max number of digits.
Definition: anytone_codeplug.hh:509
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:510
Internal used offsets within the codeplug.
Definition: anytone_codeplug.hh:515
Some limits of the list.
Definition: anytone_codeplug.hh:2744
static constexpr unsigned int numberLength()
The maximum length of the numbers.
Definition: anytone_codeplug.hh:2746
static constexpr unsigned int numEntries()
The maximum number of entries in the list.
Definition: anytone_codeplug.hh:2745
Internal used offsets within the element.
Definition: anytone_codeplug.hh:2105
Some limits for the list.
Definition: anytone_codeplug.hh:2281
static constexpr unsigned int numFunctions()
The max number of functions.
Definition: anytone_codeplug.hh:2282
Some limits for the list.
Definition: anytone_codeplug.hh:2200
static constexpr unsigned int numEntries()
Maximum number of entries.
Definition: anytone_codeplug.hh:2201
Internal used offsets within the element.
Definition: anytone_codeplug.hh:1167
Some limits for this element.
Definition: anytone_codeplug.hh:1856
static constexpr unsigned int numEntries()
Maximum number of hot-key entries.
Definition: anytone_codeplug.hh:1857
Some internal offsets within the element.
Definition: anytone_codeplug.hh:1862
Some limits for the offset frequency table.
Definition: anytone_codeplug.hh:1493
static constexpr unsigned int numEntries()
Max number of entries in the table.
Definition: anytone_codeplug.hh:1494
Some internal used offsets.
Definition: anytone_codeplug.hh:1499
Some limits.
Definition: anytone_codeplug.hh:1697
static constexpr unsigned int numMessages()
Maximum number of messages.
Definition: anytone_codeplug.hh:1698
static constexpr unsigned int messageLength()
Maximum length of the messages.
Definition: anytone_codeplug.hh:1699
Some internal offsets.
Definition: anytone_codeplug.hh:1704
Some limits of the element.
Definition: anytone_codeplug.hh:2525
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:2526
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2531
Some limits for the element.
Definition: anytone_codeplug.hh:2447
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:2448
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2453
Some limits for the channel list.
Definition: anytone_codeplug.hh:2780
static constexpr unsigned int numEntries()
Maximum number of channels in the list.
Definition: anytone_codeplug.hh:2781
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2786
Helper type to encode frequencies without any rounding error.
Definition: frequency.hh:11