libdrmconf  0.11.3
A library to program DMR radios.
anytone_codeplug.hh
1 #ifndef ANYTONECODEPLUG_HH
2 #define ANYTONECODEPLUG_HH
3 
4 #include "codeplug.hh"
5 #include "anytone_extension.hh"
6 
14 class AnytoneCodeplug : public Codeplug
15 {
16  Q_OBJECT
17 
18 public:
20  class BitmapElement: public Element
21  {
22  protected:
24  BitmapElement(uint8_t *ptr, size_t size);
25 
26  public:
28  void clear();
29 
31  virtual bool isEncoded(unsigned int idx) const ;
33  virtual void setEncoded(unsigned int idx, bool enable);
35  virtual void enableFirst(unsigned int n);
36  };
37 
40  {
41  protected:
43  InvertedBitmapElement(uint8_t *ptr, size_t size);
44 
45  public:
47  void clear();
48 
50  virtual bool isEncoded(unsigned int idx) const ;
52  virtual void setEncoded(unsigned int idx, bool enable);
54  virtual void enableFirst(unsigned int n);
55  };
56 
64  {
65  protected:
67  InvertedBytemapElement(uint8_t *ptr, size_t size);
68 
69  public:
71  void clear();
72 
74  virtual bool isEncoded(unsigned int idx) const ;
76  virtual void setEncoded(unsigned int idx, bool enable);
78  virtual void enableFirst(unsigned int n);
79  };
80 
86  class ChannelElement: public Element
87  {
88  public:
90  enum class Mode {
91  Analog = 0,
92  Digital = 1,
93  MixedAnalog = 2,
94  MixedDigital = 3
95  };
96 
98  enum Power {
99  POWER_LOW = 0,
102  POWER_TURBO = 3
103  };
104 
106  enum class RepeaterMode {
107  Simplex = 0,
108  Positive = 1,
109  Negative = 2
110  };
111 
113  enum class SignalingMode {
114  None = 0,
115  CTCSS = 1,
116  DCS = 2
117  };
118 
120  enum class Admit {
121  Always = 0,
122  Free = 1,
123  DifferentColorCode = 2,
124  SameColorCode = 3,
125  Tone = 1,
126  Busy = 2
127  };
128 
130  enum class OptSignaling {
131  Off = 0,
132  DTMF = 1,
133  TwoTone = 2,
134  FiveTone = 3
135  };
136 
137  protected:
139  ChannelElement(uint8_t *ptr, unsigned size);
140 
141  public:
143  ChannelElement(uint8_t *ptr);
145  virtual ~ChannelElement();
146 
148  static constexpr unsigned int size() { return 0x0040; }
149 
151  void clear();
152 
154  virtual unsigned rxFrequency() const;
156  virtual void setRXFrequency(unsigned hz);
157 
161  virtual unsigned txOffset() const;
165  virtual void setTXOffset(unsigned hz);
167  virtual unsigned txFrequency() const;
170  virtual void setTXFrequency(unsigned hz);
171 
173  virtual Mode mode() const;
175  virtual void setMode(Mode mode);
176 
178  virtual Channel::Power power() const;
180  virtual void setPower(Channel::Power power);
181 
183  virtual FMChannel::Bandwidth bandwidth() const;
185  virtual void setBandwidth(FMChannel::Bandwidth bw);
186 
188  virtual RepeaterMode repeaterMode() const;
190  virtual void setRepeaterMode(RepeaterMode mode);
191 
193  virtual SignalingMode rxSignalingMode() const;
195  virtual void setRXSignalingMode(SignalingMode mode);
197  virtual Signaling::Code rxTone() const;
199  virtual void setRXTone(Signaling::Code code);
200 
202  virtual SignalingMode txSignalingMode() const;
204  virtual void setTXSignalingMode(SignalingMode mode);
206  virtual Signaling::Code txTone() const;
208  virtual void setTXTone(Signaling::Code code);
209 
211  virtual bool ctcssPhaseReversal() const;
213  virtual void enableCTCSSPhaseReversal(bool enable);
214 
216  virtual bool rxOnly() const;
218  virtual void enableRXOnly(bool enable);
220  virtual bool callConfirm() const;
222  virtual void enableCallConfirm(bool enable);
224  virtual bool talkaround() const;
226  virtual void enableTalkaround(bool enable);
227 
229  virtual bool txCTCSSIsCustom() const;
231  virtual Signaling::Code txCTCSS() const;
233  virtual void setTXCTCSS(Signaling::Code tone);
235  virtual void enableTXCustomCTCSS();
237  virtual bool rxCTCSSIsCustom() const;
239  virtual Signaling::Code rxCTCSS() const;
241  virtual void setRXCTCSS(Signaling::Code tone);
243  virtual void enableRXCustomCTCSS();
244 
246  virtual Signaling::Code txDCS() const;
248  virtual void setTXDCS(Signaling::Code code);
250  virtual Signaling::Code rxDCS() const;
252  virtual void setRXDCS(Signaling::Code code);
253 
255  virtual double customCTCSSFrequency() const;
257  virtual void setCustomCTCSSFrequency(double hz);
258 
260  virtual unsigned twoToneDecodeIndex() const;
262  virtual void setTwoToneDecodeIndex(unsigned idx);
263 
265  virtual unsigned contactIndex() const;
267  virtual void setContactIndex(unsigned idx);
268 
270  virtual unsigned radioIDIndex() const;
272  virtual void setRadioIDIndex(unsigned idx);
273 
278 
280  virtual Admit admit() const;
282  virtual void setAdmit(Admit admit);
283 
285  virtual OptSignaling optionalSignaling() const;
287  virtual void setOptionalSignaling(OptSignaling sig);
288 
290  virtual bool hasScanListIndex() const;
292  virtual unsigned scanListIndex() const;
294  virtual void setScanListIndex(unsigned idx);
296  virtual void clearScanListIndex();
297 
299  virtual bool hasGroupListIndex() const;
301  virtual unsigned groupListIndex() const;
303  virtual void setGroupListIndex(unsigned idx);
305  virtual void clearGroupListIndex();
306 
308  virtual unsigned twoToneIDIndex() const;
310  virtual void setTwoToneIDIndex(unsigned idx);
312  virtual unsigned fiveToneIDIndex() const;
314  virtual void setFiveToneIDIndex(unsigned idx);
316  virtual unsigned dtmfIDIndex() const;
318  virtual void setDTMFIDIndex(unsigned idx);
319 
321  virtual unsigned colorCode() const;
323  virtual void setColorCode(unsigned code);
324 
326  virtual DMRChannel::TimeSlot timeSlot() const;
328  virtual void setTimeSlot(DMRChannel::TimeSlot ts);
329 
331  virtual bool smsConfirm() const;
333  virtual void enableSMSConfirm(bool enable);
335  virtual bool simplexTDMA() const;
337  virtual void enableSimplexTDMA(bool enable);
339  virtual bool adaptiveTDMA() const;
341  virtual void enableAdaptiveTDMA(bool enable);
343  virtual bool rxAPRS() const;
345  virtual void enableRXAPRS(bool enable);
347  virtual bool enhancedEncryption() const;
349  virtual void enableEnhancedEncryption(bool enable);
351  virtual bool loneWorker() const;
353  virtual void enableLoneWorker(bool enable);
354 
356  virtual bool hasEncryptionKeyIndex() const;
358  virtual unsigned encryptionKeyIndex() const;
360  virtual void setEncryptionKeyIndex(unsigned idx);
362  virtual void clearEncryptionKeyIndex();
363 
365  virtual QString name() const;
367  virtual void setName(const QString &name);
368 
370  virtual Channel *toChannelObj(Context &ctx) const;
372  virtual bool linkChannelObj(Channel *c, Context &ctx) const;
374  virtual bool fromChannelObj(const Channel *c, Context &ctx);
375 
376  protected:
378  struct Offset {
380  };
381  };
382 
385  {
386  protected:
388  ChannelBitmapElement(uint8_t *ptr, size_t size);
389 
390  public:
392  ChannelBitmapElement(uint8_t *ptr);
393 
395  static constexpr unsigned int size() { return 0x0200; }
396  };
397 
403  class ContactElement: public Element
404  {
405  protected:
407  ContactElement(uint8_t *ptr, unsigned size);
408 
409  public:
411  explicit ContactElement(uint8_t *ptr);
413  virtual ~ContactElement();
414 
416  static constexpr unsigned int size() { return 0x0064; }
417 
419  void clear();
421  bool isValid() const;
422 
424  virtual DMRContact::Type type() const;
426  virtual void setType(DMRContact::Type type);
427 
429  virtual QString name() const;
431  virtual void setName(const QString &name);
432 
434  virtual unsigned number() const;
436  virtual void setNumber(unsigned number);
437 
442 
444  virtual DMRContact *toContactObj(Context &ctx) const;
446  virtual bool fromContactObj(const DMRContact *contact, Context &ctx);
447  };
448 
451  {
452  protected:
454  ContactBitmapElement(uint8_t *ptr, size_t size);
455 
456  public:
458  ContactBitmapElement(uint8_t *ptr);
459 
461  static constexpr unsigned int size() { return 0x0500; }
462  };
463 
469  {
470  protected:
472  DTMFContactElement(uint8_t *ptr, unsigned size);
473 
474  public:
476  explicit DTMFContactElement(uint8_t *ptr);
478  virtual ~DTMFContactElement();
479 
481  static constexpr unsigned int size() { return 0x0018; }
482 
484  void clear();
485 
487  virtual QString number() const;
489  virtual void setNumber(const QString &number);
490 
492  virtual QString name() const;
494  virtual void setName(const QString &name);
495 
497  virtual DTMFContact *toContact() const;
499  virtual bool fromContact(const DTMFContact *contact);
500 
501  public:
503  struct Limit {
504  static constexpr unsigned int digitCount() { return 14; }
505  static constexpr unsigned int nameLength() { return 15; }
506  };
507 
508  protected:
510  struct Offset {
512  static constexpr unsigned int digits() { return 0x0000; }
513  static constexpr unsigned int numDigits() { return 0x0007; }
514  static constexpr unsigned int name() { return 0x0008; }
516  };
517  };
518 
521  {
522  protected:
524  DTMFContactBytemapElement(uint8_t *ptr, size_t size);
525 
526  public:
528  explicit DTMFContactBytemapElement(uint8_t *ptr);
529 
531  static constexpr unsigned int size() { return 0x0100; }
532  };
533 
538  class GroupListElement: public Element
539  {
540  protected:
542  GroupListElement(uint8_t *ptr, unsigned size);
543 
544  public:
546  GroupListElement(uint8_t *ptr);
547 
549  static constexpr unsigned int size() { return 0x0120; }
550 
552  void clear();
554  bool isValid() const;
555 
557  virtual QString name() const;
559  virtual void setName(const QString &name);
560 
562  virtual bool hasMemberIndex(unsigned n) const;
564  virtual unsigned memberIndex(unsigned n) const;
566  virtual void setMemberIndex(unsigned n, unsigned idx);
568  virtual void clearMemberIndex(unsigned n);
569 
573  virtual RXGroupList *toGroupListObj() const;
576  virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const;
578  virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx);
579  };
580 
583  {
584  protected:
586  GroupListBitmapElement(uint8_t *ptr, size_t size);
587 
588  public:
590  explicit GroupListBitmapElement(uint8_t *ptr);
591 
593  static constexpr unsigned int size() { return 0x0020; }
594  };
595 
600  class ScanListElement: public Element
601  {
602  public:
604  enum class PriChannel {
605  Off = 0,
606  Primary = 1,
607  Secondary = 2,
608  Both = 3
609  };
610 
612  enum class RevertChannel {
613  Selected = 0,
614  SelectedActive = 1,
615  Primary = 2,
616  Secondary = 3,
617  LastCalled = 4,
618  LastUsed = 5,
619  PrimaryActive = 6,
620  SecondaryActive = 7
621  };
622 
623  protected:
625  ScanListElement(uint8_t *ptr, unsigned size);
626 
627  public:
629  ScanListElement(uint8_t *ptr);
630 
632  static constexpr unsigned int size() { return 0x0090; }
633 
635  void clear();
636 
638  virtual PriChannel priorityChannels() const;
640  virtual void setPriorityChannels(PriChannel sel);
641 
643  virtual bool hasPrimary() const;
645  virtual bool primaryIsSelected() const;
647  virtual unsigned primary() const;
649  virtual void setPrimary(unsigned idx);
651  virtual void setPrimarySelected();
653  virtual void clearPrimaryChannel();
654 
656  virtual bool hasSecondary() const;
658  virtual bool secondaryIsSelected() const;
660  virtual unsigned secondary() const;
662  virtual void setSecondary(unsigned idx);
664  virtual void setSecondarySelected();
666  virtual void clearSecondaryChannel();
667 
669  virtual unsigned lookBackTimeA() const;
671  virtual void setLookBackTimeA(unsigned sec);
673  virtual unsigned lookBackTimeB() const;
675  virtual void setLookBackTimeB(unsigned sec);
677  virtual unsigned dropOutDelay() const;
679  virtual void setDropOutDelay(unsigned sec);
681  virtual unsigned dwellTime() const;
683  virtual void setDwellTime(unsigned sec);
684 
686  virtual RevertChannel revertChannel() const;
688  virtual void setRevertChannel(RevertChannel type);
689 
691  virtual QString name() const;
693  virtual void setName(const QString &name);
694 
696  virtual bool hasMemberIndex(unsigned n) const;
698  virtual unsigned memberIndex(unsigned n) const;
700  virtual void setMemberIndex(unsigned n, unsigned idx);
702  virtual void clearMemberIndex(unsigned n);
703 
706  virtual ScanList *toScanListObj() const;
708  virtual bool linkScanListObj(ScanList *lst, Context &ctx) const;
710  virtual bool fromScanListObj(ScanList *lst, Context &ctx);
711  };
712 
715  {
716  protected:
718  ScanListBitmapElement(uint8_t *ptr, size_t size);
719 
720  public:
722  ScanListBitmapElement(uint8_t *ptr);
723 
725  static constexpr unsigned int size() { return 0x00000020; }
726  };
727 
732  class RadioIDElement: public Element
733  {
734  protected:
736  RadioIDElement(uint8_t *ptr, unsigned size);
737 
738  public:
740  RadioIDElement(uint8_t *ptr);
741 
743  static constexpr unsigned int size() { return 0x0020; }
744 
746  void clear();
747 
749  virtual unsigned number() const;
751  virtual void setNumber(unsigned number);
752 
754  virtual QString name() const;
756  virtual void setName(const QString &name);
757 
759  virtual bool fromRadioID(DMRRadioID *id);
761  virtual DMRRadioID *toRadioID() const;
762  };
763 
766  {
767  protected:
769  RadioIDBitmapElement(uint8_t *ptr, size_t size);
770 
771  public:
773  RadioIDBitmapElement(uint8_t *ptr);
774 
776  static constexpr unsigned int size() { return 0x0020; }
777  };
778 
787  {
788  public:
790  enum class AutoShutdown {
791  Off = 0, After10min = 1, After30min = 2, After60min = 3, After120min = 4,
792  };
793 
794  protected:
796  GeneralSettingsElement(uint8_t *ptr, unsigned size);
797 
798  public:
800  void clear();
801 
803  virtual bool keyToneEnabled() const = 0;
805  virtual void enableKeyTone(bool enable) = 0;
806 
808  virtual bool displayFrequency() const;
810  virtual void enableDisplayFrequency(bool enable);
812  virtual bool autoKeyLock() const;
814  virtual void enableAutoKeyLock(bool enable);
816  virtual Interval autoShutdownDelay() const;
818  virtual void setAutoShutdownDelay(Interval min);
824  virtual bool bootPassword() const;
826  virtual void enableBootPassword(bool enable);
828  virtual unsigned squelchLevelA() const;
830  virtual void setSquelchLevelA(unsigned level);
832  virtual unsigned squelchLevelB() const;
834  virtual void setSquelchLevelB(unsigned level);
835 
841  virtual unsigned dmrMicGain() const = 0;
843  virtual void setDMRMicGain(unsigned int gain) = 0;
844 
865 
886 
888  virtual Interval longPressDuration() const = 0;
890  virtual void setLongPressDuration(Interval ms) = 0;
891 
893  virtual bool knobLock() const = 0;
895  virtual void enableKnobLock(bool enable) = 0;
897  virtual bool keypadLock() const = 0;
899  virtual void enableKeypadLock(bool enable) = 0;
901  virtual bool sidekeysLock() const = 0;
903  virtual void enableSidekeysLock(bool enable) = 0;
905  virtual bool keyLockForced() const = 0;
907  virtual void enableKeyLockForced(bool enable) = 0;
908 
909  public:
911  virtual bool vfoModeA() const = 0;
913  virtual void enableVFOModeA(bool enable) = 0;
915  virtual bool vfoModeB() const = 0;
917  virtual void enableVFOModeB(bool enable) = 0;
918 
920  virtual unsigned memoryZoneA() const = 0;
922  virtual void setMemoryZoneA(unsigned zone) = 0;
924  virtual unsigned memoryZoneB() const = 0;
926  virtual void setMemoryZoneB(unsigned zone) = 0;
927 
929  virtual bool recording() const = 0;
931  virtual void enableRecording(bool enable) = 0;
932 
934  virtual unsigned brightness() const = 0;
936  virtual void setBrightness(unsigned level) = 0;
937 
939  virtual bool gps() const = 0;
941  virtual void enableGPS(bool enable) = 0;
943  virtual bool smsAlert() const = 0;
945  virtual void enableSMSAlert(bool enable) = 0;
947  virtual bool activeChannelB() const = 0;
949  virtual void enableActiveChannelB(bool enable) = 0;
951  virtual bool subChannel() const = 0;
953  virtual void enableSubChannel(bool enable) = 0;
955  virtual bool callAlert() const = 0;
957  virtual void enableCallAlert(bool enable) = 0;
958 
960  virtual QTimeZone gpsTimeZone() const = 0;
962  virtual void setGPSTimeZone(const QTimeZone &zone) = 0;
964  virtual bool dmrTalkPermit() const = 0;
966  virtual bool fmTalkPermit() const = 0;
968  virtual void enableDMRTalkPermit(bool enable) = 0;
970  virtual void enableFMTalkPermit(bool enable) = 0;
972  virtual bool dmrResetTone() const = 0;
974  virtual void enableDMRResetTone(bool enable) = 0;
975 
977  virtual bool idleChannelTone() const = 0;
979  virtual void enableIdleChannelTone(bool enable) = 0;
981  virtual Interval menuExitTime() const = 0;
983  virtual void setMenuExitTime(Interval intv) = 0;
985  virtual bool startupTone() const = 0;
987  virtual void enableStartupTone(bool enable) = 0;
989  virtual bool callEndPrompt() const = 0;
991  virtual void enableCallEndPrompt(bool enable) = 0;
993  virtual unsigned maxSpeakerVolume() const = 0;
995  virtual void setMaxSpeakerVolume(unsigned level) = 0;
997  virtual bool getGPSPosition() const = 0;
999  virtual void enableGetGPSPosition(bool enable) = 0;
1000 
1002  virtual bool volumeChangePrompt() const = 0;
1004  virtual void enableVolumeChangePrompt(bool enable) = 0;
1013 
1015  virtual bool displayClock() const = 0;
1017  virtual void enableDisplayClock(bool enable) = 0;
1019  virtual bool enhanceAudio() const = 0;
1021  virtual void enableEnhancedAudio(bool enable) = 0;
1023  virtual Frequency minVFOScanFrequencyUHF() const = 0;
1025  virtual void setMinVFOScanFrequencyUHF(Frequency hz) = 0;
1027  virtual Frequency maxVFOScanFrequencyUHF() const = 0;
1029  virtual void setMaxVFOScanFrequencyUHF(Frequency hz) = 0;
1030 
1032  virtual Frequency minVFOScanFrequencyVHF() const = 0;
1034  virtual void setMinVFOScanFrequencyVHF(Frequency hz) = 0;
1036  virtual Frequency maxVFOScanFrequencyVHF() const = 0;
1038  virtual void setMaxVFOScanFrequencyVHF(Frequency hz) = 0;
1039 
1041  virtual bool hasAutoRepeaterOffsetFrequencyIndexUHF() const = 0;
1043  virtual unsigned autoRepeaterOffsetFrequencyIndexUHF() const = 0;
1045  virtual void setAutoRepeaterOffsetFrequenyIndexUHF(unsigned idx) = 0;
1049  virtual bool hasAutoRepeaterOffsetFrequencyIndexVHF() const = 0;
1051  virtual unsigned autoRepeaterOffsetFrequencyIndexVHF() const = 0;
1053  virtual void setAutoRepeaterOffsetFrequenyIndexVHF(unsigned idx) = 0;
1056 
1058  virtual bool showCurrentContact() const = 0;
1060  virtual void enableShowCurrentContact(bool enable) = 0;
1061 
1063  virtual void callToneMelody(Melody &melody) const = 0;
1065  virtual void setCallToneMelody(const Melody &melody) = 0;
1067  virtual void idleToneMelody(Melody &melody) const = 0;
1069  virtual void setIdleToneMelody(const Melody &melody) = 0;
1071  virtual void resetToneMelody(Melody &melody) const = 0;
1073  virtual void setResetToneMelody(const Melody &melody) = 0;
1074 
1076  virtual bool defaultChannel() const = 0;
1078  virtual void enableDefaultChannel(bool enable) = 0;
1080  virtual unsigned defaultZoneIndexA() const = 0;
1082  virtual void setDefaultZoneIndexA(unsigned idx) = 0;
1084  virtual unsigned defaultZoneIndexB() const = 0;
1086  virtual void setDefaultZoneIndexB(unsigned idx) = 0;
1088  virtual bool defaultChannelAIsVFO() const = 0;
1091  virtual unsigned defaultChannelAIndex() const = 0;
1093  virtual void setDefaultChannelAIndex(unsigned idx) = 0;
1095  virtual void setDefaultChannelAToVFO() = 0;
1097  virtual bool defaultChannelBIsVFO() const = 0;
1100  virtual unsigned defaultChannelBIndex() const = 0;
1102  virtual void setDefaultChannelBIndex(unsigned idx) = 0;
1104  virtual void setDefaultChannelBToVFO() = 0;
1105 
1107  virtual bool displayCall() const = 0;
1109  virtual void enableDisplayCall(bool enable) = 0;
1110 
1115 
1117  virtual bool gpsUnitsImperial() const = 0;
1119  virtual void enableGPSUnitsImperial(bool enable) = 0;
1120 
1129 
1142 
1144  virtual bool showLastHeard() const = 0;
1146  virtual void enableShowLastHeard(bool enable) = 0;
1147 
1149  virtual bool keepLastCaller() const = 0;
1151  virtual void enableKeepLastCaller(bool enable) = 0;
1152 
1154  virtual bool fromConfig(const Flags &flags, Context &ctx);
1156  virtual bool updateConfig(Context &ctx);
1158  virtual bool linkSettings(RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack());
1159 
1160  protected:
1162  struct Offset {
1164  static constexpr unsigned int displayMode() { return 0x0001; }
1165  static constexpr unsigned int autoKeyLock() { return 0x0002; }
1166  static constexpr unsigned int autoShutDown() { return 0x0003; }
1167  static constexpr unsigned int bootDisplay() { return 0x0006; }
1168  static constexpr unsigned int bootPassword() { return 0x0007; }
1169  static constexpr unsigned int squelchLevelA() { return 0x0009; }
1170  static constexpr unsigned int squelchLevelB() { return 0x000a; }
1172  };
1173  };
1174 
1182  {
1183  protected:
1185  ExtendedSettingsElement(uint8_t *ptr, unsigned size);
1186 
1187  public:
1189  virtual bool sendTalkerAlias() const = 0;
1191  virtual void enableSendTalkerAlias(bool enable) = 0;
1192 
1194  virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource() const = 0;
1196  virtual void setTalkerAliasSource(AnytoneDMRSettingsExtension::TalkerAliasSource mode) = 0;
1197 
1199  virtual AnytoneDMRSettingsExtension::TalkerAliasEncoding talkerAliasEncoding() const = 0;
1201  virtual void setTalkerAliasEncoding(AnytoneDMRSettingsExtension::TalkerAliasEncoding encoding) = 0;
1202 
1207 
1212 
1217 
1219  virtual bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
1221  virtual bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1223  virtual bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1224  };
1225 
1232  {
1233  protected:
1235  ZoneChannelListElement(uint8_t *ptr, unsigned size);
1236 
1237  public:
1239  ZoneChannelListElement(uint8_t *ptr);
1240 
1242  static constexpr unsigned int size() { return 0x0400; }
1243 
1245  void clear();
1246 
1248  virtual bool hasChannelA(unsigned n) const;
1250  virtual unsigned channelIndexA(unsigned n) const;
1252  virtual void setChannelIndexA(unsigned n, unsigned idx);
1254  virtual void clearChannelIndexA(unsigned n);
1255 
1257  virtual bool hasChannelB(unsigned n) const;
1259  virtual unsigned channelIndexB(unsigned n) const;
1261  virtual void setChannelIndexB(unsigned n, unsigned idx);
1263  virtual void clearChannelIndexB(unsigned n);
1264  };
1265 
1268  {
1269  protected:
1271  ZoneBitmapElement(uint8_t *ptr, size_t size);
1272 
1273  public:
1275  ZoneBitmapElement(uint8_t *ptr);
1276 
1278  static constexpr unsigned int size() { return 0x0020; }
1279  };
1280 
1286  {
1287  protected:
1289  BootSettingsElement(uint8_t *ptr, unsigned size);
1290 
1291  public:
1293  BootSettingsElement(uint8_t *ptr);
1294 
1296  static constexpr unsigned int size() { return 0x0030; }
1297 
1299  void clear();
1300 
1302  virtual QString introLine1() const;
1304  virtual void setIntroLine1(const QString &txt);
1306  virtual QString introLine2() const;
1308  virtual void setIntroLine2(const QString &txt);
1309 
1311  virtual QString password() const;
1313  virtual void setPassword(const QString &txt);
1314 
1316  virtual bool fromConfig(const Flags &flags, Context &ctx);
1318  virtual bool updateConfig(Context &ctx);
1319  };
1320 
1326  {
1327  protected:
1329  DMRAPRSSettingsElement(uint8_t *ptr, unsigned size);
1330 
1331  public:
1333  explicit DMRAPRSSettingsElement(uint8_t *ptr);
1334 
1336  static constexpr unsigned int size() { return 0x0030; }
1337 
1339  void clear();
1340 
1342  virtual unsigned manualInterval() const;
1344  virtual void setManualInterval(unsigned sec);
1345 
1347  virtual bool automatic() const;
1349  virtual unsigned automaticInterval() const;
1351  virtual void setAutomaticInterval(unsigned sec);
1353  virtual void disableAutomatic();
1354 
1356  virtual bool fixedLocation() const;
1358  virtual QGeoCoordinate location() const;
1360  virtual void setLocation(const QGeoCoordinate &pos);
1362  virtual void enableFixedLocation(bool enable);
1363 
1365  virtual Channel::Power power() const;
1367  virtual void setPower(Channel::Power power);
1368 
1370  virtual bool hasChannel(unsigned n) const;
1372  virtual bool channelIsVFOA(unsigned n) const;
1374  virtual bool channelIsVFOB(unsigned n) const;
1376  virtual bool channelIsSelected(unsigned n) const;
1378  virtual unsigned channelIndex(unsigned n) const;
1380  virtual void setChannelIndex(unsigned n, unsigned idx);
1382  virtual void setChannelVFOA(unsigned n);
1384  virtual void setChannelVFOB(unsigned n);
1386  virtual void setChannelSelected(unsigned n);
1388  virtual void clearChannel(unsigned n);
1389 
1391  virtual unsigned destination() const;
1393  virtual void setDestination(unsigned id);
1394 
1396  virtual DMRContact::Type callType() const;
1398  virtual void setCallType(DMRContact::Type type);
1399 
1401  virtual bool timeSlotOverride() const;
1403  virtual DMRChannel::TimeSlot timeslot() const;
1405  virtual void overrideTimeSlot(DMRChannel::TimeSlot ts);
1407  virtual void disableTimeSlotOverride();
1408 
1410  virtual bool fromConfig(const Flags &flags, Context &ctx);
1412  virtual bool createGPSSystem(uint8_t i, Context &ctx);
1414  virtual bool linkGPSSystem(uint8_t i, Context &ctx);
1415  };
1416 
1419  {
1420  protected:
1422  DMRAPRSMessageElement(uint8_t *ptr, size_t size);
1423 
1424  public:
1426  DMRAPRSMessageElement(uint8_t *ptr);
1427 
1429  static constexpr unsigned int size() { return 0x0030; }
1430 
1431  void clear();
1432 
1434  virtual QString message() const;
1436  void setMessage(const QString &message);
1437 
1439  virtual bool fromConfig(Codeplug::Flags flags, Context &ctx);
1441  virtual bool updateConfig(Context &ctx) const;
1442 
1443  public:
1445  struct Limit {
1446  static constexpr unsigned int length() { return 32; }
1447  };
1448 
1449  protected:
1451  struct Offset {
1453  static constexpr unsigned int message() { return 0x0000; }
1455  };
1456  };
1457 
1463  {
1464  protected:
1466  RepeaterOffsetListElement(uint8_t *ptr, size_t size);
1467 
1468  public:
1470  explicit RepeaterOffsetListElement(uint8_t *ptr);
1471 
1473  static constexpr unsigned int size() { return 0x03f0; }
1474 
1475  void clear();
1476 
1478  virtual bool isSet(unsigned int n) const;
1480  virtual Frequency offset(unsigned int n) const;
1482  virtual void setOffset(unsigned int n, Frequency freq);
1484  virtual void clearOffset(unsigned int n);
1485 
1486  public:
1488  struct Limit {
1489  static constexpr unsigned int numEntries() { return 250; }
1490  };
1491 
1492  protected:
1494  struct Offset {
1496  static constexpr unsigned int frequencies() { return 0x0000; }
1497  static constexpr unsigned int betweenFrequencies() { return sizeof(uint32_t); }
1499  };
1500  };
1501 
1509  {
1510  protected:
1512  MessageListElement(uint8_t *ptr, unsigned size);
1513 
1514  public:
1516  explicit MessageListElement(uint8_t *ptr);
1517 
1519  static constexpr unsigned int size() { return 0x0010; }
1520 
1522  void clear();
1523 
1525  virtual bool hasNext() const;
1527  virtual unsigned next() const;
1529  virtual void setNext(unsigned idx);
1531  virtual void clearNext();
1532 
1534  virtual bool hasIndex() const;
1536  virtual unsigned index() const;
1538  virtual void setIndex(unsigned idx);
1540  virtual void clearIndex();
1541  };
1542 
1547  class MessageElement: public Element
1548  {
1549  protected:
1551  MessageElement(uint8_t *ptr, unsigned size);
1552 
1553  public:
1555  MessageElement(uint8_t *ptr);
1556 
1558  static constexpr unsigned int size() { return 0x0100; }
1559 
1561  void clear();
1562 
1564  virtual QString message() const;
1566  virtual void setMessage(const QString &msg);
1567  };
1568 
1571  {
1572  protected:
1574  MessageBytemapElement(uint8_t *ptr, size_t size);
1575 
1576  public:
1578  MessageBytemapElement(uint8_t *ptr);
1579 
1581  static constexpr unsigned int size() { return 0x0090; }
1582  };
1583 
1589  {
1590  public:
1592  enum class Type {
1593  None = 0,
1594  DTMF = 1,
1595  TwoTone = 2,
1596  FiveTone = 3
1597  };
1598 
1599  protected:
1601  AnalogQuickCallElement(uint8_t *ptr, unsigned size);
1602 
1603  public:
1605  explicit AnalogQuickCallElement(uint8_t *ptr);
1606 
1608  static constexpr unsigned int size() { return 0x0002; }
1609 
1611  void clear();
1612 
1614  virtual Type type() const;
1616  virtual void setType(Type type);
1617 
1619  virtual bool hasContactIndex() const;
1621  virtual unsigned contactIndex() const;
1623  virtual void setContactIndex(unsigned idx);
1625  virtual void clearContactIndex();
1626  };
1627 
1633  {
1634  protected:
1636  AnalogQuickCallsElement(uint8_t *ptr, size_t size);
1637 
1638  public:
1640  AnalogQuickCallsElement(uint8_t *ptr);
1641 
1643  static constexpr unsigned int size() { return 0x0100; }
1644 
1646  void clear();
1647 
1649  uint8_t *quickCall(unsigned int n) const;
1650 
1651  public:
1653  struct Limit {
1654  static constexpr unsigned int numEntries() { return 4; }
1655  };
1656 
1657  protected:
1659  struct Offset {
1661  static constexpr unsigned int quickCalls() { return 0x0000; }
1663  };
1664  };
1665 
1671  {
1672  protected:
1674  StatusMessagesElement(uint8_t *ptr, size_t size);
1675 
1676  public:
1678  StatusMessagesElement(uint8_t *ptr);
1679 
1681  static constexpr unsigned int size() { return 0x0400; }
1682 
1683  void clear();
1684 
1686  virtual QString message(unsigned int n) const;
1688  virtual void setMessage(unsigned int n, const QString &msg);
1689 
1690  public:
1692  struct Limit {
1693  static constexpr unsigned int numMessages() { return 32; }
1694  static constexpr unsigned int messageLength() { return 32; }
1695  };
1696 
1697  protected:
1699  struct Offset {
1701  static constexpr unsigned int messages() { return 0x0000; }
1702  static constexpr unsigned int betweenMessages() { return 0x0020; }
1704  };
1705  };
1706 
1709  {
1710  protected:
1712  StatusMessageBitmapElement(uint8_t *ptr, size_t size);
1713 
1714  public:
1716  StatusMessageBitmapElement(uint8_t *ptr);
1717 
1719  static constexpr unsigned int size() { return 0x0010; }
1720  };
1721 
1726  class HotKeyElement: public Element
1727  {
1728  public:
1730  enum class Type {
1731  Call = 0,
1732  Menu = 1
1733  };
1734 
1736  enum class MenuItem {
1737  SMS = 1,
1738  NewSMS = 2,
1739  HotText = 3,
1740  Inbox = 4,
1741  Outbox = 5,
1742  Contacts = 6,
1743  ManualDial = 7,
1744  CallLog = 8
1745  };
1746 
1748  enum class CallType {
1749  Analog = 0,
1750  Digital = 1
1751  };
1752 
1754  enum class DigiCallType {
1755  Off = 0xff,
1756  GroupCall = 0,
1757  PrivateCall= 1,
1758  AllCall = 2,
1759  HotText = 3,
1760  CallTip = 4,
1761  StatusMessage = 5
1762  };
1763 
1764  protected:
1766  HotKeyElement(uint8_t *ptr, unsigned size);
1767 
1768  public:
1770  explicit HotKeyElement(uint8_t *ptr);
1771 
1773  static constexpr unsigned int size() { return 0x0030; }
1774 
1776  void clear();
1777 
1779  virtual Type type() const;
1781  virtual void setType(Type type);
1782 
1784  virtual MenuItem menuItem() const;
1787  virtual void setMenuItem(MenuItem item);
1788 
1790  virtual CallType callType() const;
1793  virtual void setCallType(CallType type);
1794 
1797  virtual DigiCallType digiCallType() const;
1800  virtual void setDigiCallType(DigiCallType type);
1801 
1803  virtual bool hasContactIndex() const;
1807  virtual unsigned contactIndex() const;
1810  virtual void setContactIndex(unsigned idx);
1812  virtual void clearContactIndex();
1813 
1815  virtual bool hasMessageIndex() const;
1818  virtual unsigned messageIndex() const;
1820  virtual void setMessageIndex(unsigned idx);
1822  virtual void clearMessageIndex();
1823  };
1824 
1832  {
1833  protected:
1835  HotKeySettingsElement(uint8_t *ptr, size_t size);
1836 
1837  public:
1839  HotKeySettingsElement(uint8_t *ptr);
1840 
1842  static constexpr unsigned int size() { return 0x0360; }
1843 
1844  void clear();
1845 
1847  virtual uint8_t *hotKeySetting(unsigned int n) const;
1848 
1849  public:
1851  struct Limit {
1852  static constexpr unsigned int numEntries() { return 18; }
1853  };
1854 
1855  protected:
1857  struct Offset {
1859  static constexpr unsigned int hotKeySettings() { return 0x0000; }
1860  static constexpr unsigned int betweenHotKeySettings() { return HotKeySettingsElement::size(); }
1862  };
1863  };
1864 
1870  {
1871  public:
1876  class AnalogAlarm: public Element
1877  {
1878  public:
1880  enum class Action {
1881  None = 0,
1882  Background = 1,
1883  TXAlarm = 2,
1884  Both = 3,
1885  };
1886 
1888  enum class ENIType {
1889  None = 0,
1890  DTMF = 1,
1891  FiveTone = 2
1892  };
1893 
1894  protected:
1896  AnalogAlarm(uint8_t *ptr, unsigned size);
1897 
1898  public:
1900  AnalogAlarm(uint8_t *ptr);
1901 
1903  static constexpr unsigned int size() { return 0x000a; }
1904 
1906  void clear();
1907 
1909  virtual Action action() const;
1911  virtual void setAction(Action action);
1912 
1914  virtual ENIType encodingType() const;
1916  virtual void setEncodingType(ENIType type);
1917 
1919  virtual unsigned emergencyIndex() const;
1921  virtual void setEmergencyIndex(unsigned idx);
1922 
1924  virtual unsigned duration() const;
1926  virtual void setDuration(unsigned sec);
1928  virtual unsigned txDuration() const;
1930  virtual void setTXDuration(unsigned sec);
1932  virtual unsigned rxDuration() const;
1934  virtual void setRXDuration(unsigned sec);
1935 
1937  virtual bool channelIsSelected() const;
1939  virtual unsigned channelIndex() const;
1941  virtual void setChannelIndex(unsigned idx);
1943  virtual void setChannelSelected();
1944 
1946  virtual bool repeatContinuously() const;
1948  virtual unsigned repetitions() const;
1950  virtual void setRepetitions(unsigned num);
1952  virtual void setRepatContinuously();
1953  };
1954 
1959  class DigitalAlarm: public Element
1960  {
1961  public:
1963  enum class Action {
1964  None = 0,
1965  Background = 1,
1966  NonLocal = 2,
1967  Local = 3,
1968  };
1969 
1970  protected:
1972  DigitalAlarm(uint8_t *ptr, unsigned size);
1973 
1974  public:
1976  explicit DigitalAlarm(uint8_t *ptr);
1977 
1979  static constexpr unsigned int size() { return 0x000c; }
1980 
1982  void clear();
1983 
1985  virtual Action action() const;
1987  virtual void setAction(Action action);
1988 
1990  virtual unsigned duration() const;
1992  virtual void setDuration(unsigned sec);
1994  virtual unsigned txDuration() const;
1996  virtual void setTXDuration(unsigned sec);
1998  virtual unsigned rxDuration() const;
2000  virtual void setRXDuration(unsigned sec);
2001 
2003  virtual bool channelIsSelected() const;
2005  virtual unsigned channelIndex() const;
2007  virtual void setChannelIndex(unsigned idx);
2009  virtual void setChannelSelected();
2010 
2012  virtual bool repeatContinuously() const;
2014  virtual unsigned repetitions() const;
2016  virtual void setRepetitions(unsigned num);
2018  virtual void setRepatContinuously();
2019 
2021  virtual unsigned voiceBroadcastDuration() const;
2023  virtual void setVoiceBroadcastDuration(unsigned min);
2025  virtual unsigned areaBroadcastDuration() const;
2027  virtual void setAreaBroadcastDuration(unsigned min);
2028 
2030  virtual bool vox() const;
2032  virtual void enableVOX(bool enable);
2034  virtual bool rxAlarm() const;
2036  virtual void enableRXAlarm(bool enable);
2037  };
2038 
2039  protected:
2041  AlarmSettingElement(uint8_t *ptr, unsigned size);
2042 
2043  public:
2045  AlarmSettingElement(uint8_t *ptr);
2046 
2048  static constexpr unsigned int size() { return 0x0020; }
2049 
2051  void clear();
2052 
2054  virtual uint8_t *analog() const;
2056  virtual uint8_t *digital() const;
2057 
2058  protected:
2060  struct Offset {
2062  static constexpr unsigned int analog() { return 0x0000; }
2063  static constexpr unsigned int digital() { return 0x000a; }
2065  };
2066  };
2067 
2073  {
2074  protected:
2076  DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size);
2077 
2078  public:
2080  DigitalAlarmExtensionElement(uint8_t *ptr);
2081 
2083  static constexpr unsigned int size() { return 0x0030; }
2084 
2086  void clear();
2087 
2089  virtual DMRContact::Type callType() const;
2091  virtual void setCallType(DMRContact::Type type);
2092 
2094  virtual unsigned destination() const;
2096  virtual void setDestination(unsigned number);
2097 
2098  protected:
2100  struct Offset {
2102  static constexpr unsigned int callType() { return 0x0000; }
2103  static constexpr unsigned int destination() { return 0x0023; }
2105  };
2106  };
2107 
2113  {
2114  public:
2116  enum class Standard {
2117  ZVEI1 = 0, ZVEI2, ZVEI3, PZVEI, DZVEI, PDZVEI, CCIR1, CCIR2, PCCIR, EEA, EuroSignal, NATEL,
2118  MODAT, CCITT, EIA
2119  };
2120 
2121  protected:
2123  FiveToneIDElement(uint8_t *ptr, unsigned size);
2124 
2125  public:
2127  FiveToneIDElement(uint8_t *ptr);
2128 
2130  static constexpr unsigned int size() { return 0x0020; }
2131 
2133  void clear();
2134 
2136  virtual Standard standard() const;
2138  virtual void setStandard(Standard std);
2139 
2141  virtual unsigned toneDuration() const;
2143  virtual void setToneDuration(unsigned ms);
2144 
2146  virtual QString id() const;
2148  virtual void setID(const QString &id);
2149 
2151  virtual QString name() const;
2153  virtual void setName(const QString &name);
2154  };
2155 
2158  {
2159  protected:
2161  FiveToneIDBitmapElement(uint8_t *ptr, size_t size);
2162 
2163  public:
2165  FiveToneIDBitmapElement(uint8_t *ptr);
2166 
2168  static constexpr unsigned int size() { return 0x0010; }
2169  };
2170 
2176  {
2177  protected:
2179  FiveToneIDListElement(uint8_t *ptr, size_t size);
2180 
2181  public:
2183  FiveToneIDListElement(uint8_t *ptr);
2184 
2186  static constexpr unsigned int size() { return 0x0c80; }
2187 
2188  void clear();
2189 
2191  virtual uint8_t *member(unsigned int n) const;
2192 
2193  public:
2195  struct Limit {
2196  static constexpr unsigned int numEntries() { return 100; }
2197  };
2198  };
2199 
2205  {
2206  public:
2208  enum class Function {
2209  OpenSquelch=0, CallAll, EmergencyAlarm, RemoteKill, RemoteStun, RemoteWakeup,
2210  GroupCall
2211  };
2212 
2214  enum class Response {
2215  None=0, Tone, ToneRespond
2216  };
2217 
2218  protected:
2220  FiveToneFunctionElement(uint8_t *ptr, unsigned size);
2221 
2222  public:
2224  explicit FiveToneFunctionElement(uint8_t *ptr);
2225 
2227  static constexpr unsigned int size() { return 0x0020; }
2228 
2230  void clear();
2231 
2233  virtual Function function() const;
2235  virtual void setFunction(Function function);
2237  virtual Response response() const;
2239  virtual void setResponse(Response response);
2240 
2242  virtual QString id() const;
2244  virtual void setID(const QString &id);
2245 
2247  virtual QString name() const;
2249  virtual void setName(const QString &name);
2250  };
2251 
2257  {
2258  protected:
2260  FiveToneFunctionListElement(uint8_t *ptr, size_t size);
2261 
2262  public:
2264  FiveToneFunctionListElement(uint8_t *ptr);
2265 
2267  static constexpr unsigned int size() { return 0x0200; }
2268 
2269  void clear();
2270 
2272  virtual uint8_t *function(unsigned int n) const;
2273 
2274  public:
2276  struct Limit {
2277  static constexpr unsigned int numFunctions() { return 16; }
2278  };
2279  };
2280 
2286  {
2287  public:
2289  enum class Response {
2290  None = 0, Tone, ToneRespond
2291  };
2294 
2295  protected:
2297  FiveToneSettingsElement(uint8_t *ptr, unsigned size);
2298 
2299  public:
2301  FiveToneSettingsElement(uint8_t *ptr);
2302 
2304  static constexpr unsigned int size() { return 0x0080; }
2305 
2307  void clear();
2308 
2310  virtual Response decodingResponse() const;
2312  virtual void setDecodingResponse(Response response);
2313 
2315  virtual Standard decodingStandard() const;
2317  virtual void setDecodingStandard(Standard standard);
2318 
2320  virtual unsigned decodingToneDuration() const;
2322  virtual void setDecodingToneDuration(unsigned ms);
2323 
2325  virtual QString id() const;
2327  virtual void setID(const QString &id);
2328 
2330  virtual unsigned postEncodeDelay() const;
2332  virtual void setPostEncodeDelay(unsigned ms);
2333 
2335  virtual bool hasPTTID() const;
2337  virtual unsigned pttID() const;
2339  virtual void setPTTID(unsigned id);
2341  virtual void clearPTTID();
2342 
2344  virtual unsigned autoResetTime() const;
2346  virtual void setAutoResetTime(unsigned s);
2347 
2349  virtual unsigned firstDelay() const;
2351  virtual void setFirstDelay(unsigned ms);
2352 
2354  virtual bool sidetoneEnabled() const;
2356  virtual void enableSidetone(bool enable);
2358  virtual unsigned stopCode() const;
2360  virtual void setStopCode(unsigned code);
2362  virtual unsigned stopTime() const;
2364  virtual void setStopTime(unsigned ms);
2366  virtual unsigned decodeTime() const;
2368  virtual void setDecodeTime(unsigned ms);
2370  virtual unsigned delayAfterStop() const;
2372  virtual void setDelayAfterStop(unsigned ms);
2374  virtual unsigned preTime() const;
2376  virtual void setPreTime(unsigned ms);
2377 
2379  virtual Standard botStandard() const;
2381  virtual void setBOTStandard(Standard standard);
2383  virtual unsigned botToneDuration() const;
2385  virtual void setBOTToneDuration(unsigned ms);
2387  virtual QString botID() const;
2389  virtual void setBOTID(const QString &id);
2390 
2392  virtual Standard eotStandard() const;
2394  virtual void setEOTStandard(Standard standard);
2396  virtual unsigned eotToneDuration() const;
2398  virtual void setEOTToneDuration(unsigned ms);
2400  virtual QString eotID() const;
2402  virtual void setEOTID(const QString &id);
2403  };
2404 
2410  {
2411  protected:
2413  TwoToneIDElement(uint8_t *ptr, unsigned size);
2414 
2415  public:
2417  TwoToneIDElement(uint8_t *ptr);
2418 
2420  static constexpr unsigned int size() { return 0x0010; }
2421 
2423  void clear();
2424 
2426  virtual double firstTone() const;
2428  virtual void setFirstTone(double f);
2429 
2431  virtual double secondTone() const;
2433  virtual void setSecondTone(double f);
2434 
2436  virtual QString name() const;
2438  virtual void setName(const QString &name);
2439 
2440  public:
2442  struct Limit {
2443  static constexpr unsigned int nameLength() { return 7; }
2444  };
2445 
2446  protected:
2448  struct Offset {
2450  static constexpr unsigned int firstTone() { return 0x0000; }
2451  static constexpr unsigned int secondTone() { return 0x0002; }
2452  static constexpr unsigned int name() { return 0x0008; }
2454  };
2455  };
2456 
2459  {
2460  protected:
2462  TwoToneIDBitmapElement(uint8_t *ptr, size_t size);
2463 
2464  public:
2466  TwoToneIDBitmapElement(uint8_t *ptr);
2467 
2469  static constexpr unsigned int size() { return 0x0010; }
2470  };
2471 
2477  {
2478  public:
2480  enum class Response {
2481  None = 0, Tone, ToneRespond
2482  };
2483 
2484  protected:
2486  TwoToneFunctionElement(uint8_t *ptr, unsigned size);
2487 
2488  public:
2490  TwoToneFunctionElement(uint8_t *ptr);
2491 
2493  static constexpr unsigned int size() { return 0x0020; }
2494 
2496  void clear();
2497 
2499  virtual double firstTone() const;
2501  virtual void setFirstTone(double f);
2502 
2504  virtual double secondTone() const;
2506  virtual void setSecondTone(double f);
2507 
2509  virtual Response response() const;
2511  virtual void setResponse(Response resp);
2512 
2514  virtual QString name() const;
2516  virtual void setName(const QString &name);
2517 
2518  public:
2520  struct Limit {
2521  static constexpr unsigned int nameLength() { return 7; }
2522  };
2523 
2524  protected:
2526  struct Offset {
2528  static constexpr unsigned int firstTone() { return 0x0000; }
2529  static constexpr unsigned int secondTone() { return 0x0002; }
2530  static constexpr unsigned int response() { return 0x0004; }
2531  static constexpr unsigned int name() { return 0x0005; }
2533  };
2534  };
2535 
2538  {
2539  protected:
2541  TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size);
2542 
2543  public:
2545  TwoToneFunctionBitmapElement(uint8_t *ptr);
2546 
2548  static constexpr unsigned int size() { return 0x0010; }
2549  };
2550 
2556  {
2557  protected:
2559  TwoToneSettingsElement(uint8_t *ptr, unsigned size);
2560 
2561  public:
2563  TwoToneSettingsElement(uint8_t *ptr);
2564 
2566  static constexpr unsigned int size() { return 0x0010; }
2567 
2569  void clear();
2570 
2572  virtual unsigned firstToneDuration() const;
2574  virtual void setFirstToneDuration(unsigned ms);
2575 
2577  virtual unsigned secondToneDuration() const;
2579  virtual void setSecondToneDuration(unsigned ms);
2580 
2582  virtual unsigned longToneDuration() const;
2584  virtual void setLongToneDuration(unsigned ms);
2585 
2587  virtual unsigned gapDuration() const;
2589  virtual void setGapDuration(unsigned ms);
2590 
2592  virtual unsigned autoResetTime() const;
2594  virtual void setAutoResetTime(unsigned sec);
2595 
2597  virtual bool sidetone() const;
2599  virtual void enableSidetone(bool enable);
2600  };
2601 
2607  {
2608  public:
2610  enum Response {
2611  None=0, Tone, ToneRespond
2612  };
2613 
2614  protected:
2616  DTMFSettingsElement(uint8_t *ptr, unsigned size);
2617 
2618  public:
2620  explicit DTMFSettingsElement(uint8_t *ptr);
2621 
2623  static constexpr unsigned int size() { return 0x0050; }
2624 
2626  void clear();
2627 
2629  virtual unsigned intervalSymbol() const;
2631  virtual void setIntervalSymbol(unsigned symb);
2632 
2634  virtual unsigned groupCode() const;
2636  virtual void setGroupCode(unsigned symb);
2637 
2639  virtual Response response() const;
2641  virtual void setResponse(Response resp);
2642 
2644  virtual unsigned preTime() const;
2646  virtual void setPreTime(unsigned ms);
2647 
2649  virtual unsigned firstDigitDuration() const;
2651  virtual void setFirstDigitDuration(unsigned ms);
2652 
2654  virtual unsigned autoResetTime() const;
2656  virtual void setAutoResetTime(unsigned sec);
2657 
2659  virtual QString id() const;
2661  virtual void setID(const QString &id);
2662 
2664  virtual unsigned postEncodingDelay() const;
2666  virtual void setPostEncodingDelay(unsigned ms);
2667 
2669  virtual unsigned pttIDPause() const;
2671  virtual void setPTTIDPause(unsigned sec);
2672 
2674  virtual bool pttIDEnabled() const;
2676  virtual void enablePTTID(bool enable);
2677 
2679  virtual unsigned dCodePause() const;
2681  virtual void setDCodePause(unsigned sec);
2682 
2684  virtual bool sidetone() const;
2686  virtual void enableSidetone(bool enable);
2687 
2689  virtual QString botID() const;
2691  virtual void setBOTID(const QString &id);
2692 
2694  virtual QString eotID() const;
2696  virtual void setEOTID(const QString &id);
2697 
2699  virtual QString remoteKillID() const;
2701  virtual void setRemoteKillID(const QString &id);
2702 
2704  virtual QString remoteStunID() const;
2706  virtual void setRemoteStunID(const QString &id);
2707  };
2708 
2714  {
2715  protected:
2717  DTMFIDListElement(uint8_t *ptr, size_t size);
2718 
2719  public:
2721  DTMFIDListElement(uint8_t *ptr);
2722 
2724  static constexpr unsigned int size() { return 0x0100; }
2725 
2726  void clear();
2727 
2729  virtual bool hasNumber(unsigned int n) const;
2731  virtual QString number(unsigned int n) const;
2733  virtual void setNumber(unsigned int n, const QString &number);
2735  virtual void clearNumber(unsigned int n);
2736 
2737  public:
2739  struct Limit {
2740  static constexpr unsigned int numEntries() { return 16; }
2741  static constexpr unsigned int numberLength() { return 16; }
2742  };
2743  };
2744 
2750  {
2751  protected:
2753  WFMChannelListElement(uint8_t *ptr, size_t size);
2754 
2755  public:
2757  explicit WFMChannelListElement(uint8_t *ptr);
2758 
2760  static constexpr unsigned int size() { return 0x0200; }
2761 
2762  void clear();
2763 
2765  virtual bool hasChannel(unsigned int n) const;
2767  virtual Frequency channel(unsigned int n) const;
2769  virtual void setChannel(unsigned int n, Frequency freq);
2771  virtual void clearChannel(unsigned int n);
2772 
2773  public:
2775  struct Limit {
2776  static constexpr unsigned int numEntries() { return 100; }
2777  };
2778 
2779  protected:
2781  struct Offset {
2783  static constexpr unsigned int betweenChannels() { return 0x0004; }
2785  };
2786  };
2787 
2790  {
2791  protected:
2793  WFMChannelBitmapElement(uint8_t *ptr, size_t size);
2794 
2795  public:
2797  WFMChannelBitmapElement(uint8_t *ptr);
2798 
2800  static constexpr unsigned int size() { return 0x0020; }
2801  };
2802 
2804  class WFMVFOElement: public Element
2805  {
2806  protected:
2808  WFMVFOElement(uint8_t *ptr, size_t size);
2809 
2810  public:
2812  WFMVFOElement(uint8_t *ptr);
2813 
2815  static constexpr unsigned int size() { return 0x0010; }
2816 
2817  void clear();
2818 
2820  virtual Frequency frequency() const;
2822  virtual void setFrequency(Frequency freq);
2823  };
2824 
2827  {
2828  protected:
2830  DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size);
2831 
2832  public:
2834  DMREncryptionKeyIDListElement(uint8_t *ptr);
2835 
2837  static constexpr unsigned int size() { return 0x0040; }
2838 
2839  void clear();
2840 
2842  virtual bool hasID(unsigned int n) const;
2844  virtual uint16_t id(unsigned int n) const;
2846  virtual void setID(unsigned int n, uint16_t id);
2848  virtual void clearID(unsigned int n);
2849 
2850  public:
2852  struct Limit {
2853  static constexpr unsigned int numEntries() { return 32; }
2854  };
2855 
2856  protected:
2858  struct Offset {
2860  static constexpr unsigned int betweenIDs() { return 0x0002; }
2862  };
2863  };
2864 
2867  {
2868  protected:
2870  DMREncryptionKeyListElement(uint8_t *ptr, size_t size);
2871 
2872  public:
2874  DMREncryptionKeyListElement(uint8_t *ptr);
2875 
2877  static constexpr unsigned int size() { return 0x0500; }
2878 
2879  void clear();
2880 
2882  QByteArray key(unsigned int n) const;
2884  void setKey(unsigned int n, const QByteArray &key);
2885 
2886  public:
2888  struct Limit {
2889  static constexpr unsigned numEntries() { return DMREncryptionKeyIDListElement::Limit::numEntries(); }
2890  };
2891 
2892  protected:
2894  struct Offset {
2896  static constexpr unsigned int keys() { return 0x0010; }
2897  static constexpr unsigned int betweenKeys() { return 0x0028; }
2899  };
2900  };
2901 
2907  {
2908  protected:
2910  ContactMapElement(uint8_t *ptr, unsigned size);
2911 
2912  public:
2914  ContactMapElement(uint8_t *ptr);
2915 
2917  static constexpr unsigned int size() { return 0x0008; }
2918 
2920  void clear();
2922  bool isValid() const;
2923 
2925  virtual bool isGroup() const;
2927  virtual unsigned id() const;
2929  virtual void setID(unsigned id, bool group=false);
2931  virtual unsigned index() const;
2933  virtual void setIndex(unsigned idx);
2934  };
2935 
2936 protected:
2938  AnytoneCodeplug(const QString &label, QObject *parent=nullptr);
2939 
2940 public:
2942  virtual ~AnytoneCodeplug();
2943 
2945  virtual void clear();
2946 
2947  bool encode(Config *config, const Flags &flags, const ErrorStack &err);
2948  bool decode(Config *config, const ErrorStack &err);
2949 
2950 protected:
2951  virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
2952 
2954  virtual bool allocateBitmaps() = 0;
2956  virtual void setBitmaps(Context &ctx) = 0;
2957 
2960  virtual void allocateUpdated() = 0;
2963  virtual void allocateForDecoding() = 0;
2965  virtual void allocateForEncoding() = 0;
2966 
2968  virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2970  virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2971 
2972 protected:
2974  QString _label;
2975 
2976  // Allow access to protected allocation methods.
2977  friend class AnytoneRadio;
2978 };
2979 
2980 #endif // ANYTONECODEPLUG_HH
Direction
Encodes the auto-repeater offset sign.
Definition: anytone_extension.hh:1419
BootDisplay
What to display during boot.
Definition: anytone_extension.hh:382
Represents the base class of an analog alarm setting for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1877
virtual void setAction(Action action)
Sets the alarm action.
Definition: anytone_codeplug.cc:2997
virtual void setEmergencyIndex(unsigned idx)
Sets the emergency ID index.
Definition: anytone_codeplug.cc:3015
virtual unsigned emergencyIndex() const
Returns the emergency ID index.
Definition: anytone_codeplug.cc:3011
virtual void setEncodingType(ENIType type)
Sets the encoding type.
Definition: anytone_codeplug.cc:3006
AnalogAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2974
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition: anytone_codeplug.cc:3055
Action
Possible analog alarm types.
Definition: anytone_codeplug.hh:1880
virtual Action action() const
Returns the alarm action.
Definition: anytone_codeplug.cc:2993
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition: anytone_codeplug.cc:3065
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1903
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition: anytone_codeplug.cc:3042
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition: anytone_codeplug.cc:3020
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition: anytone_codeplug.cc:3029
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition: anytone_codeplug.cc:3077
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition: anytone_codeplug.cc:3060
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition: anytone_codeplug.cc:3038
ENIType
Possible alarm signalling types.
Definition: anytone_codeplug.hh:1888
void clear()
Resets the alarm.
Definition: anytone_codeplug.cc:2987
virtual unsigned channelIndex() const
Returns the channel index.
Definition: anytone_codeplug.cc:3051
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition: anytone_codeplug.cc:3024
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition: anytone_codeplug.cc:3069
virtual ENIType encodingType() const
Returns the encoding type.
Definition: anytone_codeplug.cc:3002
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition: anytone_codeplug.cc:3073
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition: anytone_codeplug.cc:3033
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition: anytone_codeplug.cc:3047
Represents the base class of an digital alarm setting for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1960
virtual void enableRXAlarm(bool enable)
Enables/disables the reception of alarms.
Definition: anytone_codeplug.cc:3207
virtual void enableVOX(bool enable)
Enables/disables the VOX for alarms.
Definition: anytone_codeplug.cc:3198
virtual bool rxAlarm() const
Returns true if alarms gets received enabled.
Definition: anytone_codeplug.cc:3203
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition: anytone_codeplug.cc:3169
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition: anytone_codeplug.cc:3161
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition: anytone_codeplug.cc:3116
Action
Possible alarm types.
Definition: anytone_codeplug.hh:1963
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition: anytone_codeplug.cc:3139
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition: anytone_codeplug.cc:3165
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1979
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition: anytone_codeplug.cc:3157
virtual void setAreaBroadcastDuration(unsigned min)
Sets area broadcast duration in minutes.
Definition: anytone_codeplug.cc:3188
DigitalAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3084
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition: anytone_codeplug.cc:3130
virtual Action action() const
Returns the alarm action.
Definition: anytone_codeplug.cc:3103
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition: anytone_codeplug.cc:3147
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition: anytone_codeplug.cc:3112
virtual bool vox() const
Returns true if the VOX gets enabled.
Definition: anytone_codeplug.cc:3194
virtual void setAction(Action action)
Sets the alarm action.
Definition: anytone_codeplug.cc:3107
virtual unsigned areaBroadcastDuration() const
Returns area broadcast duration in minutes.
Definition: anytone_codeplug.cc:3184
virtual unsigned channelIndex() const
Returns the channel index.
Definition: anytone_codeplug.cc:3143
virtual void setVoiceBroadcastDuration(unsigned min)
Sets voice broadcast duration in minutes.
Definition: anytone_codeplug.cc:3178
virtual unsigned voiceBroadcastDuration() const
Returns voice broadcast duration in minutes.
Definition: anytone_codeplug.cc:3174
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition: anytone_codeplug.cc:3152
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition: anytone_codeplug.cc:3134
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition: anytone_codeplug.cc:3125
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition: anytone_codeplug.cc:3121
void clear()
Resets the digital alarm settings.
Definition: anytone_codeplug.cc:3097
Represents the base class of alarm setting entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1870
virtual uint8_t * digital() const
Returns a pointer to the digital alarm settings.
Definition: anytone_codeplug.cc:3238
void clear()
Clears the alarm settings.
Definition: anytone_codeplug.cc:3228
virtual uint8_t * analog() const
Returns a pointer to the analog alarm settings.
Definition: anytone_codeplug.cc:3234
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2048
AlarmSettingElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3215
Represents base class of a analog quick call entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1589
Type
Analog quick-call types.
Definition: anytone_codeplug.hh:1592
AnalogQuickCallElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2725
virtual void setContactIndex(unsigned idx)
Sets the analog contact index.
Definition: anytone_codeplug.cc:2761
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1608
virtual void clearContactIndex()
Clears the contact index.
Definition: anytone_codeplug.cc:2765
virtual unsigned contactIndex() const
Returns the analog contact index.
Definition: anytone_codeplug.cc:2757
void clear()
Resets the quick call entry.
Definition: anytone_codeplug.cc:2738
virtual bool hasContactIndex() const
Returns true if an analog contact index is set.
Definition: anytone_codeplug.cc:2753
virtual void setType(Type type)
Sets the type of the quick call.
Definition: anytone_codeplug.cc:2748
virtual Type type() const
Returns the call type.
Definition: anytone_codeplug.cc:2744
Implements the list of analog quick-call settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1633
uint8_t * quickCall(unsigned int n) const
Returns a pointer to the n-th entry.
Definition: anytone_codeplug.cc:2793
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1643
void clear()
Clears the quick calls.
Definition: anytone_codeplug.cc:2786
AnalogQuickCallsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2773
Represents the base class for bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:21
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:93
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:84
BitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:66
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:78
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:73
Represents the base class of the boot settings for all AnyTone codeplug.
Definition: anytone_codeplug.hh:1286
virtual bool updateConfig(Context &ctx)
Updates the abstract configuration from this general settings.
Definition: anytone_codeplug.cc:2252
virtual void setIntroLine2(const QString &txt)
Sets the second intro line.
Definition: anytone_codeplug.cc:2221
virtual void setIntroLine1(const QString &txt)
Sets the first intro line.
Definition: anytone_codeplug.cc:2213
void clear()
Resets the boot settings.
Definition: anytone_codeplug.cc:2204
virtual QString introLine2() const
Returns the second intro line.
Definition: anytone_codeplug.cc:2217
BootSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2191
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1296
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the general settings from the given abstract configuration.
Definition: anytone_codeplug.cc:2237
virtual QString password() const
Returns the password.
Definition: anytone_codeplug.cc:2226
virtual QString introLine1() const
Returns the first intro line.
Definition: anytone_codeplug.cc:2209
virtual void setPassword(const QString &txt)
Sets the password.
Definition: anytone_codeplug.cc:2230
Represents the channel bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:385
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:395
ChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:928
Represents the base class for channel encodings in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:87
virtual bool talkaround() const
Returns true if the talkaround is enabled.
Definition: anytone_codeplug.cc:395
virtual void setTXOffset(unsigned hz)
Sets the TX frequency offset in Hz.
Definition: anytone_codeplug.cc:220
virtual void setScanListIndex(unsigned idx)
Sets the scan list index (0-based).
Definition: anytone_codeplug.cc:542
virtual void setTXTone(Signaling::Code code)
Sets the RX signaling (tone).
Definition: anytone_codeplug.cc:358
virtual void setGroupListIndex(unsigned idx)
Sets the group list index (0-based).
Definition: anytone_codeplug.cc:559
virtual bool simplexTDMA() const
Returns true if simplex TDMA is enabled.
Definition: anytone_codeplug.cc:624
virtual unsigned twoToneIDIndex() const
Returns the two-tone ID index (0-based).
Definition: anytone_codeplug.cc:568
virtual bool adaptiveTDMA() const
Returns true if adaptive TDMA is enabled.
Definition: anytone_codeplug.cc:632
virtual unsigned scanListIndex() const
Returns the scan list index (0-based).
Definition: anytone_codeplug.cc:538
virtual void setTwoToneDecodeIndex(unsigned idx)
Sets the 2-tone decode index (0-based).
Definition: anytone_codeplug.cc:484
virtual SignalingMode rxSignalingMode() const
Returns the RX signaling mode.
Definition: anytone_codeplug.cc:307
virtual void enableEnhancedEncryption(bool enable)
Enables/disables enhanced encryption.
Definition: anytone_codeplug.cc:652
virtual bool rxAPRS() const
Returns true if RX APRS is enabled.
Definition: anytone_codeplug.cc:640
virtual void setPower(Channel::Power power)
Sets the channel power.
Definition: anytone_codeplug.cc:265
virtual void enableCTCSSPhaseReversal(bool enable)
Enables/disables CTCSS phase reversal.
Definition: anytone_codeplug.cc:375
virtual unsigned twoToneDecodeIndex() const
Returns the 2-tone decode index (0-based).
Definition: anytone_codeplug.cc:480
virtual void setDTMFIDIndex(unsigned idx)
Sets the DTMF ID index (0-based).
Definition: anytone_codeplug.cc:588
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition: anytone_codeplug.cc:602
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition: anytone_codeplug.cc:608
virtual OptSignaling optionalSignaling() const
Returns the optional signalling type.
Definition: anytone_codeplug.cc:525
Mode
Defines all possible channel modes, see channelMode.
Definition: anytone_codeplug.hh:90
@ 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:234
virtual bool ctcssPhaseReversal() const
Returns true if the CTCSS phase reversal is enabled.
Definition: anytone_codeplug.cc:371
virtual void setTXDCS(Signaling::Code code)
Sets the TX DCS code.
Definition: anytone_codeplug.cc:444
virtual void setContactIndex(unsigned idx)
Sets the transmit contact index (0-based).
Definition: anytone_codeplug.cc:493
virtual Signaling::Code rxTone() const
Simplified access to RX signaling (tone).
Definition: anytone_codeplug.cc:316
virtual ~ChannelElement()
Destructor.
Definition: anytone_codeplug.cc:190
virtual void setColorCode(unsigned code)
Sets the color code.
Definition: anytone_codeplug.cc:597
virtual QString name() const
Returns the channel name.
Definition: anytone_codeplug.cc:682
virtual Channel * toChannelObj(Context &ctx) const
Constructs a generic Channel object from the codeplug channel.
Definition: anytone_codeplug.cc:692
virtual void setTXCTCSS(Signaling::Code tone)
Sets the TX CTCSS tone.
Definition: anytone_codeplug.cc:412
virtual Mode mode() const
Returns the channel mode (analog, digtital, etc).
Definition: anytone_codeplug.cc:246
virtual bool loneWorker() const
Returns true if lone worker is enabled.
Definition: anytone_codeplug.cc:656
virtual void enableRXCustomCTCSS()
Enables RX custom CTCSS frequency.
Definition: anytone_codeplug.cc:432
virtual void enableSimplexTDMA(bool enable)
Enables/disables simplex TDMA confirmation.
Definition: anytone_codeplug.cc:628
virtual unsigned txFrequency() const
Returns the TX frequency in Hz.
Definition: anytone_codeplug.cc:225
virtual void setMode(Mode mode)
Sets the channel mode.
Definition: anytone_codeplug.cc:250
Power
Defines all possible power settings.
Definition: anytone_codeplug.hh:98
@ POWER_HIGH
High power, usually 5W.
Definition: anytone_codeplug.hh:101
@ POWER_LOW
Low power, usually 1W.
Definition: anytone_codeplug.hh:99
@ POWER_MIDDLE
Medium power, usually 2.5W.
Definition: anytone_codeplug.hh:100
@ POWER_TURBO
Higher power, usually 7W on VHF and 6W on UHF.
Definition: anytone_codeplug.hh:102
virtual unsigned dtmfIDIndex() const
Returns the DTFM ID index (0-based).
Definition: anytone_codeplug.cc:584
virtual void setRXSignalingMode(SignalingMode mode)
Sets the RX signaling mode.
Definition: anytone_codeplug.cc:311
virtual bool hasGroupListIndex() const
Returns true, if a group list index is set.
Definition: anytone_codeplug.cc:551
ChannelElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:178
virtual Signaling::Code txDCS() const
Returns the TX DCS code.
Definition: anytone_codeplug.cc:437
virtual bool callConfirm() const
Returns true if the call confirm is enabled.
Definition: anytone_codeplug.cc:387
virtual unsigned txOffset() const
Returns the TX frequency offset in Hz.
Definition: anytone_codeplug.cc:216
virtual unsigned encryptionKeyIndex() const
Returns the AES (enhanced) encryption key index (0-based).
Definition: anytone_codeplug.cc:669
virtual Admit admit() const
Returns the admit criterion.
Definition: anytone_codeplug.cc:516
virtual void setRXCTCSS(Signaling::Code tone)
Sets the RX CTCSS tone.
Definition: anytone_codeplug.cc:428
virtual void setEncryptionKeyIndex(unsigned idx)
Sets the AES (enahnced) encryption key index (0-based).
Definition: anytone_codeplug.cc:673
virtual bool hasScanListIndex() const
Returns true, if a scan list index is set.
Definition: anytone_codeplug.cc:534
virtual void setRXDCS(Signaling::Code code)
Sets the RX DCS code.
Definition: anytone_codeplug.cc:461
virtual void setCustomCTCSSFrequency(double hz)
Sets the custom CTCSS frequency in Hz.
Definition: anytone_codeplug.cc:475
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:148
virtual SignalingMode txSignalingMode() const
Returns the TX signaling mode.
Definition: anytone_codeplug.cc:339
RepeaterMode
Defines all possible repeater modes.
Definition: anytone_codeplug.hh:106
@ 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:620
virtual unsigned rxFrequency() const
Returns the RX frequency in Hz.
Definition: anytone_codeplug.cc:207
virtual void setTXSignalingMode(SignalingMode mode)
Sets the TX signaling mode.
Definition: anytone_codeplug.cc:343
virtual void setRXFrequency(unsigned hz)
Sets the RX frequency in Hz.
Definition: anytone_codeplug.cc:211
virtual bool smsConfirm() const
Returns true if SMS confirmation is enabled.
Definition: anytone_codeplug.cc:616
virtual AnytoneFMChannelExtension::SquelchMode squelchMode() const
Returns true if the sequelch is silent and false if open.
Definition: anytone_codeplug.cc:507
virtual void enableAdaptiveTDMA(bool enable)
Enables/disables adaptive TDMA.
Definition: anytone_codeplug.cc:636
virtual void enableCallConfirm(bool enable)
Enables/disables call confirm.
Definition: anytone_codeplug.cc:391
virtual bool rxCTCSSIsCustom() const
Returns true if the RX CTCSS tone frequency is custom (non standard).
Definition: anytone_codeplug.cc:420
virtual Signaling::Code txTone() const
Simplified access to TX signaling (tone).
Definition: anytone_codeplug.cc:348
virtual void setRXTone(Signaling::Code code)
Sets the RX signaling (tone).
Definition: anytone_codeplug.cc:326
virtual bool enhancedEncryption() const
Returns true if enhanced encryption is enabled.
Definition: anytone_codeplug.cc:648
virtual void enableRXAPRS(bool enable)
Enables/disables RX APRS.
Definition: anytone_codeplug.cc:644
virtual void setSquelchMode(AnytoneFMChannelExtension::SquelchMode mode)
Enables/disables silent squelch.
Definition: anytone_codeplug.cc:511
virtual bool fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: anytone_codeplug.cc:820
virtual void setRepeaterMode(RepeaterMode mode)
Sets the transmit offset direction.
Definition: anytone_codeplug.cc:302
Admit
Defines possible admit criteria.
Definition: anytone_codeplug.hh:120
@ 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:580
virtual bool linkChannelObj(Channel *c, Context &ctx) const
Links a previously constructed channel to the rest of the configuration.
Definition: anytone_codeplug.cc:778
virtual unsigned contactIndex() const
Returns the transmit contact index (0-based).
Definition: anytone_codeplug.cc:489
virtual void clearScanListIndex()
Clears the scan list index.
Definition: anytone_codeplug.cc:546
OptSignaling
Defines all possible optional signalling settings.
Definition: anytone_codeplug.hh:130
virtual void clearGroupListIndex()
Clears the group list index.
Definition: anytone_codeplug.cc:563
virtual unsigned radioIDIndex() const
Returns the radio ID index (0-based).
Definition: anytone_codeplug.cc:498
virtual void enableRXOnly(bool enable)
Enables/disables RX only.
Definition: anytone_codeplug.cc:383
virtual double customCTCSSFrequency() const
Returns the custom CTCSS frequency in Hz.
Definition: anytone_codeplug.cc:471
virtual unsigned fiveToneIDIndex() const
Returns the five-tone ID index (0-based).
Definition: anytone_codeplug.cc:576
virtual Channel::Power power() const
Returns the channel power.
Definition: anytone_codeplug.cc:255
virtual Signaling::Code rxCTCSS() const
Returns the RX CTCSS tone.
Definition: anytone_codeplug.cc:424
virtual FMChannel::Bandwidth bandwidth() const
Returns the band width of the channel.
Definition: anytone_codeplug.cc:284
virtual bool txCTCSSIsCustom() const
Returns true if the TX CTCSS tone frequency is custom (non standard).
Definition: anytone_codeplug.cc:404
virtual RepeaterMode repeaterMode() const
Returns the transmit offset direction.
Definition: anytone_codeplug.cc:298
virtual void enableTXCustomCTCSS()
Enables TX custom CTCSS frequency.
Definition: anytone_codeplug.cc:416
virtual void setAdmit(Admit admit)
Sets the admit criterion.
Definition: anytone_codeplug.cc:520
virtual void setName(const QString &name)
Sets the channel name.
Definition: anytone_codeplug.cc:686
virtual void enableLoneWorker(bool enable)
Enables/disables lone worker.
Definition: anytone_codeplug.cc:660
virtual void setTwoToneIDIndex(unsigned idx)
Sets the two-tone ID index (0-based).
Definition: anytone_codeplug.cc:572
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the band width of the channel.
Definition: anytone_codeplug.cc:290
virtual Signaling::Code rxDCS() const
Returns the RX DCS code.
Definition: anytone_codeplug.cc:454
virtual void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition: anytone_codeplug.cc:677
virtual unsigned colorCode() const
Returns the color code.
Definition: anytone_codeplug.cc:593
virtual void setOptionalSignaling(OptSignaling sig)
Sets the optional signaling type.
Definition: anytone_codeplug.cc:529
virtual void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition: anytone_codeplug.cc:399
virtual void setRadioIDIndex(unsigned idx)
Sets the radio ID index (0-based).
Definition: anytone_codeplug.cc:502
virtual bool hasEncryptionKeyIndex() const
Returns true if an encryption key is set.
Definition: anytone_codeplug.cc:665
virtual Signaling::Code txCTCSS() const
Returns the TX CTCSS tone.
Definition: anytone_codeplug.cc:408
virtual unsigned groupListIndex() const
Returns the scan list index (0-based).
Definition: anytone_codeplug.cc:555
SignalingMode
Possible analog signaling modes.
Definition: anytone_codeplug.hh:113
void clear()
Resets the channel.
Definition: anytone_codeplug.cc:195
virtual bool rxOnly() const
Returns true if the RX only is enabled.
Definition: anytone_codeplug.cc:379
Represents the contact bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:451
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:461
ContactBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1070
Represents the base class for conacts in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:404
virtual void setNumber(unsigned number)
Sets the contact number.
Definition: anytone_codeplug.cc:1002
virtual void setName(const QString &name)
Sets the name of the contact.
Definition: anytone_codeplug.cc:993
virtual ~ContactElement()
Destructor.
Definition: anytone_codeplug.cc:956
virtual bool fromContactObj(const DMRContact *contact, Context &ctx)
Constructs this contact from the give DigitalContact.
Definition: anytone_codeplug.cc:1048
ContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:944
virtual DMRContact::Type type() const
Returns the contact type.
Definition: anytone_codeplug.cc:971
virtual void setType(DMRContact::Type type)
Sets the contact type.
Definition: anytone_codeplug.cc:980
virtual DMRContact * toContactObj(Context &ctx) const
Assembles a DigitalContact from this contact.
Definition: anytone_codeplug.cc:1029
virtual void setAlertType(AnytoneContactExtension::AlertType type)
Sets the alert type.
Definition: anytone_codeplug.cc:1024
virtual unsigned number() const
Returns the contact number.
Definition: anytone_codeplug.cc:998
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:416
virtual QString name() const
Returns the name of the contact.
Definition: anytone_codeplug.cc:989
bool isValid() const
Returns true if the element is valid.
Definition: anytone_codeplug.cc:966
virtual AnytoneContactExtension::AlertType alertType() const
Returns the alert type.
Definition: anytone_codeplug.cc:1007
void clear()
Resets the contact element.
Definition: anytone_codeplug.cc:961
Represents the base class for entries to the contact indices in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2907
virtual void setIndex(unsigned idx)
Sets the index.
Definition: anytone_codeplug.cc:4479
virtual unsigned id() const
Returns the id.
Definition: anytone_codeplug.cc:4462
bool isValid() const
Returns true if the contact map is valid.
Definition: anytone_codeplug.cc:4452
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2917
virtual bool isGroup() const
Returns true if the entry is a group call.
Definition: anytone_codeplug.cc:4457
void clear()
Clears the entry.
Definition: anytone_codeplug.cc:4447
virtual void setID(unsigned id, bool group=false)
Encodes ID and group call flag.
Definition: anytone_codeplug.cc:4468
ContactMapElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:4434
virtual unsigned index() const
Returns the index.
Definition: anytone_codeplug.cc:4475
Represents the base class of a DMR APRS message for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1419
virtual QString message() const
Returns the message.
Definition: anytone_codeplug.cc:2542
virtual bool updateConfig(Context &ctx) const
Decodes the message.
Definition: anytone_codeplug.cc:2558
void setMessage(const QString &message)
Sets the message.
Definition: anytone_codeplug.cc:2547
virtual bool fromConfig(Codeplug::Flags flags, Context &ctx)
Encodes the message.
Definition: anytone_codeplug.cc:2552
DMRAPRSMessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2524
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2537
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1429
Represents the base class of DMR APRS settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1326
virtual Channel::Power power() const
Returns the transmit power.
Definition: anytone_codeplug.cc:2349
virtual bool automatic() const
Returns true if the automatic APRS is enabled.
Definition: anytone_codeplug.cc:2298
virtual void setManualInterval(unsigned sec)
Sets the manual TX interval in seconds.
Definition: anytone_codeplug.cc:2293
virtual void setChannelSelected(unsigned n)
Sets the n-th channel to selected channel.
Definition: anytone_codeplug.cc:2410
virtual void setDestination(unsigned id)
Sets the destination DMR ID to send the APRS information to.
Definition: anytone_codeplug.cc:2423
virtual void overrideTimeSlot(DMRChannel::TimeSlot ts)
Sets the timeslot.
Definition: anytone_codeplug.cc:2458
virtual unsigned manualInterval() const
Returns the Manual TX interval in seconds.
Definition: anytone_codeplug.cc:2289
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition: anytone_codeplug.cc:2437
virtual bool fixedLocation() const
Returns true if the fixed location beacon is enabled.
Definition: anytone_codeplug.cc:2317
virtual void setChannelIndex(unsigned n, unsigned idx)
Sets the n-th channel index.
Definition: anytone_codeplug.cc:2398
virtual bool hasChannel(unsigned n) const
Returns true if the n-th channel is set.
Definition: anytone_codeplug.cc:2378
virtual void setLocation(const QGeoCoordinate &pos)
Sets the location of the fixed position.
Definition: anytone_codeplug.cc:2329
virtual void disableAutomatic()
Disables the automatic APRS.
Definition: anytone_codeplug.cc:2312
virtual void setAutomaticInterval(unsigned sec)
Sets the automatic transmit interval in seconds.
Definition: anytone_codeplug.cc:2306
virtual bool channelIsSelected(unsigned n) const
Returns true if the n-th channel is selected channel.
Definition: anytone_codeplug.cc:2390
virtual void enableFixedLocation(bool enable)
Enables/disables fixed location beacon.
Definition: anytone_codeplug.cc:2344
virtual bool timeSlotOverride() const
Returns true if the timeslot of the channel is overridden.
Definition: anytone_codeplug.cc:2446
virtual DMRChannel::TimeSlot timeslot() const
Returns the timeslot (only valid if timeSlotOverride returns true).
Definition: anytone_codeplug.cc:2450
virtual DMRContact::Type callType() const
Returns the call type.
Definition: anytone_codeplug.cc:2428
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1336
virtual void disableTimeSlotOverride()
Disables TS override.
Definition: anytone_codeplug.cc:2465
void clear()
Resets the APRS settings.
Definition: anytone_codeplug.cc:2284
virtual bool channelIsVFOB(unsigned n) const
Returns true if the n-th channel is VFO B.
Definition: anytone_codeplug.cc:2386
virtual void setChannelVFOA(unsigned n)
Sets the n-th channel to VFO A.
Definition: anytone_codeplug.cc:2402
DMRAPRSSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2271
virtual void clearChannel(unsigned n)
Resets the n-th channel.
Definition: anytone_codeplug.cc:2414
virtual unsigned automaticInterval() const
Returns the automatic transmit interval in seconds.
Definition: anytone_codeplug.cc:2302
virtual void setPower(Channel::Power power)
Sets the transmit power.
Definition: anytone_codeplug.cc:2359
virtual unsigned destination() const
Returns the destination DMR ID to send the APRS information to.
Definition: anytone_codeplug.cc:2419
virtual bool channelIsVFOA(unsigned n) const
Returns true if the n-th channel is VFO A.
Definition: anytone_codeplug.cc:2382
virtual QGeoCoordinate location() const
Returns the location of the fixed position.
Definition: anytone_codeplug.cc:2321
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the GPS settings from the given config.
Definition: anytone_codeplug.cc:2470
virtual bool linkGPSSystem(uint8_t i, Context &ctx)
Links GPS system from this GPS settings.
Definition: anytone_codeplug.cc:2503
virtual unsigned channelIndex(unsigned n) const
Returns the index of the n-th channel.
Definition: anytone_codeplug.cc:2394
virtual void setChannelVFOB(unsigned n)
Sets the n-th channel to VFO B.
Definition: anytone_codeplug.cc:2406
virtual bool createGPSSystem(uint8_t i, Context &ctx)
Creates GPS system from this GPS settings.
Definition: anytone_codeplug.cc:2496
Represents a list of DMR encryption key IDs.
Definition: anytone_codeplug.hh:2827
virtual bool hasID(unsigned int n) const
Returns true if the n-th id is set.
Definition: anytone_codeplug.cc:4365
virtual uint16_t id(unsigned int n) const
Returns the ID of the encryption key.
Definition: anytone_codeplug.cc:4372
DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4347
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4360
virtual void clearID(unsigned int n)
Clears the n-th id.
Definition: anytone_codeplug.cc:4386
virtual void setID(unsigned int n, uint16_t id)
Sets the ID of the encryption key.
Definition: anytone_codeplug.cc:4379
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2837
Represents a list of DMR encryption keys.
Definition: anytone_codeplug.hh:2867
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4409
QByteArray key(unsigned int n) const
Returns the n-th key.
Definition: anytone_codeplug.cc:4417
DMREncryptionKeyListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4396
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2877
void setKey(unsigned int n, const QByteArray &key)
Sets the n-th key.
Definition: anytone_codeplug.cc:4424
Represents the DTMF contact byte map, indicating which contacts are valid.
Definition: anytone_codeplug.hh:521
DTMFContactBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1160
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:531
Represents the base class for analog (DTMF) contacts in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:469
virtual bool fromContact(const DTMFContact *contact)
Encodes an DTMF contact from the given one.
Definition: anytone_codeplug.cc:1150
virtual void setNumber(const QString &number)
Sets the number of the contact.
Definition: anytone_codeplug.cc:1121
virtual DTMFContact * toContact() const
Creates an DTMF contact from the entry.
Definition: anytone_codeplug.cc:1145
DTMFContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1086
virtual QString number() const
Returns the number of the contact.
Definition: anytone_codeplug.cc:1108
virtual void setName(const QString &name)
Sets the name of the contact.
Definition: anytone_codeplug.cc:1140
void clear()
Resets the contact element.
Definition: anytone_codeplug.cc:1103
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:481
virtual ~DTMFContactElement()
Destructor.
Definition: anytone_codeplug.cc:1098
virtual QString name() const
Returns the name of the contact.
Definition: anytone_codeplug.cc:1136
Represents a list of DTMF IDs to be send.
Definition: anytone_codeplug.hh:2714
virtual void clearNumber(unsigned int n)
Clears the n-th number.
Definition: anytone_codeplug.cc:4239
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2724
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4211
virtual bool hasNumber(unsigned int n) const
Returns true, if the n-th number is set.
Definition: anytone_codeplug.cc:4216
DTMFIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4198
virtual QString number(unsigned int n) const
Returns the n-th number.
Definition: anytone_codeplug.cc:4223
virtual void setNumber(unsigned int n, const QString &number)
Sets the n-th number.
Definition: anytone_codeplug.cc:4231
Represents the base class of DTMF settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2607
Response
Possible responses to a DTMF decode.
Definition: anytone_codeplug.hh:2610
virtual void setFirstDigitDuration(unsigned ms)
Sets the first digit duration in ms.
Definition: anytone_codeplug.cc:4055
virtual QString botID() const
Returns the BOT ID.
Definition: anytone_codeplug.cc:4130
virtual void setPostEncodingDelay(unsigned ms)
Sets the post encoding delay in ms.
Definition: anytone_codeplug.cc:4089
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2623
virtual void setDCodePause(unsigned sec)
Sets the D-code pause in seconds.
Definition: anytone_codeplug.cc:4116
virtual unsigned groupCode() const
Returns the group code [0,15].
Definition: anytone_codeplug.cc:4024
virtual unsigned dCodePause() const
Returns the D-code pause in seconds.
Definition: anytone_codeplug.cc:4112
virtual void setRemoteStunID(const QString &id)
Sets the remote stun ID.
Definition: anytone_codeplug.cc:4187
DTMFSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3996
virtual QString id() const
Returns the radio ID.
Definition: anytone_codeplug.cc:4069
virtual void setResponse(Response resp)
Sets the response to a DTMF decode.
Definition: anytone_codeplug.cc:4037
virtual unsigned preTime() const
Returns the pre time in ms.
Definition: anytone_codeplug.cc:4042
virtual unsigned pttIDPause() const
Returns the PTT ID pause in seconds.
Definition: anytone_codeplug.cc:4094
virtual void setGroupCode(unsigned symb)
Sets the group code [0,15].
Definition: anytone_codeplug.cc:4028
virtual void enablePTTID(bool enable)
Enables/disables the PTT ID.
Definition: anytone_codeplug.cc:4107
virtual bool pttIDEnabled() const
Returns true if the PTT ID is enabled.
Definition: anytone_codeplug.cc:4103
virtual void setIntervalSymbol(unsigned symb)
Sets the interval/repeat symbol [0,15].
Definition: anytone_codeplug.cc:4019
virtual void setRemoteKillID(const QString &id)
Sets the remote kill ID.
Definition: anytone_codeplug.cc:4170
virtual void setID(const QString &id)
Sets the radio ID.
Definition: anytone_codeplug.cc:4077
virtual unsigned autoResetTime() const
Returns the auto reset time in seconds.
Definition: anytone_codeplug.cc:4060
virtual unsigned firstDigitDuration() const
Returns the first digit duration in ms.
Definition: anytone_codeplug.cc:4051
virtual void setBOTID(const QString &id)
Sets the BOT ID.
Definition: anytone_codeplug.cc:4138
virtual unsigned postEncodingDelay() const
Returns the post encoding delay in ms.
Definition: anytone_codeplug.cc:4085
virtual QString eotID() const
Returns the EOT ID.
Definition: anytone_codeplug.cc:4146
virtual QString remoteKillID() const
Returns the remote kill ID.
Definition: anytone_codeplug.cc:4162
virtual void setPTTIDPause(unsigned sec)
Sets the PTT ID pause in seconds.
Definition: anytone_codeplug.cc:4098
virtual QString remoteStunID() const
Returns the remote stun ID.
Definition: anytone_codeplug.cc:4179
void clear()
Resets the settings.
Definition: anytone_codeplug.cc:4009
virtual void setAutoResetTime(unsigned sec)
Sets the auto reset time in seconds.
Definition: anytone_codeplug.cc:4064
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition: anytone_codeplug.cc:4046
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:4121
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition: anytone_codeplug.cc:4125
virtual Response response() const
Returns the response to a DMTF decode.
Definition: anytone_codeplug.cc:4033
virtual unsigned intervalSymbol() const
Returns the interval/repeat symbol [0,15].
Definition: anytone_codeplug.cc:4015
virtual void setEOTID(const QString &id)
Sets the EOT ID.
Definition: anytone_codeplug.cc:4154
Represents the base class of digital alarm setting extension for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2073
virtual DMRContact::Type callType() const
Returns the call type.
Definition: anytone_codeplug.cc:3264
virtual unsigned destination() const
Returns the destination DMR number.
Definition: anytone_codeplug.cc:3282
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2083
void clear()
Clears the settings.
Definition: anytone_codeplug.cc:3259
virtual void setDestination(unsigned number)
Sets the destination DMR number.
Definition: anytone_codeplug.cc:3286
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition: anytone_codeplug.cc:3273
DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3246
Represents the base class for the extended settings element in many AnyTone codeplugs.
Definition: anytone_codeplug.hh:1182
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:2103
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:2051
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:2079
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:2044
Represents the base-class for 5Tone function for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2205
virtual void setFunction(Function function)
Sets the function.
Definition: anytone_codeplug.cc:3436
virtual QString name() const
Returns the name.
Definition: anytone_codeplug.cc:3478
void clear()
Clears the function settings.
Definition: anytone_codeplug.cc:3427
Function
Possible function being performed on 5-tone decoding.
Definition: anytone_codeplug.hh:2208
Response
Possible responses to 5-tone decoding.
Definition: anytone_codeplug.hh:2214
virtual void setName(const QString &name)
Sets the name.
Definition: anytone_codeplug.cc:3482
virtual void setID(const QString &id)
Sets the ID.
Definition: anytone_codeplug.cc:3463
virtual void setResponse(Response response)
Sets the response.
Definition: anytone_codeplug.cc:3445
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2227
virtual Response response() const
Returns the response.
Definition: anytone_codeplug.cc:3441
FiveToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3414
virtual QString id() const
Returns the ID.
Definition: anytone_codeplug.cc:3450
Represents the list of five-tone functions for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2257
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:3503
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2267
FiveToneFunctionListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3490
Represents the bitmap indicating which five-tone IDs are valid.
Definition: anytone_codeplug.hh:2158
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2168
FiveToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3370
Represents the base-class for 5Tone IDs for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2113
virtual void setStandard(Standard std)
Sets the encoding standard.
Definition: anytone_codeplug.cc:3316
FiveToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3294
void clear()
Clears the ID.
Definition: anytone_codeplug.cc:3307
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2130
virtual void setID(const QString &id)
Sets the ID.
Definition: anytone_codeplug.cc:3343
virtual QString name() const
Returns the name.
Definition: anytone_codeplug.cc:3358
virtual unsigned toneDuration() const
Returns the tone duration in ms.
Definition: anytone_codeplug.cc:3321
Standard
Possible 5-tone encoding standards.
Definition: anytone_codeplug.hh:2116
virtual void setName(const QString &name)
Sets the name.
Definition: anytone_codeplug.cc:3362
virtual Standard standard() const
Returns the 5Tone encoding standard.
Definition: anytone_codeplug.cc:3312
virtual void setToneDuration(unsigned ms)
Sets the tone duration in ms.
Definition: anytone_codeplug.cc:3325
virtual QString id() const
Returns the ID.
Definition: anytone_codeplug.cc:3330
Represents the list of five-tone IDs.
Definition: anytone_codeplug.hh:2176
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2186
FiveToneIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3386
virtual uint8_t * member(unsigned int n) const
Returns a pointer to the n-th five-tone ID.
Definition: anytone_codeplug.cc:3404
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:3399
Represents the base-class for 5Tone settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2286
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3617
virtual Standard decodingStandard() const
Returns the decoding standard.
Definition: anytone_codeplug.cc:3545
virtual unsigned eotToneDuration() const
Returns the EOT tone duration in ms.
Definition: anytone_codeplug.cc:3744
void clear()
Resets the 5tone settings.
Definition: anytone_codeplug.cc:3531
enum FiveToneIDElement::Standard Standard
Possible 5-tone encoding standards.
Definition: anytone_codeplug.hh:2293
virtual QString eotID() const
Returns the 5tone EOT ID.
Definition: anytone_codeplug.cc:3753
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2304
virtual void setEOTToneDuration(unsigned ms)
Sets the EOT tone duration in ms.
Definition: anytone_codeplug.cc:3748
FiveToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3518
virtual unsigned stopCode() const
Returns the stop code [0,15].
Definition: anytone_codeplug.cc:3644
virtual unsigned postEncodeDelay() const
Returns the post-encode delay in ms.
Definition: anytone_codeplug.cc:3591
virtual void setAutoResetTime(unsigned s)
Sets the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3621
virtual void setStopCode(unsigned code)
Sets the stop code.
Definition: anytone_codeplug.cc:3648
virtual void setDecodingResponse(Response response)
Sets the decoding response.
Definition: anytone_codeplug.cc:3540
virtual void setStopTime(unsigned ms)
Sets the stop time in ms.
Definition: anytone_codeplug.cc:3657
virtual QString botID() const
Returns the 5tone BOT ID.
Definition: anytone_codeplug.cc:3707
virtual bool hasPTTID() const
Returns true if the PTT ID is set.
Definition: anytone_codeplug.cc:3600
virtual void setID(const QString &id)
Sets the 5tone radio ID.
Definition: anytone_codeplug.cc:3576
virtual void setDelayAfterStop(unsigned ms)
Sets the delay after stop in ms.
Definition: anytone_codeplug.cc:3675
virtual unsigned decodingToneDuration() const
Returns the decoding tone duration in ms.
Definition: anytone_codeplug.cc:3554
virtual QString id() const
Returns the 5tone radio ID.
Definition: anytone_codeplug.cc:3563
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition: anytone_codeplug.cc:3684
virtual bool sidetoneEnabled() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:3635
virtual void setDecodeTime(unsigned ms)
Sets the decode time in ms.
Definition: anytone_codeplug.cc:3666
virtual void setPostEncodeDelay(unsigned ms)
Sets the post-encode delay in ms.
Definition: anytone_codeplug.cc:3595
virtual void enableSidetone(bool enable)
Enables/disables side tone.
Definition: anytone_codeplug.cc:3639
virtual void setDecodingStandard(Standard standard)
Sets the decoding standard.
Definition: anytone_codeplug.cc:3549
virtual unsigned firstDelay() const
Returns the first delay in ms.
Definition: anytone_codeplug.cc:3626
virtual void setEOTID(const QString &id)
Sets the 5tone EOT ID.
Definition: anytone_codeplug.cc:3766
virtual void setBOTStandard(Standard standard)
Sets the BOT standard.
Definition: anytone_codeplug.cc:3693
virtual void setDecodingToneDuration(unsigned ms)
Sets the decoding tone duration in ms.
Definition: anytone_codeplug.cc:3558
virtual void setPTTID(unsigned id)
Sets the PTT ID [5,75].
Definition: anytone_codeplug.cc:3608
virtual unsigned preTime() const
Returns the pre time in ms.
Definition: anytone_codeplug.cc:3680
virtual unsigned pttID() const
Returns the PTT ID.
Definition: anytone_codeplug.cc:3604
virtual Response decodingResponse() const
Returns the decoding response.
Definition: anytone_codeplug.cc:3536
virtual unsigned botToneDuration() const
Returns the BOT tone duration in ms.
Definition: anytone_codeplug.cc:3698
virtual void setBOTToneDuration(unsigned ms)
Sets the BOT tone duration in ms.
Definition: anytone_codeplug.cc:3702
virtual void setFirstDelay(unsigned ms)
Sets the first delay in ms.
Definition: anytone_codeplug.cc:3630
virtual void setBOTID(const QString &id)
Sets the 5tone BOT ID.
Definition: anytone_codeplug.cc:3720
virtual void setEOTStandard(Standard standard)
Sets the EOT standard.
Definition: anytone_codeplug.cc:3739
virtual unsigned stopTime() const
Returns the stop time in ms.
Definition: anytone_codeplug.cc:3653
virtual Standard botStandard() const
Returns the BOT standard.
Definition: anytone_codeplug.cc:3689
Response
Possible responses to decoded 5-tone codes.
Definition: anytone_codeplug.hh:2289
virtual Standard eotStandard() const
Returns the EOT standard.
Definition: anytone_codeplug.cc:3735
virtual unsigned delayAfterStop() const
Returns the delay after stop in ms.
Definition: anytone_codeplug.cc:3671
virtual void clearPTTID()
Clears the PTT ID.
Definition: anytone_codeplug.cc:3612
virtual unsigned decodeTime() const
Returns the decode time in ms.
Definition: anytone_codeplug.cc:3662
Represents the base class for the settings elements in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:787
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:1852
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:1687
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:1627
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:1622
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:790
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:1606
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:1684
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:1618
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:1954
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:1666
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:1662
virtual bool fromConfig(const Flags &flags, Context &ctx)
Encodes the general settings.
Definition: anytone_codeplug.cc:1696
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:1675
void clear()
Resets the general settings.
Definition: anytone_codeplug.cc:1613
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:1691
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:1647
virtual void enableRecording(bool enable)=0
Enables/disables recording.
virtual Interval autoShutdownDelay() const
Returns the auto-shutdown delay in minutes.
Definition: anytone_codeplug.cc:1636
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:1631
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:1671
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:1680
Represents the bitmap indicating which group list element is valid.
Definition: anytone_codeplug.hh:583
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:593
GroupListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1279
Represents the base class for group lists in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:539
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition: anytone_codeplug.cc:1214
virtual RXGroupList * toGroupListObj() const
Constructs a new RXGroupList from this group list.
Definition: anytone_codeplug.cc:1227
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is valid.
Definition: anytone_codeplug.cc:1210
virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx)
Constructs this group list from the given RXGroupList.
Definition: anytone_codeplug.cc:1249
void clear()
Clears the group list.
Definition: anytone_codeplug.cc:1189
GroupListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1176
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:549
bool isValid() const
Returns true if the group list is valid.
Definition: anytone_codeplug.cc:1196
virtual void setName(const QString &name)
Sets the name of the group list.
Definition: anytone_codeplug.cc:1205
virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const
Populates the RXGroupList from this group list.
Definition: anytone_codeplug.cc:1232
virtual QString name() const
Returns the name of the group list.
Definition: anytone_codeplug.cc:1201
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition: anytone_codeplug.cc:1222
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition: anytone_codeplug.cc:1218
Represents the base class of a hot-key setting entry for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1727
virtual DigiCallType digiCallType() const
If type returns Type::Call and callType CalLType::Digital, returns the digital call type.
Definition: anytone_codeplug.cc:2899
virtual void setContactIndex(unsigned idx)
Sets the contact index.
Definition: anytone_codeplug.cc:2916
Type
Hot-key types.
Definition: anytone_codeplug.hh:1730
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1773
void clear()
Resets the hot-key entry.
Definition: anytone_codeplug.cc:2865
virtual Type type() const
Returns the type of the hot-key entry.
Definition: anytone_codeplug.cc:2872
virtual void setMessageIndex(unsigned idx)
Sets the message index.
Definition: anytone_codeplug.cc:2933
virtual void clearContactIndex()
Clears the contact index.
Definition: anytone_codeplug.cc:2920
DigiCallType
Possible digital call sub-types.
Definition: anytone_codeplug.hh:1754
virtual unsigned contactIndex() const
If type is Type::Call, returns the contact index.
Definition: anytone_codeplug.cc:2912
virtual void clearMessageIndex()
Clears the message index.
Definition: anytone_codeplug.cc:2937
virtual CallType callType() const
If type returns Type::Call, returns the type of the call.
Definition: anytone_codeplug.cc:2890
virtual void setMenuItem(MenuItem item)
Sets the menu item.
Definition: anytone_codeplug.cc:2885
virtual bool hasContactIndex() const
Returns true if the contact index is set.
Definition: anytone_codeplug.cc:2908
HotKeyElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2852
virtual void setCallType(CallType type)
Sets the call type.
Definition: anytone_codeplug.cc:2894
CallType
Possible call types.
Definition: anytone_codeplug.hh:1748
virtual unsigned messageIndex() const
Returns the message index.
Definition: anytone_codeplug.cc:2929
virtual void setType(Type type)
Sets the type of the hot-key entry.
Definition: anytone_codeplug.cc:2876
virtual MenuItem menuItem() const
If type returns Type::Menu, returns the menu item.
Definition: anytone_codeplug.cc:2881
MenuItem
Possible menu items.
Definition: anytone_codeplug.hh:1736
virtual bool hasMessageIndex() const
Returns true if a message index is set.
Definition: anytone_codeplug.cc:2925
virtual void setDigiCallType(DigiCallType type)
Sets the digital call type.
Definition: anytone_codeplug.cc:2903
Represents the list of hot-key settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1832
HotKeySettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2945
virtual uint8_t * hotKeySetting(unsigned int n) const
Returns a pointer to the n-th hot key setting.
Definition: anytone_codeplug.cc:2965
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2958
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1842
Represents the base class for inverted bitmaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:40
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:112
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:117
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:132
InvertedBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:105
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:123
Represents the base class for inverted bytemaps in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:64
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition: anytone_codeplug.cc:163
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition: anytone_codeplug.cc:156
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition: anytone_codeplug.cc:170
void clear()
Clears the bitmap, disables all channels.
Definition: anytone_codeplug.cc:151
InvertedBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:144
Represents the bytemap indicating which message is valid.
Definition: anytone_codeplug.hh:1571
MessageBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2709
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1581
Represents base class of a preset message for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1548
MessageElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2679
virtual QString message() const
Returns the message text.
Definition: anytone_codeplug.cc:2697
void clear()
Resets the message.
Definition: anytone_codeplug.cc:2692
virtual void setMessage(const QString &msg)
Sets the message text.
Definition: anytone_codeplug.cc:2701
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1558
Represents the base class of prefabricated message linked list for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1509
virtual void setIndex(unsigned idx)
Sets the index of the message.
Definition: anytone_codeplug.cc:2667
virtual bool hasIndex() const
Returns true if there is a message index.
Definition: anytone_codeplug.cc:2659
virtual unsigned next() const
Returns the index of the next message in list.
Definition: anytone_codeplug.cc:2646
virtual unsigned index() const
Returns the index of the message.
Definition: anytone_codeplug.cc:2663
void clear()
Clears the message list item.
Definition: anytone_codeplug.cc:2635
virtual void setNext(unsigned idx)
Sets the index of the next message in list.
Definition: anytone_codeplug.cc:2650
MessageListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2622
virtual void clearNext()
Clears the next message index.
Definition: anytone_codeplug.cc:2654
virtual bool hasNext() const
Returns true if there is a next message (EOL otherwise).
Definition: anytone_codeplug.cc:2642
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1519
virtual void clearIndex()
Clears the index of the message.
Definition: anytone_codeplug.cc:2671
Represents the bitmap indicating which radio IDs are valid.
Definition: anytone_codeplug.hh:766
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:776
RadioIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1590
Represents the base class for radio IDs in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:733
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:743
virtual bool fromRadioID(DMRRadioID *id)
Encodes the given RadioID.
Definition: anytone_codeplug.cc:1580
virtual void setName(const QString &name)
Sets the name of the radio ID.
Definition: anytone_codeplug.cc:1571
void clear()
Resets the radio ID.
Definition: anytone_codeplug.cc:1554
RadioIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1541
virtual DMRRadioID * toRadioID() const
Constructs a new radio id.
Definition: anytone_codeplug.cc:1576
virtual void setNumber(unsigned number)
Sets the number of the radio ID.
Definition: anytone_codeplug.cc:1562
virtual QString name() const
Returns the name of the radio ID.
Definition: anytone_codeplug.cc:1567
virtual unsigned number() const
Returns the number of the radio ID.
Definition: anytone_codeplug.cc:1558
Represents the table of repeater offset frequencies.
Definition: anytone_codeplug.hh:1463
virtual bool isSet(unsigned int n) const
Returns true, if the n-th offset frequency is set.
Definition: anytone_codeplug.cc:2587
virtual Frequency offset(unsigned int n) const
Returns the n-th offset frequency.
Definition: anytone_codeplug.cc:2594
virtual void setOffset(unsigned int n, Frequency freq)
Sets the n-th offset frequency.
Definition: anytone_codeplug.cc:2604
RepeaterOffsetListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2567
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2580
virtual void clearOffset(unsigned int n)
Clears the n-th offset frequency.
Definition: anytone_codeplug.cc:2612
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1473
Represents the bitmap indicating which scanlist elements are valid.
Definition: anytone_codeplug.hh:715
ScanListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:1525
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:725
Represents the base class for scan lists in all AnyTone codeplugs.
Definition: anytone_codeplug.hh:601
virtual void setSecondarySelected()
Sets the secondary channel to be selected channel.
Definition: anytone_codeplug.cc:1373
virtual bool fromScanListObj(ScanList *lst, Context &ctx)
Constructs the binary representation from the give config.
Definition: anytone_codeplug.cc:1485
virtual void setSecondary(unsigned idx)
Sets the secondary channel index.
Definition: anytone_codeplug.cc:1369
virtual PriChannel priorityChannels() const
Returns the priority channel selection.
Definition: anytone_codeplug.cc:1323
ScanListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:1295
virtual QString name() const
Returns the name of the scan list.
Definition: anytone_codeplug.cc:1424
virtual void setDropOutDelay(unsigned sec)
Sets the drop out delay in seconds.
Definition: anytone_codeplug.cc:1402
virtual bool hasSecondary() const
Returns true if the secondary channel is set.
Definition: anytone_codeplug.cc:1357
virtual bool hasPrimary() const
Returns true if the primary channel is set.
Definition: anytone_codeplug.cc:1332
virtual bool primaryIsSelected() const
Returns true if the primary channel is set to the selected channel.
Definition: anytone_codeplug.cc:1336
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition: anytone_codeplug.cc:1437
virtual void setRevertChannel(RevertChannel type)
Sets the revert channel type.
Definition: anytone_codeplug.cc:1419
virtual ScanList * toScanListObj() const
Constructs a ScanList object from this definition.
Definition: anytone_codeplug.cc:1450
virtual unsigned lookBackTimeA() const
Returns the look back time A in seconds.
Definition: anytone_codeplug.cc:1382
virtual void setPrimary(unsigned idx)
Sets the primary channel index.
Definition: anytone_codeplug.cc:1344
virtual void setPrimarySelected()
Sets the primary channel to be selected channel.
Definition: anytone_codeplug.cc:1348
virtual void setDwellTime(unsigned sec)
Sets the dwell time in seconds.
Definition: anytone_codeplug.cc:1410
virtual unsigned primary() const
Returns the primary channel index.
Definition: anytone_codeplug.cc:1340
PriChannel
Defines all possible priority channel selections.
Definition: anytone_codeplug.hh:604
@ 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:1428
virtual bool secondaryIsSelected() const
Returns true if the secondary channel is set to the selected channel.
Definition: anytone_codeplug.cc:1361
virtual void setPriorityChannels(PriChannel sel)
Sets the priority channel selection.
Definition: anytone_codeplug.cc:1327
virtual void clearSecondaryChannel()
Clears the secondary channel index.
Definition: anytone_codeplug.cc:1377
virtual RevertChannel revertChannel() const
Returns the revert channel type.
Definition: anytone_codeplug.cc:1415
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is set.
Definition: anytone_codeplug.cc:1433
virtual unsigned lookBackTimeB() const
Returns the look back time B in seconds.
Definition: anytone_codeplug.cc:1390
virtual void clearPrimaryChannel()
Clears the primary channel index.
Definition: anytone_codeplug.cc:1352
virtual void setLookBackTimeA(unsigned sec)
Sets the look back time A in seconds.
Definition: anytone_codeplug.cc:1386
RevertChannel
Defines all possible reply channel selections.
Definition: anytone_codeplug.hh:612
@ SecondaryActive
Secondary + active channel.
@ SelectedActive
Selected + active channel.
void clear()
Resets the scan list.
Definition: anytone_codeplug.cc:1308
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition: anytone_codeplug.cc:1441
virtual unsigned dropOutDelay() const
Returns the drop out delay in seconds.
Definition: anytone_codeplug.cc:1398
virtual void setLookBackTimeB(unsigned sec)
Sets the look back time B in seconds.
Definition: anytone_codeplug.cc:1394
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition: anytone_codeplug.cc:1445
virtual unsigned secondary() const
Returns the secondary channel index.
Definition: anytone_codeplug.cc:1365
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:1455
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:632
virtual unsigned dwellTime() const
Returns the dwell time in seconds.
Definition: anytone_codeplug.cc:1406
Represents the bitmap, indicating which status messages are valid.
Definition: anytone_codeplug.hh:1709
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1719
StatusMessageBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2836
Implements the list of status messages for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1671
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1681
virtual QString message(unsigned int n) const
Returns the n-th status message.
Definition: anytone_codeplug.cc:2820
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:2815
StatusMessagesElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2802
virtual void setMessage(unsigned int n, const QString &msg)
Sets the n-th status message.
Definition: anytone_codeplug.cc:2826
Rerpesents the two-tone function bitmap, indicating which two-tone functions are valid.
Definition: anytone_codeplug.hh:2538
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2548
TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3905
Represents the base-class for a 2-tone function for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2477
virtual Response response() const
Returns the response.
Definition: anytone_codeplug.cc:3884
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition: anytone_codeplug.cc:3879
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition: anytone_codeplug.cc:3870
Response
Possible responses to a decode.
Definition: anytone_codeplug.hh:2480
void clear()
Resets the function.
Definition: anytone_codeplug.cc:3861
virtual void setResponse(Response resp)
Sets the response.
Definition: anytone_codeplug.cc:3888
virtual QString name() const
Returns the name of the function.
Definition: anytone_codeplug.cc:3893
virtual double secondTone() const
Returns the second tone of the sequence.
Definition: anytone_codeplug.cc:3875
virtual void setName(const QString &name)
Sets the name of the function.
Definition: anytone_codeplug.cc:3897
TwoToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3848
virtual double firstTone() const
Returns the first tone of the sequence.
Definition: anytone_codeplug.cc:3866
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2493
Represents the two-tone ID bitmap, indicating the which two-tone IDs are valid.
Definition: anytone_codeplug.hh:2459
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2469
TwoToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:3832
Represents the base-class for a 2-tone ID for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2410
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition: anytone_codeplug.cc:3815
virtual QString name() const
Returns the name of the function.
Definition: anytone_codeplug.cc:3820
void clear()
Resets the ID.
Definition: anytone_codeplug.cc:3797
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2420
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition: anytone_codeplug.cc:3806
virtual double firstTone() const
Returns the first tone of the sequence.
Definition: anytone_codeplug.cc:3802
virtual void setName(const QString &name)
Sets the name of the function.
Definition: anytone_codeplug.cc:3824
TwoToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3784
virtual double secondTone() const
Returns the second tone of the sequence.
Definition: anytone_codeplug.cc:3811
Represents the base class of 2-tone settings for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:2556
virtual unsigned gapDuration() const
Returns the gap duration in ms.
Definition: anytone_codeplug.cc:3966
virtual void setFirstToneDuration(unsigned ms)
Sets the first tone duration in ms.
Definition: anytone_codeplug.cc:3943
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition: anytone_codeplug.cc:3984
virtual void setSecondToneDuration(unsigned ms)
Sets the second tone duration in ms.
Definition: anytone_codeplug.cc:3952
virtual unsigned firstToneDuration() const
Returns the first tone duration in ms.
Definition: anytone_codeplug.cc:3939
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition: anytone_codeplug.cc:3988
virtual void setLongToneDuration(unsigned ms)
Sets the long tone duration in ms.
Definition: anytone_codeplug.cc:3961
virtual void setAutoResetTime(unsigned sec)
Sets the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3979
TwoToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:3921
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition: anytone_codeplug.cc:3975
virtual unsigned longToneDuration() const
Returns the long tone duration in ms.
Definition: anytone_codeplug.cc:3957
virtual unsigned secondToneDuration() const
Returns the second tone duration in ms.
Definition: anytone_codeplug.cc:3948
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:2566
void clear()
Resets the settings.
Definition: anytone_codeplug.cc:3934
virtual void setGapDuration(unsigned ms)
Sets the gap duration in ms.
Definition: anytone_codeplug.cc:3970
Represents the bitmap, indicating which WFM (FM broadcast) channels are valid.
Definition: anytone_codeplug.hh:2790
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2800
WFMChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4299
Represents a list of 100 FM broad cast channels.
Definition: anytone_codeplug.hh:2750
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2760
virtual void clearChannel(unsigned int n)
Clears the n-th channel frequency.
Definition: anytone_codeplug.cc:4289
WFMChannelListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4250
virtual void setChannel(unsigned int n, Frequency freq)
Sets the n-th channel frequency.
Definition: anytone_codeplug.cc:4282
virtual Frequency channel(unsigned int n) const
Returns the n-th channel frequency.
Definition: anytone_codeplug.cc:4275
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4263
virtual bool hasChannel(unsigned int n) const
Returns true, if the n-th channel is set.
Definition: anytone_codeplug.cc:4268
Represents the WFM (FM broadcast) VFO frquency.
Definition: anytone_codeplug.hh:2805
virtual Frequency frequency() const
Returns the VFO frequency.
Definition: anytone_codeplug.cc:4334
WFMVFOElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:4315
void clear()
Abstract method to reset the element within the codeplug.
Definition: anytone_codeplug.cc:4328
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:2815
virtual void setFrequency(Frequency freq)
Sets the VFO frequency.
Definition: anytone_codeplug.cc:4339
Represents the bitmap indcating which zones are valid.
Definition: anytone_codeplug.hh:1268
static constexpr unsigned int size()
The size of the element.
Definition: anytone_codeplug.hh:1278
ZoneBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: anytone_codeplug.cc:2175
Represents the base class for zone channel list for all AnyTone codeplugs.
Definition: anytone_codeplug.hh:1232
virtual unsigned channelIndexA(unsigned n) const
Returns the channel index (0-based) for VFO A for the n-th zone.
Definition: anytone_codeplug.cc:2142
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:2163
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:2155
void clear()
Resets the zone channel list.
Definition: anytone_codeplug.cc:2131
ZoneChannelListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: anytone_codeplug.cc:2118
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:2138
virtual void clearChannelIndexA(unsigned n)
Clears the channel index (0-based) for VFO A for the n-th zone.
Definition: anytone_codeplug.cc:2150
static constexpr unsigned int size()
Returns the size of the element.
Definition: anytone_codeplug.hh:1242
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:2146
virtual void clearChannelIndexB(unsigned n)
Clears the channel index (0-based) for VFO B for the n-th zone.
Definition: anytone_codeplug.cc:2167
virtual unsigned channelIndexB(unsigned n) const
Returns the channel index (0-based) for VFO B for the n-th zone.
Definition: anytone_codeplug.cc:2159
Base class interface for all Anytone radio codeplugs.
Definition: anytone_codeplug.hh:15
AnytoneCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition: anytone_codeplug.cc:4487
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:4577
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition: anytone_codeplug.cc:4498
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:4493
virtual void allocateForDecoding()=0
Allocate all code-plug elements that must be downloaded for decoding.
virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes the downloaded codeplug.
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:4607
virtual bool allocateBitmaps()=0
Allocates the bitmaps.
QString _label
Holds the image label.
Definition: anytone_codeplug.hh:2974
virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition: anytone_codeplug.cc:4509
AlertType
Possible ring-tone types.
Definition: anytone_extension.hh:321
Color
Possible display colors.
Definition: anytone_extension.hh:974
LastCallerDisplayMode
What to show from the last caller.
Definition: anytone_extension.hh:968
SquelchMode
Possible squelch mode settings.
Definition: anytone_extension.hh:141
KeyFunction
All possible key functions.
Definition: anytone_extension.hh:585
Implements an interface to Anytone radios.
Definition: anytone_radio.hh:34
VFOScanType
Encodes the possible VFO scan types.
Definition: anytone_extension.hh:2148
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:195
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:47
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:24
This class defines the interface all device-specific code-plugs must implement.
Definition: codeplug.hh:18
The config class, representing the codeplug configuration.
Definition: config.hh:69
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:385
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:31
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:236
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:14
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:14
Internal offsets within the element.
Definition: anytone_codeplug.hh:2060
Some limits for the quick calls.
Definition: anytone_codeplug.hh:1653
static constexpr unsigned int numEntries()
The maximum number of quick-call entries.
Definition: anytone_codeplug.hh:1654
Some offsets within the element.
Definition: anytone_codeplug.hh:1659
Internal used offsets within the channel element.
Definition: anytone_codeplug.hh:378
Some limits for the message.
Definition: anytone_codeplug.hh:1445
static constexpr unsigned int length()
Maximum message length.
Definition: anytone_codeplug.hh:1446
Some internal used offset.
Definition: anytone_codeplug.hh:1451
Some limits for the list.
Definition: anytone_codeplug.hh:2852
static constexpr unsigned int numEntries()
Maximum number of DMR encryption key IDs.
Definition: anytone_codeplug.hh:2853
Some internal used offsets within the element.
Definition: anytone_codeplug.hh:2858
Some limits of the list.
Definition: anytone_codeplug.hh:2888
static constexpr unsigned numEntries()
Maximum number of keys.
Definition: anytone_codeplug.hh:2889
Some offsets within the element.
Definition: anytone_codeplug.hh:2894
Some limits for the element.
Definition: anytone_codeplug.hh:503
static constexpr unsigned int digitCount()
The max number of digits.
Definition: anytone_codeplug.hh:504
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:505
Internal used offsets within the codeplug.
Definition: anytone_codeplug.hh:510
Some limits of the list.
Definition: anytone_codeplug.hh:2739
static constexpr unsigned int numberLength()
The maximum length of the numbers.
Definition: anytone_codeplug.hh:2741
static constexpr unsigned int numEntries()
The maximum number of entries in the list.
Definition: anytone_codeplug.hh:2740
Internal used offsets within the element.
Definition: anytone_codeplug.hh:2100
Some limits for the list.
Definition: anytone_codeplug.hh:2276
static constexpr unsigned int numFunctions()
The max number of functions.
Definition: anytone_codeplug.hh:2277
Some limits for the list.
Definition: anytone_codeplug.hh:2195
static constexpr unsigned int numEntries()
Maximum number of entries.
Definition: anytone_codeplug.hh:2196
Internal used offsets within the element.
Definition: anytone_codeplug.hh:1162
Some limits for this element.
Definition: anytone_codeplug.hh:1851
static constexpr unsigned int numEntries()
Maximum number of hot-key entries.
Definition: anytone_codeplug.hh:1852
Some internal offsets within the element.
Definition: anytone_codeplug.hh:1857
Some limits for the offset frequency table.
Definition: anytone_codeplug.hh:1488
static constexpr unsigned int numEntries()
Max number of entries in the table.
Definition: anytone_codeplug.hh:1489
Some internal used offsets.
Definition: anytone_codeplug.hh:1494
Some limits.
Definition: anytone_codeplug.hh:1692
static constexpr unsigned int numMessages()
Maximum number of messages.
Definition: anytone_codeplug.hh:1693
static constexpr unsigned int messageLength()
Maximum length of the messages.
Definition: anytone_codeplug.hh:1694
Some internal offsets.
Definition: anytone_codeplug.hh:1699
Some limits of the element.
Definition: anytone_codeplug.hh:2520
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:2521
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2526
Some limits for the element.
Definition: anytone_codeplug.hh:2442
static constexpr unsigned int nameLength()
Maximum name length.
Definition: anytone_codeplug.hh:2443
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2448
Some limits for the channel list.
Definition: anytone_codeplug.hh:2775
static constexpr unsigned int numEntries()
Maximum number of channels in the list.
Definition: anytone_codeplug.hh:2776
Some internal offsets within the element.
Definition: anytone_codeplug.hh:2781
Helper type to encode frequencies without any rounding error.
Definition: frequency.hh:11