libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
gd73_codeplug.hh
1#ifndef GD73CODEPLUG_HH
2#define GD73CODEPLUG_HH
3
4#include "codeplug.hh"
5#include "interval.hh"
6#include "ranges.hh"
7#include "contact.hh"
8#include "rxgrouplist.hh"
9#include "channel.hh"
10#include "zone.hh"
11#include "bootsettings.hh"
12#include "radioddity_extensions.hh"
13
14
15class SMSTemplate;
16class SMSExtension;
17
53class GD73Codeplug : public Codeplug
54{
55 Q_OBJECT
56
57public:
63 {
64 protected:
66 InformationElement(uint8_t *ptr, size_t size);
67
68 public:
70 InformationElement(uint8_t *ptr);
71
73 static constexpr unsigned int size() { return 0x0061; }
74
76 FrequencyRange frequencyRange() const;
78 void setFrequencyRange(const FrequencyRange &range);
79
81 QDateTime timestamp() const;
83 void setTimestamp(const QDateTime &timestamp);
84
86 QString serial() const;
88 QString modelName() const;
90 QString deviceID() const;
92 QString modelNumber() const;
94 QString softwareVersion() const;
95
96 public:
98 struct Limit {
100 static constexpr unsigned int serial() { return 16; }
102 static constexpr unsigned int modelName() { return 16; }
104 static constexpr unsigned int deviceID() { return 16; }
106 static constexpr unsigned int modelNumber() { return 16; }
108 static constexpr unsigned int softwareVersion() { return 16; }
109 };
110
111 protected:
113 struct Offset {
115 static constexpr unsigned int frequencyRange() { return 0x0000; }
116 static constexpr unsigned int dateCentury() { return 0x0001; }
117 static constexpr unsigned int dateYear() { return 0x0002; }
118 static constexpr unsigned int dateMonth() { return 0x0003; }
119 static constexpr unsigned int dateDay() { return 0x0004; }
120 static constexpr unsigned int dateHour() { return 0x0005; }
121 static constexpr unsigned int dateMinute() { return 0x0006; }
122 static constexpr unsigned int dateSecond() { return 0x0007; }
123 static constexpr unsigned int serial() { return 0x0011; }
124 static constexpr unsigned int modelName() { return 0x0021; }
125 static constexpr unsigned int deviceID() { return 0x0031; }
126 static constexpr unsigned int modelNumber() { return 0x0041; }
127 static constexpr unsigned int softwareVersion() { return 0x0051; }
129 };
130 };
131
132
138 {
139 public:
141 enum class Action {
142 Call = 0, Message = 1
143 };
144
145 protected:
147 OneTouchSettingElement(uint8_t *ptr, size_t size);
148
149 public:
151 OneTouchSettingElement(uint8_t *ptr);
152
154 static constexpr unsigned int size() { return 0x0005; }
155
156 protected:
158 struct Offset {
160 static constexpr unsigned int contact() { return 0x0001; }
161 static constexpr unsigned int action() { return 0x0003; }
162 static constexpr unsigned int message() { return 0x0001; }
164 };
165 };
166
167
174 {
175 public:
178 Name = 0, Frequency = 1
179 };
180
181 enum class BootDisplayMode {
182 Off = 0, Text = 1, Image = 2, Both = 3
183 };
184
185 struct KeyFunction {
186 public:
191 protected:
193 enum Code {
194 None=0, RadioEnable=1, RadioCheck=2, RadioDisable=3, PowerLevel=4,
195 Monitor=5, EmergencyOn=6, EmergencyOff=7, ZoneSwitch=8, ToggleScan=9, ToggleVOX=10,
196 OneTouch1=11, OneTouch2=12, OneTouch3=13, OneTouch4=14, OneTouch5=15, ToggleTalkaround=16,
197 LoneWorker=17, TBST=18, CallSwell=19
198 };
199 };
200
201 enum class Language {
202 Chinese=0, English=1
203 };
204
205 protected:
207 SettingsElement(uint8_t *ptr, size_t size);
208
209 public:
211 SettingsElement(uint8_t *ptr);
212
214 static constexpr unsigned int size() { return 0x00aa; }
215
217 QString name() const;
219 void setName(const QString &name);
220
222 unsigned int dmrID() const;
224 void setDMRID(unsigned int id);
225
227 Language language() const;
229 void setLanguage(Language lang);
230
232 Level vox() const;
234 void setVOX(Level level);
235
237 Level squelch() const;
239 void setSquelch(Level level);
240
242 bool totIsSet() const;
244 Interval tot() const;
246 void setTOT(const Interval &interval);
248 void clearTOT();
249
251 bool txInterruptedEnabled() const;
253 void enableTXInterrupt(bool enable);
254
256 bool powerSaveEnabled() const;
258 void enablePowerSave(bool enable);
262 void setPowerSaveTimeout(const Interval &interval);
263
265 bool readLockEnabled() const;
267 void enableReadLock(bool enable);
269 QString readLockPin() const;
271 void setReadLockPin(const QString &pin);
272
274 bool writeLockEnabled() const;
276 void enableWriteLock(bool enable);
278 QString writeLockPin() const;
280 void setWriteLockPin(const QString &pin);
281
286
288 Level dmrMicGain() const;
290 void setDMRMicGain(Level gain);
292 Level fmMicGain() const;
294 void setFMMicGain(Level gain);
295
299 void setLoneWorkerResponseTimeout(const Interval &interval);
303 void setLoneWorkerRemindPeriod(const Interval &interval);
304
310 QString bootTextLine1() const;
312 void setBootTextLine1(const QString &line);
314 QString bootTextLine2() const;
316 void setBootTextLine2(const QString &line);
317
319 bool keyToneEnabled() const;
321 void enableKeyTone(bool enable);
323 Level keyToneVolume() const;
325 void setKeyToneVolume(Level vol);
327 bool lowBatteryToneEnabled() const;
329 void enableLowBatteryTone(bool enable);
331 unsigned int lowBatteryToneVolume() const;
333 void setLowBatteryToneVolume(unsigned int vol);
334
338 void setLongPressDuration(const Interval &interval);
356 OneTouchSettingElement oneTouch(unsigned int n);
357
359 bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
361 bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
362
363 public:
365 struct Limit: Element::Limit {
367 static constexpr unsigned int name() { return 16; }
369 static constexpr Range<unsigned int> vox() { return {1, 4}; }
371 static constexpr Range<unsigned int> squelch() { return {1, 9}; }
373 static constexpr Range<unsigned int> micGain() { return {1, 6}; }
374
376 static constexpr TimeRange tot() {
377 return TimeRange{Interval::fromSeconds(20), Interval::fromSeconds(500)};
378 }
379
380 static constexpr TimeRange powerSaveTimeout() {
381 return TimeRange{Interval::fromSeconds(10), Interval::fromSeconds(60)};
382 }
383
384 static constexpr unsigned int pin() { return 6; }
386 static constexpr TimeRange loneWorkerResponse() {
387 return TimeRange{Interval::fromMinutes(1), Interval::fromMinutes(480)};
388 }
389
390 static constexpr TimeRange loneWorkerRemindPeriod() {
391 return TimeRange{Interval::fromSeconds(10), Interval::fromSeconds(200)};
392 }
393
394 static constexpr unsigned int bootTextLine() { return 16; }
396 static constexpr Range<unsigned int> toneVolume() { return {0,13}; }
398 static constexpr TimeRange longPressDuration() {
399 return TimeRange{Interval::fromSeconds(0), Interval::fromSeconds(31)};
400 }
401 };
402
403 protected:
405 struct Offset {
407 static constexpr unsigned int name() { return 0x0000; }
408 static constexpr unsigned int dmrId() { return 0x0020; }
409 static constexpr unsigned int language() { return 0x0024; }
410 static constexpr unsigned int voxLevel() { return 0x0026; }
411 static constexpr unsigned int squelchLevel() { return 0x0027; }
412 static constexpr unsigned int tot() { return 0x0028; }
413 static constexpr unsigned int txInterrupt() { return 0x0029; }
414 static constexpr unsigned int powerSave() { return 0x002a; }
415 static constexpr unsigned int powerSaveTimeout() { return 0x002b; }
416 static constexpr unsigned int readLockEnable() { return 0x002c; }
417 static constexpr unsigned int writeLockEnable() { return 0x002d; }
418 static constexpr unsigned int channelDisplayMode() { return 0x002f; }
419 static constexpr unsigned int readLockPin() { return 0x0030; }
420 static constexpr unsigned int writeLockPin() { return 0x0036; }
421 static constexpr unsigned int dmrMicGain() { return 0x003d; }
422 static constexpr unsigned int fmMicGain() { return 0x003f; }
423 static constexpr unsigned int loneWorkerResponseTimeout() { return 0x0040; }
424 static constexpr unsigned int loneWorkerReminderPeriod() { return 0x0042; }
425 static constexpr unsigned int bootDisplayMode() { return 0x0043; }
426 static constexpr unsigned int bootTextLine1() { return 0x0044; }
427 static constexpr unsigned int bootTextLine2() { return 0x0064; }
428 static constexpr unsigned int keyToneEnable() { return 0x0084; }
429 static constexpr unsigned int keyToneVolume() { return 0x0085; }
430 static constexpr unsigned int lowBatToneEnable() { return 0x0086; }
431 static constexpr unsigned int lowBatToneVolume() { return 0x0087; }
432 static constexpr unsigned int longPressDuration() { return 0x0088; }
433 static constexpr unsigned int progFuncKey1ShortPress() { return 0x008b; }
434 static constexpr unsigned int progFuncKey1LongPress() { return 0x008c; }
435 static constexpr unsigned int progFuncKey2ShortPress() { return 0x008d; }
436 static constexpr unsigned int progFuncKey2LongPress() { return 0x008e; }
437 static constexpr unsigned int oneTouchSettings() { return 0x0090; }
438 static constexpr unsigned int betweenOneTouchSettings() { return OneTouchSettingElement::size(); }
440 };
441 };
442
443
448 class ZoneElement: public Element
449 {
450 protected:
452 ZoneElement(uint8_t *ptr, size_t size);
453
454 public:
456 ZoneElement(uint8_t *ptr);
457
459 static constexpr unsigned int size() { return 0x0031; }
460
462 QString name() const;
464 void setName(const QString &name);
465
467 Zone *toZone(Context &ctx, const ErrorStack &err=ErrorStack());
469 bool linkZone(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack());
471 bool encode(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack());
472
473 public:
475 struct Limit {
477 static constexpr unsigned int nameLength() { return 8; }
479 static constexpr unsigned int channelCount() { return 16; }
480 };
481
482 protected:
484 struct Offset {
486 static constexpr unsigned int name() { return 0x0000; }
487 static constexpr unsigned int channeCount() { return 0x0010; }
488 static constexpr unsigned int channelIndices() { return 0x0011; }
489 static constexpr unsigned int betweenChannelIndices() { return 0x0002; }
491 };
492 };
493
494
502 {
503 protected:
505 ZoneBankElement(uint8_t *ptr, size_t size);
506
507 public:
509 ZoneBankElement(uint8_t *ptr);
510
512 static constexpr unsigned int size() { return 0x0c41; }
513
515 bool createZones(Context &ctx, const ErrorStack &err);
517 bool linkZones(Context &ctx, const ErrorStack &err);
519 bool encode(Context &ctx, const ErrorStack &err);
520
521 public:
523 struct Limit {
525 static constexpr unsigned int zoneCount() { return 64; }
526 };
527
528 protected:
530 struct Offset {
532 static constexpr unsigned int zoneCount() { return 0x0000; }
533 static constexpr unsigned int zones() { return 0x0001; }
534 static constexpr unsigned int betweenZones() { return ZoneElement::size(); }
536 };
537 };
538
539
545 {
546 protected:
548 ChannelElement(uint8_t *ptr, size_t size);
549
550 public:
552 enum class Type {
553 FM = 0, DMR = 1
554 };
555
556 enum class Admit {
557 Always = 0, CC_CTCSS = 1, Free=2
558 };
559
560 public:
562 ChannelElement(uint8_t *ptr);
563
565 static constexpr unsigned int size() { return 0x0046; }
566
568 QString name() const;
570 void setName(const QString &name);
571
576
578 bool hasScanListIndex() const;
580 unsigned int scanListIndex() const;
582 void setScanListIndex(unsigned int idx);
584 void clearScanListIndex();
585
587 Type type() const;
589 void setType(Type type);
590
592 bool talkaroundEnabled() const;
594 void enableTalkaround(bool enable);
595
597 bool rxOnly() const;
599 void enableRXOnly(bool enable);
600
602 bool scanAutoStartEnabled() const;
604 void enableScanAutoStart(bool enable);
605
607 Frequency rxFrequency() const;
609 void setRXFrequency(const Frequency &f);
611 Frequency txFrequency() const;
613 void setTXFrequency(const Frequency &f);
614
616 bool hasDTMFPTTSettingsIndex() const;
618 unsigned int dtmfPTTSettingsIndex() const;
620 void setDTMFPTTSettingsIndex(unsigned int idx);
623
624
626 Channel::Power power() const;
629
631 Admit admit() const;
633 void setAdmit(Admit admit);
634
636 SelectiveCall rxTone() const;
638 void setRXTone(const SelectiveCall &code);
640 SelectiveCall txTone() const;
642 void setTXTone(const SelectiveCall &code);
643
648
650 unsigned int colorCode() const;
652 void setColorCode(unsigned int cc);
653
655 bool groupListMatchesContact() const;
657 bool groupListAllMatch() const;
659 unsigned int groupListIndex() const;
661 void setGroupListIndex(unsigned int idx);
666
668 bool hasTXContact() const;
670 unsigned int txContactIndex() const;
672 void setTXContactIndex(unsigned int idx);
674 void clearTXContactIndex();
675
677 bool hasEmergencySystemIndex() const;
679 unsigned int emergencySystemIndex() const;
681 void setEmergencySystemIndex(unsigned int idx);
684
686 bool hasEncryptionKeyIndex() const;
688 unsigned int encryptionKeyIndex() const;
690 void setEncryptionKeyIndex(unsigned int idx);
693
695 Channel *toChannel(Context &ctx, const ErrorStack &err=ErrorStack());
697 bool linkChannel(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack());
699 bool encode(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack());
700
701 public:
703 struct Limit {
705 static constexpr unsigned int nameLength() { return 16; }
706 };
707
708 protected:
710 struct Offset {
712 static constexpr unsigned int name() { return 0x0000; }
713 static constexpr unsigned int bandwidth() { return 0x0020; }
714 static constexpr unsigned int scanList() { return 0x0021; }
715 static constexpr unsigned int channelType() { return 0x0022; }
716 static constexpr unsigned int talkaround() { return 0x0023; }
717 static constexpr unsigned int rxOnly() { return 0x0024; }
718 static constexpr unsigned int scanAutoStart() { return 0x0026; }
719 static constexpr unsigned int rxFrequency() { return 0x0027; }
720 static constexpr unsigned int txFrequency() { return 0x002b; }
721 static constexpr unsigned int dtmfPTTSettingsIndex() { return 0x002f; }
722 static constexpr unsigned int power() { return 0x0030; }
723 static constexpr unsigned int admid() { return 0x0031; }
724 static constexpr unsigned int rxToneMode() { return 0x0034; }
725 static constexpr unsigned int rxCTCSS() { return 0x0035; }
726 static constexpr unsigned int rxDCS() { return 0x0036; }
727 static constexpr unsigned int txToneMode() { return 0x0037; }
728 static constexpr unsigned int txCTCSS() { return 0x0038; }
729 static constexpr unsigned int txDCS() { return 0x0039; }
730 static constexpr unsigned int timeslot() { return 0x003c; }
731 static constexpr unsigned int colorcode() { return 0x003d; }
732 static constexpr unsigned int groupListIndex() { return 0x003e; }
733 static constexpr unsigned int contactIndex() { return 0x0040; }
734 static constexpr unsigned int emergencySystemIndex() { return 0x0042; }
735 static constexpr unsigned int encryptionKeyIndex() { return 0x0044; }
737 };
738 };
739
740
748 {
749 protected:
751 ChannelBankElement(uint8_t *ptr, size_t size);
752
753 public:
755 ChannelBankElement(uint8_t *ptr);
756
758 static constexpr unsigned int size() { return 0x11802; }
759
761 bool createChannels(Context &ctx, const ErrorStack &err);
763 bool linkChannels(Context &ctx, const ErrorStack &err);
765 bool encode(Context &ctx, const ErrorStack &err);
766
767 public:
769 struct Limit {
771 static constexpr unsigned int channelCount() { return 1024; }
772 };
773
774 protected:
776 struct Offset {
778 static constexpr unsigned int channelCount() { return 0x0000; }
779 static constexpr unsigned int channels() { return 0x0002; }
780 static constexpr unsigned int betweenChannels() { return ChannelElement::size(); }
782 };
783 };
784
785
791 {
792 protected:
794 ContactElement(uint8_t *ptr, size_t size);
795
796 public:
798 ContactElement(uint8_t *ptr);
799
801 static constexpr unsigned int size() { return 0x025; }
802
804 QString name() const;
806 void setName(const QString &name);
807
809 DMRContact::Type type() const;
812
814 unsigned int id() const;
816 void setID(unsigned int id);
817
819 DMRContact *toContact(Context &ctx, const ErrorStack &err=ErrorStack());
821 bool encode(const DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack());
822
823 public:
825 struct Limit {
827 static constexpr unsigned int nameLength() { return 16; }
828 };
829
830 protected:
832 struct Offset {
834 static constexpr unsigned int name() { return 0x0000; }
835 static constexpr unsigned int type() { return 0x0020; }
836 static constexpr unsigned int id() { return 0x0021; }
838 };
839 };
840
841
849 {
850 protected:
852 ContactBankElement(uint8_t *ptr, size_t size);
853
854 public:
856 ContactBankElement(uint8_t *ptr);
857
859 static constexpr unsigned int size() { return 0x9c02; }
860
862 bool createContacts(Context &ctx, const ErrorStack &err);
864 bool encode(Context &ctx, const ErrorStack &err);
865
866 public:
868 struct Limit {
870 static constexpr unsigned int contactCount() { return 1024; }
871 };
872
873 protected:
875 struct Offset {
877 static constexpr unsigned int contactCount() { return 0x0000; }
878 static constexpr unsigned int contacts() { return 0x0802; }
879 static constexpr unsigned int betweenContacts() { return ContactElement::size(); }
881 };
882 };
883
884
890 {
891 protected:
893 GroupListElement(uint8_t *ptr, size_t size);
894
895 public:
897 GroupListElement(uint8_t *ptr);
898
900 static constexpr unsigned int size() { return 0x0053; }
901
903 QString name() const;
905 void setName(const QString &name);
906
908 unsigned int members() const;
910 bool hasMember(unsigned int i) const;
912 unsigned int memberIndex(unsigned int i) const;
913
917 bool linkGroupList(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack());
919 bool encode(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack());
920
921 public:
923 struct Limit {
925 static constexpr unsigned int nameLength() { return 8; }
927 static constexpr unsigned int memberCount() { return 33; }
928 };
929
930 protected:
932 struct Offset {
934 static constexpr unsigned int name() { return 0x0000; }
935 static constexpr unsigned int memberCount() { return 0x0010; }
936 static constexpr unsigned int members() { return 0x0011; }
937 static constexpr unsigned int betweenMembers() { return 0x0002; }
939 };
940 };
941
942
950 {
951 protected:
953 GroupListBankElement(uint8_t *ptr, size_t size);
954
955 public:
957 GroupListBankElement(uint8_t *ptr);
958
960 static constexpr unsigned int size() { return 0x510f; }
961
963 bool createGroupLists(Context &ctx, const ErrorStack &err);
965 bool linkGroupLists(Context &ctx, const ErrorStack &err);
967 bool encode(Context &ctx, const ErrorStack &err);
968
969 public:
971 struct Limit {
973 static constexpr unsigned int memberCount() { return 250; }
974 };
975
976 protected:
978 struct Offset {
980 static constexpr unsigned int memberCount() { return 0x0000; }
981 static constexpr unsigned int members() { return 0x0001; }
982 static constexpr unsigned int betweenMembers() { return GroupListElement::size(); }
984 };
985 };
986
987
993 {
994 public:
996 enum class ChannelMode {
997 None=0, Fixed=1, Selected=2
998 };
999
1000 protected:
1002 ScanListElement(uint8_t *ptr, size_t size);
1003
1004 public:
1006 ScanListElement(uint8_t *ptr);
1007
1009 static constexpr unsigned int size() { return 0x005f; }
1010
1012 QString name() const;
1014 void setName(const QString &name);
1015
1021 bool hasPrimaryZoneIndex() const;
1023 unsigned int primaryZoneIndex() const;
1025 void setPrimaryZoneIndex(unsigned int idx);
1027 void clearPrimaryZoneIndex();
1029 bool hasPrimaryChannelIndex() const;
1031 unsigned int primaryChannelIndex() const;
1033 void setPrimaryChannelIndex(unsigned int idx);
1036
1042 bool hasSecondaryZoneIndex() const;
1044 unsigned int secondaryZoneIndex() const;
1046 void setSecondaryZoneIndex(unsigned int idx);
1050 bool hasSecondaryChannelIndex() const;
1052 unsigned int secondaryChannelIndex() const;
1054 void setSecondaryChannelIndex(unsigned int idx);
1057
1063 bool hasRevertZoneIndex() const;
1065 unsigned int revertZoneIndex() const;
1067 void setRevertZoneIndex(unsigned int idx);
1069 void clearRevertZoneIndex();
1071 bool hasRevertChannelIndex() const;
1073 unsigned int revertChannelIndex() const;
1075 void setRevertChannelIndex(unsigned int idx);
1078
1080 Interval rxHoldTime() const;
1082 void setRXHoldTime(const Interval &interval);
1084 Interval txHoldTime() const;
1086 void setTXHoldTime(const Interval &interval);
1087
1089 ScanList *toScanList(Context &ctx, const ErrorStack &err=ErrorStack());
1091 bool linkScanList(ScanList *lst, Context&ctx, const ErrorStack &err=ErrorStack());
1093 bool encode(ScanList *lst, Context&ctx, const ErrorStack &err=ErrorStack());
1094
1095 public:
1097 struct Limit {
1099 static constexpr unsigned int nameLength() { return 8; }
1101 static constexpr unsigned int memberCount() { return 32; }
1103 static TimeRange holdTime() {
1104 return TimeRange{Interval::fromSeconds(0), Interval::fromSeconds(10)};
1105 }
1106 };
1107
1108 protected:
1110 struct Offset {
1112 static constexpr unsigned int name() { return 0x0000; }
1113 static constexpr unsigned int memberCount() { return 0x0010; }
1114 static constexpr unsigned int members() { return 0x0011; }
1115 static constexpr unsigned int betweenMembers() { return 0x0002; }
1116 static constexpr unsigned int priChannel1Mode() { return 0x0051; }
1117 static constexpr unsigned int priChannel2Mode() { return 0x0052; }
1118 static constexpr unsigned int priChannel1Zone() { return 0x0053; }
1119 static constexpr unsigned int priChannel2Zone() { return 0x0054; }
1120 static constexpr unsigned int priChannel1Channel() { return 0x0055; }
1121 static constexpr unsigned int priChannel2Channel() { return 0x0057; }
1122 static constexpr unsigned int txChannelMode() { return 0x0059; }
1123 static constexpr unsigned int txChannelZone() { return 0x005a; }
1124 static constexpr unsigned int txChannelChannel() { return 0x005b; }
1125 static constexpr unsigned int holdTime() { return 0x005d; }
1126 static constexpr unsigned int txHoldTime() { return 0x005e; }
1128 };
1129 };
1130
1131
1139 {
1140 protected:
1142 ScanListBankElement(uint8_t *ptr, size_t size);
1143
1144 public:
1146 ScanListBankElement(uint8_t *ptr);
1147
1149 static constexpr unsigned int size() { return 0x601; }
1150
1152 bool createScanLists(Context &ctx, const ErrorStack &err);
1154 bool linkScanLists(Context &ctx, const ErrorStack &err);
1156 bool encode(Context &ctx, const ErrorStack &err);
1157
1158 public:
1160 struct Limit {
1162 static constexpr unsigned int memberCount() { return 16; }
1163 };
1164
1165 protected:
1167 struct Offset {
1169 static constexpr unsigned int memberCount() { return 0x0000; }
1170 static constexpr unsigned int members() { return 0x0011; }
1171 static constexpr unsigned int betweenMembers() { return ScanListElement::size(); }
1173 };
1174 };
1175
1176
1182 {
1183 protected:
1185 DMRSettingsElement(uint8_t *ptr, size_t size);
1186
1187 public:
1189 DMRSettingsElement(uint8_t *ptr);
1190
1192 static constexpr unsigned int size() { return 0x000e; }
1193
1195 Interval callHangTime() const;
1197 void setCallHangTime(const Interval &intv);
1198
1200 Interval activeWaitTime() const;
1202 void setActiveWaitTime(const Interval &interval);
1204 unsigned int activeRetries() const;
1206 void setActiveRetries(unsigned int count);
1207
1209 unsigned int txPreambles() const;
1211 void setTXPreambles(unsigned int count);
1212
1214 bool decodeDisableRadioEnabled() const;
1216 void enableDecodeDisableRadio(bool enable);
1218 bool decodeRadioCheckEnabled() const;
1220 void enableDecodeRadioCheck(bool enable);
1222 bool decodeEnableRadioEnabled() const;
1224 void enableDecodeEnableRadio(bool enable);
1225
1227 bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1229 bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1230
1231 public:
1233 struct Limit {
1235 static constexpr TimeRange callHangTime() { return TimeRange{
1237 }; }
1238
1239 static constexpr TimeRange activeWaitTime() { return TimeRange{
1241 }; }
1242
1243 static constexpr IntRange activeRetires() { return IntRange{ 1, 10}; }
1245 static constexpr IntRange txPreambles() { return IntRange{ 0, 63}; }
1246 };
1247
1248 protected:
1250 struct Offset {
1252 static constexpr unsigned int callHangTime() { return 0x0000; }
1253 static constexpr unsigned int activeWaitTime() { return 0x0001; }
1254 static constexpr unsigned int activeRetries() { return 0x0002; }
1255 static constexpr unsigned int txPreambles() { return 0x0003; }
1256 static constexpr unsigned int decodeDisableRadio() { return 0x0004; }
1257 static constexpr unsigned int decodeCheckRadio() { return 0x0005; }
1258 static constexpr unsigned int decodeEnableRadio() { return 0x0006; }
1260 };
1261 };
1262
1263
1269 {
1270 protected:
1272 EncryptionKeyElement(uint8_t *ptr, size_t size);
1273
1274 public:
1276 EncryptionKeyElement(uint8_t *ptr);
1277
1279 static constexpr unsigned int size() { return 0x005; }
1280
1281 void clear();
1282 bool isValid() const;
1283
1285 unsigned int keySize() const;
1287 void setKeySize(unsigned int size);
1288
1293
1294 protected:
1296 struct Offset {
1298 static constexpr unsigned int size() { return 0x0000; }
1299 static constexpr unsigned int key() { return 0x0001; }
1301 };
1302 };
1303
1304
1310 {
1311 protected:
1313 EncryptionKeyBankElement(uint8_t *ptr, size_t size);
1314
1315 public:
1317 EncryptionKeyBankElement(uint8_t *ptr);
1318
1320 static constexpr unsigned int size() { return 0x0050; }
1321
1323 bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1325 bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1326
1327 public:
1329 struct Limit {
1331 static constexpr unsigned int keys() { return 16; }
1332 };
1333
1334 protected:
1336 struct Offset {
1338 static constexpr unsigned int keys() { return 0x0000; }
1339 static constexpr unsigned int betweenKeys() { return EncryptionKeyElement::size(); }
1341 };
1342 };
1343
1344
1349 {
1350 protected:
1352 MessageElement(uint8_t *ptr, size_t size);
1353
1354 public:
1356 MessageElement(uint8_t *ptr);
1357
1359 static constexpr unsigned int size() { return 0x051; }
1360
1362 QString text() const;
1364 void setText(const QString &message);
1365
1367 bool encode(SMSTemplate *message, const ErrorStack &err=ErrorStack());
1369 SMSTemplate *decode(const ErrorStack &err=ErrorStack());
1370
1371 public:
1373 struct Limit {
1375 static constexpr unsigned int messageLength() { return 40; }
1376 };
1377
1378 protected:
1380 struct Offset {
1382 static constexpr unsigned int size() { return 0x0000; }
1383 static constexpr unsigned int text() { return 0x0001; }
1385 };
1386 };
1387
1388
1396 {
1397 protected:
1399 MessageBankElement(uint8_t *ptr, size_t size);
1400
1401 public:
1403 MessageBankElement(uint8_t *ptr);
1404
1406 static constexpr unsigned int size() { return 0x511; }
1407
1409 unsigned int memberCount() const;
1411 void setMemberCount(unsigned int count);
1412
1414 MessageElement message(unsigned int i);
1415
1417 bool decode(SMSExtension *ext, const ErrorStack &err=ErrorStack());
1419 bool encode(const SMSExtension *ext, const ErrorStack &err=ErrorStack());
1420
1421 public:
1423 struct Limit {
1425 static constexpr unsigned int memberCount() { return 16; }
1426 };
1427
1428 protected:
1430 struct Offset {
1432 static constexpr unsigned int memberCount() { return 0x0000; }
1433 static constexpr unsigned int members() { return 0x0001; }
1434 static constexpr unsigned int betweenMembers() { return MessageElement::size(); }
1436 };
1437 };
1438
1439
1444 {
1445 protected:
1447 DTMFSystemElement(uint8_t *ptr, size_t size);
1448
1449 public:
1451 DTMFSystemElement(uint8_t *ptr);
1452
1454 static constexpr unsigned int size() { return 0x005; }
1455
1456 public:
1458 struct Limit {
1460 static constexpr Interval preambleDuration() { return Interval::fromMilliseconds(1000); }
1462 static constexpr TimeRange toneDuration() { return TimeRange{
1464 }; }
1465
1466 static constexpr TimeRange pauseDuration() { return TimeRange{
1468 }; }
1469
1470 static constexpr TimeRange deadTime() { return TimeRange{
1472 }; }
1473 };
1474
1475 protected:
1477 struct Offset {
1479 static constexpr unsigned int sidetone() { return 0x0000; }
1480 static constexpr unsigned int preambleDuration() { return 0x0001; }
1481 static constexpr unsigned int toneDuration() { return 0x0002; }
1482 static constexpr unsigned int pauseDuration() { return 0x0003; }
1483 static constexpr unsigned int deadTime() { return 0x0004; }
1485 };
1486 };
1487
1488
1492 {
1493 protected:
1495 DTMFSystemBankElement(uint8_t *ptr, size_t size);
1496
1497 public:
1500
1502 static constexpr unsigned int size() { return 0x0014; }
1503
1504 public:
1506 struct Limit {
1508 static constexpr unsigned int memberCount() { return 4; }
1509 };
1510
1511 protected:
1513 struct Offset {
1515 static constexpr unsigned int members() { return 0x0000; }
1516 static constexpr unsigned int betweenMembers() { return DTMFSystemElement::size(); }
1518 };
1519 };
1520
1521
1526 {
1527 protected:
1529 DTMFNumberElement(uint8_t *ptr, size_t size);
1530
1531 public:
1533 DTMFNumberElement(uint8_t *ptr);
1534
1536 static constexpr unsigned int size() { return 0x000a; }
1537
1538 public:
1540 struct Limit {
1542 static constexpr unsigned int digits() { return 16; }
1543 };
1544
1545 protected:
1547 struct Offset {
1549 static constexpr unsigned int count() { return 0x0000; }
1550 static constexpr unsigned int digits() { return 0x0001; }
1552 };
1553 };
1554
1555
1559 {
1560 protected:
1562 DTMFNumberBankElement(uint8_t *ptr, size_t size);
1563
1564 public:
1567
1569 static constexpr unsigned int size() { return 0x0090; }
1570
1571 public:
1573 struct Limit {
1575 static constexpr unsigned int memberCount() { return 16; }
1576 };
1577
1578 protected:
1580 struct Offset {
1582 static constexpr unsigned int members() { return 0x0000; }
1583 static constexpr unsigned int betweenMembers() { return DTMFNumberElement::size(); }
1585 };
1586 };
1587
1588
1593 {
1594 protected:
1596 DTMFPTTSettingElement(uint8_t *ptr, size_t size);
1597
1598 public:
1601
1603 static constexpr unsigned int size() { return 0x0005; }
1604
1605 protected:
1607 struct Offset {
1609 static constexpr unsigned int systemIndex() { return 0x0000; }
1610 static constexpr unsigned int pttIDType() { return 0x0001; }
1611 static constexpr unsigned int pttIDMode() { return 0x0002; }
1612 static constexpr unsigned int connectIDIndex() { return 0x0003; }
1613 static constexpr unsigned int disconnectIDIndex() { return 0x0004; }
1615 };
1616 };
1617
1618
1622 {
1623 protected:
1625 DTMFPTTSettingBankElement(uint8_t *ptr, size_t size);
1626
1627 public:
1630
1632 static constexpr unsigned int size() { return 0x00a0; }
1633
1634 public:
1636 struct Limit {
1638 static constexpr unsigned int memberCount() { return 32; }
1639 };
1640
1641 protected:
1643 struct Offset {
1645 static constexpr unsigned int members() { return 0x0000; }
1646 static constexpr unsigned int betweenMembers() { return DTMFPTTSettingElement::size(); }
1648 };
1649 };
1650
1651public:
1653 explicit GD73Codeplug(QObject *parent = nullptr);
1654
1655 Config *preprocess(Config *config, const ErrorStack &err=ErrorStack()) const;
1656 bool postprocess(Config *config, const ErrorStack &err=ErrorStack()) const;
1657
1658 bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
1659 bool decode(Config *config, const ErrorStack &err=ErrorStack());
1660 bool encode(Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack());
1661
1662protected:
1664 virtual bool decodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack());
1666 virtual bool encodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack());
1667
1669 virtual bool createMessages(Context &ctx, const ErrorStack &err=ErrorStack());
1671 virtual bool encodeMessages(Context &ctx, const ErrorStack &err=ErrorStack());
1672
1674 virtual bool decodeSettings(Context &ctx, const ErrorStack &err=ErrorStack());
1676 virtual bool encodeSettings(Context &ctx, const ErrorStack &err=ErrorStack());
1677
1679 virtual bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1681 virtual bool encodeContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1682
1684 virtual bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1685
1687 virtual bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1689 virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1691 virtual bool encodeGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1692
1694 virtual bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1696 virtual bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1697
1699 virtual bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1701 virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1703 virtual bool encodeChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1704
1706 virtual bool createZones(Context &ctx, const ErrorStack &err=ErrorStack());
1708 virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack());
1710 virtual bool encodeZones(Context &ctx, const ErrorStack &err=ErrorStack());
1711
1713 virtual bool createScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1715 virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1717 virtual bool encodeScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1718
1719protected:
1721 struct Offset {
1723 static constexpr unsigned int timestamp() { return 0x00000; }
1724 static constexpr unsigned int settings() { return 0x00061; }
1725 static constexpr unsigned int zones() { return 0x0010b; }
1726 static constexpr unsigned int channels() { return 0x00d4c; }
1727 static constexpr unsigned int contacts() { return 0x125ff; }
1728 static constexpr unsigned int groupLists() { return 0x1c201; }
1729 static constexpr unsigned int scanLists() { return 0x21310; }
1730 static constexpr unsigned int dmrSettings() { return 0x21911; }
1731 static constexpr unsigned int encryptionKeys() { return 0x2191f; }
1732 static constexpr unsigned int messages() { return 0x2196f; }
1733 static constexpr unsigned int dtmfSystems() { return 0x21e80; }
1734 static constexpr unsigned int dtmfNumbers() { return 0x21e94; }
1735 static constexpr unsigned int dtmfPTTSettings() { return 0x21f24; }
1737 };
1738};
1739
1740
1741#endif // GD73CODEPLUG_HH
Represents a DMR (basic) encryption key.
Definition encryptionextension.hh:47
BootDisplay
What to display during boot.
Definition bootsettings.hh:50
The base class of all channels (analog and digital) of a codeplug configuration.
Definition channel.hh:38
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition channel.hh:65
Base class for all codeplug contexts.
Definition codeplug.hh:331
Element(uint8_t *ptr, size_t size)
Hidden constructor.
Definition codeplug.cc:56
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:24
Codeplug(QObject *parent=nullptr)
Hidden default constructor.
Definition codeplug.cc:872
The config class, representing the codeplug configuration.
Definition config.hh:70
Represents a single image within a DFUFile.
Definition dfufile.hh:121
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:448
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 a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
Bandwidth
Possible bandwidth of an analog channel.
Definition channel.hh:288
bool linkChannels(Context &ctx, const ErrorStack &err)
Link all decoded channels.
Definition gd73_codeplug.cc:1268
static constexpr unsigned int size()
Returns the size of the channel bank.
Definition gd73_codeplug.hh:758
ChannelBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1239
bool encode(Context &ctx, const ErrorStack &err)
Encodes all indexed channels.
Definition gd73_codeplug.cc:1282
bool createChannels(Context &ctx, const ErrorStack &err)
Creates the encoded channels, also updates context.
Definition gd73_codeplug.cc:1252
bool scanAutoStartEnabled() const
Returns true if scan auto-start is enabled.
Definition gd73_codeplug.cc:1382
unsigned int txContactIndex() const
Returns the tx contact index.
Definition gd73_codeplug.cc:1584
Admit admit() const
Returns the admit criterion.
Definition gd73_codeplug.cc:1449
Channel * toChannel(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the channel.
Definition gd73_codeplug.cc:1631
Frequency txFrequency() const
Returns the TX frequency.
Definition gd73_codeplug.cc:1400
void setColorCode(unsigned int cc)
Sets the color code.
Definition gd73_codeplug.cc:1550
void setEmergencySystemIndex(unsigned int idx)
Sets the emergency system index.
Definition gd73_codeplug.cc:1605
void setName(const QString &name)
Sets the channel name.
Definition gd73_codeplug.cc:1317
Channel::Power power() const
Returns the power setting.
Definition gd73_codeplug.cc:1426
bool talkaroundEnabled() const
Returns true if talkaround is enabled.
Definition gd73_codeplug.cc:1364
void setAdmit(Admit admit)
Sets the admit criterion.
Definition gd73_codeplug.cc:1453
bool hasDTMFPTTSettingsIndex() const
Returns true if channel has DTMF PTT settings index.
Definition gd73_codeplug.cc:1409
bool groupListAllMatch() const
Returns true, if no group list match is needed (monitor).
Definition gd73_codeplug.cc:1559
void setGroupListIndex(unsigned int idx)
Sets the group list index.
Definition gd73_codeplug.cc:1567
Type
Possible channel types.
Definition gd73_codeplug.hh:552
Type type() const
Returns the channel type.
Definition gd73_codeplug.cc:1355
void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition gd73_codeplug.cc:1626
void clearScanListIndex()
Clears the scan list index.
Definition gd73_codeplug.cc:1350
void enableTalkaround(bool enable)
Enable/disable talkaround.
Definition gd73_codeplug.cc:1368
QString name() const
Returns the name of the channel.
Definition gd73_codeplug.cc:1313
unsigned int groupListIndex() const
Returns the group list index.
Definition gd73_codeplug.cc:1563
void setTXTone(const SelectiveCall &code)
Sets the TX tone.
Definition gd73_codeplug.cc:1508
bool hasTXContact() const
Returns true, if the transmit contact is set.
Definition gd73_codeplug.cc:1580
unsigned int dtmfPTTSettingsIndex() const
Returns the DTMF PTT settings index.
Definition gd73_codeplug.cc:1413
void setRXTone(const SelectiveCall &code)
Sets the RX tone.
Definition gd73_codeplug.cc:1474
bool hasScanListIndex() const
Returns true, if a scan list index is set.
Definition gd73_codeplug.cc:1338
unsigned int colorCode() const
Returns the color code.
Definition gd73_codeplug.cc:1546
SelectiveCall rxTone() const
Returns the RX tone.
Definition gd73_codeplug.cc:1458
void setScanListIndex(unsigned int idx)
Sets the scan list index.
Definition gd73_codeplug.cc:1346
FMChannel::Bandwidth bandwidth() const
Returns the bandwidth of the channel.
Definition gd73_codeplug.cc:1322
unsigned int emergencySystemIndex() const
Returns the emergency system index.
Definition gd73_codeplug.cc:1601
void setType(Type type)
Sets the channel type.
Definition gd73_codeplug.cc:1359
void clearEmergencySystemIndex()
Clears the emergency system index.
Definition gd73_codeplug.cc:1609
void setDTMFPTTSettingsIndex(unsigned int idx)
Sets the DTMF PTT settings index.
Definition gd73_codeplug.cc:1417
unsigned int scanListIndex() const
Returns the index of the scan list.
Definition gd73_codeplug.cc:1342
Admit
Possible admit criteria.
Definition gd73_codeplug.hh:556
void clearTXContactIndex()
Clears the transmit contact index.
Definition gd73_codeplug.cc:1592
void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition gd73_codeplug.cc:1538
void clearDTMFPTTSettingsIndex()
Resets the DTMF PTT settings index.
Definition gd73_codeplug.cc:1421
void setBandwidth(FMChannel::Bandwidth bandwidth)
Sets the bandwidth.
Definition gd73_codeplug.cc:1330
bool groupListMatchesContact() const
Returns true, if group list matches current TX contact.
Definition gd73_codeplug.cc:1555
unsigned int encryptionKeyIndex() const
Returns the encryption key index.
Definition gd73_codeplug.cc:1618
void setGroupListAllMatch()
Enables, that no group list match is needed (monitor).
Definition gd73_codeplug.cc:1571
bool hasEmergencySystemIndex() const
Returns true if an emergency system index is set.
Definition gd73_codeplug.cc:1597
bool rxOnly() const
Returns true if RX only is enabled.
Definition gd73_codeplug.cc:1373
void enableScanAutoStart(bool enable)
Enables/disables scan auto-start.
Definition gd73_codeplug.cc:1386
void setTXContactIndex(unsigned int idx)
Sets the transmit contact index.
Definition gd73_codeplug.cc:1588
bool hasEncryptionKeyIndex() const
Returns true if an encryption key index is set.
Definition gd73_codeplug.cc:1614
DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition gd73_codeplug.cc:1526
void setPower(Channel::Power power)
Sets the power.
Definition gd73_codeplug.cc:1434
Frequency rxFrequency() const
Returns the RX frequency.
Definition gd73_codeplug.cc:1391
void setTXFrequency(const Frequency &f)
Sets the TX frequency.
Definition gd73_codeplug.cc:1404
void setRXFrequency(const Frequency &f)
Sets the RX frequency.
Definition gd73_codeplug.cc:1395
void setEncryptionKeyIndex(unsigned int idx)
Sets the encryption key index.
Definition gd73_codeplug.cc:1622
ChannelElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1300
static constexpr unsigned int size()
Returns the size of the channel element.
Definition gd73_codeplug.hh:565
bool linkChannel(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack())
Links decoded channel.
Definition gd73_codeplug.cc:1672
bool encode(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given channel.
Definition gd73_codeplug.cc:1719
void setGroupListMatchesContact()
Enables, that the group list matches the current TX contact.
Definition gd73_codeplug.cc:1575
SelectiveCall txTone() const
Returns the TX tone.
Definition gd73_codeplug.cc:1492
void enableRXOnly(bool enable)
Enables/disables RX only.
Definition gd73_codeplug.cc:1377
ContactBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:973
bool createContacts(Context &ctx, const ErrorStack &err)
Adds all encoded contacts, also updates the context.
Definition gd73_codeplug.cc:986
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:859
bool encode(Context &ctx, const ErrorStack &err)
Encodes all defined contacts.
Definition gd73_codeplug.cc:1002
DMRContact::Type type() const
Returns the contact type.
Definition gd73_codeplug.cc:1050
void setName(const QString &name)
Sets the name of the contact.
Definition gd73_codeplug.cc:1045
unsigned int id() const
Returns the DMR ID.
Definition gd73_codeplug.cc:1068
void setType(DMRContact::Type type)
Sets the contact type.
Definition gd73_codeplug.cc:1059
ContactElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1028
DMRContact * toContact(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the contact.
Definition gd73_codeplug.cc:1077
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:801
QString name() const
Returns the name of the contact.
Definition gd73_codeplug.cc:1041
void setID(unsigned int id)
Sets the DMR ID.
Definition gd73_codeplug.cc:1072
bool encode(const DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given contact.
Definition gd73_codeplug.cc:1083
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1192
bool decodeRadioCheckEnabled() const
Returns true, if decoding of 'radio check' is enabled.
Definition gd73_codeplug.cc:710
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the settings within the config.
Definition gd73_codeplug.cc:727
bool decodeEnableRadioEnabled() const
Returns true, if decoding of 'enable radio' is enabled.
Definition gd73_codeplug.cc:718
void setCallHangTime(const Interval &intv)
Sets the call hang time (private & group).
Definition gd73_codeplug.cc:671
Interval callHangTime() const
Returns the call hang time (private & group).
Definition gd73_codeplug.cc:667
unsigned int txPreambles() const
Returns the number of TX preambles.
Definition gd73_codeplug.cc:693
unsigned int activeRetries() const
Returns the number of active reties.
Definition gd73_codeplug.cc:684
void setActiveRetries(unsigned int count)
Sets the number of active retries.
Definition gd73_codeplug.cc:688
void setActiveWaitTime(const Interval &interval)
Sets the active wait time.
Definition gd73_codeplug.cc:679
bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the given config.
Definition gd73_codeplug.cc:737
bool decodeDisableRadioEnabled() const
Returns true, if decoding of 'disable radio' is enabled.
Definition gd73_codeplug.cc:702
Interval activeWaitTime() const
Returns the active wait time.
Definition gd73_codeplug.cc:675
void enableDecodeDisableRadio(bool enable)
Enables/disables decoding of 'disable radio'.
Definition gd73_codeplug.cc:706
void enableDecodeEnableRadio(bool enable)
Enables/disables decoding of 'enable radio'.
Definition gd73_codeplug.cc:722
DMRSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:654
void setTXPreambles(unsigned int count)
Sets the number of TX preambles.
Definition gd73_codeplug.cc:697
void enableDecodeRadioCheck(bool enable)
Enables/disables decoding of 'radio check'.
Definition gd73_codeplug.cc:714
DTMFNumberBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
DTMFNumberBankElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1569
DTMFNumberElement(uint8_t *ptr, size_t size)
Hidden constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1536
DTMFNumberElement(uint8_t *ptr)
Constructor.
DTMFPTTSettingBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
DTMFPTTSettingBankElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1632
DTMFPTTSettingElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1603
DTMFPTTSettingElement(uint8_t *ptr, size_t size)
Hidden constructor.
DTMFSystemBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1502
DTMFSystemBankElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1454
DTMFSystemElement(uint8_t *ptr, size_t size)
Hidden constructor.
DTMFSystemElement(uint8_t *ptr)
Constructor.
bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes encryption keys.
Definition gd73_codeplug.cc:845
EncryptionKeyBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:814
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1320
bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes and create encryption keys.
Definition gd73_codeplug.cc:827
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1279
void clear()
Abstract method to reset the element within the codeplug.
Definition gd73_codeplug.cc:763
BasicEncryptionKey * createEncryptionKey(const ErrorStack &err=ErrorStack()) const
Decodes the encryption key.
Definition gd73_codeplug.cc:782
unsigned int keySize() const
Returns the key size in bits.
Definition gd73_codeplug.cc:773
bool encodeEncryptionKey(BasicEncryptionKey *key, const ErrorStack &err=ErrorStack())
Encodes the encryption key.
Definition gd73_codeplug.cc:797
void setKeySize(unsigned int size)
Sets the key size in bits.
Definition gd73_codeplug.cc:777
EncryptionKeyElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:750
bool isValid() const
Returns true if the pointer is not null.
Definition gd73_codeplug.cc:768
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:960
GroupListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1095
bool linkGroupLists(Context &ctx, const ErrorStack &err)
Link all decoded group lists.
Definition gd73_codeplug.cc:1124
bool createGroupLists(Context &ctx, const ErrorStack &err)
Create all encoded group lists, also update context.
Definition gd73_codeplug.cc:1108
bool encode(Context &ctx, const ErrorStack &err)
Encode group lists.
Definition gd73_codeplug.cc:1138
QString name() const
Returns the name of the group list.
Definition gd73_codeplug.cc:1173
RXGroupList * toGroupList(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the group list.
Definition gd73_codeplug.cc:1195
bool encode(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the group list.
Definition gd73_codeplug.cc:1219
unsigned int memberIndex(unsigned int i) const
Returns the i-th member index.
Definition gd73_codeplug.cc:1190
unsigned int members() const
Returns the number of entries in the group list.
Definition gd73_codeplug.cc:1182
bool hasMember(unsigned int i) const
Returns true, if the i-th member is set.
Definition gd73_codeplug.cc:1186
void setName(const QString &name)
Sets the name of the group list.
Definition gd73_codeplug.cc:1177
bool linkGroupList(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Links the given RX group list.
Definition gd73_codeplug.cc:1201
GroupListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1160
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:900
QString deviceID() const
Returns the device id.
Definition gd73_codeplug.cc:101
void setTimestamp(const QDateTime &timestamp)
Sets the timestamp of the last programming.
Definition gd73_codeplug.cc:80
FrequencyRange frequencyRange() const
Returns the frequency range, supported by the radio.
Definition gd73_codeplug.cc:50
QString serial() const
Returns the serial number as a string.
Definition gd73_codeplug.cc:91
QDateTime timestamp() const
Returns the timestamp of the last programming.
Definition gd73_codeplug.cc:71
void setFrequencyRange(const FrequencyRange &range)
Overrides the frequency range settings.
Definition gd73_codeplug.cc:60
QString softwareVersion() const
Returns the software version as a string.
Definition gd73_codeplug.cc:111
QString modelNumber() const
Returns the model number as a string.
Definition gd73_codeplug.cc:106
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:73
InformationElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:37
QString modelName() const
Returns the model name.
Definition gd73_codeplug.cc:96
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1406
unsigned int memberCount() const
Returns the member count.
Definition gd73_codeplug.cc:924
bool encode(const SMSExtension *ext, const ErrorStack &err=ErrorStack())
Encodes all messages defined within the SMS extension.
Definition gd73_codeplug.cc:955
void setMemberCount(unsigned int count)
Sets the member count.
Definition gd73_codeplug.cc:928
MessageElement message(unsigned int i)
Returns the i-th message.
Definition gd73_codeplug.cc:933
bool decode(SMSExtension *ext, const ErrorStack &err=ErrorStack())
Updates the SMS extension by decoding all defined messages.
Definition gd73_codeplug.cc:939
MessageBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:911
Implements a message.
Definition gd73_codeplug.hh:1349
MessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:864
SMSTemplate * decode(const ErrorStack &err=ErrorStack())
Creates a SMS template from this message.
Definition gd73_codeplug.cc:898
QString text() const
Returns the message text.
Definition gd73_codeplug.cc:877
void setText(const QString &message)
Set message text.
Definition gd73_codeplug.cc:883
bool encode(SMSTemplate *message, const ErrorStack &err=ErrorStack())
Sets a message element from an SMS message.
Definition gd73_codeplug.cc:890
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1359
Implements one of the 5 one-touch settings elements.
Definition gd73_codeplug.hh:138
Action
Possible one-touch actions.
Definition gd73_codeplug.hh:141
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:154
OneTouchSettingElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:638
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1149
ScanListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1901
bool createScanLists(Context &ctx, const ErrorStack &err)
Creates all encoded scan lists, also updates context.
Definition gd73_codeplug.cc:1914
bool linkScanLists(Context &ctx, const ErrorStack &err)
Links all decoded scan lists.
Definition gd73_codeplug.cc:1930
bool encode(Context &ctx, const ErrorStack &err)
Encodes all scan lists.
Definition gd73_codeplug.cc:1944
void clearSecondaryZoneIndex()
Clears the secondary zone index.
Definition gd73_codeplug.cc:2045
void setSecondaryChannelIndex(unsigned int idx)
Sets the secondary channel index.
Definition gd73_codeplug.cc:2057
void setPrimaryChannelMode(ChannelMode mode)
Sets the primary channel mode.
Definition gd73_codeplug.cc:1988
bool hasPrimaryZoneIndex() const
Returns true, if a primary zone is set.
Definition gd73_codeplug.cc:1992
void setRevertChannelIndex(unsigned int idx)
Sets the revert channel index.
Definition gd73_codeplug.cc:2098
bool encode(ScanList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the scan list.
Definition gd73_codeplug.cc:2180
void clearSecondaryChannelIndex()
Clears the secondary channel index.
Definition gd73_codeplug.cc:2061
bool hasPrimaryChannelIndex() const
Returns true, if a primary channel is set.
Definition gd73_codeplug.cc:2008
unsigned int revertChannelIndex() const
Returns the revert channel index.
Definition gd73_codeplug.cc:2094
QString name() const
Returns the name of the scan list.
Definition gd73_codeplug.cc:1975
void setSecondaryZoneIndex(unsigned int idx)
Sets the secondary zone index.
Definition gd73_codeplug.cc:2041
void clearRevertZoneIndex()
Clears the revert zone index.
Definition gd73_codeplug.cc:2086
Interval txHoldTime() const
Returns the TX hold time.
Definition gd73_codeplug.cc:2116
void setTXHoldTime(const Interval &interval)
Sets the TX hold time.
Definition gd73_codeplug.cc:2120
void clearPrimaryChannelIndex()
Clears the primary channel index.
Definition gd73_codeplug.cc:2020
unsigned int revertZoneIndex() const
Returns the revert zone index.
Definition gd73_codeplug.cc:2078
void setRevertZoneIndex(unsigned int idx)
Sets the revert zone index.
Definition gd73_codeplug.cc:2082
void setSecondaryChannelMode(ChannelMode mode)
Sets the secondary channel mode.
Definition gd73_codeplug.cc:2029
void clearRevertChannelIndex()
Clears the revert channel index.
Definition gd73_codeplug.cc:2102
ChannelMode secondaryChannelMode() const
Returns the secondary channel mode.
Definition gd73_codeplug.cc:2025
ChannelMode primaryChannelMode() const
Returns the primary channel mode.
Definition gd73_codeplug.cc:1984
bool hasRevertZoneIndex() const
Returns true, if a revert zone is set.
Definition gd73_codeplug.cc:2074
unsigned int secondaryChannelIndex() const
Returns the secondary channel index.
Definition gd73_codeplug.cc:2053
unsigned int secondaryZoneIndex() const
Returns the secondary zone index.
Definition gd73_codeplug.cc:2037
bool linkScanList(ScanList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Links a decoded scan list.
Definition gd73_codeplug.cc:2131
void clearPrimaryZoneIndex()
Clears the primary zone index.
Definition gd73_codeplug.cc:2004
ChannelMode
Possible priority/revert channel modes.
Definition gd73_codeplug.hh:996
void setRevertChannelMode(ChannelMode mode)
Sets the revert channel mode.
Definition gd73_codeplug.cc:2070
void setPrimaryChannelIndex(unsigned int idx)
Sets the primary channel index.
Definition gd73_codeplug.cc:2016
Interval rxHoldTime() const
Returns the RX hold time.
Definition gd73_codeplug.cc:2107
bool hasSecondaryChannelIndex() const
Returns true, if a secondary channel is set.
Definition gd73_codeplug.cc:2049
ChannelMode revertChannelMode() const
Returns the revert channel mode.
Definition gd73_codeplug.cc:2066
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1009
void setRXHoldTime(const Interval &interval)
Sets the RX hold time.
Definition gd73_codeplug.cc:2111
unsigned int primaryZoneIndex() const
Returns the primary zone index.
Definition gd73_codeplug.cc:1996
void setName(const QString &name)
Sets the name of the scan list.
Definition gd73_codeplug.cc:1979
unsigned int primaryChannelIndex() const
Returns the primary channel index.
Definition gd73_codeplug.cc:2012
bool hasRevertChannelIndex() const
Returns true, if a revert channel is set.
Definition gd73_codeplug.cc:2090
void setPrimaryZoneIndex(unsigned int idx)
Sets the primary zone index.
Definition gd73_codeplug.cc:2000
ScanList * toScanList(Context &ctx, const ErrorStack &err=ErrorStack())
Constructs a ScanList from this element.
Definition gd73_codeplug.cc:2125
ScanListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1962
bool hasSecondaryZoneIndex() const
Returns true, if a secondary zone is set.
Definition gd73_codeplug.cc:2033
void setVOX(Level level)
Sets the VOX level [0,10].
Definition gd73_codeplug.cc:222
void enableWriteLock(bool enable)
Enables/disables write lock.
Definition gd73_codeplug.cc:307
void setFMMicGain(Level gain)
Sets the FM microphone gain [1,10].
Definition gd73_codeplug.cc:342
Interval tot() const
Returns the transmit time-out.
Definition gd73_codeplug.cc:240
RadioddityButtonSettingsExtension::Function keyFunctionShortPressP2() const
Short-press function of programmable key 2.
Definition gd73_codeplug.cc:474
void enableReadLock(bool enable)
Enables/disables read lock.
Definition gd73_codeplug.cc:290
unsigned int dmrID() const
Returns the radio ID.
Definition gd73_codeplug.cc:200
void setName(const QString &name)
Sets the radio name.
Definition gd73_codeplug.cc:195
void setDMRID(unsigned int id)
Sets the radio ID.
Definition gd73_codeplug.cc:204
Level squelch() const
Returns the squelch level [0,10].
Definition gd73_codeplug.cc:227
void setKeyFunctionLongPressP2(RadioddityButtonSettingsExtension::Function function)
Sets the long-press function of the programmable key 2.
Definition gd73_codeplug.cc:470
QString bootTextLine1() const
Returns the first line of the boot text.
Definition gd73_codeplug.cc:388
void setSquelch(Level level)
Sets the squelch level [0,10].
Definition gd73_codeplug.cc:231
void setKeyFunctionShortPressP1(RadioddityButtonSettingsExtension::Function function)
Sets the short-press function of the programmable key 1.
Definition gd73_codeplug.cc:462
Level dmrMicGain() const
Returns the DMR microphone gain [1,10].
Definition gd73_codeplug.cc:329
void setKeyToneVolume(Level vol)
Sets the key-tone volume.
Definition gd73_codeplug.cc:419
Level keyToneVolume() const
Returns the key-tone volume [0-13].
Definition gd73_codeplug.cc:415
void setBootTextLine1(const QString &line)
Sets the first line of the boot text.
Definition gd73_codeplug.cc:392
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given config.
Definition gd73_codeplug.cc:488
void setReadLockPin(const QString &pin)
Sets the read-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:298
QString bootTextLine2() const
Returns the second line of the boot text.
Definition gd73_codeplug.cc:396
bool writeLockEnabled() const
Returns true, if the write lock is enabled.
Definition gd73_codeplug.cc:303
Interval longPressDuration() const
Returns the long-press duration.
Definition gd73_codeplug.cc:441
QString readLockPin() const
Returns the read-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:294
void setBootDisplayMode(BootSettings::BootDisplay mode)
Sets the boot display mode.
Definition gd73_codeplug.cc:378
void setKeyFunctionLongPressP1(RadioddityButtonSettingsExtension::Function function)
Sets the long-press function of the programmable key 1.
Definition gd73_codeplug.cc:454
Interval loneWorkerResponseTimeout() const
Returns the lone-worker response time-out.
Definition gd73_codeplug.cc:347
RadioddityButtonSettingsExtension::Function keyFunctionShortPressP1() const
Short-press function of programmable key 1.
Definition gd73_codeplug.cc:458
RadioddityButtonSettingsExtension::Function keyFunctionLongPressP1() const
Long-press function of programmable key 1.
Definition gd73_codeplug.cc:450
void setPowerSaveTimeout(const Interval &interval)
Sets the power-save time-out.
Definition gd73_codeplug.cc:280
void setWriteLockPin(const QString &pin)
Sets the write-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:315
Language
Possible languages.
Definition gd73_codeplug.hh:201
void setTOT(const Interval &interval)
Sets the transmit time-out.
Definition gd73_codeplug.cc:247
Level fmMicGain() const
Returns the FM microphone gain [1,10].
Definition gd73_codeplug.cc:338
bool totIsSet() const
Returns true, if a transmit time-out is set.
Definition gd73_codeplug.cc:236
bool powerSaveEnabled() const
Returns true if power save is enabled.
Definition gd73_codeplug.cc:268
void enableKeyTone(bool enable)
Enables/disables the key tones.
Definition gd73_codeplug.cc:410
OneTouchSettingElement oneTouch(unsigned int n)
Returns the n-th one-touch setting.
Definition gd73_codeplug.cc:482
static constexpr unsigned int size()
Returns the size of the settings element.
Definition gd73_codeplug.hh:214
BootSettings::BootDisplay bootDisplayMode() const
Returns the boot display mode.
Definition gd73_codeplug.cc:367
Language language() const
Returns the menu language.
Definition gd73_codeplug.cc:209
bool txInterruptedEnabled() const
Returns true if the TX interrupt is enabled.
Definition gd73_codeplug.cc:259
void enableTXInterrupt(bool enable)
Enables/disables the TX interrupt.
Definition gd73_codeplug.cc:263
void setBootTextLine2(const QString &line)
Sets the second line of the boot text.
Definition gd73_codeplug.cc:400
Interval powerSaveTimeout() const
Returns the power-save time-out.
Definition gd73_codeplug.cc:276
void setLoneWorkerResponseTimeout(const Interval &interval)
Sets the lone-worker response time-out.
Definition gd73_codeplug.cc:351
void enablePowerSave(bool enable)
Enables/disables power save.
Definition gd73_codeplug.cc:272
RadioddityButtonSettingsExtension::Function keyFunctionLongPressP2() const
Long-press function of programmable key 2.
Definition gd73_codeplug.cc:466
void setLanguage(Language lang)
Sets the menu language.
Definition gd73_codeplug.cc:213
QString writeLockPin() const
Returns the write-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:311
void setLoneWorkerRemindPeriod(const Interval &interval)
Sets the lone-worker remind period.
Definition gd73_codeplug.cc:360
void enableLowBatteryTone(bool enable)
Enables/disables the low-battery warn tone.
Definition gd73_codeplug.cc:428
void setLongPressDuration(const Interval &interval)
Sets the long-press duration.
Definition gd73_codeplug.cc:445
ChannelDisplayMode
Possible channel display modes.
Definition gd73_codeplug.hh:177
void setChannelDisplayMode(ChannelDisplayMode mode)
Sets the channel display mode.
Definition gd73_codeplug.cc:324
Interval loneWorkerRemindPeriod() const
Returns the lone-worker remind period.
Definition gd73_codeplug.cc:356
ChannelDisplayMode channelDisplayMode() const
Returns the channel display mode.
Definition gd73_codeplug.cc:320
unsigned int lowBatteryToneVolume() const
Returns the low-battery warn-tone volume [0-13].
Definition gd73_codeplug.cc:432
void setKeyFunctionShortPressP2(RadioddityButtonSettingsExtension::Function function)
Sets the short-press function of the programmable key 2.
Definition gd73_codeplug.cc:478
void clearTOT()
Disables transmit time-out.
Definition gd73_codeplug.cc:254
void setDMRMicGain(Level gain)
Sets the DMR microphone gain [1,10].
Definition gd73_codeplug.cc:333
bool readLockEnabled() const
Returns true, if the read lock is enabled.
Definition gd73_codeplug.cc:286
bool lowBatteryToneEnabled() const
Returns true if the low-battery warn tone is enabled.
Definition gd73_codeplug.cc:424
SettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:178
BootDisplayMode
Possible boot display modes.
Definition gd73_codeplug.hh:181
bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the given config.
Definition gd73_codeplug.cc:558
Level vox() const
Returns the VOX level [0,10].
Definition gd73_codeplug.cc:218
QString name() const
Returns the radio name.
Definition gd73_codeplug.cc:191
void setLowBatteryToneVolume(unsigned int vol)
Sets the low-battery warn-tone volume.
Definition gd73_codeplug.cc:436
bool keyToneEnabled() const
Returns true if the key tones are enabled.
Definition gd73_codeplug.cc:405
bool createZones(Context &ctx, const ErrorStack &err)
Creates all encoded zones, also updates the context.
Definition gd73_codeplug.cc:1786
static constexpr unsigned int size()
Returns the size of the zone bank element.
Definition gd73_codeplug.hh:512
bool encode(Context &ctx, const ErrorStack &err)
Encodess all zones.
Definition gd73_codeplug.cc:1816
ZoneBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1773
bool linkZones(Context &ctx, const ErrorStack &err)
Links all decoded zones.
Definition gd73_codeplug.cc:1802
Zone * toZone(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the zone element.
Definition gd73_codeplug.cc:1856
void setName(const QString &name)
Sets the name of the zone.
Definition gd73_codeplug.cc:1851
bool encode(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given zone.
Definition gd73_codeplug.cc:1879
QString name() const
Returns the name of the zone.
Definition gd73_codeplug.cc:1847
bool linkZone(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack())
Links the decoded zone.
Definition gd73_codeplug.cc:1862
ZoneElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1834
static constexpr unsigned int size()
Returns the size of the zone element.
Definition gd73_codeplug.hh:459
virtual bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Create channels.
Definition gd73_codeplug.cc:2614
bool encode(Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack())
Encodes a given abstract configuration (config) to the device specific binary code-plug.
Definition gd73_codeplug.cc:2331
virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Link zones.
Definition gd73_codeplug.cc:2650
virtual bool encodeContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Encode contacts.
Definition gd73_codeplug.cc:2552
virtual bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Create encryption keys.
Definition gd73_codeplug.cc:2596
virtual bool encodeGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Encode group lists.
Definition gd73_codeplug.cc:2587
virtual bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Create group lists.
Definition gd73_codeplug.cc:2569
virtual bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Encode encryption keys.
Definition gd73_codeplug.cc:2605
virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Link group lists.
Definition gd73_codeplug.cc:2578
virtual bool encodeScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Encode zones.
Definition gd73_codeplug.cc:2686
virtual bool createZones(Context &ctx, const ErrorStack &err=ErrorStack())
Create zones.
Definition gd73_codeplug.cc:2641
virtual bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Creates contacts.
Definition gd73_codeplug.cc:2542
virtual bool decodeSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the settings fields (generic & DMR).
Definition gd73_codeplug.cc:2512
bool decode(Config *config, const ErrorStack &err=ErrorStack())
Decodes a binary codeplug to the given abstract configuration config.
Definition gd73_codeplug.cc:2390
virtual bool encodeChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Encode channels.
Definition gd73_codeplug.cc:2632
virtual bool encodeMessages(Context &ctx, const ErrorStack &err=ErrorStack())
Encode messages.
Definition gd73_codeplug.cc:2502
bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition gd73_codeplug.cc:2274
virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Link channels.
Definition gd73_codeplug.cc:2623
virtual bool encodeZones(Context &ctx, const ErrorStack &err=ErrorStack())
Encode zones.
Definition gd73_codeplug.cc:2659
virtual bool createScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Create scan lists.
Definition gd73_codeplug.cc:2668
virtual bool decodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the time-stamp field.
Definition gd73_codeplug.cc:2467
virtual bool encodeSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Encode settings fields (generic & DMR settings).
Definition gd73_codeplug.cc:2527
GD73Codeplug(QObject *parent=nullptr)
Default constructor.
Definition gd73_codeplug.cc:2224
virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Link zones.
Definition gd73_codeplug.cc:2677
bool postprocess(Config *config, const ErrorStack &err=ErrorStack()) const
Returns a post-processed configuration of the decoded config.
Definition gd73_codeplug.cc:2257
Config * preprocess(Config *config, const ErrorStack &err=ErrorStack()) const
Returns a prepared configuration for this particular radio.
Definition gd73_codeplug.cc:2232
virtual bool createMessages(Context &ctx, const ErrorStack &err=ErrorStack())
Creates messages.
Definition gd73_codeplug.cc:2492
virtual bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Creates DTMF contacts.
Definition gd73_codeplug.cc:2563
virtual bool encodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the time-stamp field.
Definition gd73_codeplug.cc:2481
Represents a time interval.
Definition interval.hh:11
static constexpr Interval fromMinutes(unsigned long long min)
Definition interval.hh:79
static constexpr Interval fromSeconds(unsigned long long s)
Definition interval.hh:76
static constexpr Interval fromMilliseconds(unsigned long long ms)
Definition interval.hh:73
Some simple class implementing a [1-10] level setting.
Definition level.hh:15
Generic representation of a RX group list.
Definition rxgrouplist.hh:14
Function
Possible function key actions.
Definition radioddity_extensions.hh:32
Simple range class representing some range in some data type.
Definition ranges.hh:14
Extension collecting all settings associated with SMS messages.
Definition smsextension.hh:55
Represents a SMS message template (pre defined message).
Definition smsextension.hh:11
Generic representation of a scan list.
Definition scanlist.hh:15
Represents a zone within the generic configuration.
Definition zone.hh:15
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:107
Some limits for the channel bank.
Definition gd73_codeplug.hh:769
static constexpr unsigned int channelCount()
Maximum number of channels.
Definition gd73_codeplug.hh:771
Internal offsets within the bank.
Definition gd73_codeplug.hh:776
Some limits for the channel.
Definition gd73_codeplug.hh:703
static constexpr unsigned int nameLength()
Maximum name length.
Definition gd73_codeplug.hh:705
Internal used offsets within the element.
Definition gd73_codeplug.hh:710
Some limits.
Definition gd73_codeplug.hh:868
static constexpr unsigned int contactCount()
The maximum number of contacts.
Definition gd73_codeplug.hh:870
Some internal offsets within the contact bank.
Definition gd73_codeplug.hh:875
Some limits.
Definition gd73_codeplug.hh:825
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:827
Some internal offsets within the contact.
Definition gd73_codeplug.hh:832
Some limits.
Definition gd73_codeplug.hh:1233
static constexpr TimeRange callHangTime()
The range of call hang times.
Definition gd73_codeplug.hh:1235
static constexpr IntRange activeRetires()
The range of active retries.
Definition gd73_codeplug.hh:1243
static constexpr IntRange txPreambles()
The maximum number of TX preambles.
Definition gd73_codeplug.hh:1245
static constexpr TimeRange activeWaitTime()
The range of active wait times.
Definition gd73_codeplug.hh:1239
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1250
Some limits.
Definition gd73_codeplug.hh:1573
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1575
Some internal offsets within the number bank.
Definition gd73_codeplug.hh:1580
Some limits.
Definition gd73_codeplug.hh:1540
static constexpr unsigned int digits()
Maximum number of digita.
Definition gd73_codeplug.hh:1542
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1547
Some limits.
Definition gd73_codeplug.hh:1636
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1638
Some internal offsets within the number bank.
Definition gd73_codeplug.hh:1643
Internal used offsets within the element.
Definition gd73_codeplug.hh:1607
Some limits.
Definition gd73_codeplug.hh:1506
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1508
Some internal offsets within the message bank.
Definition gd73_codeplug.hh:1513
Some limits.
Definition gd73_codeplug.hh:1458
static constexpr TimeRange toneDuration()
Range for tone duration.
Definition gd73_codeplug.hh:1462
static constexpr TimeRange pauseDuration()
Range for pause duration.
Definition gd73_codeplug.hh:1466
static constexpr TimeRange deadTime()
Rang of dead time.
Definition gd73_codeplug.hh:1470
static constexpr Interval preambleDuration()
Maximum preamble duration in ms.
Definition gd73_codeplug.hh:1460
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1477
Some limits.
Definition gd73_codeplug.hh:1329
static constexpr unsigned int keys()
The maximum number of keys.
Definition gd73_codeplug.hh:1331
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1336
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1296
Some limits.
Definition gd73_codeplug.hh:971
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:973
Some internal offsets within the group list bank.
Definition gd73_codeplug.hh:978
Some limits.
Definition gd73_codeplug.hh:923
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:927
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:925
Some internal offsets within the group list.
Definition gd73_codeplug.hh:932
Some limits.
Definition gd73_codeplug.hh:98
static constexpr unsigned int modelNumber()
Maximum length of model number.
Definition gd73_codeplug.hh:106
static constexpr unsigned int serial()
Maximum length of serial number.
Definition gd73_codeplug.hh:100
static constexpr unsigned int softwareVersion()
Maximum length of software version.
Definition gd73_codeplug.hh:108
static constexpr unsigned int modelName()
Maximum length of model name.
Definition gd73_codeplug.hh:102
static constexpr unsigned int deviceID()
Maximum length of device id.
Definition gd73_codeplug.hh:104
Internal offsets within the element.
Definition gd73_codeplug.hh:113
Some limits.
Definition gd73_codeplug.hh:1423
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1425
Some internal offsets within the message bank.
Definition gd73_codeplug.hh:1430
Some limits.
Definition gd73_codeplug.hh:1373
static constexpr unsigned int messageLength()
The maximum message length.
Definition gd73_codeplug.hh:1375
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1380
Internal used offsets within the codeplug.
Definition gd73_codeplug.hh:1721
Internal offsets within the element.
Definition gd73_codeplug.hh:158
Some limits.
Definition gd73_codeplug.hh:1160
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1162
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1167
Some limits.
Definition gd73_codeplug.hh:1097
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:1099
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1101
static TimeRange holdTime()
The range of hold times.
Definition gd73_codeplug.hh:1103
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1110
Possible programmable key function.
Definition gd73_codeplug.hh:185
static uint8_t encode(RadioddityButtonSettingsExtension::Function func)
Encodes the given function.
Definition gd73_codeplug.cc:120
static RadioddityButtonSettingsExtension::Function decode(uint8_t code)
Decodes the given function code.
Definition gd73_codeplug.cc:148
Code
Possible function codes.
Definition gd73_codeplug.hh:193
Some limits of the settings.
Definition gd73_codeplug.hh:365
static constexpr Range< unsigned int > micGain()
Valid range for mic gains.
Definition gd73_codeplug.hh:373
static constexpr Range< unsigned int > toneVolume()
Value range for tone-volumes.
Definition gd73_codeplug.hh:396
static constexpr Range< unsigned int > vox()
Valid VOX sensitivity levels.
Definition gd73_codeplug.hh:369
static constexpr unsigned int bootTextLine()
Maximum length of the boot text lines.
Definition gd73_codeplug.hh:394
static constexpr unsigned int name()
Maximum name length.
Definition gd73_codeplug.hh:367
static constexpr TimeRange longPressDuration()
Long-press duration range.
Definition gd73_codeplug.hh:398
static constexpr Range< unsigned int > squelch()
Valid squelch sensitivity levels.
Definition gd73_codeplug.hh:371
static constexpr TimeRange tot()
Transmit time-out range.
Definition gd73_codeplug.hh:376
static constexpr TimeRange loneWorkerResponse()
Lone-worker response time-out range.
Definition gd73_codeplug.hh:386
static constexpr TimeRange powerSaveTimeout()
Power-save timeout.
Definition gd73_codeplug.hh:380
static constexpr unsigned int pin()
Maximum read/write lock pin size.
Definition gd73_codeplug.hh:384
static constexpr TimeRange loneWorkerRemindPeriod()
Lone-worker remind period range.
Definition gd73_codeplug.hh:390
Internal offsets within the element.
Definition gd73_codeplug.hh:405
Some limits for the zone bank.
Definition gd73_codeplug.hh:523
static constexpr unsigned int zoneCount()
Maximum number of zones.
Definition gd73_codeplug.hh:525
Internal offsets within the element.
Definition gd73_codeplug.hh:530
Some limits for the element.
Definition gd73_codeplug.hh:475
static constexpr unsigned int nameLength()
Maximum name length.
Definition gd73_codeplug.hh:477
static constexpr unsigned int channelCount()
Maximum number of channels per zone.
Definition gd73_codeplug.hh:479
Internal offsets within the zone element.
Definition gd73_codeplug.hh:484
Encodes a selective call.
Definition signaling.hh:13