libdrmconf 0.13.3
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 "radioddity_extensions.hh"
12
13
14class SMSTemplate;
15class SMSExtension;
16
52class GD73Codeplug : public Codeplug
53{
54 Q_OBJECT
55
56public:
62 {
63 protected:
65 InformationElement(uint8_t *ptr, size_t size);
66
67 public:
69 InformationElement(uint8_t *ptr);
70
72 static constexpr unsigned int size() { return 0x0061; }
73
75 FrequencyRange frequencyRange() const;
77 void setFrequencyRange(const FrequencyRange &range);
78
80 QDateTime timestamp() const;
82 void setTimestamp(const QDateTime &timestamp);
83
85 QString serial() const;
87 QString modelName() const;
89 QString deviceID() const;
91 QString modelNumber() const;
93 QString softwareVersion() const;
94
95 public:
97 struct Limit {
99 static constexpr unsigned int serial() { return 16; }
101 static constexpr unsigned int modelName() { return 16; }
103 static constexpr unsigned int deviceID() { return 16; }
105 static constexpr unsigned int modelNumber() { return 16; }
107 static constexpr unsigned int softwareVersion() { return 16; }
108 };
109
110 protected:
112 struct Offset {
114 static constexpr unsigned int frequencyRange() { return 0x0000; }
115 static constexpr unsigned int dateCentury() { return 0x0001; }
116 static constexpr unsigned int dateYear() { return 0x0002; }
117 static constexpr unsigned int dateMonth() { return 0x0003; }
118 static constexpr unsigned int dateDay() { return 0x0004; }
119 static constexpr unsigned int dateHour() { return 0x0005; }
120 static constexpr unsigned int dateMinute() { return 0x0006; }
121 static constexpr unsigned int dateSecond() { return 0x0007; }
122 static constexpr unsigned int serial() { return 0x0011; }
123 static constexpr unsigned int modelName() { return 0x0021; }
124 static constexpr unsigned int deviceID() { return 0x0031; }
125 static constexpr unsigned int modelNumber() { return 0x0041; }
126 static constexpr unsigned int softwareVersion() { return 0x0051; }
128 };
129 };
130
131
137 {
138 public:
140 enum class Action {
141 Call = 0, Message = 1
142 };
143
144 protected:
146 OneTouchSettingElement(uint8_t *ptr, size_t size);
147
148 public:
150 OneTouchSettingElement(uint8_t *ptr);
151
153 static constexpr unsigned int size() { return 0x0005; }
154
155 protected:
157 struct Offset {
159 static constexpr unsigned int contact() { return 0x0001; }
160 static constexpr unsigned int action() { return 0x0003; }
161 static constexpr unsigned int message() { return 0x0001; }
163 };
164 };
165
166
173 {
174 public:
177 Name = 0, Frequency = 1
178 };
179
180 enum class BootDisplayMode {
181 Off = 0, Text = 1, Image = 2, Both = 3
182 };
183
184 struct KeyFunction {
185 public:
190 protected:
192 enum Code {
193 None=0, RadioEnable=1, RadioCheck=2, RadioDisable=3, PowerLevel=4,
194 Monitor=5, EmergencyOn=6, EmergencyOff=7, ZoneSwitch=8, ToggleScan=9, ToggleVOX=10,
195 OneTouch1=11, OneTouch2=12, OneTouch3=13, OneTouch4=14, OneTouch5=15, ToggleTalkaround=16,
196 LoneWorker=17, TBST=18, CallSwell=19
197 };
198 };
199
200 enum class Language {
201 Chinese=0, English=1
202 };
203
204 protected:
206 SettingsElement(uint8_t *ptr, size_t size);
207
208 public:
210 SettingsElement(uint8_t *ptr);
211
213 static constexpr unsigned int size() { return 0x00aa; }
214
216 QString name() const;
218 void setName(const QString &name);
219
221 unsigned int dmrID() const;
223 void setDMRID(unsigned int id);
224
226 Language language() const;
228 void setLanguage(Language lang);
229
231 unsigned int vox() const;
233 void setVOX(unsigned int level);
234
236 unsigned int squelch() const;
238 void setSquelch(unsigned int level);
239
241 bool totIsSet() const;
243 Interval tot() const;
245 void setTOT(const Interval &interval);
247 void clearTOT();
248
250 bool txInterruptedEnabled() const;
252 void enableTXInterrupt(bool enable);
253
255 bool powerSaveEnabled() const;
257 void enablePowerSave(bool enable);
261 void setPowerSaveTimeout(const Interval &interval);
262
264 bool readLockEnabled() const;
266 void enableReadLock(bool enable);
268 QString readLockPin() const;
270 void setReadLockPin(const QString &pin);
271
273 bool writeLockEnabled() const;
275 void enableWriteLock(bool enable);
277 QString writeLockPin() const;
279 void setWriteLockPin(const QString &pin);
280
285
287 unsigned int dmrMicGain() const;
289 void setDMRMicGain(unsigned int gain);
291 unsigned int fmMicGain() const;
293 void setFMMicGain(unsigned int gain);
294
298 void setLoneWorkerResponseTimeout(const Interval &interval);
302 void setLoneWorkerRemindPeriod(const Interval &interval);
303
309 QString bootTextLine1() const;
311 void setBootTextLine1(const QString &line);
313 QString bootTextLine2() const;
315 void setBootTextLine2(const QString &line);
316
318 bool keyToneEnabled() const;
320 void enableKeyTone(bool enable);
322 unsigned int keyToneVolume() const;
324 void setKeyToneVolume(unsigned int vol);
326 bool lowBatteryToneEnabled() const;
328 void enableLowBatteryTone(bool enable);
330 unsigned int lowBatteryToneVolume() const;
332 void setLowBatteryToneVolume(unsigned int vol);
333
337 void setLongPressDuration(const Interval &interval);
355 OneTouchSettingElement oneTouch(unsigned int n);
356
358 bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
360 bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
361
362 public:
364 struct Limit {
366 static constexpr unsigned int name() { return 16; }
368 static constexpr TimeRange tot() {
369 return TimeRange{Interval::fromSeconds(20), Interval::fromSeconds(500)};
370 }
371
372 static constexpr TimeRange powerSaveTimeout() {
373 return TimeRange{Interval::fromSeconds(10), Interval::fromSeconds(60)};
374 }
375
376 static constexpr unsigned int pin() { return 6; }
378 static constexpr TimeRange loneWorkerResponse() {
379 return TimeRange{Interval::fromMinutes(1), Interval::fromMinutes(480)};
380 }
381
382 static constexpr TimeRange loneWorkerRemindPeriod() {
383 return TimeRange{Interval::fromSeconds(10), Interval::fromSeconds(200)};
384 }
385
386 static constexpr unsigned int bootTextLine() { return 16; }
388 static constexpr IntRange toneVolume() { return IntRange{0,13}; }
390 static constexpr TimeRange longPressDuration() {
391 return TimeRange{Interval::fromSeconds(0), Interval::fromSeconds(31)};
392 }
393 };
394
395 protected:
397 struct Offset {
399 static constexpr unsigned int name() { return 0x0000; }
400 static constexpr unsigned int dmrId() { return 0x0020; }
401 static constexpr unsigned int language() { return 0x0024; }
402 static constexpr unsigned int voxLevel() { return 0x0026; }
403 static constexpr unsigned int squelchLevel() { return 0x0027; }
404 static constexpr unsigned int tot() { return 0x0028; }
405 static constexpr unsigned int txInterrupt() { return 0x0029; }
406 static constexpr unsigned int powerSave() { return 0x002a; }
407 static constexpr unsigned int powerSaveTimeout() { return 0x002b; }
408 static constexpr unsigned int readLockEnable() { return 0x002c; }
409 static constexpr unsigned int writeLockEnable() { return 0x002d; }
410 static constexpr unsigned int channelDisplayMode() { return 0x002f; }
411 static constexpr unsigned int readLockPin() { return 0x0030; }
412 static constexpr unsigned int writeLockPin() { return 0x0036; }
413 static constexpr unsigned int dmrMicGain() { return 0x003d; }
414 static constexpr unsigned int fmMicGain() { return 0x003f; }
415 static constexpr unsigned int loneWorkerResponseTimeout() { return 0x0040; }
416 static constexpr unsigned int loneWorkerReminderPeriod() { return 0x0042; }
417 static constexpr unsigned int bootDisplayMode() { return 0x0043; }
418 static constexpr unsigned int bootTextLine1() { return 0x0044; }
419 static constexpr unsigned int bootTextLine2() { return 0x0064; }
420 static constexpr unsigned int keyToneEnable() { return 0x0084; }
421 static constexpr unsigned int keyToneVolume() { return 0x0085; }
422 static constexpr unsigned int lowBatToneEnable() { return 0x0086; }
423 static constexpr unsigned int lowBatToneVolume() { return 0x0087; }
424 static constexpr unsigned int longPressDuration() { return 0x0088; }
425 static constexpr unsigned int progFuncKey1ShortPress() { return 0x008b; }
426 static constexpr unsigned int progFuncKey1LongPress() { return 0x008c; }
427 static constexpr unsigned int progFuncKey2ShortPress() { return 0x008d; }
428 static constexpr unsigned int progFuncKey2LongPress() { return 0x008e; }
429 static constexpr unsigned int oneTouchSettings() { return 0x0090; }
430 static constexpr unsigned int betweenOneTouchSettings() { return OneTouchSettingElement::size(); }
432 };
433 };
434
435
440 class ZoneElement: public Element
441 {
442 protected:
444 ZoneElement(uint8_t *ptr, size_t size);
445
446 public:
448 ZoneElement(uint8_t *ptr);
449
451 static constexpr unsigned int size() { return 0x0031; }
452
454 QString name() const;
456 void setName(const QString &name);
457
459 Zone *toZone(Context &ctx, const ErrorStack &err=ErrorStack());
461 bool linkZone(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack());
463 bool encode(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack());
464
465 public:
467 struct Limit {
469 static constexpr unsigned int nameLength() { return 8; }
471 static constexpr unsigned int channelCount() { return 16; }
472 };
473
474 protected:
476 struct Offset {
478 static constexpr unsigned int name() { return 0x0000; }
479 static constexpr unsigned int channeCount() { return 0x0010; }
480 static constexpr unsigned int channelIndices() { return 0x0011; }
481 static constexpr unsigned int betweenChannelIndices() { return 0x0002; }
483 };
484 };
485
486
494 {
495 protected:
497 ZoneBankElement(uint8_t *ptr, size_t size);
498
499 public:
501 ZoneBankElement(uint8_t *ptr);
502
504 static constexpr unsigned int size() { return 0x0c41; }
505
507 bool createZones(Context &ctx, const ErrorStack &err);
509 bool linkZones(Context &ctx, const ErrorStack &err);
511 bool encode(Context &ctx, const ErrorStack &err);
512
513 public:
515 struct Limit {
517 static constexpr unsigned int zoneCount() { return 64; }
518 };
519
520 protected:
522 struct Offset {
524 static constexpr unsigned int zoneCount() { return 0x0000; }
525 static constexpr unsigned int zones() { return 0x0001; }
526 static constexpr unsigned int betweenZones() { return ZoneElement::size(); }
528 };
529 };
530
531
537 {
538 protected:
540 ChannelElement(uint8_t *ptr, size_t size);
541
542 public:
544 enum class Type {
545 FM = 0, DMR = 1
546 };
547
548 enum class Admit {
549 Always = 0, CC_CTCSS = 1, Free=2
550 };
551
552 public:
554 ChannelElement(uint8_t *ptr);
555
557 static constexpr unsigned int size() { return 0x0046; }
558
560 QString name() const;
562 void setName(const QString &name);
563
568
570 bool hasScanListIndex() const;
572 unsigned int scanListIndex() const;
574 void setScanListIndex(unsigned int idx);
576 void clearScanListIndex();
577
579 Type type() const;
581 void setType(Type type);
582
584 bool talkaroundEnabled() const;
586 void enableTalkaround(bool enable);
587
589 bool rxOnly() const;
591 void enableRXOnly(bool enable);
592
594 bool scanAutoStartEnabled() const;
596 void enableScanAutoStart(bool enable);
597
599 Frequency rxFrequency() const;
601 void setRXFrequency(const Frequency &f);
603 Frequency txFrequency() const;
605 void setTXFrequency(const Frequency &f);
606
608 bool hasDTMFPTTSettingsIndex() const;
610 unsigned int dtmfPTTSettingsIndex() const;
612 void setDTMFPTTSettingsIndex(unsigned int idx);
615
616
618 Channel::Power power() const;
621
623 Admit admit() const;
625 void setAdmit(Admit admit);
626
628 SelectiveCall rxTone() const;
630 void setRXTone(const SelectiveCall &code);
632 SelectiveCall txTone() const;
634 void setTXTone(const SelectiveCall &code);
635
640
642 unsigned int colorCode() const;
644 void setColorCode(unsigned int cc);
645
647 bool groupListMatchesContact() const;
649 bool groupListAllMatch() const;
651 unsigned int groupListIndex() const;
653 void setGroupListIndex(unsigned int idx);
658
660 bool hasTXContact() const;
662 unsigned int txContactIndex() const;
664 void setTXContactIndex(unsigned int idx);
666 void clearTXContactIndex();
667
669 bool hasEmergencySystemIndex() const;
671 unsigned int emergencySystemIndex() const;
673 void setEmergencySystemIndex(unsigned int idx);
676
678 bool hasEncryptionKeyIndex() const;
680 unsigned int encryptionKeyIndex() const;
682 void setEncryptionKeyIndex(unsigned int idx);
685
687 Channel *toChannel(Context &ctx, const ErrorStack &err=ErrorStack());
689 bool linkChannel(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack());
691 bool encode(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack());
692
693 public:
695 struct Limit {
697 static constexpr unsigned int nameLength() { return 16; }
698 };
699
700 protected:
702 struct Offset {
704 static constexpr unsigned int name() { return 0x0000; }
705 static constexpr unsigned int bandwidth() { return 0x0020; }
706 static constexpr unsigned int scanList() { return 0x0021; }
707 static constexpr unsigned int channelType() { return 0x0022; }
708 static constexpr unsigned int talkaround() { return 0x0023; }
709 static constexpr unsigned int rxOnly() { return 0x0024; }
710 static constexpr unsigned int scanAutoStart() { return 0x0026; }
711 static constexpr unsigned int rxFrequency() { return 0x0027; }
712 static constexpr unsigned int txFrequency() { return 0x002b; }
713 static constexpr unsigned int dtmfPTTSettingsIndex() { return 0x002f; }
714 static constexpr unsigned int power() { return 0x0030; }
715 static constexpr unsigned int admid() { return 0x0031; }
716 static constexpr unsigned int rxToneMode() { return 0x0034; }
717 static constexpr unsigned int rxCTCSS() { return 0x0035; }
718 static constexpr unsigned int rxDCS() { return 0x0036; }
719 static constexpr unsigned int txToneMode() { return 0x0037; }
720 static constexpr unsigned int txCTCSS() { return 0x0038; }
721 static constexpr unsigned int txDCS() { return 0x0039; }
722 static constexpr unsigned int timeslot() { return 0x003c; }
723 static constexpr unsigned int colorcode() { return 0x003d; }
724 static constexpr unsigned int groupListIndex() { return 0x003e; }
725 static constexpr unsigned int contactIndex() { return 0x0040; }
726 static constexpr unsigned int emergencySystemIndex() { return 0x0042; }
727 static constexpr unsigned int encryptionKeyIndex() { return 0x0044; }
729 };
730 };
731
732
740 {
741 protected:
743 ChannelBankElement(uint8_t *ptr, size_t size);
744
745 public:
747 ChannelBankElement(uint8_t *ptr);
748
750 static constexpr unsigned int size() { return 0x11802; }
751
753 bool createChannels(Context &ctx, const ErrorStack &err);
755 bool linkChannels(Context &ctx, const ErrorStack &err);
757 bool encode(Context &ctx, const ErrorStack &err);
758
759 public:
761 struct Limit {
763 static constexpr unsigned int channelCount() { return 1024; }
764 };
765
766 protected:
768 struct Offset {
770 static constexpr unsigned int channelCount() { return 0x0000; }
771 static constexpr unsigned int channels() { return 0x0002; }
772 static constexpr unsigned int betweenChannels() { return ChannelElement::size(); }
774 };
775 };
776
777
783 {
784 protected:
786 ContactElement(uint8_t *ptr, size_t size);
787
788 public:
790 ContactElement(uint8_t *ptr);
791
793 static constexpr unsigned int size() { return 0x025; }
794
796 QString name() const;
798 void setName(const QString &name);
799
801 DMRContact::Type type() const;
804
806 unsigned int id() const;
808 void setID(unsigned int id);
809
811 DMRContact *toContact(Context &ctx, const ErrorStack &err=ErrorStack());
813 bool encode(const DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack());
814
815 public:
817 struct Limit {
819 static constexpr unsigned int nameLength() { return 16; }
820 };
821
822 protected:
824 struct Offset {
826 static constexpr unsigned int name() { return 0x0000; }
827 static constexpr unsigned int type() { return 0x0020; }
828 static constexpr unsigned int id() { return 0x0021; }
830 };
831 };
832
833
841 {
842 protected:
844 ContactBankElement(uint8_t *ptr, size_t size);
845
846 public:
848 ContactBankElement(uint8_t *ptr);
849
851 static constexpr unsigned int size() { return 0x9c02; }
852
854 bool createContacts(Context &ctx, const ErrorStack &err);
856 bool encode(Context &ctx, const ErrorStack &err);
857
858 public:
860 struct Limit {
862 static constexpr unsigned int contactCount() { return 1024; }
863 };
864
865 protected:
867 struct Offset {
869 static constexpr unsigned int contactCount() { return 0x0000; }
870 static constexpr unsigned int contacts() { return 0x0802; }
871 static constexpr unsigned int betweenContacts() { return ContactElement::size(); }
873 };
874 };
875
876
882 {
883 protected:
885 GroupListElement(uint8_t *ptr, size_t size);
886
887 public:
889 GroupListElement(uint8_t *ptr);
890
892 static constexpr unsigned int size() { return 0x0053; }
893
895 QString name() const;
897 void setName(const QString &name);
898
900 unsigned int members() const;
902 bool hasMember(unsigned int i) const;
904 unsigned int memberIndex(unsigned int i) const;
905
909 bool linkGroupList(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack());
911 bool encode(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack());
912
913 public:
915 struct Limit {
917 static constexpr unsigned int nameLength() { return 8; }
919 static constexpr unsigned int memberCount() { return 33; }
920 };
921
922 protected:
924 struct Offset {
926 static constexpr unsigned int name() { return 0x0000; }
927 static constexpr unsigned int memberCount() { return 0x0010; }
928 static constexpr unsigned int members() { return 0x0011; }
929 static constexpr unsigned int betweenMembers() { return 0x0002; }
931 };
932 };
933
934
942 {
943 protected:
945 GroupListBankElement(uint8_t *ptr, size_t size);
946
947 public:
949 GroupListBankElement(uint8_t *ptr);
950
952 static constexpr unsigned int size() { return 0x510f; }
953
955 bool createGroupLists(Context &ctx, const ErrorStack &err);
957 bool linkGroupLists(Context &ctx, const ErrorStack &err);
959 bool encode(Context &ctx, const ErrorStack &err);
960
961 public:
963 struct Limit {
965 static constexpr unsigned int memberCount() { return 250; }
966 };
967
968 protected:
970 struct Offset {
972 static constexpr unsigned int memberCount() { return 0x0000; }
973 static constexpr unsigned int members() { return 0x0001; }
974 static constexpr unsigned int betweenMembers() { return GroupListElement::size(); }
976 };
977 };
978
979
985 {
986 public:
988 enum class ChannelMode {
989 None=0, Fixed=1, Selected=2
990 };
991
992 protected:
994 ScanListElement(uint8_t *ptr, size_t size);
995
996 public:
998 ScanListElement(uint8_t *ptr);
999
1001 static constexpr unsigned int size() { return 0x005f; }
1002
1004 QString name() const;
1006 void setName(const QString &name);
1007
1013 bool hasPrimaryZoneIndex() const;
1015 unsigned int primaryZoneIndex() const;
1017 void setPrimaryZoneIndex(unsigned int idx);
1019 void clearPrimaryZoneIndex();
1021 bool hasPrimaryChannelIndex() const;
1023 unsigned int primaryChannelIndex() const;
1025 void setPrimaryChannelIndex(unsigned int idx);
1028
1034 bool hasSecondaryZoneIndex() const;
1036 unsigned int secondaryZoneIndex() const;
1038 void setSecondaryZoneIndex(unsigned int idx);
1042 bool hasSecondaryChannelIndex() const;
1044 unsigned int secondaryChannelIndex() const;
1046 void setSecondaryChannelIndex(unsigned int idx);
1049
1055 bool hasRevertZoneIndex() const;
1057 unsigned int revertZoneIndex() const;
1059 void setRevertZoneIndex(unsigned int idx);
1061 void clearRevertZoneIndex();
1063 bool hasRevertChannelIndex() const;
1065 unsigned int revertChannelIndex() const;
1067 void setRevertChannelIndex(unsigned int idx);
1070
1072 Interval rxHoldTime() const;
1074 void setRXHoldTime(const Interval &interval);
1076 Interval txHoldTime() const;
1078 void setTXHoldTime(const Interval &interval);
1079
1081 ScanList *toScanList(Context &ctx, const ErrorStack &err=ErrorStack());
1083 bool linkScanList(ScanList *lst, Context&ctx, const ErrorStack &err=ErrorStack());
1085 bool encode(ScanList *lst, Context&ctx, const ErrorStack &err=ErrorStack());
1086
1087 public:
1089 struct Limit {
1091 static constexpr unsigned int nameLength() { return 8; }
1093 static constexpr unsigned int memberCount() { return 32; }
1095 static TimeRange holdTime() {
1096 return TimeRange{Interval::fromSeconds(0), Interval::fromSeconds(10)};
1097 }
1098 };
1099
1100 protected:
1102 struct Offset {
1104 static constexpr unsigned int name() { return 0x0000; }
1105 static constexpr unsigned int memberCount() { return 0x0010; }
1106 static constexpr unsigned int members() { return 0x0011; }
1107 static constexpr unsigned int betweenMembers() { return 0x0002; }
1108 static constexpr unsigned int priChannel1Mode() { return 0x0051; }
1109 static constexpr unsigned int priChannel2Mode() { return 0x0052; }
1110 static constexpr unsigned int priChannel1Zone() { return 0x0053; }
1111 static constexpr unsigned int priChannel2Zone() { return 0x0054; }
1112 static constexpr unsigned int priChannel1Channel() { return 0x0055; }
1113 static constexpr unsigned int priChannel2Channel() { return 0x0057; }
1114 static constexpr unsigned int txChannelMode() { return 0x0059; }
1115 static constexpr unsigned int txChannelZone() { return 0x005a; }
1116 static constexpr unsigned int txChannelChannel() { return 0x005b; }
1117 static constexpr unsigned int holdTime() { return 0x005d; }
1118 static constexpr unsigned int txHoldTime() { return 0x005e; }
1120 };
1121 };
1122
1123
1131 {
1132 protected:
1134 ScanListBankElement(uint8_t *ptr, size_t size);
1135
1136 public:
1138 ScanListBankElement(uint8_t *ptr);
1139
1141 static constexpr unsigned int size() { return 0x601; }
1142
1144 bool createScanLists(Context &ctx, const ErrorStack &err);
1146 bool linkScanLists(Context &ctx, const ErrorStack &err);
1148 bool encode(Context &ctx, const ErrorStack &err);
1149
1150 public:
1152 struct Limit {
1154 static constexpr unsigned int memberCount() { return 16; }
1155 };
1156
1157 protected:
1159 struct Offset {
1161 static constexpr unsigned int memberCount() { return 0x0000; }
1162 static constexpr unsigned int members() { return 0x0011; }
1163 static constexpr unsigned int betweenMembers() { return ScanListElement::size(); }
1165 };
1166 };
1167
1168
1174 {
1175 protected:
1177 DMRSettingsElement(uint8_t *ptr, size_t size);
1178
1179 public:
1181 DMRSettingsElement(uint8_t *ptr);
1182
1184 static constexpr unsigned int size() { return 0x000e; }
1185
1187 Interval callHangTime() const;
1189 void setCallHangTime(const Interval &intv);
1190
1192 Interval activeWaitTime() const;
1194 void setActiveWaitTime(const Interval &interval);
1196 unsigned int activeRetries() const;
1198 void setActiveRetries(unsigned int count);
1199
1201 unsigned int txPreambles() const;
1203 void setTXPreambles(unsigned int count);
1204
1206 bool decodeDisableRadioEnabled() const;
1208 void enableDecodeDisableRadio(bool enable);
1210 bool decodeRadioCheckEnabled() const;
1212 void enableDecodeRadioCheck(bool enable);
1214 bool decodeEnableRadioEnabled() const;
1216 void enableDecodeEnableRadio(bool enable);
1217
1219 bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1221 bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1222
1223 public:
1225 struct Limit {
1227 static constexpr TimeRange callHangTime() { return TimeRange{
1229 }; }
1230
1231 static constexpr TimeRange activeWaitTime() { return TimeRange{
1233 }; }
1234
1235 static constexpr IntRange activeRetires() { return IntRange{ 1, 10}; }
1237 static constexpr IntRange txPreambles() { return IntRange{ 0, 63}; }
1238 };
1239
1240 protected:
1242 struct Offset {
1244 static constexpr unsigned int callHangTime() { return 0x0000; }
1245 static constexpr unsigned int activeWaitTime() { return 0x0001; }
1246 static constexpr unsigned int activeRetries() { return 0x0002; }
1247 static constexpr unsigned int txPreambles() { return 0x0003; }
1248 static constexpr unsigned int decodeDisableRadio() { return 0x0004; }
1249 static constexpr unsigned int decodeCheckRadio() { return 0x0005; }
1250 static constexpr unsigned int decodeEnableRadio() { return 0x0006; }
1252 };
1253 };
1254
1255
1261 {
1262 protected:
1264 EncryptionKeyElement(uint8_t *ptr, size_t size);
1265
1266 public:
1268 EncryptionKeyElement(uint8_t *ptr);
1269
1271 static constexpr unsigned int size() { return 0x005; }
1272
1273 void clear();
1274 bool isValid() const;
1275
1277 unsigned int keySize() const;
1279 void setKeySize(unsigned int size);
1280
1285
1286 protected:
1288 struct Offset {
1290 static constexpr unsigned int size() { return 0x0000; }
1291 static constexpr unsigned int key() { return 0x0001; }
1293 };
1294 };
1295
1296
1302 {
1303 protected:
1305 EncryptionKeyBankElement(uint8_t *ptr, size_t size);
1306
1307 public:
1309 EncryptionKeyBankElement(uint8_t *ptr);
1310
1312 static constexpr unsigned int size() { return 0x0050; }
1313
1315 bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1317 bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1318
1319 public:
1321 struct Limit {
1323 static constexpr unsigned int keys() { return 16; }
1324 };
1325
1326 protected:
1328 struct Offset {
1330 static constexpr unsigned int keys() { return 0x0000; }
1331 static constexpr unsigned int betweenKeys() { return EncryptionKeyElement::size(); }
1333 };
1334 };
1335
1336
1341 {
1342 protected:
1344 MessageElement(uint8_t *ptr, size_t size);
1345
1346 public:
1348 MessageElement(uint8_t *ptr);
1349
1351 static constexpr unsigned int size() { return 0x051; }
1352
1354 QString text() const;
1356 void setText(const QString &message);
1357
1359 bool encode(SMSTemplate *message, const ErrorStack &err=ErrorStack());
1361 SMSTemplate *decode(const ErrorStack &err=ErrorStack());
1362
1363 public:
1365 struct Limit {
1367 static constexpr unsigned int messageLength() { return 40; }
1368 };
1369
1370 protected:
1372 struct Offset {
1374 static constexpr unsigned int size() { return 0x0000; }
1375 static constexpr unsigned int text() { return 0x0001; }
1377 };
1378 };
1379
1380
1388 {
1389 protected:
1391 MessageBankElement(uint8_t *ptr, size_t size);
1392
1393 public:
1395 MessageBankElement(uint8_t *ptr);
1396
1398 static constexpr unsigned int size() { return 0x511; }
1399
1401 unsigned int memberCount() const;
1403 void setMemberCount(unsigned int count);
1404
1406 MessageElement message(unsigned int i);
1407
1409 bool decode(SMSExtension *ext, const ErrorStack &err=ErrorStack());
1411 bool encode(const SMSExtension *ext, const ErrorStack &err=ErrorStack());
1412
1413 public:
1415 struct Limit {
1417 static constexpr unsigned int memberCount() { return 16; }
1418 };
1419
1420 protected:
1422 struct Offset {
1424 static constexpr unsigned int memberCount() { return 0x0000; }
1425 static constexpr unsigned int members() { return 0x0001; }
1426 static constexpr unsigned int betweenMembers() { return MessageElement::size(); }
1428 };
1429 };
1430
1431
1436 {
1437 protected:
1439 DTMFSystemElement(uint8_t *ptr, size_t size);
1440
1441 public:
1443 DTMFSystemElement(uint8_t *ptr);
1444
1446 static constexpr unsigned int size() { return 0x005; }
1447
1448 public:
1450 struct Limit {
1452 static constexpr Interval preambleDuration() { return Interval::fromMilliseconds(1000); }
1454 static constexpr TimeRange toneDuration() { return TimeRange{
1456 }; }
1457
1458 static constexpr TimeRange pauseDuration() { return TimeRange{
1460 }; }
1461
1462 static constexpr TimeRange deadTime() { return TimeRange{
1464 }; }
1465 };
1466
1467 protected:
1469 struct Offset {
1471 static constexpr unsigned int sidetone() { return 0x0000; }
1472 static constexpr unsigned int preambleDuration() { return 0x0001; }
1473 static constexpr unsigned int toneDuration() { return 0x0002; }
1474 static constexpr unsigned int pauseDuration() { return 0x0003; }
1475 static constexpr unsigned int deadTime() { return 0x0004; }
1477 };
1478 };
1479
1480
1484 {
1485 protected:
1487 DTMFSystemBankElement(uint8_t *ptr, size_t size);
1488
1489 public:
1492
1494 static constexpr unsigned int size() { return 0x0014; }
1495
1496 public:
1498 struct Limit {
1500 static constexpr unsigned int memberCount() { return 4; }
1501 };
1502
1503 protected:
1505 struct Offset {
1507 static constexpr unsigned int members() { return 0x0000; }
1508 static constexpr unsigned int betweenMembers() { return DTMFSystemElement::size(); }
1510 };
1511 };
1512
1513
1518 {
1519 protected:
1521 DTMFNumberElement(uint8_t *ptr, size_t size);
1522
1523 public:
1525 DTMFNumberElement(uint8_t *ptr);
1526
1528 static constexpr unsigned int size() { return 0x000a; }
1529
1530 public:
1532 struct Limit {
1534 static constexpr unsigned int digits() { return 16; }
1535 };
1536
1537 protected:
1539 struct Offset {
1541 static constexpr unsigned int count() { return 0x0000; }
1542 static constexpr unsigned int digits() { return 0x0001; }
1544 };
1545 };
1546
1547
1551 {
1552 protected:
1554 DTMFNumberBankElement(uint8_t *ptr, size_t size);
1555
1556 public:
1559
1561 static constexpr unsigned int size() { return 0x0090; }
1562
1563 public:
1565 struct Limit {
1567 static constexpr unsigned int memberCount() { return 16; }
1568 };
1569
1570 protected:
1572 struct Offset {
1574 static constexpr unsigned int members() { return 0x0000; }
1575 static constexpr unsigned int betweenMembers() { return DTMFNumberElement::size(); }
1577 };
1578 };
1579
1580
1585 {
1586 protected:
1588 DTMFPTTSettingElement(uint8_t *ptr, size_t size);
1589
1590 public:
1593
1595 static constexpr unsigned int size() { return 0x0005; }
1596
1597 protected:
1599 struct Offset {
1601 static constexpr unsigned int systemIndex() { return 0x0000; }
1602 static constexpr unsigned int pttIDType() { return 0x0001; }
1603 static constexpr unsigned int pttIDMode() { return 0x0002; }
1604 static constexpr unsigned int connectIDIndex() { return 0x0003; }
1605 static constexpr unsigned int disconnectIDIndex() { return 0x0004; }
1607 };
1608 };
1609
1610
1614 {
1615 protected:
1617 DTMFPTTSettingBankElement(uint8_t *ptr, size_t size);
1618
1619 public:
1622
1624 static constexpr unsigned int size() { return 0x00a0; }
1625
1626 public:
1628 struct Limit {
1630 static constexpr unsigned int memberCount() { return 32; }
1631 };
1632
1633 protected:
1635 struct Offset {
1637 static constexpr unsigned int members() { return 0x0000; }
1638 static constexpr unsigned int betweenMembers() { return DTMFPTTSettingElement::size(); }
1640 };
1641 };
1642
1643public:
1645 explicit GD73Codeplug(QObject *parent = nullptr);
1646
1647 Config *preprocess(Config *config, const ErrorStack &err=ErrorStack()) const;
1648 bool postprocess(Config *config, const ErrorStack &err=ErrorStack()) const;
1649
1650 bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
1651 bool decode(Config *config, const ErrorStack &err=ErrorStack());
1652 bool encode(Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack());
1653
1654protected:
1656 virtual bool decodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack());
1658 virtual bool encodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack());
1659
1661 virtual bool createMessages(Context &ctx, const ErrorStack &err=ErrorStack());
1663 virtual bool encodeMessages(Context &ctx, const ErrorStack &err=ErrorStack());
1664
1666 virtual bool decodeSettings(Context &ctx, const ErrorStack &err=ErrorStack());
1668 virtual bool encodeSettings(Context &ctx, const ErrorStack &err=ErrorStack());
1669
1671 virtual bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1673 virtual bool encodeContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1674
1676 virtual bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack());
1677
1679 virtual bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1681 virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1683 virtual bool encodeGroupLists(Context &ctx, const ErrorStack &err=ErrorStack());
1684
1686 virtual bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1688 virtual bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack());
1689
1691 virtual bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1693 virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1695 virtual bool encodeChannels(Context &ctx, const ErrorStack &err=ErrorStack());
1696
1698 virtual bool createZones(Context &ctx, const ErrorStack &err=ErrorStack());
1700 virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack());
1702 virtual bool encodeZones(Context &ctx, const ErrorStack &err=ErrorStack());
1703
1705 virtual bool createScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1707 virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1709 virtual bool encodeScanLists(Context &ctx, const ErrorStack &err=ErrorStack());
1710
1711protected:
1713 struct Offset {
1715 static constexpr unsigned int timestamp() { return 0x00000; }
1716 static constexpr unsigned int settings() { return 0x00061; }
1717 static constexpr unsigned int zones() { return 0x0010b; }
1718 static constexpr unsigned int channels() { return 0x00d4c; }
1719 static constexpr unsigned int contacts() { return 0x125ff; }
1720 static constexpr unsigned int groupLists() { return 0x1c201; }
1721 static constexpr unsigned int scanLists() { return 0x21310; }
1722 static constexpr unsigned int dmrSettings() { return 0x21911; }
1723 static constexpr unsigned int encryptionKeys() { return 0x2191f; }
1724 static constexpr unsigned int messages() { return 0x2196f; }
1725 static constexpr unsigned int dtmfSystems() { return 0x21e80; }
1726 static constexpr unsigned int dtmfNumbers() { return 0x21e94; }
1727 static constexpr unsigned int dtmfPTTSettings() { return 0x21f24; }
1729 };
1730};
1731
1732
1733#endif // GD73CODEPLUG_HH
Represents a DMR (basic) encryption key.
Definition encryptionextension.hh:47
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:291
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:778
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:398
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:251
bool linkChannels(Context &ctx, const ErrorStack &err)
Link all decoded channels.
Definition gd73_codeplug.cc:1271
static constexpr unsigned int size()
Returns the size of the channel bank.
Definition gd73_codeplug.hh:750
ChannelBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1242
bool encode(Context &ctx, const ErrorStack &err)
Encodes all indexed channels.
Definition gd73_codeplug.cc:1285
bool createChannels(Context &ctx, const ErrorStack &err)
Creates the encoded channels, also updates context.
Definition gd73_codeplug.cc:1255
bool scanAutoStartEnabled() const
Returns true if scan auto-start is enabled.
Definition gd73_codeplug.cc:1385
unsigned int txContactIndex() const
Returns the tx contact index.
Definition gd73_codeplug.cc:1587
Admit admit() const
Returns the admit criterion.
Definition gd73_codeplug.cc:1452
Channel * toChannel(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the channel.
Definition gd73_codeplug.cc:1634
Frequency txFrequency() const
Returns the TX frequency.
Definition gd73_codeplug.cc:1403
void setColorCode(unsigned int cc)
Sets the color code.
Definition gd73_codeplug.cc:1553
void setEmergencySystemIndex(unsigned int idx)
Sets the emergency system index.
Definition gd73_codeplug.cc:1608
void setName(const QString &name)
Sets the channel name.
Definition gd73_codeplug.cc:1320
Channel::Power power() const
Returns the power setting.
Definition gd73_codeplug.cc:1429
bool talkaroundEnabled() const
Returns true if talkaround is enabled.
Definition gd73_codeplug.cc:1367
void setAdmit(Admit admit)
Sets the admit criterion.
Definition gd73_codeplug.cc:1456
bool hasDTMFPTTSettingsIndex() const
Returns true if channel has DTMF PTT settings index.
Definition gd73_codeplug.cc:1412
bool groupListAllMatch() const
Returns true, if no group list match is needed (monitor).
Definition gd73_codeplug.cc:1562
void setGroupListIndex(unsigned int idx)
Sets the group list index.
Definition gd73_codeplug.cc:1570
Type
Possible channel types.
Definition gd73_codeplug.hh:544
Type type() const
Returns the channel type.
Definition gd73_codeplug.cc:1358
void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition gd73_codeplug.cc:1629
void clearScanListIndex()
Clears the scan list index.
Definition gd73_codeplug.cc:1353
void enableTalkaround(bool enable)
Enable/disable talkaround.
Definition gd73_codeplug.cc:1371
QString name() const
Returns the name of the channel.
Definition gd73_codeplug.cc:1316
unsigned int groupListIndex() const
Returns the group list index.
Definition gd73_codeplug.cc:1566
void setTXTone(const SelectiveCall &code)
Sets the TX tone.
Definition gd73_codeplug.cc:1511
bool hasTXContact() const
Returns true, if the transmit contact is set.
Definition gd73_codeplug.cc:1583
unsigned int dtmfPTTSettingsIndex() const
Returns the DTMF PTT settings index.
Definition gd73_codeplug.cc:1416
void setRXTone(const SelectiveCall &code)
Sets the RX tone.
Definition gd73_codeplug.cc:1477
bool hasScanListIndex() const
Returns true, if a scan list index is set.
Definition gd73_codeplug.cc:1341
unsigned int colorCode() const
Returns the color code.
Definition gd73_codeplug.cc:1549
SelectiveCall rxTone() const
Returns the RX tone.
Definition gd73_codeplug.cc:1461
void setScanListIndex(unsigned int idx)
Sets the scan list index.
Definition gd73_codeplug.cc:1349
FMChannel::Bandwidth bandwidth() const
Returns the bandwidth of the channel.
Definition gd73_codeplug.cc:1325
unsigned int emergencySystemIndex() const
Returns the emergency system index.
Definition gd73_codeplug.cc:1604
void setType(Type type)
Sets the channel type.
Definition gd73_codeplug.cc:1362
void clearEmergencySystemIndex()
Clears the emergency system index.
Definition gd73_codeplug.cc:1612
void setDTMFPTTSettingsIndex(unsigned int idx)
Sets the DTMF PTT settings index.
Definition gd73_codeplug.cc:1420
unsigned int scanListIndex() const
Returns the index of the scan list.
Definition gd73_codeplug.cc:1345
Admit
Possible admit criteria.
Definition gd73_codeplug.hh:548
void clearTXContactIndex()
Clears the transmit contact index.
Definition gd73_codeplug.cc:1595
void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition gd73_codeplug.cc:1541
void clearDTMFPTTSettingsIndex()
Resets the DTMF PTT settings index.
Definition gd73_codeplug.cc:1424
void setBandwidth(FMChannel::Bandwidth bandwidth)
Sets the bandwidth.
Definition gd73_codeplug.cc:1333
bool groupListMatchesContact() const
Returns true, if group list matches current TX contact.
Definition gd73_codeplug.cc:1558
unsigned int encryptionKeyIndex() const
Returns the encryption key index.
Definition gd73_codeplug.cc:1621
void setGroupListAllMatch()
Enables, that no group list match is needed (monitor).
Definition gd73_codeplug.cc:1574
bool hasEmergencySystemIndex() const
Returns true if an emergency system index is set.
Definition gd73_codeplug.cc:1600
bool rxOnly() const
Returns true if RX only is enabled.
Definition gd73_codeplug.cc:1376
void enableScanAutoStart(bool enable)
Enables/disables scan auto-start.
Definition gd73_codeplug.cc:1389
void setTXContactIndex(unsigned int idx)
Sets the transmit contact index.
Definition gd73_codeplug.cc:1591
bool hasEncryptionKeyIndex() const
Returns true if an encryption key index is set.
Definition gd73_codeplug.cc:1617
DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition gd73_codeplug.cc:1529
void setPower(Channel::Power power)
Sets the power.
Definition gd73_codeplug.cc:1437
Frequency rxFrequency() const
Returns the RX frequency.
Definition gd73_codeplug.cc:1394
void setTXFrequency(const Frequency &f)
Sets the TX frequency.
Definition gd73_codeplug.cc:1407
void setRXFrequency(const Frequency &f)
Sets the RX frequency.
Definition gd73_codeplug.cc:1398
void setEncryptionKeyIndex(unsigned int idx)
Sets the encryption key index.
Definition gd73_codeplug.cc:1625
ChannelElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1303
static constexpr unsigned int size()
Returns the size of the channel element.
Definition gd73_codeplug.hh:557
bool linkChannel(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack())
Links decoded channel.
Definition gd73_codeplug.cc:1673
bool encode(Channel *ch, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given channel.
Definition gd73_codeplug.cc:1720
void setGroupListMatchesContact()
Enables, that the group list matches the current TX contact.
Definition gd73_codeplug.cc:1578
SelectiveCall txTone() const
Returns the TX tone.
Definition gd73_codeplug.cc:1495
void enableRXOnly(bool enable)
Enables/disables RX only.
Definition gd73_codeplug.cc:1380
ContactBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:976
bool createContacts(Context &ctx, const ErrorStack &err)
Adds all encoded contacts, also updates the context.
Definition gd73_codeplug.cc:989
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:851
bool encode(Context &ctx, const ErrorStack &err)
Encodes all defined contacts.
Definition gd73_codeplug.cc:1005
DMRContact::Type type() const
Returns the contact type.
Definition gd73_codeplug.cc:1053
void setName(const QString &name)
Sets the name of the contact.
Definition gd73_codeplug.cc:1048
unsigned int id() const
Returns the DMR ID.
Definition gd73_codeplug.cc:1071
void setType(DMRContact::Type type)
Sets the contact type.
Definition gd73_codeplug.cc:1062
ContactElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1031
DMRContact * toContact(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the contact.
Definition gd73_codeplug.cc:1080
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:793
QString name() const
Returns the name of the contact.
Definition gd73_codeplug.cc:1044
void setID(unsigned int id)
Sets the DMR ID.
Definition gd73_codeplug.cc:1075
bool encode(const DMRContact *contact, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given contact.
Definition gd73_codeplug.cc:1086
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1184
bool decodeRadioCheckEnabled() const
Returns true, if decoding of 'radio check' is enabled.
Definition gd73_codeplug.cc:705
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the settings within the config.
Definition gd73_codeplug.cc:722
bool decodeEnableRadioEnabled() const
Returns true, if decoding of 'enable radio' is enabled.
Definition gd73_codeplug.cc:713
void setCallHangTime(const Interval &intv)
Sets the call hang time (private & group).
Definition gd73_codeplug.cc:666
Interval callHangTime() const
Returns the call hang time (private & group).
Definition gd73_codeplug.cc:662
unsigned int txPreambles() const
Returns the number of TX preambles.
Definition gd73_codeplug.cc:688
unsigned int activeRetries() const
Returns the number of active reties.
Definition gd73_codeplug.cc:679
void setActiveRetries(unsigned int count)
Sets the number of active retries.
Definition gd73_codeplug.cc:683
void setActiveWaitTime(const Interval &interval)
Sets the active wait time.
Definition gd73_codeplug.cc:674
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:697
Interval activeWaitTime() const
Returns the active wait time.
Definition gd73_codeplug.cc:670
void enableDecodeDisableRadio(bool enable)
Enables/disables decoding of 'disable radio'.
Definition gd73_codeplug.cc:701
void enableDecodeEnableRadio(bool enable)
Enables/disables decoding of 'enable radio'.
Definition gd73_codeplug.cc:717
DMRSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:649
void setTXPreambles(unsigned int count)
Sets the number of TX preambles.
Definition gd73_codeplug.cc:692
void enableDecodeRadioCheck(bool enable)
Enables/disables decoding of 'radio check'.
Definition gd73_codeplug.cc:709
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:1561
DTMFNumberElement(uint8_t *ptr, size_t size)
Hidden constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1528
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:1624
DTMFPTTSettingElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1595
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:1494
DTMFSystemBankElement(uint8_t *ptr)
Constructor.
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1446
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:848
EncryptionKeyBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:817
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1312
bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes and create encryption keys.
Definition gd73_codeplug.cc:830
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1271
void clear()
Abstract method to reset the element within the codeplug.
Definition gd73_codeplug.cc:766
BasicEncryptionKey * createEncryptionKey(const ErrorStack &err=ErrorStack()) const
Decodes the encryption key.
Definition gd73_codeplug.cc:785
unsigned int keySize() const
Returns the key size in bits.
Definition gd73_codeplug.cc:776
bool encodeEncryptionKey(BasicEncryptionKey *key, const ErrorStack &err=ErrorStack())
Encodes the encryption key.
Definition gd73_codeplug.cc:800
void setKeySize(unsigned int size)
Sets the key size in bits.
Definition gd73_codeplug.cc:780
EncryptionKeyElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:753
bool isValid() const
Returns true if the pointer is not null.
Definition gd73_codeplug.cc:771
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:952
GroupListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1098
bool linkGroupLists(Context &ctx, const ErrorStack &err)
Link all decoded group lists.
Definition gd73_codeplug.cc:1127
bool createGroupLists(Context &ctx, const ErrorStack &err)
Create all encoded group lists, also update context.
Definition gd73_codeplug.cc:1111
bool encode(Context &ctx, const ErrorStack &err)
Encode group lists.
Definition gd73_codeplug.cc:1141
QString name() const
Returns the name of the group list.
Definition gd73_codeplug.cc:1176
RXGroupList * toGroupList(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the group list.
Definition gd73_codeplug.cc:1198
bool encode(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the group list.
Definition gd73_codeplug.cc:1222
unsigned int memberIndex(unsigned int i) const
Returns the i-th member index.
Definition gd73_codeplug.cc:1193
unsigned int members() const
Returns the number of entries in the group list.
Definition gd73_codeplug.cc:1185
bool hasMember(unsigned int i) const
Returns true, if the i-th member is set.
Definition gd73_codeplug.cc:1189
void setName(const QString &name)
Sets the name of the group list.
Definition gd73_codeplug.cc:1180
bool linkGroupList(RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Links the given RX group list.
Definition gd73_codeplug.cc:1204
GroupListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1163
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:892
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:72
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:1398
unsigned int memberCount() const
Returns the member count.
Definition gd73_codeplug.cc:927
bool encode(const SMSExtension *ext, const ErrorStack &err=ErrorStack())
Encodes all messages defined within the SMS extension.
Definition gd73_codeplug.cc:958
void setMemberCount(unsigned int count)
Sets the member count.
Definition gd73_codeplug.cc:931
MessageElement message(unsigned int i)
Returns the i-th message.
Definition gd73_codeplug.cc:936
bool decode(SMSExtension *ext, const ErrorStack &err=ErrorStack())
Updates the SMS extension by decoding all defined messages.
Definition gd73_codeplug.cc:942
MessageBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:914
Implements a message.
Definition gd73_codeplug.hh:1341
MessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:867
SMSTemplate * decode(const ErrorStack &err=ErrorStack())
Creates a SMS template from this message.
Definition gd73_codeplug.cc:901
QString text() const
Returns the message text.
Definition gd73_codeplug.cc:880
void setText(const QString &message)
Set message text.
Definition gd73_codeplug.cc:886
bool encode(SMSTemplate *message, const ErrorStack &err=ErrorStack())
Sets a message element from an SMS message.
Definition gd73_codeplug.cc:893
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1351
Implements one of the 5 one-touch settings elements.
Definition gd73_codeplug.hh:137
Action
Possible one-touch actions.
Definition gd73_codeplug.hh:140
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:153
OneTouchSettingElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:633
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1141
ScanListBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1900
bool createScanLists(Context &ctx, const ErrorStack &err)
Creates all encoded scan lists, also updates context.
Definition gd73_codeplug.cc:1913
bool linkScanLists(Context &ctx, const ErrorStack &err)
Links all decoded scan lists.
Definition gd73_codeplug.cc:1929
bool encode(Context &ctx, const ErrorStack &err)
Encodes all scan lists.
Definition gd73_codeplug.cc:1943
void clearSecondaryZoneIndex()
Clears the secondary zone index.
Definition gd73_codeplug.cc:2044
void setSecondaryChannelIndex(unsigned int idx)
Sets the secondary channel index.
Definition gd73_codeplug.cc:2056
void setPrimaryChannelMode(ChannelMode mode)
Sets the primary channel mode.
Definition gd73_codeplug.cc:1987
bool hasPrimaryZoneIndex() const
Returns true, if a primary zone is set.
Definition gd73_codeplug.cc:1991
void setRevertChannelIndex(unsigned int idx)
Sets the revert channel index.
Definition gd73_codeplug.cc:2097
bool encode(ScanList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the scan list.
Definition gd73_codeplug.cc:2179
void clearSecondaryChannelIndex()
Clears the secondary channel index.
Definition gd73_codeplug.cc:2060
bool hasPrimaryChannelIndex() const
Returns true, if a primary channel is set.
Definition gd73_codeplug.cc:2007
unsigned int revertChannelIndex() const
Returns the revert channel index.
Definition gd73_codeplug.cc:2093
QString name() const
Returns the name of the scan list.
Definition gd73_codeplug.cc:1974
void setSecondaryZoneIndex(unsigned int idx)
Sets the secondary zone index.
Definition gd73_codeplug.cc:2040
void clearRevertZoneIndex()
Clears the revert zone index.
Definition gd73_codeplug.cc:2085
Interval txHoldTime() const
Returns the TX hold time.
Definition gd73_codeplug.cc:2115
void setTXHoldTime(const Interval &interval)
Sets the TX hold time.
Definition gd73_codeplug.cc:2119
void clearPrimaryChannelIndex()
Clears the primary channel index.
Definition gd73_codeplug.cc:2019
unsigned int revertZoneIndex() const
Returns the revert zone index.
Definition gd73_codeplug.cc:2077
void setRevertZoneIndex(unsigned int idx)
Sets the revert zone index.
Definition gd73_codeplug.cc:2081
void setSecondaryChannelMode(ChannelMode mode)
Sets the secondary channel mode.
Definition gd73_codeplug.cc:2028
void clearRevertChannelIndex()
Clears the revert channel index.
Definition gd73_codeplug.cc:2101
ChannelMode secondaryChannelMode() const
Returns the secondary channel mode.
Definition gd73_codeplug.cc:2024
ChannelMode primaryChannelMode() const
Returns the primary channel mode.
Definition gd73_codeplug.cc:1983
bool hasRevertZoneIndex() const
Returns true, if a revert zone is set.
Definition gd73_codeplug.cc:2073
unsigned int secondaryChannelIndex() const
Returns the secondary channel index.
Definition gd73_codeplug.cc:2052
unsigned int secondaryZoneIndex() const
Returns the secondary zone index.
Definition gd73_codeplug.cc:2036
bool linkScanList(ScanList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Links a decoded scan list.
Definition gd73_codeplug.cc:2130
void clearPrimaryZoneIndex()
Clears the primary zone index.
Definition gd73_codeplug.cc:2003
ChannelMode
Possible priority/revert channel modes.
Definition gd73_codeplug.hh:988
void setRevertChannelMode(ChannelMode mode)
Sets the revert channel mode.
Definition gd73_codeplug.cc:2069
void setPrimaryChannelIndex(unsigned int idx)
Sets the primary channel index.
Definition gd73_codeplug.cc:2015
Interval rxHoldTime() const
Returns the RX hold time.
Definition gd73_codeplug.cc:2106
bool hasSecondaryChannelIndex() const
Returns true, if a secondary channel is set.
Definition gd73_codeplug.cc:2048
ChannelMode revertChannelMode() const
Returns the revert channel mode.
Definition gd73_codeplug.cc:2065
static constexpr unsigned int size()
Returns the size of the element.
Definition gd73_codeplug.hh:1001
void setRXHoldTime(const Interval &interval)
Sets the RX hold time.
Definition gd73_codeplug.cc:2110
unsigned int primaryZoneIndex() const
Returns the primary zone index.
Definition gd73_codeplug.cc:1995
void setName(const QString &name)
Sets the name of the scan list.
Definition gd73_codeplug.cc:1978
unsigned int primaryChannelIndex() const
Returns the primary channel index.
Definition gd73_codeplug.cc:2011
bool hasRevertChannelIndex() const
Returns true, if a revert channel is set.
Definition gd73_codeplug.cc:2089
void setPrimaryZoneIndex(unsigned int idx)
Sets the primary zone index.
Definition gd73_codeplug.cc:1999
ScanList * toScanList(Context &ctx, const ErrorStack &err=ErrorStack())
Constructs a ScanList from this element.
Definition gd73_codeplug.cc:2124
ScanListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1961
bool hasSecondaryZoneIndex() const
Returns true, if a secondary zone is set.
Definition gd73_codeplug.cc:2032
void enableWriteLock(bool enable)
Enables/disables write lock.
Definition gd73_codeplug.cc:308
Interval tot() const
Returns the transmit time-out.
Definition gd73_codeplug.cc:241
RadioddityButtonSettingsExtension::Function keyFunctionShortPressP2() const
Short-press function of programmable key 2.
Definition gd73_codeplug.cc:458
void enableReadLock(bool enable)
Enables/disables read lock.
Definition gd73_codeplug.cc:291
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
void setKeyFunctionLongPressP2(RadioddityButtonSettingsExtension::Function function)
Sets the long-press function of the programmable key 2.
Definition gd73_codeplug.cc:454
QString bootTextLine1() const
Returns the first line of the boot text.
Definition gd73_codeplug.cc:374
void setDMRMicGain(unsigned int gain)
Sets the DMR microphone gain [1,10].
Definition gd73_codeplug.cc:334
void setKeyFunctionShortPressP1(RadioddityButtonSettingsExtension::Function function)
Sets the short-press function of the programmable key 1.
Definition gd73_codeplug.cc:446
void setBootTextLine1(const QString &line)
Sets the first line of the boot text.
Definition gd73_codeplug.cc:378
unsigned int squelch() const
Returns the squelch level [0,10].
Definition gd73_codeplug.cc:227
unsigned int fmMicGain() const
Returns the FM microphone gain [1,10].
Definition gd73_codeplug.cc:338
bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given config.
Definition gd73_codeplug.cc:472
void setReadLockPin(const QString &pin)
Sets the read-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:299
QString bootTextLine2() const
Returns the second line of the boot text.
Definition gd73_codeplug.cc:382
bool writeLockEnabled() const
Returns true, if the write lock is enabled.
Definition gd73_codeplug.cc:304
Interval longPressDuration() const
Returns the long-press duration.
Definition gd73_codeplug.cc:425
QString readLockPin() const
Returns the read-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:295
void setVOX(unsigned int level)
Sets the VOX level [0,10].
Definition gd73_codeplug.cc:222
unsigned int vox() const
Returns the VOX level [0,10].
Definition gd73_codeplug.cc:218
void setKeyFunctionLongPressP1(RadioddityButtonSettingsExtension::Function function)
Sets the long-press function of the programmable key 1.
Definition gd73_codeplug.cc:438
Interval loneWorkerResponseTimeout() const
Returns the lone-worker response time-out.
Definition gd73_codeplug.cc:347
unsigned int keyToneVolume() const
Returns the key-tone volume [0-13].
Definition gd73_codeplug.cc:399
RadioddityButtonSettingsExtension::Function keyFunctionShortPressP1() const
Short-press function of programmable key 1.
Definition gd73_codeplug.cc:442
RadioddityButtonSettingsExtension::Function keyFunctionLongPressP1() const
Long-press function of programmable key 1.
Definition gd73_codeplug.cc:434
void setPowerSaveTimeout(const Interval &interval)
Sets the power-save time-out.
Definition gd73_codeplug.cc:281
void setWriteLockPin(const QString &pin)
Sets the write-lock pin (1-6 digits as ASCII).
Definition gd73_codeplug.cc:316
Language
Possible languages.
Definition gd73_codeplug.hh:200
void setTOT(const Interval &interval)
Sets the transmit time-out.
Definition gd73_codeplug.cc:248
void setKeyToneVolume(unsigned int vol)
Sets the key-tone volume.
Definition gd73_codeplug.cc:403
bool totIsSet() const
Returns true, if a transmit time-out is set.
Definition gd73_codeplug.cc:237
bool powerSaveEnabled() const
Returns true if power save is enabled.
Definition gd73_codeplug.cc:269
void enableKeyTone(bool enable)
Enables/disables the key tones.
Definition gd73_codeplug.cc:395
OneTouchSettingElement oneTouch(unsigned int n)
Returns the n-th one-touch setting.
Definition gd73_codeplug.cc:466
void setSquelch(unsigned int level)
Sets the squelch level [0,10].
Definition gd73_codeplug.cc:231
static constexpr unsigned int size()
Returns the size of the settings element.
Definition gd73_codeplug.hh:213
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:260
void enableTXInterrupt(bool enable)
Enables/disables the TX interrupt.
Definition gd73_codeplug.cc:264
void setBootTextLine2(const QString &line)
Sets the second line of the boot text.
Definition gd73_codeplug.cc:386
Interval powerSaveTimeout() const
Returns the power-save time-out.
Definition gd73_codeplug.cc:277
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:273
RadioddityButtonSettingsExtension::Function keyFunctionLongPressP2() const
Long-press function of programmable key 2.
Definition gd73_codeplug.cc:450
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:312
unsigned int dmrMicGain() const
Returns the DMR microphone gain [1,10].
Definition gd73_codeplug.cc:330
void setLoneWorkerRemindPeriod(const Interval &interval)
Sets the lone-worker remind period.
Definition gd73_codeplug.cc:360
void setBootDisplayMode(BootDisplayMode mode)
Sets the boot display mode.
Definition gd73_codeplug.cc:370
void enableLowBatteryTone(bool enable)
Enables/disables the low-battery warn tone.
Definition gd73_codeplug.cc:412
void setLongPressDuration(const Interval &interval)
Sets the long-press duration.
Definition gd73_codeplug.cc:429
ChannelDisplayMode
Possible channel display modes.
Definition gd73_codeplug.hh:176
void setChannelDisplayMode(ChannelDisplayMode mode)
Sets the channel display mode.
Definition gd73_codeplug.cc:325
Interval loneWorkerRemindPeriod() const
Returns the lone-worker remind period.
Definition gd73_codeplug.cc:356
BootDisplayMode bootDisplayMode() const
Returns the boot display mode.
Definition gd73_codeplug.cc:366
ChannelDisplayMode channelDisplayMode() const
Returns the channel display mode.
Definition gd73_codeplug.cc:321
unsigned int lowBatteryToneVolume() const
Returns the low-battery warn-tone volume [0-13].
Definition gd73_codeplug.cc:416
void setKeyFunctionShortPressP2(RadioddityButtonSettingsExtension::Function function)
Sets the short-press function of the programmable key 2.
Definition gd73_codeplug.cc:462
void clearTOT()
Disables transmit time-out.
Definition gd73_codeplug.cc:255
bool readLockEnabled() const
Returns true, if the read lock is enabled.
Definition gd73_codeplug.cc:287
bool lowBatteryToneEnabled() const
Returns true if the low-battery warn tone is enabled.
Definition gd73_codeplug.cc:408
SettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:178
BootDisplayMode
Possible boot display modes.
Definition gd73_codeplug.hh:180
bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the given config.
Definition gd73_codeplug.cc:547
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:420
bool keyToneEnabled() const
Returns true if the key tones are enabled.
Definition gd73_codeplug.cc:391
void setFMMicGain(unsigned int gain)
Sets the FM microphone gain [1,10].
Definition gd73_codeplug.cc:342
bool createZones(Context &ctx, const ErrorStack &err)
Creates all encoded zones, also updates the context.
Definition gd73_codeplug.cc:1785
static constexpr unsigned int size()
Returns the size of the zone bank element.
Definition gd73_codeplug.hh:504
bool encode(Context &ctx, const ErrorStack &err)
Encodess all zones.
Definition gd73_codeplug.cc:1815
ZoneBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1772
bool linkZones(Context &ctx, const ErrorStack &err)
Links all decoded zones.
Definition gd73_codeplug.cc:1801
Zone * toZone(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the zone element.
Definition gd73_codeplug.cc:1855
void setName(const QString &name)
Sets the name of the zone.
Definition gd73_codeplug.cc:1850
bool encode(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given zone.
Definition gd73_codeplug.cc:1878
QString name() const
Returns the name of the zone.
Definition gd73_codeplug.cc:1846
bool linkZone(Zone *zone, Context &ctx, const ErrorStack &err=ErrorStack())
Links the decoded zone.
Definition gd73_codeplug.cc:1861
ZoneElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition gd73_codeplug.cc:1833
static constexpr unsigned int size()
Returns the size of the zone element.
Definition gd73_codeplug.hh:451
virtual bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Create channels.
Definition gd73_codeplug.cc:2604
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:2321
virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Link zones.
Definition gd73_codeplug.cc:2640
virtual bool encodeContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Encode contacts.
Definition gd73_codeplug.cc:2542
virtual bool createEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Create encryption keys.
Definition gd73_codeplug.cc:2586
virtual bool encodeGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Encode group lists.
Definition gd73_codeplug.cc:2577
virtual bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Create group lists.
Definition gd73_codeplug.cc:2559
virtual bool encodeEncryptionKeys(Context &ctx, const ErrorStack &err=ErrorStack())
Encode encryption keys.
Definition gd73_codeplug.cc:2595
virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Link group lists.
Definition gd73_codeplug.cc:2568
virtual bool encodeScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Encode zones.
Definition gd73_codeplug.cc:2676
virtual bool createZones(Context &ctx, const ErrorStack &err=ErrorStack())
Create zones.
Definition gd73_codeplug.cc:2631
virtual bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Creates contacts.
Definition gd73_codeplug.cc:2532
virtual bool decodeSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the settings fields (generic & DMR).
Definition gd73_codeplug.cc:2502
bool decode(Config *config, const ErrorStack &err=ErrorStack())
Decodes a binary codeplug to the given abstract configuration config.
Definition gd73_codeplug.cc:2380
virtual bool encodeChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Encode channels.
Definition gd73_codeplug.cc:2622
virtual bool encodeMessages(Context &ctx, const ErrorStack &err=ErrorStack())
Encode messages.
Definition gd73_codeplug.cc:2492
bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition gd73_codeplug.cc:2265
virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Link channels.
Definition gd73_codeplug.cc:2613
virtual bool encodeZones(Context &ctx, const ErrorStack &err=ErrorStack())
Encode zones.
Definition gd73_codeplug.cc:2649
virtual bool createScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Create scan lists.
Definition gd73_codeplug.cc:2658
virtual bool decodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the time-stamp field.
Definition gd73_codeplug.cc:2457
virtual bool encodeSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Encode settings fields (generic & DMR settings).
Definition gd73_codeplug.cc:2517
GD73Codeplug(QObject *parent=nullptr)
Default constructor.
Definition gd73_codeplug.cc:2223
virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Link zones.
Definition gd73_codeplug.cc:2667
bool postprocess(Config *config, const ErrorStack &err=ErrorStack()) const
Returns a post-processed configuration of the decoded config.
Definition gd73_codeplug.cc:2248
Config * preprocess(Config *config, const ErrorStack &err=ErrorStack()) const
Returns a prepared configuration for this particular radio.
Definition gd73_codeplug.cc:2231
virtual bool createMessages(Context &ctx, const ErrorStack &err=ErrorStack())
Creates messages.
Definition gd73_codeplug.cc:2482
virtual bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Creates DTMF contacts.
Definition gd73_codeplug.cc:2553
virtual bool encodeTimestamp(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the time-stamp field.
Definition gd73_codeplug.cc:2471
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
Generic representation of a RX group list.
Definition rxgrouplist.hh:14
Function
Possible function key actions.
Definition radioddity_extensions.hh:31
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:761
static constexpr unsigned int channelCount()
Maximum number of channels.
Definition gd73_codeplug.hh:763
Internal offsets within the bank.
Definition gd73_codeplug.hh:768
Some limits for the channel.
Definition gd73_codeplug.hh:695
static constexpr unsigned int nameLength()
Maximum name length.
Definition gd73_codeplug.hh:697
Internal used offsets within the element.
Definition gd73_codeplug.hh:702
Some limits.
Definition gd73_codeplug.hh:860
static constexpr unsigned int contactCount()
The maximum number of contacts.
Definition gd73_codeplug.hh:862
Some internal offsets within the contact bank.
Definition gd73_codeplug.hh:867
Some limits.
Definition gd73_codeplug.hh:817
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:819
Some internal offsets within the contact.
Definition gd73_codeplug.hh:824
Some limits.
Definition gd73_codeplug.hh:1225
static constexpr TimeRange callHangTime()
The range of call hang times.
Definition gd73_codeplug.hh:1227
static constexpr IntRange activeRetires()
The range of active retries.
Definition gd73_codeplug.hh:1235
static constexpr IntRange txPreambles()
The maximum number of TX preambles.
Definition gd73_codeplug.hh:1237
static constexpr TimeRange activeWaitTime()
The range of active wait times.
Definition gd73_codeplug.hh:1231
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1242
Some limits.
Definition gd73_codeplug.hh:1565
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1567
Some internal offsets within the number bank.
Definition gd73_codeplug.hh:1572
Some limits.
Definition gd73_codeplug.hh:1532
static constexpr unsigned int digits()
Maximum number of digita.
Definition gd73_codeplug.hh:1534
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1539
Some limits.
Definition gd73_codeplug.hh:1628
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1630
Some internal offsets within the number bank.
Definition gd73_codeplug.hh:1635
Internal used offsets within the element.
Definition gd73_codeplug.hh:1599
Some limits.
Definition gd73_codeplug.hh:1498
static constexpr unsigned int memberCount()
The number of members.
Definition gd73_codeplug.hh:1500
Some internal offsets within the message bank.
Definition gd73_codeplug.hh:1505
Some limits.
Definition gd73_codeplug.hh:1450
static constexpr TimeRange toneDuration()
Range for tone duration.
Definition gd73_codeplug.hh:1454
static constexpr TimeRange pauseDuration()
Range for pause duration.
Definition gd73_codeplug.hh:1458
static constexpr TimeRange deadTime()
Rang of dead time.
Definition gd73_codeplug.hh:1462
static constexpr Interval preambleDuration()
Maximum preamble duration in ms.
Definition gd73_codeplug.hh:1452
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1469
Some limits.
Definition gd73_codeplug.hh:1321
static constexpr unsigned int keys()
The maximum number of keys.
Definition gd73_codeplug.hh:1323
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1328
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1288
Some limits.
Definition gd73_codeplug.hh:963
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:965
Some internal offsets within the group list bank.
Definition gd73_codeplug.hh:970
Some limits.
Definition gd73_codeplug.hh:915
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:919
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:917
Some internal offsets within the group list.
Definition gd73_codeplug.hh:924
Some limits.
Definition gd73_codeplug.hh:97
static constexpr unsigned int modelNumber()
Maximum length of model number.
Definition gd73_codeplug.hh:105
static constexpr unsigned int serial()
Maximum length of serial number.
Definition gd73_codeplug.hh:99
static constexpr unsigned int softwareVersion()
Maximum length of software version.
Definition gd73_codeplug.hh:107
static constexpr unsigned int modelName()
Maximum length of model name.
Definition gd73_codeplug.hh:101
static constexpr unsigned int deviceID()
Maximum length of device id.
Definition gd73_codeplug.hh:103
Internal offsets within the element.
Definition gd73_codeplug.hh:112
Some limits.
Definition gd73_codeplug.hh:1415
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1417
Some internal offsets within the message bank.
Definition gd73_codeplug.hh:1422
Some limits.
Definition gd73_codeplug.hh:1365
static constexpr unsigned int messageLength()
The maximum message length.
Definition gd73_codeplug.hh:1367
Internal used offsets within the bank.
Definition gd73_codeplug.hh:1372
Internal used offsets within the codeplug.
Definition gd73_codeplug.hh:1713
Internal offsets within the element.
Definition gd73_codeplug.hh:157
Some limits.
Definition gd73_codeplug.hh:1152
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1154
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1159
Some limits.
Definition gd73_codeplug.hh:1089
static constexpr unsigned int nameLength()
The maximum name length.
Definition gd73_codeplug.hh:1091
static constexpr unsigned int memberCount()
The maximum number of members.
Definition gd73_codeplug.hh:1093
static TimeRange holdTime()
The range of hold times.
Definition gd73_codeplug.hh:1095
Some internal offsets within the scan list bank.
Definition gd73_codeplug.hh:1102
Possible programmable key function.
Definition gd73_codeplug.hh:184
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:192
Some limits of the settings.
Definition gd73_codeplug.hh:364
static constexpr unsigned int bootTextLine()
Maximum length of the boot text lines.
Definition gd73_codeplug.hh:386
static constexpr unsigned int name()
Maximum name length.
Definition gd73_codeplug.hh:366
static constexpr TimeRange longPressDuration()
Long-press duration range.
Definition gd73_codeplug.hh:390
static constexpr TimeRange tot()
Transmit time-out range.
Definition gd73_codeplug.hh:368
static constexpr TimeRange loneWorkerResponse()
Lone-worker response time-out range.
Definition gd73_codeplug.hh:378
static constexpr TimeRange powerSaveTimeout()
Power-save timeout.
Definition gd73_codeplug.hh:372
static constexpr IntRange toneVolume()
Value range for tone-volumes.
Definition gd73_codeplug.hh:388
static constexpr unsigned int pin()
Maximum read/write lock pin size.
Definition gd73_codeplug.hh:376
static constexpr TimeRange loneWorkerRemindPeriod()
Lone-worker remind period range.
Definition gd73_codeplug.hh:382
Internal offsets within the element.
Definition gd73_codeplug.hh:397
Some limits for the zone bank.
Definition gd73_codeplug.hh:515
static constexpr unsigned int zoneCount()
Maximum number of zones.
Definition gd73_codeplug.hh:517
Internal offsets within the element.
Definition gd73_codeplug.hh:522
Some limits for the element.
Definition gd73_codeplug.hh:467
static constexpr unsigned int nameLength()
Maximum name length.
Definition gd73_codeplug.hh:469
static constexpr unsigned int channelCount()
Maximum number of channels per zone.
Definition gd73_codeplug.hh:471
Internal offsets within the zone element.
Definition gd73_codeplug.hh:476
Encodes a selective call.
Definition signaling.hh:13