libdrmconf  0.12.0
A library to program DMR radios.
dr1801uv_codeplug.hh
1 #ifndef DR1801UVCODEPLUG_HH
2 #define DR1801UVCODEPLUG_HH
3 
4 #include "channel.hh"
5 #include "codeplug.hh"
6 #include "contact.hh"
7 
8 class Zone;
9 
10 
63 class DR1801UVCodeplug : public Codeplug
64 {
65  Q_OBJECT
66 
67 public:
72  class ChannelElement: public Element
73  {
74  public:
76  enum class Type {
77  FM = 1, DMR = 3
78  };
80  enum class Power {
81  Low = 0, High = 1
82  };
84  enum class Admit {
85  Always = 0, ColorCode_or_Tone = 1, ChannelFree = 2
86  };
88  enum class TimeSlot {
89  TS1 = 1, TS2 = 2
90  };
92  enum class SignalingMode {
93  None = 0, DTMF = 1
94  };
96  enum class Bandwidth {
97  Narrow = 1, Wide = 2
98  };
100  enum class SubToneType {
101  None = 0, CTCSS = 1, DCS = 2
102  };
104  enum class DCSMode {
105  Normal = 0, Inverted = 1
106  };
107 
108  protected:
110  ChannelElement(uint8_t *ptr, size_t size);
111 
112  public:
114  ChannelElement(uint8_t *ptr);
115 
116  bool isValid() const;
117  void clear();
118 
120  static constexpr unsigned int size() { return 0x00034; }
121 
123  virtual unsigned int index() const;
125  virtual void setIndex(unsigned int idx);
126 
128  virtual Type channelType() const;
130  virtual void setChannelType(Type type);
131 
133  virtual Channel::Power power() const;
135  virtual void setPower(Channel::Power pwr);
136 
138  virtual Frequency rxFrequency() const;
140  virtual void setRXFrequency(Frequency MHz);
142  virtual Frequency txFrequency() const;
144  virtual void setTXFrequency(Frequency MHz);
145 
147  virtual bool hasTransmitContact() const;
149  virtual unsigned int transmitContactIndex() const;
151  virtual void setTransmitContactIndex(unsigned int index);
153  virtual void clearTransmitContactIndex();
154 
156  virtual Admit admitCriterion() const;
158  virtual void setAdmitCriterion(Admit admit);
159 
161  virtual unsigned int colorCode() const;
163  virtual void setColorCode(unsigned int cc);
165  virtual DMRChannel::TimeSlot timeSlot() const;
167  virtual void setTimeSlot(DMRChannel::TimeSlot ts);
168 
170  virtual bool hasEncryptionKey() const;
172  virtual unsigned int encryptionKeyIndex() const;
174  virtual void setEncryptionKeyIndex(unsigned int index);
176  virtual void clearEncryptionKeyIndex();
177 
179  virtual bool dcdm() const;
181  virtual void enableDCDM(bool enable);
183  virtual bool confirmPrivateCall() const;
185  virtual void enablePrivateCallConfirmation(bool enable);
186 
188  virtual SignalingMode signalingMode() const;
190  virtual void setSignalingMode(SignalingMode mode);
191 
193  virtual bool hasAlarmSystem() const;
195  virtual unsigned int alarmSystemIndex() const;
197  virtual void setAlarmSystemIndex(unsigned int index);
199  virtual void clearAlarmSystemIndex();
200 
202  virtual FMChannel::Bandwidth bandwidth() const;
204  virtual void setBandwidth(FMChannel::Bandwidth bw);
205 
207  virtual bool autoScanEnabled() const;
209  virtual void enableAutoScan(bool enable);
211  virtual bool hasScanList() const;
213  virtual unsigned int scanListIndex() const;
215  virtual void setScanListIndex(unsigned int index);
217  virtual void clearScanListIndex();
218 
220  virtual Signaling::Code rxTone() const;
222  virtual void setRXTone(Signaling::Code code);
224  virtual Signaling::Code txTone() const;
226  virtual void setTXTone(Signaling::Code code);
227 
229  virtual bool talkaround() const;
231  virtual void enableTalkaround(bool enable);
232 
234  virtual bool hasPTTID() const;
236  virtual unsigned int pttIDIndex() const;
238  virtual void setPTTIDIndex(unsigned int idx);
240  virtual void clearPTTID();
241 
243  virtual bool hasGroupList() const;
245  virtual unsigned int groupListIndex() const;
247  virtual void setGroupListIndex(unsigned int index);
249  virtual void clearGroupListIndex();
250 
252  virtual bool loneWorker() const;
254  virtual void enableLoneWorker(bool enable);
255 
257  virtual Channel *toChannelObj(Context &ctx, const ErrorStack &err=ErrorStack()) const;
259  virtual bool linkChannelObj(Channel *channel, Context &ctx, const ErrorStack &err=ErrorStack()) const;
261  virtual bool encode(Channel *channel, Context &ctx, const ErrorStack &err=ErrorStack());
262 
263  protected:
265  struct Offset: Element::Offset {
267  static constexpr unsigned int index() { return 0x0000; }
268  static constexpr unsigned int channelType() { return 0x0002; }
269  static constexpr unsigned int power() { return 0x0003; }
270  static constexpr unsigned int rxFrequency() { return 0x0004; }
271  static constexpr unsigned int txFrequency() { return 0x0008; }
272  static constexpr unsigned int transmitContactIndex() { return 0x000c; }
273  static constexpr unsigned int admitCriterion() { return 0x000e; }
274  static constexpr unsigned int colorCode() { return 0x0010; }
275  static constexpr unsigned int timeSlot() { return 0x0011; }
276  static constexpr unsigned int encryptionKeyIndex() { return 0x0014; }
277  static constexpr BitOffset dcdm() { return {0x0015, 1} ; }
278  static constexpr BitOffset confirmPivateCall() { return {0x0015, 0}; }
279  static constexpr unsigned int signalingMode() { return 0x0016; }
280  static constexpr unsigned int alarmSystemIndex() { return 0x0018; }
281  static constexpr unsigned int bandwidth() { return 0x0019; }
282  static constexpr unsigned int autoScan() { return 0x001a; }
283  static constexpr unsigned int scanListIndex() { return 0x001b; }
284  static constexpr unsigned int rxSubtoneCode() { return 0x001c; }
285  static constexpr unsigned int rxSubtoneType() { return 0x001e; }
286  static constexpr unsigned int rxDCSMode() { return 0x001f; }
287  static constexpr unsigned int txSubtoneCode() { return 0x0020; }
288  static constexpr unsigned int txSubtoneType() { return 0x0022; }
289  static constexpr unsigned int txDCSMode() { return 0x0023; }
290  static constexpr unsigned int talkaround() { return 0x0025; }
291  static constexpr unsigned int pttIDIndex() { return 0x0028; }
292  static constexpr unsigned int groupListIndex() { return 0x002a; }
293  static constexpr unsigned int loneWorker() { return 0x002f; }
295  };
296  };
297 
305  {
306  protected:
308  ChannelBankElement(uint8_t *ptr, size_t size);
309 
310  public:
312  ChannelBankElement(uint8_t *ptr);
313 
314  void clear();
315 
317  static constexpr unsigned int size() { return 0x12004; }
318 
320  virtual unsigned int channelCount() const;
322  virtual void setChannelCount(unsigned int count);
323 
325  virtual ChannelElement channel(unsigned int index) const;
326 
328  virtual QString channelName(unsigned int index) const;
330  virtual void setChannelName(unsigned int index, const QString &name);
331 
333  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
335  virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const;
337  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
338 
339  public:
341  struct Limit {
343  static constexpr unsigned int channelCount() { return 1024; }
345  static constexpr unsigned int channelNameLength() { return 0x00014; }
346  };
347 
348  protected:
350  struct Offset {
352  static constexpr unsigned int channelCount() { return 0x00000; }
353  static constexpr unsigned int channel() { return 0x00004; }
354  static constexpr unsigned int channelName() { return 0x0d004; }
356  };
357  };
358 
359 
364  class ContactElement: public Element
365  {
366  public:
368  enum class CallType {
369  AllCall = 0x20, PrivateCall = 0x40, GroupCall = 0x80
370  };
371 
372  protected:
374  ContactElement(uint8_t *ptr, size_t size);
375 
376  public:
378  ContactElement(uint8_t *ptr);
379 
380  bool isValid() const;
381  void clear();
382 
384  static constexpr unsigned int size() { return 0x00018; }
385 
387  virtual bool hasSuccessor() const;
389  virtual uint16_t successorIndex() const;
391  virtual void setSuccessorIndex(uint16_t index);
393  virtual void clearSuccessorIndex();
394 
396  virtual uint32_t dmrID() const;
398  virtual void setDMRID(uint32_t id);
399 
401  virtual DMRContact::Type type() const;
403  virtual void setCallType(DMRContact::Type type);
404 
406  virtual QString name() const;
408  virtual void setName(const QString &name);
409 
411  virtual DMRContact *toContactObj(Context &ctx, const ErrorStack &err=ErrorStack()) const;
413  virtual bool linkContactObj(DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack());
415  virtual bool encode(DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack());
416 
417  public:
419  struct Limit {
421  static constexpr unsigned int nameLength() { return 16; }
422  };
423 
424  protected:
426  struct Offset : public Element::Offset {
428  static constexpr unsigned int successorIndex() { return 0x0000; }
429  static constexpr unsigned int nameLength() { return 0x0002; }
430  static constexpr unsigned int dmrID() { return 0x0004; }
431  static constexpr unsigned int callType() { return 0x0007; }
432  static constexpr unsigned int name() { return 0x0008; }
434  };
435  };
436 
445  {
446  protected:
448  ContactBankElement(uint8_t *ptr, size_t size);
449 
450  public:
452  ContactBankElement(uint8_t *ptr);
453 
454  void clear();
455 
457  static constexpr unsigned int size() { return 0x06004; }
458 
460  virtual unsigned int contactCount() const;
462  virtual void setContactCount(unsigned int count);
463 
465  virtual unsigned int firstIndex() const;
467  virtual void setFirstIndex(unsigned int index);
468 
470  virtual ContactElement contact(unsigned int index) const;
471 
473  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
475  virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const;
477  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
478 
479  public:
481  struct Limit {
483  static constexpr unsigned int contactCount() { return 1024; }
484  };
485 
486  protected:
488  struct Offset : public Element::Offset{
490  static constexpr unsigned int contactCount() { return 0x0000; }
491  static constexpr unsigned int firstIndex() { return 0x0002; }
492  static constexpr unsigned int contacts() { return 0x0004; }
494  };
495  };
496 
497 
502  class GroupListElement: public Element
503  {
504  protected:
506  GroupListElement(uint8_t *ptr, size_t size);
507 
508  public:
510  GroupListElement(uint8_t *ptr);
511 
512  bool isValid() const;
513  void clear();
514 
516  static constexpr unsigned int size() { return 0x00044; }
517 
519  virtual unsigned int index() const;
521  virtual void setIndex(unsigned int index);
522 
524  virtual unsigned int count() const;
526  virtual void setCount(unsigned int n);
527 
529  virtual bool hasMemberIndex(unsigned int n) const;
531  virtual unsigned int memberIndex(unsigned int n) const;
533  virtual void setMemberIndex(unsigned int n, unsigned int index);
535  virtual void clearMemberIndex(unsigned int n);
536 
538  virtual RXGroupList *toGroupListObj(Context &ctx, const ErrorStack &err=ErrorStack()) const;
540  virtual bool linkGroupListObj(RXGroupList *list, Context &ctx, const ErrorStack &err=ErrorStack()) const;
542  virtual bool encode(RXGroupList *list, Context &ctx, const ErrorStack &err=ErrorStack());
543 
544  protected:
546  struct Offset: public Element::Offset {
548  static constexpr unsigned int count() { return 0x0000; }
549  static constexpr unsigned int index() { return 0x0002; }
550  static constexpr unsigned int members() { return 0x0004; }
552  };
554  struct Limit {
556  static constexpr unsigned int members() { return 10; }
558  };
559  };
560 
566  {
567  protected:
569  GroupListBankElement(uint8_t *ptr, size_t size);
570 
571  public:
573  GroupListBankElement(uint8_t *ptr);
574 
575  void clear();
576 
578  static constexpr unsigned int size() { return 0x01104; }
579 
581  virtual unsigned int groupListCount() const;
583  virtual void setGroupListCount(unsigned int count);
584 
586  virtual GroupListElement groupList(unsigned int index) const;
587 
589  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
591  virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const;
593  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
594 
595  public:
597  struct Limit {
599  static constexpr unsigned int groupListCount() { return 64; }
600  };
601 
602  protected:
604  struct Offset {
606  static constexpr unsigned int groupListCount() { return 0x0000; }
607  static constexpr unsigned int groupLists() { return 0x00004; }
609  };
610  };
611 
612 
617  class ZoneElement: public Element
618  {
619  protected:
621  ZoneElement(uint8_t *ptr, size_t size);
622 
623  public:
625  ZoneElement(uint8_t *ptr);
626 
627  bool isValid() const;
628  void clear();
629 
631  static constexpr unsigned int size() { return 0x00068; }
632 
634  virtual QString name() const;
636  virtual void setName(const QString &name);
637 
639  virtual unsigned int numEntries() const;
641  virtual unsigned int entryIndex(unsigned int n);
643  virtual void setEntryIndex(unsigned int n, unsigned int index);
644 
646  virtual unsigned int index() const;
648  virtual void setIndex(unsigned int index);
649 
651  virtual Zone *toZoneObj(Context &ctx, const ErrorStack &err=ErrorStack());
653  virtual bool linkZoneObj(Zone *obj, Context &ctx, const ErrorStack &err=ErrorStack());
655  virtual bool encode(Zone *obj, Context &ctx, const ErrorStack &err=ErrorStack());
656 
658  struct Limit {
660  static constexpr unsigned int nameLength() { return 32; }
662  static constexpr unsigned int memberCount() { return 32; }
663  };
664 
665  protected:
667  struct Offset {
669  static constexpr unsigned int name() { return 0x0000; }
670  static constexpr unsigned int nameLength() { return 0x0020; }
671  static constexpr unsigned int numEntries() { return 0x0022; }
672  static constexpr unsigned int index() { return 0x0024; }
673  static constexpr unsigned int members() { return 0x0028; }
675  };
676  };
677 
682  class ZoneBankElement: public Element
683  {
684  protected:
686  ZoneBankElement(uint8_t *ptr, size_t size);
687 
688  public:
690  ZoneBankElement(uint8_t *ptr);
691 
692  void clear();
693 
695  static constexpr unsigned int size() { return 0x03cf8; }
696 
698  virtual unsigned int zoneCount() const;
700  virtual void setZoneCount(unsigned int count);
701 
703  virtual unsigned int upZoneIndex() const;
705  virtual void setUpZoneIndex(unsigned int index);
707  virtual unsigned int downZoneIndex() const;
709  virtual void setDownZoneIndex(unsigned int index);
710 
712  virtual ZoneElement zone(unsigned int index) const;
713 
715  virtual bool decode(Context &ctx, const ErrorStack &err = ErrorStack()) const;
717  virtual bool link(Context &ctx, const ErrorStack &err = ErrorStack()) const;
719  virtual bool encode(Context &ctx, const ErrorStack &err = ErrorStack());
720 
721  public:
723  struct Limit {
725  static constexpr unsigned int zoneCount() { return 150; }
726  };
727 
728  protected:
730  struct Offset {
732  static constexpr unsigned int zoneCount() { return 0x0000; }
733  static constexpr unsigned int upZoneIndex() { return 0x0002; }
734  static constexpr unsigned int downZoneIndex() { return 0x0004; }
735  static constexpr unsigned int zones() { return 0x0008; }
737  };
738  };
739 
740 
745  class SettingsElement: public Element
746  {
747  public:
749  enum class PowerSaveMode {
750  Off = 0, Save50 = 1, Save25 = 2, Save12 = 3
751  };
752 
754  enum class Language {
755  SimplifiedChinese = 0, English = 1
756  };
757 
759  enum class SquelchMode {
760  Normal = 0, Silent = 1
761  };
762 
764  enum class RingTone {
765  Off = 0, RingTone1 = 1, RingTone2 = 2, RingTone3 = 3, RingTone4 = 4, RingTone5 = 5,
766  RingTone6 = 6, RingTone7 = 7, RingTone8 = 8, RingTone9 = 9, RingTone10 = 10, RingTone11 = 11,
767  RingTone12 = 12, RingTone13 = 13, RingTone14 = 14, RingTone15 = 15, RingTone16 = 16,
768  RingTone17 = 17, RingTone18 = 18, RingTone19 = 19, RingTone20 = 20
769  };
770 
772  enum class BacklightTime {
773  Infinite = 0, Off = 1, On5s = 2, On10s = 3
774  };
775 
777  enum class TuningMode {
778  Channel = 0, VFO = 1
779  };
780 
782  enum class DisplayMode {
783  Number = 0, Name = 1, Frequency = 2
784  };
785 
787  enum class DualWatchMode {
788  Off = 0, DoubleDouble = 1, DoubleSingle = 2
789  };
790 
792  enum class ScanMode {
793  Time = 0, Carrier = 1, Search = 2
794  };
795 
797  enum class BootScreen {
798  Picture = 0, Text = 1
799  };
800 
801  protected:
803  SettingsElement(uint8_t *ptr, size_t size);
804 
805  public:
807  SettingsElement(uint8_t *ptr);
808 
809  void clear();
810 
812  static constexpr unsigned int size() { return 0x00064; }
813 
815  virtual unsigned int dmrID() const;
817  virtual void setDMRID(unsigned int id);
818 
820  virtual PowerSaveMode powerSaveMode() const;
822  virtual void setPowerSaveMode(PowerSaveMode mode);
823 
826  virtual unsigned int voxSensitivity() const;
829  virtual void setVOXSensitivity(unsigned int sens);
831  virtual unsigned int voxDelay() const;
833  virtual void setVOXDelay(unsigned int ms);
834 
836  virtual bool encryptionEnabled() const;
838  virtual void enableEncryption(bool enable);
839 
841  virtual bool keyLockEnabled() const;
843  virtual void enableKeyLock(bool enable);
845  virtual unsigned int keyLockDelay() const;
847  virtual void setKeyLockDelay(unsigned int sec);
849  virtual bool lockSideKey1() const;
851  virtual void enableLockSideKey1(bool enable);
853  virtual bool lockSideKey2() const;
855  virtual void enableLockSideKey2(bool enable);
857  virtual bool lockPTT() const;
859  virtual void enableLockPTT(bool enable);
860 
862  virtual Language language() const;
864  virtual void setLanguage(Language lang);
865 
867  virtual SquelchMode squelchMode() const;
869  virtual void setSquelchMode(SquelchMode mode);
870 
872  virtual bool rogerTonesEnabled() const;
874  virtual void enableRogerTones(bool enable);
876  virtual bool dmrCallOutToneEnabled() const;
878  virtual void enableDMRCallOutTone(bool enable);
880  virtual bool dmrVoiceEndToneEnabled() const;
882  virtual void enableDMRVoiceEndTone(bool enable);
884  virtual bool dmrCallEndToneEnabled() const;
886  virtual void enableDMRCallEndTone(bool enable);
888  virtual bool fmVoiceEndToneEnabled() const;
890  virtual void enableFMVoiceEndTone(bool enable);
892  virtual bool fmCallOutToneEnabled() const;
894  virtual void enableFMCallOutTone(bool enable);
896  virtual bool messageToneEnabled() const;
898  virtual void enableMessageTone(bool enable);
899 
901  virtual RingTone ringTone() const;
903  virtual void setRingTone(RingTone tone);
904 
906  virtual QString radioName() const;
908  virtual void setRadioName(const QString &name);
909 
911  virtual float reverseBurstFrequency() const;
913  virtual void setReverseBurstFrequency(float Hz);
914 
916  virtual BacklightTime backlightTime() const;
918  virtual void setBacklightTime(BacklightTime time);
919 
921  virtual bool campandingEnabled() const;
923  virtual void enableCampanding(bool enable);
924 
926  virtual TuningMode tunigModeUp() const;
928  virtual void setTuningModeUp(TuningMode mode);
930  virtual TuningMode tunigModeDown() const;
932  virtual void setTuningModeDown(TuningMode mode);
933 
935  virtual DisplayMode displayMode() const;
937  virtual void setDisplayMode(DisplayMode mode);
938 
940  virtual DualWatchMode dualWatchMode() const;
942  virtual void setDualWatchMode(DualWatchMode mode);
943 
945  virtual ScanMode scanMode() const;
947  virtual void setScanMode(ScanMode mode);
948 
950  virtual BootScreen bootScreen() const;
952  virtual void setBootScreen(BootScreen mode);
953 
955  virtual QString bootLine1() const;
957  virtual void setBootLine1(const QString &line);
959  virtual QString bootLine2() const;
961  virtual void setBootLine2(const QString &line);
962 
964  virtual bool ledEnabled() const;
966  virtual void enableLED(bool enabled);
967 
969  virtual unsigned int loneWorkerResponseTime() const;
971  virtual void setLoneWorkerResponseTime(unsigned int sec);
973  virtual unsigned int loneWorkerReminderTime() const;
975  virtual void setLoneWorkerReminderTime(unsigned int sec);
976 
978  virtual bool bootPasswordEnabled() const;
980  virtual QString bootPassword() const;
982  virtual void setBootPassword(const QString &passwd);
984  virtual void clearBootPassword();
985 
987  virtual bool progPasswordEnabled() const;
989  virtual QString progPassword() const;
991  virtual void setProgPassword(const QString &passwd);
993  virtual void clearProgPassword();
994 
996  virtual bool updateConfig(Config *config, const ErrorStack &err=ErrorStack());
998  virtual bool fromConfig(Config *config, const ErrorStack &err=ErrorStack());
999 
1000  protected:
1002  struct Offset: Element::Offset {
1004  static constexpr unsigned int dmrID() { return 0x0000; }
1005  static constexpr unsigned int powerSaveEnabled() { return 0x0008; }
1006  static constexpr unsigned int powerSaveMode() { return 0x0009; }
1007  static constexpr unsigned int voxSensitivity() { return 0x000a; }
1008  static constexpr unsigned int voxDelay() { return 0x000c; }
1009  static constexpr unsigned int encryptionEnabled() { return 0x000d; }
1010  static constexpr unsigned int keyLockDelay() { return 0x000e; }
1011  static constexpr BitOffset lockPTT() { return {0x000f, 0}; }
1012  static constexpr BitOffset lockSideKey1() { return {0x000f, 1}; }
1013  static constexpr BitOffset lockSideKey2() { return {0x000f, 2}; }
1014  static constexpr unsigned int language() { return 0x0010; }
1015  static constexpr unsigned int squelchMode() { return 0x0011; }
1016  static constexpr unsigned int rogerTonesEnabled() { return 0x0013; }
1017  static constexpr unsigned int keyLockEnabled() { return 0x0017; }
1018  static constexpr unsigned int ringTone() { return 0x0016; }
1019  static constexpr unsigned int radioName() { return 0x0018; }
1020  static constexpr BitOffset dmrCallOutToneEnabled() { return {0x0028, 1}; }
1021  static constexpr BitOffset fmCallOutToneEnabled() { return {0x0028, 2}; }
1022  static constexpr BitOffset dmrVoiceEndToneEnabled() { return {0x0028, 3}; }
1023  static constexpr BitOffset fmVoiceEndToneEnabled() { return {0x0028, 4}; }
1024  static constexpr BitOffset dmrCallEndToneEnabled() { return {0x0028, 5}; }
1025  static constexpr BitOffset messageToneEnabled() { return {0x0028, 6}; }
1026  static constexpr unsigned int reverseBurstFrequency() { return 0x002c; }
1027  static constexpr unsigned int backlightTime() { return 0x002f; }
1028  static constexpr unsigned int voxEnabled() { return 0x0030; }
1029  static constexpr unsigned int campandingEnabled() { return 0x0032; }
1030  static constexpr unsigned int tuningModeUp() { return 0x0036; }
1031  static constexpr unsigned int tunigModeDown() { return 0x0037; }
1032  static constexpr unsigned int displayMode() { return 0x003c; }
1033  static constexpr unsigned int dualWatchMode() { return 0x003d; }
1034  static constexpr unsigned int scanMode() { return 0x003e; }
1035  static constexpr unsigned int bootScreen() { return 0x003f; }
1036  static constexpr unsigned int bootLine1() { return 0x0040; }
1037  static constexpr unsigned int bootLine2() { return 0x0048; }
1038  static constexpr unsigned int ledEnabled() { return 0x0050; }
1039  static constexpr unsigned int loneWorkerResponseTime() { return 0x0051; }
1040  static constexpr unsigned int loneWorkerReminderTime() { return 0x005c; }
1041  static constexpr BitOffset progPasswordEnabled() { return {0x0052, 0}; }
1042  static constexpr BitOffset bootPasswordEnabled() { return {0x0052, 1}; }
1043  static constexpr unsigned int progPasswordLength() { return 0x0053; }
1044  static constexpr unsigned int progPassword() { return 0x0054; }
1045  static constexpr unsigned int boolPasswordLength() { return 0x005d; }
1046  static constexpr unsigned int bootPassword() { return 0x005e; }
1048  };
1049 
1050  public:
1052  struct Limit {
1054  static constexpr unsigned int radioNameLength() { return 16; }
1056  static constexpr unsigned int bootLineLength() { return 8; }
1058  static constexpr unsigned int bootPasswordLength() { return 6; }
1060  static constexpr unsigned int progPasswordLength() { return 6; }
1061  };
1062  };
1063 
1064 
1069  class ScanListElement: public Element
1070  {
1071  public:
1073  enum class PriorityChannel {
1074  None = 0, Fixed = 1, Selected = 2
1075  };
1076 
1078  enum class RevertChannel {
1079  LastActive = 0, Fixed = 1, Selected = 2
1080  };
1081 
1082  protected:
1084  ScanListElement(uint8_t *ptr, size_t size);
1085 
1086  public:
1088  ScanListElement(uint8_t *ptr);
1089 
1090  bool isValid() const;
1091  void clear();
1092 
1094  static constexpr unsigned int size() { return 0x00050; }
1095 
1097  virtual unsigned int index() const;
1099  virtual void setIndex(unsigned int idx);
1100 
1102  virtual unsigned int entryCount() const;
1104  virtual void setEntryCount(unsigned int num);
1105 
1107  virtual PriorityChannel priorityChannel1() const;
1109  virtual void setPriorityChannel1(PriorityChannel mode);
1111  virtual unsigned int priorityChannel1Index() const;
1113  virtual void setPriorityChannel1Index(unsigned int index);
1114 
1116  virtual PriorityChannel priorityChannel2() const;
1118  virtual void setPriorityChannel2(PriorityChannel mode);
1120  virtual unsigned int priorityChannel2Index() const;
1122  virtual void setPriorityChannel2Index(unsigned int index);
1123 
1125  virtual RevertChannel revertChannel() const;
1127  virtual void setRevertChannel(RevertChannel mode);
1129  virtual unsigned int revertChannelIndex() const;
1131  virtual void setRevertChannelIndex(unsigned int index);
1132 
1134  virtual QString name() const;
1136  virtual void setName(const QString &name);
1137 
1139  virtual unsigned int entryIndex(unsigned int n);
1141  virtual void setEntryIndex(unsigned int n, unsigned int index);
1142 
1144  virtual ScanList *toScanListObj(Context &ctx, const ErrorStack &err=ErrorStack());
1146  virtual bool linkScanListObj(ScanList *obj, Context &ctx, const ErrorStack &err=ErrorStack());
1148  virtual bool encode(ScanList *obj, Context &ctx, const ErrorStack &err=ErrorStack());
1149 
1150  protected:
1152  struct Offset {
1154  static constexpr unsigned int index() { return 0x0000; }
1155  static constexpr unsigned int name() { return 0x0010; }
1156  static constexpr unsigned int priorityChannel1() { return 0x0002; }
1157  static constexpr unsigned int priorityChannel1Index() { return 0x0004; }
1158  static constexpr unsigned int priorityChannel2() { return 0x0003; }
1159  static constexpr unsigned int priorityChannel2Index() { return 0x0006; }
1160  static constexpr unsigned int revertChannel() { return 0x0008; }
1161  static constexpr unsigned int revertChannelIndex() { return 0x000a; }
1162  static constexpr unsigned int memberCount() { return 0x0001; }
1163  static constexpr unsigned int memberIndices() { return 0x0030; }
1165  };
1166 
1167  public:
1169  struct Limit {
1171  static constexpr unsigned int nameLength() { return 32; }
1173  static constexpr unsigned int memberCount() { return 16; }
1174  };
1175  };
1176 
1184  {
1185  protected:
1187  ScanListBankElement(uint8_t *ptr, size_t size);
1188 
1189  public:
1191  ScanListBankElement(uint8_t *ptr);
1192 
1193  void clear();
1194 
1196  static constexpr unsigned int size() { return 0x00324; }
1197 
1199  virtual unsigned int scanListCount() const;
1201  virtual void setScanListCount(unsigned int count);
1202 
1204  virtual ScanListElement scanList(unsigned int index) const;
1205 
1207  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
1209  virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const;
1211  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1212 
1213  protected:
1215  struct Offset {
1217  static constexpr unsigned int scanListCount() { return 0x0000; }
1218  static constexpr unsigned int scanLists() { return 0x0004; }
1220  };
1221 
1222  public:
1224  struct Limit {
1226  static constexpr unsigned int scanListCount() { return 10; }
1227  };
1228  };
1229 
1230 
1235  class MessageElement: public Element
1236  {
1237  protected:
1239  MessageElement(uint8_t *ptr, size_t size);
1240 
1241  public:
1243  MessageElement(uint8_t *ptr);
1244 
1245  void clear();
1246  bool isValid() const;
1247 
1249  static constexpr unsigned int size() { return 0x0044; }
1250 
1252  virtual unsigned int index() const;
1254  virtual void setIndex(unsigned int index);
1255 
1257  virtual QString text() const;
1259  virtual void setText(const QString &text);
1260 
1261  protected:
1263  struct Offset {
1265  static constexpr unsigned int index() { return 0x0000; }
1266  static constexpr unsigned int textLength() { return 0x0001; }
1267  static constexpr unsigned int text() { return 0x0004; }
1269  };
1270 
1271  public:
1273  struct Limit {
1275  static constexpr unsigned int textLength() { return 64; }
1276  };
1277  };
1278 
1287  {
1288  protected:
1290  MessageBankElement(uint8_t *ptr, size_t size);
1291 
1292  public:
1294  MessageBankElement(uint8_t *ptr);
1295 
1296  void clear();
1297 
1299  static constexpr unsigned int size() { return 0x00164; }
1300 
1302  virtual unsigned int messageCount() const;
1304  virtual void setMessageCount(unsigned int count);
1305 
1307  virtual MessageElement message(unsigned int n) const;
1308 
1310  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
1312  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1313 
1314  public:
1316  struct Limit {
1317  static constexpr unsigned int messageCount() { return 8; }
1318  };
1319 
1320  protected:
1322  struct Offset {
1324  static constexpr unsigned int messageCount() { return 0x0000; }
1325  static constexpr unsigned int messages() { return 0x0004; }
1327  };
1328  };
1329 
1330 
1336  {
1337  public:
1339  enum class Function {
1340  None = 0, ToggleAlertTones = 1, EmergencyOn = 2, EmergencyOff = 3, TogglePower = 4,
1341  Monitor = 5, DeleteNuisance = 6, OneTouch1 = 7, OneTouch2 = 8, OneTouch3 = 9, OneTouch4 = 10,
1342  OneTouch5 = 11, ToggleTalkaround = 13, ToggleScan = 14, ToggleEncryption = 15, ToggleVOX = 16,
1343  ZoneSelect = 17, ToggleLoneWorker = 19, PhoneExit = 20
1344  };
1345 
1346  protected:
1348  KeySettingsElement(uint8_t *ptr, size_t size);
1349 
1350  public:
1352  KeySettingsElement(uint8_t *ptr);
1353 
1354  void clear();
1355 
1357  static constexpr unsigned int size() { return 0x00018; }
1358 
1360  virtual Function sideKey1Short() const;
1362  virtual void setSideKey1Short(Function func);
1364  virtual Function sideKey1Long() const;
1366  virtual void setSideKey1Long(Function func);
1368  virtual Function sideKey2Short() const;
1370  virtual void setSideKey2Short(Function func);
1372  virtual Function sideKey2Long() const;
1374  virtual void setSideKey2Long(Function func);
1376  virtual Function topKeyShort() const;
1378  virtual void setTopKeyShort(Function func);
1380  virtual Function topKeyLong() const;
1382  virtual void setTopKeyLong(Function func);
1383 
1384  protected:
1386  struct Offset {
1388  static constexpr unsigned int sideKey1Short() { return 0x0001; }
1389  static constexpr unsigned int sideKey1Long() { return 0x0002; }
1390  static constexpr unsigned int sideKey2Short() { return 0x0005; }
1391  static constexpr unsigned int sideKey2Long() { return 0x0006; }
1392  static constexpr unsigned int topKeyShort() { return 0x0009; }
1393  static constexpr unsigned int topKeyLong() { return 0x000a; }
1395  };
1396  };
1397 
1398 
1403  class VFOBankElement: public Element
1404  {
1405  protected:
1407  VFOBankElement(uint8_t *ptr, size_t size);
1408 
1409  public:
1411  VFOBankElement(uint8_t *ptr);
1412 
1413  void clear();
1414 
1416  static constexpr unsigned int size() { return 0x0090; }
1417 
1419  virtual ChannelElement vfoA() const;
1421  virtual ChannelElement vfoB() const;
1422 
1424  virtual QString nameA() const;
1426  virtual void setNameA(const QString &name);
1428  virtual QString nameB() const;
1430  virtual void setNameB(const QString &name);
1431 
1432  public:
1434  struct Limit {
1436  static constexpr unsigned int nameLength() { return 20; }
1437  };
1438 
1439  protected:
1441  struct Offset {
1443  static constexpr unsigned int vfoA() { return 0x0000; }
1444  static constexpr unsigned int vfoB() { return 0x0034; }
1445  static constexpr unsigned int nameA() { return 0x0068; }
1446  static constexpr unsigned int nameB() { return 0x007c; }
1448  };
1449  };
1450 
1451 
1457  {
1458  protected:
1460  EncryptionKeyElement(uint8_t *ptr, size_t size);
1461 
1462  public:
1464  EncryptionKeyElement(uint8_t *ptr);
1465 
1466  void clear();
1467  bool isValid() const;
1468 
1470  static constexpr unsigned int size() { return 0x000c; }
1471 
1473  virtual unsigned int index() const;
1475  virtual void setIndex(unsigned int index);
1476 
1478  virtual unsigned int keyLength() const;
1479 
1481  virtual QString key() const;
1483  virtual void setKey(const QString &key);
1484 
1486  virtual EncryptionKey *toKeyObj(Context &ctx, const ErrorStack &err=ErrorStack());
1488  virtual bool linkKeyObj(EncryptionKey *obj, Context &ctx, const ErrorStack &err=ErrorStack());
1490  virtual bool encode(EncryptionKey *obj, Context &ctx, const ErrorStack &err=ErrorStack());
1491 
1492  public:
1494  struct Limit {
1496  static constexpr unsigned int keyLength() { return 8; }
1497  };
1498 
1499  protected:
1501  struct Offset {
1503  static constexpr unsigned int index() { return 0x0000; }
1504  static constexpr unsigned int length() { return 0x0001; }
1505  static constexpr unsigned int key() { return 0x0004; }
1507  };
1508  };
1509 
1515  {
1516  protected:
1518  EncryptionKeyBankElement(uint8_t *ptr, size_t size);
1519 
1520  public:
1522  EncryptionKeyBankElement(uint8_t *ptr);
1523 
1524  void clear();
1525 
1527  static constexpr unsigned int size() { return 0x0078;}
1528 
1530  virtual EncryptionKeyElement key(unsigned int index) const;
1531 
1533  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
1535  virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const;
1537  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1538 
1539  public:
1541  struct Limit {
1543  static constexpr unsigned int keyCount() { return 10; }
1544  };
1545  };
1546 
1547 
1553  {
1554  protected:
1556  DTMFSystemElement(uint8_t *ptr, size_t size);
1557 
1558  public:
1560  DTMFSystemElement(uint8_t *ptr);
1561 
1562  void clear();
1563 
1565  static constexpr unsigned int size() { return 0x0c; }
1566 
1568  virtual bool sideToneEnabled() const;
1570  virtual void enableSideTone(bool enable);
1571 
1573  virtual unsigned int preTime() const;
1575  virtual void setPreTime(unsigned int ms);
1576 
1578  virtual unsigned int codeDuration() const;
1580  virtual void setCodeDuration(unsigned int ms);
1581 
1583  virtual unsigned int codeItervall() const;
1585  virtual void setCodeItervall(unsigned int ms);
1586 
1588  virtual unsigned int resetTime() const;
1590  virtual void setResetTime(unsigned int ms);
1591 
1592  protected:
1594  struct Offset {
1596  static constexpr unsigned int sideTone() { return 0x0000; }
1597  static constexpr unsigned int preTime() { return 0x0002; }
1598  static constexpr unsigned int codeDuration() { return 0x0004; }
1599  static constexpr unsigned int codeIntervall() { return 0x0006; }
1600  static constexpr unsigned int resetTime() { return 0x0008; }
1602  };
1603  };
1604 
1611  {
1612  protected:
1614  DTMFSystemBankElement(uint8_t *ptr, size_t size);
1615 
1616  public:
1618  DTMFSystemBankElement(uint8_t *ptr);
1619 
1620  void clear();
1621 
1623  static constexpr unsigned int size() { return 0x34; }
1624 
1626  virtual unsigned int systemCount() const;
1628  virtual void setSystemCount(unsigned int count);
1629 
1631  virtual DTMFSystemElement system(unsigned int n) const;
1632 
1633  public:
1635  struct Limit {
1637  static constexpr unsigned int systemCount() { return 4; }
1638  };
1639 
1640  protected:
1642  struct Offset {
1644  static constexpr unsigned int systemCount() { return 0x0000; }
1645  static constexpr unsigned int systems() { return 0x0004; }
1647  };
1648  };
1649 
1650 
1655  class DTMFIDElement: public Element
1656  {
1657  protected:
1659  DTMFIDElement(uint8_t *ptr, size_t size);
1660 
1661  public:
1663  DTMFIDElement(uint8_t *ptr);
1664 
1665  void clear();
1666 
1668  static constexpr unsigned int size() { return 0x0014; }
1669 
1670  public:
1672  virtual QString number() const;
1674  virtual void setNumber(const QString &number);
1675 
1677  struct Limit {
1679  static constexpr unsigned int numberLength() { return 16; }
1680  };
1681 
1682  protected:
1684  virtual unsigned int numberLength() const;
1686  virtual void setNumberLength(unsigned int len);
1687 
1689  struct Offset {
1691  static constexpr unsigned int numberLength() { return 0x0000; }
1692  static constexpr unsigned int number() { return 0x0004; }
1694  };
1695 
1697  static QVector<QChar> _bin_dtmf_tab;
1698  };
1699 
1706  {
1707  protected:
1709  DTMFIDBankElement(uint8_t *ptr, size_t size);
1710 
1711  public:
1713  DTMFIDBankElement(uint8_t *ptr);
1714 
1715  void clear();
1716 
1718  static constexpr unsigned int size() { return 0x0144; }
1719 
1721  virtual unsigned int idCount() const;
1723  virtual void setIDCount(unsigned int n);
1724 
1726  virtual DTMFIDElement id(unsigned int n) const;
1727 
1728  public:
1730  struct Limit {
1732  static constexpr unsigned int idCount() { return 16; }
1733  };
1734 
1735  protected:
1737  struct Offset {
1739  static constexpr unsigned int idCount() { return 0x0000; }
1740  static constexpr unsigned int ids() { return 0x0004; }
1742  };
1743  };
1744 
1745 
1750  class PTTIDElement: public Element
1751  {
1752  public:
1754  enum class Transmit {
1755  None = 0, Start = 1, End = 2, Both = 3
1756  };
1758  enum class IDMode {
1759  Forbidden = 0, Each = 1, Once = 2
1760  };
1761 
1762  protected:
1764  PTTIDElement(uint8_t *ptr, size_t size);
1765 
1766  public:
1768  PTTIDElement(uint8_t *ptr);
1769 
1770  void clear();
1771 
1773  static constexpr unsigned int size() { return 0x14; }
1774 
1776  virtual bool hasDTMFSystem() const;
1778  virtual unsigned int dtmfSystemIndex() const;
1780  virtual void setDTMFSystemIndex(unsigned int index);
1782  virtual void clearDTMFSystem();
1783 
1785  virtual Transmit transmitMode() const;
1787  virtual void setTransmitMode(Transmit mode);
1788 
1790  virtual IDMode idMode() const;
1792  virtual void setIDMode(IDMode mode);
1793 
1795  virtual bool hasBOTID() const;
1797  virtual unsigned int botIDIndex() const;
1799  virtual void setBOTIDIndex(unsigned int index);
1801  virtual void clearBOTID();
1802 
1804  virtual bool hasEOTID() const;
1806  virtual unsigned int eotIDIndex() const;
1808  virtual void setEOTIDIndex(unsigned int index);
1810  virtual void clearEOTID();
1811 
1812  protected:
1814  struct Offset {
1816  static constexpr unsigned int dtmfSystemIndex() { return 0x0000; }
1817  static constexpr unsigned int transmitMode() { return 0x0001; }
1818  static constexpr unsigned int idMode() { return 0x0002; }
1819  static constexpr unsigned int botIDIndex() { return 0x0003; }
1820  static constexpr unsigned int eotIDIndex() { return 0x0004; }
1822  };
1823  };
1824 
1831  {
1832  protected:
1834  PTTIDBankElement(uint8_t *ptr, size_t size);
1835 
1836  public:
1838  PTTIDBankElement(uint8_t *ptr);
1839 
1840  void clear();
1841 
1843  static constexpr unsigned int size() { return 0x0104; }
1844 
1846  virtual unsigned int idCount() const;
1848  virtual void setPTTIDCount(unsigned int n);
1849 
1851  virtual PTTIDElement pttID(unsigned int n);
1852 
1853  public:
1855  struct Limit {
1857  static constexpr unsigned int idCount() { return 16; }
1858  };
1859 
1860  protected:
1862  struct Offset {
1864  static constexpr unsigned int idCount() { return 0x0000; }
1865  static constexpr unsigned int ids() { return 0x0004; }
1867  };
1868  };
1869 
1870 
1876  {
1877  public:
1879  enum class NonNumber {
1880  None = 0, A=0xa, B=0xb, C=0xc, D=0xd, Asterisk=0xe, Gate=0xf
1881  };
1883  enum class Response {
1884  None=0, Reminder=1, Reply=2, Both=3
1885  };
1887  enum class Kill {
1888  DisableTX = 0, DisableRXandTX = 1
1889  };
1890 
1891  protected:
1893  DTMFSettingsElement(uint8_t *ptr, size_t size);
1894 
1895  public:
1897  DTMFSettingsElement(uint8_t *ptr);
1898 
1899  void clear();
1900 
1902  static constexpr unsigned int size() { return 0x029c; }
1903 
1905  virtual QString radioID() const;
1907  virtual void setRadioID(const QString &id);
1909  virtual QString killCode() const;
1911  virtual void setKillCode(const QString &code);
1913  virtual QString wakeCode() const;
1915  virtual void setWakeCode(const QString &code);
1916 
1918  virtual NonNumber delimiter() const;
1920  virtual void setDelimiter(NonNumber code);
1922  virtual NonNumber groupCode() const;
1924  virtual void setGroupCode(NonNumber code);
1925 
1927  virtual Response response() const;
1929  virtual void setResponse(Response resp);
1930 
1932  virtual unsigned int autoResetTime() const;
1934  virtual void setAutoResetTime(unsigned int sec);
1935 
1937  virtual bool killWakeEnabled() const;
1939  virtual void enableKillWake(bool enable);
1940 
1942  virtual Kill killType() const;
1944  virtual void setKillType(Kill type);
1945 
1947  virtual DTMFSystemBankElement dtmfSystems() const;
1949  virtual DTMFIDBankElement dtmfIDs() const;
1951  virtual PTTIDBankElement pttIDs() const;
1952 
1953  public:
1955  struct Limit {
1957  static constexpr unsigned int radioIDLength() { return 5; }
1959  static constexpr unsigned int killCodeLength() { return 6; }
1961  static constexpr unsigned int wakeCodeLength() { return 6; }
1962  };
1963 
1964  protected:
1966  struct Offset {
1968  static constexpr unsigned int radioID() { return 0x0000; }
1969  static constexpr unsigned int radioIDLength() { return 0x0005; }
1970  static constexpr unsigned int killCode() { return 0x0008; }
1971  static constexpr unsigned int killCodeLength() { return 0x000e; }
1972  static constexpr unsigned int wakeCode() { return 0x0010; }
1973  static constexpr unsigned int wakeCodeLength() { return 0x0016; }
1974  static constexpr unsigned int delimiter() { return 0x0018; }
1975  static constexpr unsigned int groupCode() { return 0x0019; }
1976  static constexpr unsigned int response() { return 0x001a; }
1977  static constexpr unsigned int autoResetTime() { return 0x001b; }
1978  static constexpr unsigned int killWake() { return 0x001c; }
1979  static constexpr unsigned int killType() { return 0x001d; }
1980  static constexpr unsigned int dtmfSystems() { return 0x0020; }
1981  static constexpr unsigned int dtmfIDs() { return 0x0054; }
1982  static constexpr unsigned int pttIDs() { return 0x0198; }
1984  };
1985  };
1986 
1987 
1993  {
1994  protected:
1996  AlarmSystemElement(uint8_t *ptr, size_t size);
1997 
1998  public:
2000  AlarmSystemElement(uint8_t *ptr);
2001 
2002  void clear();
2003  bool isValid() const;
2004 
2006  static constexpr unsigned int size() { return 0x0018; }
2007 
2009  virtual unsigned int index() const;
2011  virtual void setIndex(unsigned int index);
2013  virtual void clearIndex();
2014 
2016  virtual bool alarmEnabled() const;
2018  virtual void enableAlarm(bool enable);
2019 
2021  virtual bool noAlarmChannel() const;
2023  virtual bool alarmChannelIsSelected() const;
2025  virtual unsigned int alarmChannelIndex() const;
2027  virtual void setAlarmChannelIndex(unsigned int index);
2029  virtual void setAlarmChannelSelected();
2031  virtual void clearAlarmChannel();
2032 
2034  virtual QString name() const;
2036  virtual void setName(const QString &name);
2037 
2038  public:
2040  struct Limit {
2042  static constexpr unsigned int nameLength() { return 16; }
2043  };
2044 
2045  protected:
2047  struct Offset {
2049  static constexpr unsigned int index() { return 0x0000; }
2050  static constexpr unsigned int alarmEnabled() { return 0x0001; }
2051  static constexpr unsigned int alarmChannelIndex() { return 0x0004; }
2052  static constexpr unsigned int name() { return 0x0008; }
2054  };
2055  };
2056 
2064  {
2065  protected:
2067  AlarmSystemBankElement(uint8_t *ptr, size_t size);
2068 
2069  public:
2071  AlarmSystemBankElement(uint8_t *ptr);
2072 
2073  void clear();
2074 
2076  static constexpr unsigned int size() { return 0x00c4; }
2077 
2079  virtual unsigned int alarmSystemCount() const;
2081  virtual void setAlarmSystemCount(unsigned int n);
2082 
2084  virtual AlarmSystemElement alarmSystem(unsigned int n) const;
2085 
2086  public:
2088  struct Limit {
2090  static constexpr unsigned int alarmSystemCount() { return 8; }
2091  };
2092 
2093  protected:
2095  struct Offset {
2097  static constexpr unsigned int alarmSystemCount() { return 0x0000; }
2098  static constexpr unsigned int alarmSystems() { return 0x0004; }
2100  };
2101  };
2102 
2103 
2109  {
2110  public:
2112  enum class SMSFormat {
2113  CompressedIP = 0, DefinedData = 1, IPData = 2
2114  };
2115 
2116  protected:
2118  DMRSettingsElement(uint8_t *ptr, size_t size);
2119 
2120  public:
2122  DMRSettingsElement(uint8_t *ptr);
2123 
2124  void clear();
2125 
2127  static constexpr unsigned int size() { return 0x0010; }
2128 
2130  virtual unsigned int holdTime() const;
2132  virtual void setHoldTime(unsigned int sec);
2133 
2135  virtual unsigned int remoteListen() const;
2137  virtual void setRemoteListen(unsigned int sec);
2138 
2140  virtual unsigned int activeWait() const;
2142  virtual void setActiveWait(unsigned int ms);
2143 
2145  virtual unsigned int activeResend() const;
2147  virtual void setActiveResend(unsigned int count);
2148 
2150  virtual unsigned int preSend() const;
2152  virtual void setPreSend(unsigned int count);
2153 
2155  virtual unsigned int voiceHead() const;
2157  virtual void setVoiceHead(unsigned int count);
2158 
2160  virtual SMSFormat smsFormat() const;
2162  virtual void setSMSFormat(SMSFormat format);
2163 
2165  virtual bool killEnc() const;
2167  virtual void enableKillEnc(bool enable);
2169  virtual bool killDec() const;
2171  virtual void enableKillDec(bool enable);
2172 
2174  virtual bool activeEnc() const;
2176  virtual void enableActiveEnc(bool enable);
2178  virtual bool activeDec() const;
2180  virtual void enableActiveDec(bool enable);
2181 
2183  virtual bool checkEnc() const;
2185  virtual void enableCheckEnc(bool enable);
2187  virtual bool checkDec() const;
2189  virtual void enableCheckDec(bool enable);
2190 
2192  virtual bool callAlterEnc() const;
2194  virtual void enableCallAlterEnc(bool enable);
2196  virtual bool callAlterDec() const;
2198  virtual void enableCallAlterDec(bool enable);
2199 
2201  virtual bool remoteMonitorEnc() const;
2203  virtual void enableRemoteMonitorEnc(bool enable);
2205  virtual bool remoteMonitorDec() const;
2207  virtual void enableRemoteMonitorDec(bool enable);
2208 
2210  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const;
2212  virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
2213 
2214 
2215  public:
2217  struct Limit: public Element::Limit {
2219  static constexpr Range<unsigned int> holdTime() { return {1, 90}; }
2221  static constexpr Range<unsigned int> remoteListen() { return {10, 120}; }
2223  static constexpr Range<unsigned int> activeWait() { return {120, 600}; }
2225  static constexpr Range<unsigned int> activeResend() { return {1, 10}; }
2227  static constexpr Range<unsigned int> preSend() { return {4, 15}; }
2229  static constexpr Range<unsigned int> voiceHead() { return {0, 20}; }
2230  };
2231 
2232  protected:
2234  struct Offset: public Element::Offset {
2236  static constexpr unsigned int holdTime() { return 0x0000; }
2237  static constexpr unsigned int remoteListen() { return 0x0001; }
2238  static constexpr unsigned int activeWait() { return 0x0002; }
2239  static constexpr unsigned int activeResend() { return 0x0003; }
2240  static constexpr unsigned int preSend() { return 0x0004; }
2241  static constexpr unsigned int killEnc() { return 0x0005; }
2242  static constexpr unsigned int activeEnc() { return 0x0006; }
2243  static constexpr unsigned int checkEnc() { return 0x0007; }
2244  static constexpr unsigned int killDec() { return 0x0008; }
2245  static constexpr unsigned int activeDec() { return 0x0009; }
2246  static constexpr unsigned int checkDec() { return 0x000a; }
2247  static constexpr unsigned int smsFormat() { return 0x000b; }
2248  static constexpr unsigned int voiceHead() { return 0x000c; }
2249  static constexpr BitOffset callAlterEnc() { return {0x000d, 0}; }
2250  static constexpr BitOffset callAlterDec() { return {0x000d, 1}; }
2251  static constexpr BitOffset remoteMonitorEnc() { return {0x000d, 2}; }
2252  static constexpr BitOffset remoteMonitorDec() { return {0x000d, 3}; }
2254  };
2255  };
2256 
2257 
2263  {
2264  public:
2266  enum class Action {
2267  Call = 0, Message = 1
2268  };
2270  enum class Type {
2271  Disabled = 0, DMR=1, FM=2
2272  };
2273 
2274  protected:
2276  OneTouchSettingElement(uint8_t *ptr, size_t size);
2277 
2278  public:
2280  OneTouchSettingElement(uint8_t *ptr);
2281 
2282  void clear();
2283 
2285  static constexpr unsigned int size() { return 0x0008; }
2286 
2288  bool isValid() const;
2289 
2291  virtual bool hasContact() const;
2293  virtual unsigned int contactIndex() const;
2295  virtual void setContactIndex(unsigned int index);
2297  virtual void clearContact();
2298 
2300  virtual Action action() const;
2302  virtual void setAction(Action action);
2303 
2305  virtual bool hasMessage() const;
2307  virtual unsigned int messageIndex() const;
2309  virtual void setMessageIndex(unsigned int index);
2311  virtual void clearMessage();
2312 
2314  virtual Type type() const;
2316  virtual void setType(Type type);
2317 
2319  virtual bool hasDTMFID() const;
2321  virtual unsigned int dtmfIDIndex() const;
2323  virtual void setDTMFIDIndex(unsigned int index);
2325  virtual void clearDTMFIDIndex();
2326 
2327  protected:
2329  struct Offset {
2331  static constexpr unsigned int contactIndex() { return 0x0000; }
2332  static constexpr unsigned int action() { return 0x0002; }
2333  static constexpr unsigned int messageIndex() { return 0x0003; }
2334  static constexpr unsigned int type() { return 0x0004; }
2335  static constexpr unsigned int dtmfIDIndex() { return 0x0005; }
2337  };
2338  };
2339 
2347  {
2348  protected:
2350  OneTouchSettingsElement(uint8_t *ptr, size_t size);
2351 
2352  public:
2354  OneTouchSettingsElement(uint8_t *ptr);
2355 
2356  void clear();
2357 
2359  static constexpr unsigned int size() { return 0x0028; }
2360 
2362  virtual unsigned int settingsCount() const;
2363 
2365  virtual OneTouchSettingElement setting(unsigned int n) const;
2366 
2367  public:
2369  struct Limit {
2371  static constexpr unsigned int settingsCount() { return 5; }
2372  };
2373 
2374  protected:
2376  struct Offset {
2378  static constexpr unsigned int settings() { return 0x0000; }
2380  };
2381  };
2382 
2383 
2384 public:
2386  explicit DR1801UVCodeplug(QObject *parent = nullptr);
2387 
2388  Config * preprocess(Config *config, const ErrorStack &err) const;
2389  bool postprocess(Config *config, const ErrorStack &err) const;
2390 
2391  bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
2392  bool encode(Config *config, const Flags &flags, const ErrorStack &err=ErrorStack());
2393  bool decode(Config *config, const ErrorStack &err=ErrorStack());
2394 
2395 protected:
2397  virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack());
2399  virtual bool linkElements(Context &ctx, const ErrorStack &err=ErrorStack());
2401  virtual bool encodeElements(Context &ctx, const ErrorStack &err=ErrorStack());
2402 
2403 protected:
2405  struct Offset {
2407  static constexpr unsigned int size() { return 0x1dd90; }
2408  static constexpr unsigned int settings() { return 0x003b4; }
2409  static constexpr unsigned int zoneBank() { return 0x00418; }
2410  static constexpr unsigned int messageBank() { return 0x04110; }
2411  static constexpr unsigned int contactBank() { return 0x04334; }
2412  static constexpr unsigned int scanListBank() { return 0x0a338; }
2413  static constexpr unsigned int channelBank() { return 0x0a65c; }
2414  static constexpr unsigned int keySettings() { return 0x1c6c4; }
2415  static constexpr unsigned int groupListBank() { return 0x1c6dc; }
2416  static constexpr unsigned int encryptionKeyBank() { return 0x1d7e0; }
2417  static constexpr unsigned int dtmfSettings() { return 0x1d858; }
2418  static constexpr unsigned int alarmSettings() { return 0x1daf4; }
2419  static constexpr unsigned int dmrSettings() { return 0x1dbb8; }
2420  static constexpr unsigned int vfoBank() { return 0x1dd00; }
2422  };
2423 };
2424 
2425 #endif // DR1801UVCODEPLUG_HH
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition: channel.hh:61
Base class for all codeplug contexts.
Definition: codeplug.hh:238
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:51
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:25
This class defines the interface all device-specific code-plugs must implement.
Definition: codeplug.hh:19
The config class, representing the codeplug configuration.
Definition: config.hh:70
uint32_t size() const
Returns the total size of the DFU file.
Definition: dfufile.cc:52
TimeSlot
Possible timeslots for digital channels.
Definition: channel.hh:389
Represents a digital contact, that is a DMR number.
Definition: contact.hh:141
Type
Possible call types for a contact.
Definition: contact.hh:155
Implements the binary encoding of the alarm system bank.
Definition: dr1801uv_codeplug.hh:2064
virtual AlarmSystemElement alarmSystem(unsigned int n) const
Returns a reference to the n-th alarm system.
Definition: dr1801uv_codeplug.cc:2804
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2790
virtual void setAlarmSystemCount(unsigned int n)
Sets the number of alarm systems.
Definition: dr1801uv_codeplug.cc:2799
virtual unsigned int alarmSystemCount() const
Returns the number of alarm systems defined.
Definition: dr1801uv_codeplug.cc:2795
AlarmSystemBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2777
static constexpr unsigned int size()
The size of the alarm system bank.
Definition: dr1801uv_codeplug.hh:2076
Implements the binary encoding of the alarm system.
Definition: dr1801uv_codeplug.hh:1993
virtual bool noAlarmChannel() const
Returns true if no alarm channel is specified.
Definition: dr1801uv_codeplug.cc:2857
virtual QString name() const
Returns the name.
Definition: dr1801uv_codeplug.cc:2882
virtual void setAlarmChannelIndex(unsigned int index)
Sets the alarm channel index.
Definition: dr1801uv_codeplug.cc:2869
AlarmSystemElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2812
virtual void clearAlarmChannel()
Clears the alarm channel.
Definition: dr1801uv_codeplug.cc:2877
virtual unsigned int index() const
Returns the index of the system.
Definition: dr1801uv_codeplug.cc:2835
virtual void enableAlarm(bool enable)
Enables/disables the alarm.
Definition: dr1801uv_codeplug.cc:2852
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2825
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:2830
virtual bool alarmChannelIsSelected() const
Returns true if the alarm channel is the current channel.
Definition: dr1801uv_codeplug.cc:2861
virtual void setIndex(unsigned int index)
Sets the index of the element.
Definition: dr1801uv_codeplug.cc:2839
virtual unsigned int alarmChannelIndex() const
Returns the index of the alarm channel.
Definition: dr1801uv_codeplug.cc:2865
virtual void setAlarmChannelSelected()
Sets the alarm channel to the selected chanel.
Definition: dr1801uv_codeplug.cc:2873
virtual void setName(const QString &name)
Sets the system name.
Definition: dr1801uv_codeplug.cc:2886
virtual void clearIndex()
Clears the index.
Definition: dr1801uv_codeplug.cc:2843
virtual bool alarmEnabled() const
Returns true if the alarm is enabled.
Definition: dr1801uv_codeplug.cc:2848
static constexpr unsigned int size()
The size of the alarm system element.
Definition: dr1801uv_codeplug.hh:2006
Implements the binary encoding of the channel bank.
Definition: dr1801uv_codeplug.hh:305
virtual void setChannelCount(unsigned int count)
Sets the number of channels.
Definition: dr1801uv_codeplug.cc:36
virtual unsigned int channelCount() const
Returns the number of channels.
Definition: dr1801uv_codeplug.cc:32
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:317
ChannelBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:14
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:27
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all defined channels.
Definition: dr1801uv_codeplug.cc:56
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all channles.
Definition: dr1801uv_codeplug.cc:100
virtual QString channelName(unsigned int index) const
Returns the name of the channel at the given index.
Definition: dr1801uv_codeplug.cc:47
virtual ChannelElement channel(unsigned int index) const
Returns a reference to the channel element that the given index.
Definition: dr1801uv_codeplug.cc:42
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links channels.
Definition: dr1801uv_codeplug.cc:78
virtual void setChannelName(unsigned int index, const QString &name)
Sets the name of the channel at the given index.
Definition: dr1801uv_codeplug.cc:51
Implements the binary encoding of the channels settings.
Definition: dr1801uv_codeplug.hh:73
virtual void clearPTTID()
Clears the PTT ID.
Definition: dr1801uv_codeplug.cc:438
virtual Signaling::Code txTone() const
Retunrs the TX CTCSS/DCS signaling.
Definition: dr1801uv_codeplug.cc:387
virtual unsigned int scanListIndex() const
Returns the scan list index.
Definition: dr1801uv_codeplug.cc:344
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition: dr1801uv_codeplug.cc:240
virtual Frequency rxFrequency() const
Retunrs the RX frequency in MHz.
Definition: dr1801uv_codeplug.cc:188
virtual void setIndex(unsigned int idx)
Sets the index.
Definition: dr1801uv_codeplug.cc:150
virtual unsigned int encryptionKeyIndex() const
Returns the encryption key index.
Definition: dr1801uv_codeplug.cc:260
virtual void clearTransmitContactIndex()
Clears the contact index.
Definition: dr1801uv_codeplug.cc:217
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:135
virtual void setGroupListIndex(unsigned int index)
Sets the group-list index.
Definition: dr1801uv_codeplug.cc:451
Type
Possible channel types.
Definition: dr1801uv_codeplug.hh:76
virtual void setAdmitCriterion(Admit admit)
Sets the admit criterion.
Definition: dr1801uv_codeplug.cc:226
virtual void setChannelType(Type type)
Sets the channel type.
Definition: dr1801uv_codeplug.cc:159
virtual void setPTTIDIndex(unsigned int idx)
Sets the PTT-ID index.
Definition: dr1801uv_codeplug.cc:434
virtual bool hasAlarmSystem() const
Returns true if the alarm system index is set.
Definition: dr1801uv_codeplug.cc:299
virtual SignalingMode signalingMode() const
Returns the FM signaling mode.
Definition: dr1801uv_codeplug.cc:290
virtual Signaling::Code rxTone() const
Retunrs the RX CTCSS/DCS signaling.
Definition: dr1801uv_codeplug.cc:357
virtual void setRXFrequency(Frequency MHz)
Sets the RX frequency in MHz.
Definition: dr1801uv_codeplug.cc:192
virtual bool linkChannelObj(Channel *channel, Context &ctx, const ErrorStack &err=ErrorStack()) const
Links the channel object.
Definition: dr1801uv_codeplug.cc:506
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the band width for FM channels.
Definition: dr1801uv_codeplug.cc:324
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition: dr1801uv_codeplug.cc:248
virtual void setScanListIndex(unsigned int index)
Sets the scan list index.
Definition: dr1801uv_codeplug.cc:348
virtual void setPower(Channel::Power pwr)
Sets the power for the channel.
Definition: dr1801uv_codeplug.cc:173
virtual bool talkaround() const
Returns true if talkaround is enabled.
Definition: dr1801uv_codeplug.cc:417
virtual bool confirmPrivateCall() const
Returns true if private-call confirmation is enabled.
Definition: dr1801uv_codeplug.cc:281
virtual Admit admitCriterion() const
Returns the admit criterion.
Definition: dr1801uv_codeplug.cc:222
virtual bool loneWorker() const
Returns true if lone-worker is enabled.
Definition: dr1801uv_codeplug.cc:460
virtual unsigned int transmitContactIndex() const
Retunrs the contact index.
Definition: dr1801uv_codeplug.cc:209
virtual unsigned int colorCode() const
Returns the color code (0-15).
Definition: dr1801uv_codeplug.cc:231
SignalingMode
Possible FM signaling modes.
Definition: dr1801uv_codeplug.hh:92
SubToneType
Possible subtone types.
Definition: dr1801uv_codeplug.hh:100
virtual void setSignalingMode(SignalingMode mode)
Sets the FM signaling mode.
Definition: dr1801uv_codeplug.cc:294
virtual Frequency txFrequency() const
Retunrs the TX frequency in MHz.
Definition: dr1801uv_codeplug.cc:196
virtual Channel::Power power() const
Returns the power settings of the channel.
Definition: dr1801uv_codeplug.cc:164
virtual Type channelType() const
Returns the channel type.
Definition: dr1801uv_codeplug.cc:155
Bandwidth
Possible band width settings.
Definition: dr1801uv_codeplug.hh:96
virtual void clearGroupListIndex()
Clears the group list index.
Definition: dr1801uv_codeplug.cc:455
virtual bool hasGroupList() const
Retruns true if a group list is assigned.
Definition: dr1801uv_codeplug.cc:443
virtual void setColorCode(unsigned int cc)
Sets the color code (0-15).
Definition: dr1801uv_codeplug.cc:235
virtual void clearScanListIndex()
Clears the scan list index.
Definition: dr1801uv_codeplug.cc:352
virtual bool hasScanList() const
Retunrs true if a scan list is assigned.
Definition: dr1801uv_codeplug.cc:340
virtual void setAlarmSystemIndex(unsigned int index)
Sets the alarm system index.
Definition: dr1801uv_codeplug.cc:307
virtual void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition: dr1801uv_codeplug.cc:268
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:140
TimeSlot
Possible time-slot values.
Definition: dr1801uv_codeplug.hh:88
virtual unsigned int pttIDIndex() const
Returns the PTT-ID index.
Definition: dr1801uv_codeplug.cc:430
Admit
Possible values for the admid criterion.
Definition: dr1801uv_codeplug.hh:84
virtual void enableDCDM(bool enable)
Enables/disables dual-capacity direct mode.
Definition: dr1801uv_codeplug.cc:277
virtual bool hasEncryptionKey() const
Returns true if an ecryption key index is set.
Definition: dr1801uv_codeplug.cc:256
virtual void enablePrivateCallConfirmation(bool enable)
Enables/disables private-call confirmation.
Definition: dr1801uv_codeplug.cc:285
virtual FMChannel::Bandwidth bandwidth() const
Retunrs the band width for FM channels.
Definition: dr1801uv_codeplug.cc:316
virtual bool dcdm() const
Returns true if dual-capacity direct mode is enabled.
Definition: dr1801uv_codeplug.cc:273
virtual Channel * toChannelObj(Context &ctx, const ErrorStack &err=ErrorStack()) const
Constructs a channel object.
Definition: dr1801uv_codeplug.cc:470
virtual void clearAlarmSystemIndex()
Clears the alarm system index.
Definition: dr1801uv_codeplug.cc:311
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:120
virtual void setEncryptionKeyIndex(unsigned int index)
Sets the encryption key index.
Definition: dr1801uv_codeplug.cc:264
virtual void setRXTone(Signaling::Code code)
Sets the RX CTCSS/DCS signaling.
Definition: dr1801uv_codeplug.cc:369
virtual unsigned int groupListIndex() const
Retunrs the group-list index.
Definition: dr1801uv_codeplug.cc:447
virtual bool autoScanEnabled() const
Retunrs true, if the auto-scan is enabled.
Definition: dr1801uv_codeplug.cc:332
virtual void setTransmitContactIndex(unsigned int index)
Sets the transmit contact index.
Definition: dr1801uv_codeplug.cc:213
virtual void enableLoneWorker(bool enable)
Enables/disables lone-worker.
Definition: dr1801uv_codeplug.cc:464
virtual unsigned int alarmSystemIndex() const
Returns the index of the alarm system.
Definition: dr1801uv_codeplug.cc:303
virtual unsigned int index() const
Retunrs the 0-based index of the channel.
Definition: dr1801uv_codeplug.cc:146
virtual bool hasTransmitContact() const
Returns true if a contact index is set.
Definition: dr1801uv_codeplug.cc:205
virtual void enableAutoScan(bool enable)
Enables/disables auto-scan.
Definition: dr1801uv_codeplug.cc:336
Power
Possible power settings.
Definition: dr1801uv_codeplug.hh:80
virtual void setTXTone(Signaling::Code code)
Sets the TX CTCSS/DCS signaling.
Definition: dr1801uv_codeplug.cc:399
virtual bool hasPTTID() const
Returns true if a PTT ID is set.
Definition: dr1801uv_codeplug.cc:426
virtual bool encode(Channel *channel, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given channel.
Definition: dr1801uv_codeplug.cc:539
DCSMode
Possible DCS modes.
Definition: dr1801uv_codeplug.hh:104
ChannelElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:122
virtual void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition: dr1801uv_codeplug.cc:421
virtual void setTXFrequency(Frequency MHz)
Sets the TX frequency in MHz.
Definition: dr1801uv_codeplug.cc:200
Implements the binary encoding of the contact bank.
Definition: dr1801uv_codeplug.hh:445
virtual void setFirstIndex(unsigned int index)
Sets the index of the first element.
Definition: dr1801uv_codeplug.cc:627
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links all contacts.
Definition: dr1801uv_codeplug.cc:662
virtual unsigned int firstIndex() const
Returns the index of the first contact.
Definition: dr1801uv_codeplug.cc:623
virtual void setContactCount(unsigned int count)
Sets the number of contacts.
Definition: dr1801uv_codeplug.cc:617
virtual unsigned int contactCount() const
Returns the number of contacts.
Definition: dr1801uv_codeplug.cc:613
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all contacts.
Definition: dr1801uv_codeplug.cc:684
virtual ContactElement contact(unsigned int index) const
Returns a reference to the n-th contact.
Definition: dr1801uv_codeplug.cc:632
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all contacts and stores them into the given context and config.
Definition: dr1801uv_codeplug.cc:637
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:608
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:457
ContactBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:595
Implements the binary encoding of a contact.
Definition: dr1801uv_codeplug.hh:365
virtual void setSuccessorIndex(uint16_t index)
Sets successor index.
Definition: dr1801uv_codeplug.cc:738
ContactElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:705
virtual DMRContact * toContactObj(Context &ctx, const ErrorStack &err=ErrorStack()) const
Constructs a DMR contact object from this contact elmeent.
Definition: dr1801uv_codeplug.cc:790
virtual bool linkContactObj(DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack())
Links the DMR contact object.
Definition: dr1801uv_codeplug.cc:796
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition: dr1801uv_codeplug.cc:767
virtual void setDMRID(uint32_t id)
Sets the number.
Definition: dr1801uv_codeplug.cc:753
virtual QString name() const
Returns the name of the contact.
Definition: dr1801uv_codeplug.cc:779
virtual bool encode(DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the contact.
Definition: dr1801uv_codeplug.cc:802
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:718
virtual uint16_t successorIndex() const
Returns the index of the next element.
Definition: dr1801uv_codeplug.cc:734
virtual bool hasSuccessor() const
Returns true if the contact has a successor.
Definition: dr1801uv_codeplug.cc:730
CallType
Possible call types.
Definition: dr1801uv_codeplug.hh:368
virtual void setName(const QString &name)
Sets the name of the contact.
Definition: dr1801uv_codeplug.cc:783
virtual void clearSuccessorIndex()
Clears the successor index.
Definition: dr1801uv_codeplug.cc:742
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:725
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:384
virtual DMRContact::Type type() const
Returns the call type.
Definition: dr1801uv_codeplug.cc:758
virtual uint32_t dmrID() const
Returns the number.
Definition: dr1801uv_codeplug.cc:747
Implements the binary encoding of the DMR settings.
Definition: dr1801uv_codeplug.hh:2109
virtual void enableActiveDec(bool enable)
Enables active decoding.
Definition: dr1801uv_codeplug.cc:3010
virtual bool callAlterEnc() const
Returns true if the call alter encoding is enabled.
Definition: dr1801uv_codeplug.cc:3032
virtual bool activeDec() const
Returns true if the active decoding is enabled.
Definition: dr1801uv_codeplug.cc:3006
virtual unsigned int activeResend() const
Returns the active resend count.
Definition: dr1801uv_codeplug.cc:2942
virtual void enableRemoteMonitorEnc(bool enable)
Enables remote monitor encoding.
Definition: dr1801uv_codeplug.cc:3053
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2907
virtual void setRemoteListen(unsigned int sec)
Sets the remote-listen duration in seconds.
Definition: dr1801uv_codeplug.cc:2926
virtual void enableActiveEnc(bool enable)
Enables active encoding.
Definition: dr1801uv_codeplug.cc:3002
virtual bool activeEnc() const
Returns true if the active encoding is enabled.
Definition: dr1801uv_codeplug.cc:2998
virtual bool checkEnc() const
Returns true if the check encoding is enabled.
Definition: dr1801uv_codeplug.cc:3015
virtual void setSMSFormat(SMSFormat format)
Sets the SMS format.
Definition: dr1801uv_codeplug.cc:2976
virtual void enableCheckDec(bool enable)
Enables check decoding.
Definition: dr1801uv_codeplug.cc:3027
virtual void setActiveResend(unsigned int count)
Sets the active resend cound.
Definition: dr1801uv_codeplug.cc:2946
virtual void enableRemoteMonitorDec(bool enable)
Enables remote monitor decoding.
Definition: dr1801uv_codeplug.cc:3061
virtual void enableCallAlterEnc(bool enable)
Enables call alter encoding.
Definition: dr1801uv_codeplug.cc:3036
virtual void enableCheckEnc(bool enable)
Enables check encoding.
Definition: dr1801uv_codeplug.cc:3019
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:2127
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all keys.
Definition: dr1801uv_codeplug.cc:3079
virtual void enableCallAlterDec(bool enable)
Enables call alter decoding.
Definition: dr1801uv_codeplug.cc:3044
virtual void enableKillDec(bool enable)
Enables kill decoding.
Definition: dr1801uv_codeplug.cc:2993
virtual bool remoteMonitorEnc() const
Returns true if the remote monitor encoding is enabled.
Definition: dr1801uv_codeplug.cc:3049
virtual SMSFormat smsFormat() const
Returns the SMS format.
Definition: dr1801uv_codeplug.cc:2972
virtual unsigned int remoteListen() const
Returns the remote-listen duration in seconds.
Definition: dr1801uv_codeplug.cc:2922
virtual bool remoteMonitorDec() const
Returns true if the remote monitor decoding is enabled.
Definition: dr1801uv_codeplug.cc:3057
virtual unsigned int voiceHead() const
Returns the voice head count.
Definition: dr1801uv_codeplug.cc:2962
virtual void setVoiceHead(unsigned int count)
Sets the voice head count.
Definition: dr1801uv_codeplug.cc:2966
virtual bool checkDec() const
Returns true if the check decoding is enabled.
Definition: dr1801uv_codeplug.cc:3023
virtual void setHoldTime(unsigned int sec)
Sets the hold-time in seconds.
Definition: dr1801uv_codeplug.cc:2916
virtual bool killDec() const
Returns true if the kill decoding is enabled.
Definition: dr1801uv_codeplug.cc:2989
DMRSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2894
SMSFormat
Possible SMS encodings.
Definition: dr1801uv_codeplug.hh:2112
virtual void setActiveWait(unsigned int ms)
Sets the active wait period in ms.
Definition: dr1801uv_codeplug.cc:2936
virtual bool killEnc() const
Returns true if the kill encoding is enabled.
Definition: dr1801uv_codeplug.cc:2981
virtual void enableKillEnc(bool enable)
Enables kill encoding.
Definition: dr1801uv_codeplug.cc:2985
virtual bool callAlterDec() const
Returns true if the call alter decoding is enabled.
Definition: dr1801uv_codeplug.cc:3040
virtual void setPreSend(unsigned int count)
Sets the pre-send count.
Definition: dr1801uv_codeplug.cc:2956
virtual unsigned int activeWait() const
Returns the active wait period in ms.
Definition: dr1801uv_codeplug.cc:2932
virtual unsigned int holdTime() const
Returns the hold-time in seconds.
Definition: dr1801uv_codeplug.cc:2912
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes the DMR settings.
Definition: dr1801uv_codeplug.cc:3066
virtual unsigned int preSend() const
Returns the pre-send count.
Definition: dr1801uv_codeplug.cc:2952
Implements the DTMF ID bank.
Definition: dr1801uv_codeplug.hh:1706
DTMFIDBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2562
virtual unsigned int idCount() const
Returns the number of IDs encoded.
Definition: dr1801uv_codeplug.cc:2580
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1718
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2575
virtual DTMFIDElement id(unsigned int n) const
Returns a reference to the n-th ID.
Definition: dr1801uv_codeplug.cc:2589
virtual void setIDCount(unsigned int n)
Sets the ID count.
Definition: dr1801uv_codeplug.cc:2584
Implements the DTMF ID.
Definition: dr1801uv_codeplug.hh:1656
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2614
virtual void setNumberLength(unsigned int len)
Sets the number length.
Definition: dr1801uv_codeplug.cc:2623
virtual unsigned int numberLength() const
Returns the length of the number.
Definition: dr1801uv_codeplug.cc:2619
DTMFIDElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2601
virtual QString number() const
Returns the DTMF code/number.
Definition: dr1801uv_codeplug.cc:2628
virtual void setNumber(const QString &number)
Sets the DTMF code/number.
Definition: dr1801uv_codeplug.cc:2637
static constexpr unsigned int size()
Size of the element.
Definition: dr1801uv_codeplug.hh:1668
static QVector< QChar > _bin_dtmf_tab
Translation table.
Definition: dr1801uv_codeplug.hh:1697
Implements the binary encoding of the DTMF signaling settings.
Definition: dr1801uv_codeplug.hh:1876
virtual PTTIDBankElement pttIDs() const
Retunrs a reference to the PTT ID bank.
Definition: dr1801uv_codeplug.cc:2453
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2351
Kill
Possible kill actions.
Definition: dr1801uv_codeplug.hh:1887
virtual QString wakeCode() const
Retunrs the DTMF wake code as a string.
Definition: dr1801uv_codeplug.cc:2378
virtual unsigned int autoResetTime() const
Returns the auto-reset time in seconds [5,60s].
Definition: dr1801uv_codeplug.cc:2416
virtual void setAutoResetTime(unsigned int sec)
Set the auto-reset time in seconds.
Definition: dr1801uv_codeplug.cc:2420
virtual void setKillType(Kill type)
Sets the kill type.
Definition: dr1801uv_codeplug.cc:2438
virtual NonNumber groupCode() const
Returns the group code.
Definition: dr1801uv_codeplug.cc:2398
virtual Kill killType() const
Returns the kill type.
Definition: dr1801uv_codeplug.cc:2434
virtual void setRadioID(const QString &id)
Sets the DTMF radio ID as a string.
Definition: dr1801uv_codeplug.cc:2360
NonNumber
Possible DTMF non-number codes.
Definition: dr1801uv_codeplug.hh:1879
Response
Possible responses.
Definition: dr1801uv_codeplug.hh:1883
virtual void setResponse(Response resp)
Sets the decode response.
Definition: dr1801uv_codeplug.cc:2411
DTMFSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2338
virtual void setDelimiter(NonNumber code)
Sets the delimiter code.
Definition: dr1801uv_codeplug.cc:2393
virtual QString radioID() const
Retunrs the DTMF radio ID as a string.
Definition: dr1801uv_codeplug.cc:2356
virtual void setKillCode(const QString &code)
Sets the DTMF kill code as a string.
Definition: dr1801uv_codeplug.cc:2371
virtual void setWakeCode(const QString &code)
Sets the DTMF wake code as a string.
Definition: dr1801uv_codeplug.cc:2382
virtual DTMFIDBankElement dtmfIDs() const
Returns a reference to the DTMF IDs.
Definition: dr1801uv_codeplug.cc:2448
virtual NonNumber delimiter() const
Returns the delimiter code.
Definition: dr1801uv_codeplug.cc:2389
virtual bool killWakeEnabled() const
Returns true if the kill/wake decoding is endabled.
Definition: dr1801uv_codeplug.cc:2425
virtual QString killCode() const
Retunrs the DTMF kill code as a string.
Definition: dr1801uv_codeplug.cc:2367
virtual void setGroupCode(NonNumber code)
Sets the group code.
Definition: dr1801uv_codeplug.cc:2402
virtual void enableKillWake(bool enable)
Enables/disables the kill/wake decoding.
Definition: dr1801uv_codeplug.cc:2429
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1902
virtual DTMFSystemBankElement dtmfSystems() const
Returns a reference to the DTMF systems.
Definition: dr1801uv_codeplug.cc:2443
virtual Response response() const
Returns the decode response.
Definition: dr1801uv_codeplug.cc:2407
Implements the DTMF systems bank.
Definition: dr1801uv_codeplug.hh:1611
virtual void setSystemCount(unsigned int count)
Sets the number of DTMF systems.
Definition: dr1801uv_codeplug.cc:2483
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1623
virtual unsigned int systemCount() const
Returns the number of DTMF systems.
Definition: dr1801uv_codeplug.cc:2479
virtual DTMFSystemElement system(unsigned int n) const
Returns a reference to the n-th system.
Definition: dr1801uv_codeplug.cc:2488
DTMFSystemBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2461
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2474
Implements the DTMF system.
Definition: dr1801uv_codeplug.hh:1553
virtual void setCodeItervall(unsigned int ms)
Sets the code intervall in milliseconds.
Definition: dr1801uv_codeplug.cc:2545
virtual unsigned int codeDuration() const
Returns the code duration in milliseconds.
Definition: dr1801uv_codeplug.cc:2532
virtual bool sideToneEnabled() const
Returns true if the side-tone is enabled.
Definition: dr1801uv_codeplug.cc:2514
virtual void setResetTime(unsigned int ms)
Sets the reset time in milliseconds.
Definition: dr1801uv_codeplug.cc:2554
virtual unsigned int codeItervall() const
Returns the code intervall in milliseconds.
Definition: dr1801uv_codeplug.cc:2541
virtual void setPreTime(unsigned int ms)
Sets the pre-time in milliseconds.
Definition: dr1801uv_codeplug.cc:2527
virtual void setCodeDuration(unsigned int ms)
Sets the code duration in milliseconds.
Definition: dr1801uv_codeplug.cc:2536
virtual unsigned int resetTime() const
Returns the reset time in milliseconds.
Definition: dr1801uv_codeplug.cc:2550
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1565
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2509
virtual unsigned int preTime() const
Returns the pre-time in milliseconds.
Definition: dr1801uv_codeplug.cc:2523
DTMFSystemElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2496
virtual void enableSideTone(bool enable)
Enables/disable side-tone.
Definition: dr1801uv_codeplug.cc:2518
Implements the binary encoding of the encryption keys.
Definition: dr1801uv_codeplug.hh:1515
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all keys.
Definition: dr1801uv_codeplug.cc:2227
virtual EncryptionKeyElement key(unsigned int index) const
Returns a reference to the encryption key.
Definition: dr1801uv_codeplug.cc:2198
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes the all encryption keys defined.
Definition: dr1801uv_codeplug.cc:2203
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1527
EncryptionKeyBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2180
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2193
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links all encryption keys.
Definition: dr1801uv_codeplug.cc:2218
Implements the binary encoding of an encryption key.
Definition: dr1801uv_codeplug.hh:1457
virtual unsigned int keyLength() const
Retunrs the length of the key.
Definition: dr1801uv_codeplug.cc:2281
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2262
virtual bool encode(EncryptionKey *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the key.
Definition: dr1801uv_codeplug.cc:2322
virtual void setIndex(unsigned int index)
Sets the index of the key.
Definition: dr1801uv_codeplug.cc:2276
virtual void setKey(const QString &key)
Sets the key.
Definition: dr1801uv_codeplug.cc:2290
virtual bool linkKeyObj(EncryptionKey *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Links the key object.
Definition: dr1801uv_codeplug.cc:2315
virtual QString key() const
Returns the key as a string.
Definition: dr1801uv_codeplug.cc:2286
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:1470
virtual EncryptionKey * toKeyObj(Context &ctx, const ErrorStack &err=ErrorStack())
Creates a key object for this element.
Definition: dr1801uv_codeplug.cc:2296
EncryptionKeyElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2249
virtual unsigned int index() const
Returns the index of the key.
Definition: dr1801uv_codeplug.cc:2272
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:2267
Implements the binary encoding of the group-list bank.
Definition: dr1801uv_codeplug.hh:566
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:827
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links all group lists.
Definition: dr1801uv_codeplug.cc:867
virtual unsigned int groupListCount() const
Returns the number of group lists defined.
Definition: dr1801uv_codeplug.cc:832
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all group lists.
Definition: dr1801uv_codeplug.cc:847
virtual GroupListElement groupList(unsigned int index) const
Returns a reference to the group list at the given index.
Definition: dr1801uv_codeplug.cc:842
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists.
Definition: dr1801uv_codeplug.cc:888
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:578
GroupListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:814
virtual void setGroupListCount(unsigned int count)
Sets the number of group lists.
Definition: dr1801uv_codeplug.cc:836
Implements the binary encoding of a group list.
Definition: dr1801uv_codeplug.hh:503
virtual unsigned int index() const
Returns the index of the group list.
Definition: dr1801uv_codeplug.cc:931
virtual unsigned int count() const
Returns the number of elements in the list.
Definition: dr1801uv_codeplug.cc:940
virtual void setCount(unsigned int n)
Sets the number of elements in the list.
Definition: dr1801uv_codeplug.cc:944
GroupListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:908
virtual unsigned int memberIndex(unsigned int n) const
Retuns the n-th member index.
Definition: dr1801uv_codeplug.cc:953
virtual bool linkGroupListObj(RXGroupList *list, Context &ctx, const ErrorStack &err=ErrorStack()) const
Links the group list object.
Definition: dr1801uv_codeplug.cc:973
virtual void setMemberIndex(unsigned int n, unsigned int index)
Sets the n-th member index.
Definition: dr1801uv_codeplug.cc:957
virtual void setIndex(unsigned int index)
Sets the index of the group list.
Definition: dr1801uv_codeplug.cc:935
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:516
virtual RXGroupList * toGroupListObj(Context &ctx, const ErrorStack &err=ErrorStack()) const
Constructs a group list object from this elmeent.
Definition: dr1801uv_codeplug.cc:966
virtual void clearMemberIndex(unsigned int n)
Clears the n-th member index.
Definition: dr1801uv_codeplug.cc:961
virtual bool hasMemberIndex(unsigned int n) const
Returns true if the n-th member index is set.
Definition: dr1801uv_codeplug.cc:950
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:926
virtual bool encode(RXGroupList *list, Context &ctx, const ErrorStack &err=ErrorStack())
Links the group list object.
Definition: dr1801uv_codeplug.cc:991
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:921
Implements the binary encoding of the key settings.
Definition: dr1801uv_codeplug.hh:1336
virtual Function sideKey1Long() const
Returns the function for the side-key 1, long press.
Definition: dr1801uv_codeplug.cc:2083
virtual Function sideKey2Long() const
Returns the function for the side-key 2, long press.
Definition: dr1801uv_codeplug.cc:2101
virtual Function topKeyLong() const
Returns the function for the top-key, long press.
Definition: dr1801uv_codeplug.cc:2119
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1357
virtual void setSideKey1Short(Function func)
Sets the function for the side-key 1, short press.
Definition: dr1801uv_codeplug.cc:2078
virtual void setSideKey1Long(Function func)
Sets the function for the side-key 1, long press.
Definition: dr1801uv_codeplug.cc:2087
KeySettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2056
virtual Function topKeyShort() const
Returns the function for the top-key, short press.
Definition: dr1801uv_codeplug.cc:2110
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2069
virtual void setSideKey2Short(Function func)
Sets the function for the side-key 2, short press.
Definition: dr1801uv_codeplug.cc:2096
virtual void setTopKeyShort(Function func)
Sets the function for the top-key, short press.
Definition: dr1801uv_codeplug.cc:2114
virtual Function sideKey2Short() const
Returns the function for the side-key 2, short press.
Definition: dr1801uv_codeplug.cc:2092
virtual void setSideKey2Long(Function func)
Sets the function for the side-key 2, long press.
Definition: dr1801uv_codeplug.cc:2105
Function
Possible key functions.
Definition: dr1801uv_codeplug.hh:1339
virtual void setTopKeyLong(Function func)
Sets the function for the side-key, long press.
Definition: dr1801uv_codeplug.cc:2123
virtual Function sideKey1Short() const
Returns the function for the side-key 1, short press.
Definition: dr1801uv_codeplug.cc:2074
Implements the binary encoding of the preset message bank element.
Definition: dr1801uv_codeplug.hh:1287
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists.
Definition: dr1801uv_codeplug.cc:1989
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all scan lists.
Definition: dr1801uv_codeplug.cc:1969
virtual MessageElement message(unsigned int n) const
Returns a reference to the n-th message.
Definition: dr1801uv_codeplug.cc:1964
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1950
static constexpr unsigned int size()
Size of the element.
Definition: dr1801uv_codeplug.hh:1299
virtual void setMessageCount(unsigned int count)
Sets the number of messages.
Definition: dr1801uv_codeplug.cc:1959
MessageBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1937
virtual unsigned int messageCount() const
Retunrs the number of elements in the bank.
Definition: dr1801uv_codeplug.cc:1955
Implements the binary representation of a single message.
Definition: dr1801uv_codeplug.hh:1236
virtual unsigned int index() const
Returns the index of the message.
Definition: dr1801uv_codeplug.cc:2033
virtual void setIndex(unsigned int index)
Sets the index of the message.
Definition: dr1801uv_codeplug.cc:2037
MessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2010
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:2028
virtual void setText(const QString &text)
Sets the message text.
Definition: dr1801uv_codeplug.cc:2046
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1249
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2023
virtual QString text() const
Returns the message text.
Definition: dr1801uv_codeplug.cc:2042
Implements the binary encoding of a one-touch setting.
Definition: dr1801uv_codeplug.hh:2263
virtual bool hasDTMFID() const
Returns true if a DTMF ID is set.
Definition: dr1801uv_codeplug.cc:3200
virtual void setContactIndex(unsigned int index)
Sets the contact index.
Definition: dr1801uv_codeplug.cc:3156
virtual void clearDTMFIDIndex()
Clears the DTMF ID index.
Definition: dr1801uv_codeplug.cc:3212
virtual void clearContact()
Clears the contact.
Definition: dr1801uv_codeplug.cc:3160
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:2285
virtual void setDTMFIDIndex(unsigned int index)
Sets the DTMF ID index.
Definition: dr1801uv_codeplug.cc:3208
virtual void clearMessage()
Clears the message.
Definition: dr1801uv_codeplug.cc:3186
virtual unsigned int messageIndex() const
Returns the message index.
Definition: dr1801uv_codeplug.cc:3178
virtual void setMessageIndex(unsigned int index)
Sets the message index.
Definition: dr1801uv_codeplug.cc:3182
virtual bool hasContact() const
Returns true if a contact is set.
Definition: dr1801uv_codeplug.cc:3148
virtual unsigned int dtmfIDIndex() const
Returns the DTMF ID index.
Definition: dr1801uv_codeplug.cc:3204
virtual Type type() const
Retuns the type of the one-touch setting.
Definition: dr1801uv_codeplug.cc:3191
OneTouchSettingElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:3125
virtual unsigned int contactIndex() const
Returns the DMR contact index.
Definition: dr1801uv_codeplug.cc:3152
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:3138
bool isValid() const
Returns true if the setting is enabled.
Definition: dr1801uv_codeplug.cc:3143
virtual void setType(Type type)
Sets the type of the one-touch setting.
Definition: dr1801uv_codeplug.cc:3195
Action
Possible actions to perform.
Definition: dr1801uv_codeplug.hh:2266
virtual void setAction(Action action)
Sets the one-touch action.
Definition: dr1801uv_codeplug.cc:3169
Type
Possible one-touch types.
Definition: dr1801uv_codeplug.hh:2270
virtual Action action() const
Returns the one-touch action.
Definition: dr1801uv_codeplug.cc:3165
virtual bool hasMessage() const
Returns true, if a message is set.
Definition: dr1801uv_codeplug.cc:3174
Implements the binary encoding of the one-touch settings.
Definition: dr1801uv_codeplug.hh:2347
virtual OneTouchSettingElement setting(unsigned int n) const
Returns a reference to the n-th one-touch setting.
Definition: dr1801uv_codeplug.cc:3117
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:3108
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:2359
OneTouchSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:3095
virtual unsigned int settingsCount() const
Returns the number of one-touch settings.
Definition: dr1801uv_codeplug.cc:3112
Implements the encoding of the DTMF PTT IDs.
Definition: dr1801uv_codeplug.hh:1831
virtual void setPTTIDCount(unsigned int n)
Set the numbe of PTT IDs.
Definition: dr1801uv_codeplug.cc:2674
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1843
virtual PTTIDElement pttID(unsigned int n)
Returns a reference to the n-th PTT ID.
Definition: dr1801uv_codeplug.cc:2679
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2665
virtual unsigned int idCount() const
Returns the number of PTT IDs defined.
Definition: dr1801uv_codeplug.cc:2670
PTTIDBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2652
Implements the PTT ID.
Definition: dr1801uv_codeplug.hh:1751
virtual bool hasEOTID() const
Returns true if the EOT DTMF ID is set.
Definition: dr1801uv_codeplug.cc:2757
virtual void setIDMode(IDMode mode)
Sets the ID mode.
Definition: dr1801uv_codeplug.cc:2735
PTTIDElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2687
Transmit
Possible modes of transmission.
Definition: dr1801uv_codeplug.hh:1754
virtual unsigned int dtmfSystemIndex() const
Returns the DTMF system index.
Definition: dr1801uv_codeplug.cc:2709
virtual void setBOTIDIndex(unsigned int index)
Sets the BOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2748
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2700
virtual unsigned int botIDIndex() const
Returns the BOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2744
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1773
virtual void clearDTMFSystem()
Clears the DTMF system.
Definition: dr1801uv_codeplug.cc:2717
virtual void setTransmitMode(Transmit mode)
Sets the ID transmission mode.
Definition: dr1801uv_codeplug.cc:2726
virtual void clearBOTID()
Clears the BOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2752
virtual void setDTMFSystemIndex(unsigned int index)
Sets the DTMF system index.
Definition: dr1801uv_codeplug.cc:2713
virtual void setEOTIDIndex(unsigned int index)
Sets the EOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2765
virtual Transmit transmitMode() const
Returns the ID transmission mode.
Definition: dr1801uv_codeplug.cc:2722
virtual unsigned int eotIDIndex() const
Returns the EOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2761
virtual bool hasBOTID() const
Returns true if the BOT DTMF ID is set.
Definition: dr1801uv_codeplug.cc:2740
IDMode
Possible ID modes.
Definition: dr1801uv_codeplug.hh:1758
virtual void clearEOTID()
Clears the EOT DTMF ID index.
Definition: dr1801uv_codeplug.cc:2769
virtual bool hasDTMFSystem() const
Returns true, if the DTMF system is set.
Definition: dr1801uv_codeplug.cc:2705
virtual IDMode idMode() const
Returns the ID mode.
Definition: dr1801uv_codeplug.cc:2731
Implements the binary encoding of the scan-list bank.
Definition: dr1801uv_codeplug.hh:1184
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists.
Definition: dr1801uv_codeplug.cc:1715
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1196
virtual ScanListElement scanList(unsigned int index) const
Returns a reference to the n-th scan list.
Definition: dr1801uv_codeplug.cc:1667
virtual void setScanListCount(unsigned int count)
Sets the number of scan lists.
Definition: dr1801uv_codeplug.cc:1661
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1652
virtual unsigned int scanListCount() const
Returns the number of scan lists.
Definition: dr1801uv_codeplug.cc:1657
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links the scan lists.
Definition: dr1801uv_codeplug.cc:1693
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all scan lists.
Definition: dr1801uv_codeplug.cc:1672
ScanListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1639
Implements the binary encoding of a scan list element.
Definition: dr1801uv_codeplug.hh:1070
PriorityChannel
Possible priority channel modes.
Definition: dr1801uv_codeplug.hh:1073
virtual bool linkScanListObj(ScanList *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Links the scan-list object.
Definition: dr1801uv_codeplug.cc:1850
virtual void setName(const QString &name)
Sets the name of the scan list.
Definition: dr1801uv_codeplug.cc:1830
virtual unsigned int priorityChannel2Index() const
Returns the priority channel 2 index.
Definition: dr1801uv_codeplug.cc:1800
ScanListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1734
virtual void setPriorityChannel2(PriorityChannel mode)
Sets the priority channel 2 setting.
Definition: dr1801uv_codeplug.cc:1796
virtual unsigned int entryIndex(unsigned int n)
Returns the n-th entry index.
Definition: dr1801uv_codeplug.cc:1835
virtual unsigned int priorityChannel1Index() const
Returns the priority channel 1 index.
Definition: dr1801uv_codeplug.cc:1783
virtual void setPriorityChannel2Index(unsigned int index)
Sets the priority channel 2 index.
Definition: dr1801uv_codeplug.cc:1804
virtual bool encode(ScanList *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the scan list.
Definition: dr1801uv_codeplug.cc:1893
virtual void setEntryCount(unsigned int num)
Sets the number of entries.
Definition: dr1801uv_codeplug.cc:1770
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:1752
virtual void setPriorityChannel1Index(unsigned int index)
Sets the priority channel 1 index.
Definition: dr1801uv_codeplug.cc:1787
virtual PriorityChannel priorityChannel1() const
Retunrs the priority channel 1 setting.
Definition: dr1801uv_codeplug.cc:1775
virtual ScanList * toScanListObj(Context &ctx, const ErrorStack &err=ErrorStack())
Constructs a scan-list object from this element.
Definition: dr1801uv_codeplug.cc:1844
virtual PriorityChannel priorityChannel2() const
Retunrs the priority channel 2 setting.
Definition: dr1801uv_codeplug.cc:1792
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:1094
RevertChannel
Possible revert channel modes.
Definition: dr1801uv_codeplug.hh:1078
virtual QString name() const
Returns the name of the scan list.
Definition: dr1801uv_codeplug.cc:1826
virtual void setEntryIndex(unsigned int n, unsigned int index)
Sets the n-th entry index.
Definition: dr1801uv_codeplug.cc:1839
virtual unsigned int revertChannelIndex() const
Returns the revert channel index.
Definition: dr1801uv_codeplug.cc:1817
virtual void setRevertChannelIndex(unsigned int index)
Sets the revert channel index.
Definition: dr1801uv_codeplug.cc:1821
virtual RevertChannel revertChannel() const
Retunrs the revert channel setting.
Definition: dr1801uv_codeplug.cc:1809
virtual void setRevertChannel(RevertChannel mode)
Sets the revert channel setting.
Definition: dr1801uv_codeplug.cc:1813
virtual unsigned int index() const
Retunrs the index of the scan list.
Definition: dr1801uv_codeplug.cc:1757
virtual void setIndex(unsigned int idx)
Sets the index of the scan list.
Definition: dr1801uv_codeplug.cc:1761
virtual unsigned int entryCount() const
Returns the number of entries.
Definition: dr1801uv_codeplug.cc:1766
virtual void setPriorityChannel1(PriorityChannel mode)
Sets the priority channel 1 setting.
Definition: dr1801uv_codeplug.cc:1779
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1747
Implements the binary encoding of the settings element.
Definition: dr1801uv_codeplug.hh:746
virtual unsigned int dmrID() const
Returns the radios DMR ID.
Definition: dr1801uv_codeplug.cc:1243
virtual float reverseBurstFrequency() const
Returns the reverse burst frequency in Hz.
Definition: dr1801uv_codeplug.cc:1434
virtual void enableDMRVoiceEndTone(bool enable)
Enables/disables the DMR voice end roger tone.
Definition: dr1801uv_codeplug.cc:1387
virtual void setBootLine2(const QString &line)
Sets the boot-screen line 2.
Definition: dr1801uv_codeplug.cc:1526
virtual unsigned int loneWorkerReminderTime() const
Returns the lone-worker reminder time in seconds.
Definition: dr1801uv_codeplug.cc:1548
virtual bool dmrCallEndToneEnabled() const
Returns true if the DMR call end roger tone is enabled.
Definition: dr1801uv_codeplug.cc:1399
BacklightTime
Possible backlight time settings.
Definition: dr1801uv_codeplug.hh:772
SquelchMode
Possible squelch modes.
Definition: dr1801uv_codeplug.hh:759
virtual void setRingTone(RingTone tone)
Sets the ring tone.
Definition: dr1801uv_codeplug.cc:1420
ScanMode
Possible scan modes.
Definition: dr1801uv_codeplug.hh:792
virtual void enableEncryption(bool enable)
Enables/disables encryption globally.
Definition: dr1801uv_codeplug.cc:1295
virtual bool lockSideKey2() const
Retunrs true if the side-key 2 gets locked too.
Definition: dr1801uv_codeplug.cc:1324
virtual void setBootPassword(const QString &passwd)
Sets and enables boot password.
Definition: dr1801uv_codeplug.cc:1565
virtual bool campandingEnabled() const
Returns true, if campanding is enabled.
Definition: dr1801uv_codeplug.cc:1452
virtual bool fromConfig(Config *config, const ErrorStack &err=ErrorStack())
Encode from config.
Definition: dr1801uv_codeplug.cc:1619
virtual void setScanMode(ScanMode mode)
Sets the scan mode.
Definition: dr1801uv_codeplug.cc:1500
virtual bool encryptionEnabled() const
Returns true if encryption is enabled.
Definition: dr1801uv_codeplug.cc:1291
DisplayMode
Possible display modes.
Definition: dr1801uv_codeplug.hh:782
DualWatchMode
Possible dual-watch modes.
Definition: dr1801uv_codeplug.hh:787
virtual RingTone ringTone() const
Retuns the ring tone.
Definition: dr1801uv_codeplug.cc:1416
virtual void setRadioName(const QString &name)
Sets the radio name.
Definition: dr1801uv_codeplug.cc:1429
virtual unsigned int voxSensitivity() const
Returns the VOX sensitivity [0,10].
Definition: dr1801uv_codeplug.cc:1266
virtual DualWatchMode dualWatchMode() const
Returns the dual-watch mode.
Definition: dr1801uv_codeplug.cc:1487
virtual void enableLockSideKey2(bool enable)
Enables/disables locking the side-key 2.
Definition: dr1801uv_codeplug.cc:1328
virtual bool lockSideKey1() const
Retunrs true if the side-key 1 gets locked too.
Definition: dr1801uv_codeplug.cc:1316
virtual void setTuningModeUp(TuningMode mode)
Sets the tuning mode up-direction.
Definition: dr1801uv_codeplug.cc:1465
virtual void setProgPassword(const QString &passwd)
Sets and enables programming password.
Definition: dr1801uv_codeplug.cc:1587
BootScreen
Possible boot screen modes.
Definition: dr1801uv_codeplug.hh:797
virtual void setLoneWorkerReminderTime(unsigned int sec)
Sets the lone-worker resminder time in seconds.
Definition: dr1801uv_codeplug.cc:1552
PowerSaveMode
Possible power-save modes.
Definition: dr1801uv_codeplug.hh:749
virtual void setLoneWorkerResponseTime(unsigned int sec)
Sets the lone-worker response time in seconds.
Definition: dr1801uv_codeplug.cc:1544
virtual BacklightTime backlightTime() const
Returns the backlight time settings.
Definition: dr1801uv_codeplug.cc:1443
virtual unsigned int voxDelay() const
Returns the VOX delay in ms.
Definition: dr1801uv_codeplug.cc:1282
virtual bool keyLockEnabled() const
Returns true if the key-lock is enabled.
Definition: dr1801uv_codeplug.cc:1300
virtual void setBacklightTime(BacklightTime time)
Sets the backlight time.
Definition: dr1801uv_codeplug.cc:1447
virtual void enableLockPTT(bool enable)
Enables/disables locking the PTT.
Definition: dr1801uv_codeplug.cc:1336
SettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1225
virtual bool fmCallOutToneEnabled() const
Returns true if the FM call out roger tone is enabled.
Definition: dr1801uv_codeplug.cc:1375
virtual bool bootPasswordEnabled() const
Returns true if the boot password is enabled.
Definition: dr1801uv_codeplug.cc:1557
virtual bool ledEnabled() const
Returns true if the LED is enabled.
Definition: dr1801uv_codeplug.cc:1531
virtual void setDualWatchMode(DualWatchMode mode)
Sets the dual-watch mode.
Definition: dr1801uv_codeplug.cc:1491
virtual TuningMode tunigModeDown() const
Retunrs the tuning mode down-direction.
Definition: dr1801uv_codeplug.cc:1469
virtual BootScreen bootScreen() const
Returns the boot-screen mode.
Definition: dr1801uv_codeplug.cc:1505
virtual void enableLED(bool enabled)
Enables/disables the LED.
Definition: dr1801uv_codeplug.cc:1535
virtual TuningMode tunigModeUp() const
Retunrs the tuning mode up-direction.
Definition: dr1801uv_codeplug.cc:1461
virtual void enableDMRCallOutTone(bool enable)
Enables/disables the DMR call out roger tone.
Definition: dr1801uv_codeplug.cc:1371
virtual bool dmrVoiceEndToneEnabled() const
Returns true if the DMR voice end roger tone is enabled.
Definition: dr1801uv_codeplug.cc:1383
virtual void setBootScreen(BootScreen mode)
Sets the boot-screen mode.
Definition: dr1801uv_codeplug.cc:1509
virtual void enableFMCallOutTone(bool enable)
Enables/disables the FM call out roger tone.
Definition: dr1801uv_codeplug.cc:1379
virtual void enableCampanding(bool enable)
Enables/disables campanding.
Definition: dr1801uv_codeplug.cc:1456
virtual void setKeyLockDelay(unsigned int sec)
Sets the key-lock delay in seconds.
Definition: dr1801uv_codeplug.cc:1312
virtual QString bootLine1() const
Returns the boot-screen line 1.
Definition: dr1801uv_codeplug.cc:1514
virtual QString bootPassword() const
Returns the boot password.
Definition: dr1801uv_codeplug.cc:1561
virtual bool updateConfig(Config *config, const ErrorStack &err=ErrorStack())
Updates configuration.
Definition: dr1801uv_codeplug.cc:1601
virtual bool progPasswordEnabled() const
Returns true if the programming password is enabled.
Definition: dr1801uv_codeplug.cc:1579
virtual void setVOXDelay(unsigned int ms)
Sets the VOX delay in ms.
Definition: dr1801uv_codeplug.cc:1286
virtual void enableMessageTone(bool enable)
Enables/disables message tone.
Definition: dr1801uv_codeplug.cc:1411
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:812
virtual void enableDMRCallEndTone(bool enable)
Enables/disables the DMR call end roger tone.
Definition: dr1801uv_codeplug.cc:1403
virtual bool messageToneEnabled() const
Returns true if the message tone is enabled.
Definition: dr1801uv_codeplug.cc:1407
virtual QString progPassword() const
Returns the programming password.
Definition: dr1801uv_codeplug.cc:1583
virtual void setTuningModeDown(TuningMode mode)
Sets the tuning mode down-direction.
Definition: dr1801uv_codeplug.cc:1473
virtual DisplayMode displayMode() const
Returns the display mode.
Definition: dr1801uv_codeplug.cc:1478
virtual void setDMRID(unsigned int id)
Sets the radios DMR ID.
Definition: dr1801uv_codeplug.cc:1247
virtual PowerSaveMode powerSaveMode() const
Retunrs the the power-save mode.
Definition: dr1801uv_codeplug.cc:1252
virtual QString radioName() const
Retuns the radio name.
Definition: dr1801uv_codeplug.cc:1425
virtual bool dmrCallOutToneEnabled() const
Returns true if the DMR call out roger tone is enabled.
Definition: dr1801uv_codeplug.cc:1367
virtual void setReverseBurstFrequency(float Hz)
Sets the reverse burst frequency in Hz.
Definition: dr1801uv_codeplug.cc:1438
TuningMode
Possible tuning modes.
Definition: dr1801uv_codeplug.hh:777
virtual void enableFMVoiceEndTone(bool enable)
Enables/disables the FM voice end roger tone.
Definition: dr1801uv_codeplug.cc:1395
virtual void enableRogerTones(bool enable)
Enables/disables roger tones.
Definition: dr1801uv_codeplug.cc:1363
virtual void setBootLine1(const QString &line)
Sets the boot-screen line 1.
Definition: dr1801uv_codeplug.cc:1518
virtual ScanMode scanMode() const
Returns the scan mode.
Definition: dr1801uv_codeplug.cc:1496
virtual QString bootLine2() const
Returns the boot-screen line 2.
Definition: dr1801uv_codeplug.cc:1522
virtual void setPowerSaveMode(PowerSaveMode mode)
Sets the power-save mode.
Definition: dr1801uv_codeplug.cc:1260
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1238
virtual void enableLockSideKey1(bool enable)
Enables/disables locking the side-key 1.
Definition: dr1801uv_codeplug.cc:1320
virtual void enableKeyLock(bool enable)
Enable/disable key-lock.
Definition: dr1801uv_codeplug.cc:1304
virtual bool lockPTT() const
Retunrs true if the PTT gets locked too.
Definition: dr1801uv_codeplug.cc:1332
virtual unsigned int keyLockDelay() const
Returns the key-lock delay in seconds.
Definition: dr1801uv_codeplug.cc:1308
virtual void setDisplayMode(DisplayMode mode)
Sets the display mode.
Definition: dr1801uv_codeplug.cc:1482
virtual void setVOXSensitivity(unsigned int sens)
Sets the VOX sensitivity [0,10].
Definition: dr1801uv_codeplug.cc:1273
virtual bool rogerTonesEnabled() const
Returns true, if the roger tones are enabled.
Definition: dr1801uv_codeplug.cc:1359
Language
Possible UI languages.
Definition: dr1801uv_codeplug.hh:754
virtual void setLanguage(Language lang)
Sets the UI language.
Definition: dr1801uv_codeplug.cc:1345
virtual unsigned int loneWorkerResponseTime() const
Returns the lone-worker response time in seconds.
Definition: dr1801uv_codeplug.cc:1540
virtual SquelchMode squelchMode() const
Returns the squelch mode.
Definition: dr1801uv_codeplug.cc:1350
RingTone
Possible ring tone variants.
Definition: dr1801uv_codeplug.hh:764
virtual void clearProgPassword()
Clears and disables programming password.
Definition: dr1801uv_codeplug.cc:1594
virtual void clearBootPassword()
Clears and disables boot password.
Definition: dr1801uv_codeplug.cc:1572
virtual Language language() const
Returns the UI language.
Definition: dr1801uv_codeplug.cc:1341
virtual void setSquelchMode(SquelchMode mode)
Sets the squelch mode.
Definition: dr1801uv_codeplug.cc:1354
virtual bool fmVoiceEndToneEnabled() const
Returns true if the FM voice end roger tone is enabled.
Definition: dr1801uv_codeplug.cc:1391
Implements the binary encoding of the VFO settings.
Definition: dr1801uv_codeplug.hh:1404
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:2144
virtual ChannelElement vfoB() const
Returns a reference to the VFO A settings.
Definition: dr1801uv_codeplug.cc:2154
virtual QString nameA() const
Retunrs the name of the first VFO.
Definition: dr1801uv_codeplug.cc:2159
virtual void setNameB(const QString &name)
Sets the name for the second VFO.
Definition: dr1801uv_codeplug.cc:2172
virtual QString nameB() const
Retunrs the name of the second VFO.
Definition: dr1801uv_codeplug.cc:2168
VFOBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:2131
static constexpr unsigned int size()
Returns the size of the element.
Definition: dr1801uv_codeplug.hh:1416
virtual ChannelElement vfoA() const
Returns a reference to the VFO A settings.
Definition: dr1801uv_codeplug.cc:2149
virtual void setNameA(const QString &name)
Sets the name for the first VFO.
Definition: dr1801uv_codeplug.cc:2163
Implements the binary encoding of the zone bank.
Definition: dr1801uv_codeplug.hh:683
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:695
virtual bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all zones.
Definition: dr1801uv_codeplug.cc:1101
virtual void setUpZoneIndex(unsigned int index)
Sets the so-called up-zone index.
Definition: dr1801uv_codeplug.cc:1037
virtual bool link(Context &ctx, const ErrorStack &err=ErrorStack()) const
Links all zones.
Definition: dr1801uv_codeplug.cc:1079
virtual unsigned int upZoneIndex() const
Returns the so-called up-zone index.
Definition: dr1801uv_codeplug.cc:1033
virtual void setZoneCount(unsigned int count)
Sets the number of zones.
Definition: dr1801uv_codeplug.cc:1027
ZoneBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1005
virtual ZoneElement zone(unsigned int index) const
Returns a reference to the n-th zone.
Definition: dr1801uv_codeplug.cc:1051
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack()) const
Decodes all zones.
Definition: dr1801uv_codeplug.cc:1056
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1018
virtual unsigned int downZoneIndex() const
Returns the so-called down-zone index.
Definition: dr1801uv_codeplug.cc:1042
virtual unsigned int zoneCount() const
Returns the number of zones.
Definition: dr1801uv_codeplug.cc:1023
virtual void setDownZoneIndex(unsigned int index)
Sets the so-called down-zone index.
Definition: dr1801uv_codeplug.cc:1046
Implements the binary encoding of a zone.
Definition: dr1801uv_codeplug.hh:618
virtual bool encode(Zone *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the zone.
Definition: dr1801uv_codeplug.cc:1208
virtual void setName(const QString &name)
Sets the name of the zone.
Definition: dr1801uv_codeplug.cc:1147
void clear()
Abstract method to reset the element within the codeplug.
Definition: dr1801uv_codeplug.cc:1131
ZoneElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: dr1801uv_codeplug.cc:1118
virtual QString name() const
Returns the name of the zone.
Definition: dr1801uv_codeplug.cc:1142
virtual unsigned int index() const
Returns the index of the zone.
Definition: dr1801uv_codeplug.cc:1154
virtual void setIndex(unsigned int index)
Sets the index of the zone.
Definition: dr1801uv_codeplug.cc:1158
virtual bool linkZoneObj(Zone *obj, Context &ctx, const ErrorStack &err=ErrorStack())
Links the zone object.
Definition: dr1801uv_codeplug.cc:1190
bool isValid() const
Returns true if the pointer is not null.
Definition: dr1801uv_codeplug.cc:1136
static constexpr unsigned int size()
The size of the element.
Definition: dr1801uv_codeplug.hh:631
virtual Zone * toZoneObj(Context &ctx, const ErrorStack &err=ErrorStack())
Constructs a zone object from this element.
Definition: dr1801uv_codeplug.cc:1178
virtual unsigned int numEntries() const
Retunrs the number of entries.
Definition: dr1801uv_codeplug.cc:1163
virtual void setEntryIndex(unsigned int n, unsigned int index)
Sets the n-th entry index.
Definition: dr1801uv_codeplug.cc:1172
virtual unsigned int entryIndex(unsigned int n)
Returns the channel index of the n-th entry.
Definition: dr1801uv_codeplug.cc:1167
Implements the binary codeplug representation of a BTECH DR-1801UV (a.k.a, BF-1801-A6).
Definition: dr1801uv_codeplug.hh:64
bool decode(Config *config, const ErrorStack &err=ErrorStack())
Decodes a binary codeplug to the given abstract configuration config.
Definition: dr1801uv_codeplug.cc:3326
bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition: dr1801uv_codeplug.cc:3264
virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack())
Decode codeplug elements.
Definition: dr1801uv_codeplug.cc:3343
virtual bool encodeElements(Context &ctx, const ErrorStack &err=ErrorStack())
Encode all elements.
Definition: dr1801uv_codeplug.cc:3424
Config * preprocess(Config *config, const ErrorStack &err) const
Retruns a prepared configuration for this particular radio.
Definition: dr1801uv_codeplug.cc:3228
virtual bool linkElements(Context &ctx, const ErrorStack &err=ErrorStack())
Link decoded elements.
Definition: dr1801uv_codeplug.cc:3394
bool encode(Config *config, const Flags &flags, const ErrorStack &err=ErrorStack())
Encodes a given abstract configuration (config) to the device specific binary code-plug.
Definition: dr1801uv_codeplug.cc:3307
bool postprocess(Config *config, const ErrorStack &err) const
Retruns a post-processed configuration of the decoded config.
Definition: dr1801uv_codeplug.cc:3247
DR1801UVCodeplug(QObject *parent=nullptr)
Default constructor.
Definition: dr1801uv_codeplug.cc:3220
Base class of all encryption keys.
Definition: encryptionextension.hh:10
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Bandwidth
Possible bandwidth of an analog channel.
Definition: channel.hh:240
Generic representation of a RX group list.
Definition: rxgrouplist.hh:14
Simple range class representing some range in some data type.
Definition: ranges.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:18
Represents a zone within the generic configuration.
Definition: zone.hh:15
Some limits.
Definition: dr1801uv_codeplug.hh:2088
static constexpr unsigned int alarmSystemCount()
The maximum number of alarm systems.
Definition: dr1801uv_codeplug.hh:2090
Some internal offsets within the element.
Definition: dr1801uv_codeplug.hh:2095
Some limits.
Definition: dr1801uv_codeplug.hh:2040
static constexpr unsigned int nameLength()
The maximum name length.
Definition: dr1801uv_codeplug.hh:2042
Some internal offsets within the codeplug.
Definition: dr1801uv_codeplug.hh:2047
Limits of some elements.
Definition: dr1801uv_codeplug.hh:341
static constexpr unsigned int channelNameLength()
Returns the maximum length of a channel name.
Definition: dr1801uv_codeplug.hh:345
static constexpr unsigned int channelCount()
Returns the maximum number of channels.
Definition: dr1801uv_codeplug.hh:343
Offsets within the element.
Definition: dr1801uv_codeplug.hh:350
Some offsets within the codeplug.
Definition: dr1801uv_codeplug.hh:265
Some Limits.
Definition: dr1801uv_codeplug.hh:481
static constexpr unsigned int contactCount()
The maximum number of contacts.
Definition: dr1801uv_codeplug.hh:483
Offsets within the element.
Definition: dr1801uv_codeplug.hh:488
Some limits.
Definition: dr1801uv_codeplug.hh:419
static constexpr unsigned int nameLength()
Maximum length of the contact name.
Definition: dr1801uv_codeplug.hh:421
Defines offsets within the element.
Definition: dr1801uv_codeplug.hh:426
Some limits.
Definition: dr1801uv_codeplug.hh:2217
static constexpr Range< unsigned int > remoteListen()
The range of remote listen duration.
Definition: dr1801uv_codeplug.hh:2221
static constexpr Range< unsigned int > preSend()
The range of pre-send count.
Definition: dr1801uv_codeplug.hh:2227
static constexpr Range< unsigned int > activeWait()
The range of active wait period.
Definition: dr1801uv_codeplug.hh:2223
static constexpr Range< unsigned int > holdTime()
The range of hold time.
Definition: dr1801uv_codeplug.hh:2219
static constexpr Range< unsigned int > voiceHead()
The range of voice head count.
Definition: dr1801uv_codeplug.hh:2229
static constexpr Range< unsigned int > activeResend()
The range of active resend count.
Definition: dr1801uv_codeplug.hh:2225
Internal offsets within the element.
Definition: dr1801uv_codeplug.hh:2234
Some limits.
Definition: dr1801uv_codeplug.hh:1730
static constexpr unsigned int idCount()
The maximum number of IDs.
Definition: dr1801uv_codeplug.hh:1732
Some offsets within the codeplug.
Definition: dr1801uv_codeplug.hh:1737
Some limits.
Definition: dr1801uv_codeplug.hh:1677
static constexpr unsigned int numberLength()
The maximum number of digits of the number.
Definition: dr1801uv_codeplug.hh:1679
Some internal offset within the element.
Definition: dr1801uv_codeplug.hh:1689
Some limits.
Definition: dr1801uv_codeplug.hh:1955
static constexpr unsigned int radioIDLength()
The maximum length of the radio ID.
Definition: dr1801uv_codeplug.hh:1957
static constexpr unsigned int killCodeLength()
The maximum length of the kill code.
Definition: dr1801uv_codeplug.hh:1959
static constexpr unsigned int wakeCodeLength()
The maximum length of the wake code.
Definition: dr1801uv_codeplug.hh:1961
Internal offsets within the settings element.
Definition: dr1801uv_codeplug.hh:1966
Some limits.
Definition: dr1801uv_codeplug.hh:1635
static constexpr unsigned int systemCount()
The maximum number of DTMF systems.
Definition: dr1801uv_codeplug.hh:1637
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1642
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1594
Some limits for the key bank.
Definition: dr1801uv_codeplug.hh:1541
static constexpr unsigned int keyCount()
The number of keys.
Definition: dr1801uv_codeplug.hh:1543
Some limits for the element.
Definition: dr1801uv_codeplug.hh:1494
static constexpr unsigned int keyLength()
The maximum length of the key.
Definition: dr1801uv_codeplug.hh:1496
Some internal offsets within the element.
Definition: dr1801uv_codeplug.hh:1501
Some limits.
Definition: dr1801uv_codeplug.hh:597
static constexpr unsigned int groupListCount()
The maximum number of group lists.
Definition: dr1801uv_codeplug.hh:599
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:604
Some limits.
Definition: dr1801uv_codeplug.hh:554
Some offset within the codeplug.
Definition: dr1801uv_codeplug.hh:546
Internal offsets within the element.
Definition: dr1801uv_codeplug.hh:1386
Some limits.
Definition: dr1801uv_codeplug.hh:1316
static constexpr unsigned int messageCount()
Maximum number of messages.
Definition: dr1801uv_codeplug.hh:1317
Offsets within the element.
Definition: dr1801uv_codeplug.hh:1322
Some limits.
Definition: dr1801uv_codeplug.hh:1273
static constexpr unsigned int textLength()
The maximum message length.
Definition: dr1801uv_codeplug.hh:1275
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1263
Defines the offsets within the codeplug.
Definition: dr1801uv_codeplug.hh:2405
Some internal offsets.
Definition: dr1801uv_codeplug.hh:2329
Some limits.
Definition: dr1801uv_codeplug.hh:2369
static constexpr unsigned int settingsCount()
Returns the maximum number of one-touch settings.
Definition: dr1801uv_codeplug.hh:2371
Some internal offset.
Definition: dr1801uv_codeplug.hh:2376
Some limits.
Definition: dr1801uv_codeplug.hh:1855
static constexpr unsigned int idCount()
The maximum number of PTT IDs.
Definition: dr1801uv_codeplug.hh:1857
Some internal offsets within the element.
Definition: dr1801uv_codeplug.hh:1862
Some internal offsets within the element.
Definition: dr1801uv_codeplug.hh:1814
Some limits.
Definition: dr1801uv_codeplug.hh:1224
static constexpr unsigned int scanListCount()
Maximum number of scan lists.
Definition: dr1801uv_codeplug.hh:1226
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1215
Some limits.
Definition: dr1801uv_codeplug.hh:1169
static constexpr unsigned int nameLength()
Maximum length of the name.
Definition: dr1801uv_codeplug.hh:1171
static constexpr unsigned int memberCount()
Maximum number of channels in scan list.
Definition: dr1801uv_codeplug.hh:1173
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1152
Some limits.
Definition: dr1801uv_codeplug.hh:1052
static constexpr unsigned int bootLineLength()
Maximum boot-text lines length.
Definition: dr1801uv_codeplug.hh:1056
static constexpr unsigned int bootPasswordLength()
Maximum boot password length.
Definition: dr1801uv_codeplug.hh:1058
static constexpr unsigned int radioNameLength()
Maximum radio name length.
Definition: dr1801uv_codeplug.hh:1054
static constexpr unsigned int progPasswordLength()
Maximum programming password length.
Definition: dr1801uv_codeplug.hh:1060
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1002
Some limits for the element.
Definition: dr1801uv_codeplug.hh:1434
static constexpr unsigned int nameLength()
The maximum length of the VFO names (not set).
Definition: dr1801uv_codeplug.hh:1436
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:1441
Some limits.
Definition: dr1801uv_codeplug.hh:723
static constexpr unsigned int zoneCount()
The maximum number of zones.
Definition: dr1801uv_codeplug.hh:725
Some offsets within the element.
Definition: dr1801uv_codeplug.hh:730
Some limits.
Definition: dr1801uv_codeplug.hh:658
static constexpr unsigned int nameLength()
The maximum name length.
Definition: dr1801uv_codeplug.hh:660
static constexpr unsigned int memberCount()
The maximum number of channels in the zone.
Definition: dr1801uv_codeplug.hh:662
Some offset within the element.
Definition: dr1801uv_codeplug.hh:667
Helper type to encode frequencies without any rounding error.
Definition: frequency.hh:11