libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
anytone_codeplug.hh
1#ifndef ANYTONECODEPLUG_HH
2#define ANYTONECODEPLUG_HH
3
4#include "codeplug.hh"
5#include <QGeoCoordinate>
6#include "channel.hh"
7#include "contact.hh"
8
9class RadioSettings;
10
11
20{
21 Q_OBJECT
22
23protected:
25 struct CTCSS {
26 public:
28 static uint8_t encode(const SelectiveCall &tone);
30 static SelectiveCall decode(uint8_t code);
31
32 protected:
34 static SelectiveCall _codeTable[52];
35 };
36
37
38public:
40 class BitmapElement: public Element
41 {
42 protected:
44 BitmapElement(uint8_t *ptr, size_t size);
45
46 public:
48 void clear();
49
51 virtual bool isEncoded(unsigned int idx) const ;
53 virtual void setEncoded(unsigned int idx, bool enable);
55 virtual void enableFirst(unsigned int n);
56 };
57
60 {
61 protected:
63 InvertedBitmapElement(uint8_t *ptr, size_t size);
64
65 public:
67 void clear();
68
70 virtual bool isEncoded(unsigned int idx) const ;
72 virtual void setEncoded(unsigned int idx, bool enable);
74 virtual void enableFirst(unsigned int n);
75 };
76
84 {
85 protected:
87 InvertedBytemapElement(uint8_t *ptr, size_t size);
88
89 public:
91 void clear();
92
94 virtual bool isEncoded(unsigned int idx) const ;
96 virtual void setEncoded(unsigned int idx, bool enable);
98 virtual void enableFirst(unsigned int n);
99 };
100
107 {
108 public:
110 enum class Mode {
111 Analog = 0,
112 Digital = 1,
113 MixedAnalog = 2,
114 MixedDigital = 3
115 };
116
124
126 enum class RepeaterMode {
127 Simplex = 0,
128 Positive = 1,
129 Negative = 2
130 };
131
133 enum class SignalingMode {
134 None = 0,
135 CTCSS = 1,
136 DCS = 2
137 };
138
140 enum class Admit {
141 Always = 0,
142 Free = 1,
144 SameColorCode = 3,
145 Tone = 1,
146 Busy = 2
147 };
148
150 enum class OptSignaling {
151 Off = 0,
152 DTMF = 1,
153 TwoTone = 2,
154 FiveTone = 3
155 };
156
157 protected:
159 ChannelElement(uint8_t *ptr, unsigned size);
160
161 public:
163 ChannelElement(uint8_t *ptr);
165 virtual ~ChannelElement();
166
168 static constexpr unsigned int size() { return 0x0040; }
169
171 void clear();
172
174 virtual unsigned rxFrequency() const;
176 virtual void setRXFrequency(unsigned hz);
177
181 virtual unsigned txOffset() const;
185 virtual void setTXOffset(unsigned hz);
187 virtual unsigned txFrequency() const;
190 virtual void setTXFrequency(unsigned hz);
191
193 virtual Mode mode() const;
195 virtual void setMode(Mode mode);
196
198 virtual Channel::Power power() const;
200 virtual void setPower(Channel::Power power);
201
203 virtual FMChannel::Bandwidth bandwidth() const;
205 virtual void setBandwidth(FMChannel::Bandwidth bw);
206
208 virtual RepeaterMode repeaterMode() const;
210 virtual void setRepeaterMode(RepeaterMode mode);
211
213 virtual SignalingMode rxSignalingMode() const;
217 virtual SelectiveCall rxTone() const;
219 virtual void setRXTone(const SelectiveCall &code);
220
222 virtual SignalingMode txSignalingMode() const;
226 virtual SelectiveCall txTone() const;
228 virtual void setTXTone(const SelectiveCall &code);
229
231 virtual bool ctcssPhaseReversal() const;
233 virtual void enableCTCSSPhaseReversal(bool enable);
234
236 virtual bool rxOnly() const;
238 virtual void enableRXOnly(bool enable);
240 virtual bool callConfirm() const;
242 virtual void enableCallConfirm(bool enable);
244 virtual bool talkaround() const;
246 virtual void enableTalkaround(bool enable);
247
249 virtual bool txCTCSSIsCustom() const;
251 virtual SelectiveCall txCTCSS() const;
253 virtual void setTXCTCSS(const SelectiveCall &tone);
255 virtual void enableTXCustomCTCSS();
257 virtual bool rxCTCSSIsCustom() const;
259 virtual SelectiveCall rxCTCSS() const;
261 virtual void setRXCTCSS(const SelectiveCall &tone);
263 virtual void enableRXCustomCTCSS();
264
266 virtual SelectiveCall txDCS() const;
268 virtual void setTXDCS(const SelectiveCall &code);
270 virtual SelectiveCall rxDCS() const;
272 virtual void setRXDCS(const SelectiveCall &code);
273
275 virtual double customCTCSSFrequency() const;
277 virtual void setCustomCTCSSFrequency(double hz);
278
280 virtual unsigned twoToneDecodeIndex() const;
282 virtual void setTwoToneDecodeIndex(unsigned idx);
283
285 virtual unsigned contactIndex() const;
287 virtual void setContactIndex(unsigned idx);
288
290 virtual unsigned radioIDIndex() const;
292 virtual void setRadioIDIndex(unsigned idx);
293
298
300 virtual Admit admit() const;
302 virtual void setAdmit(Admit admit);
303
305 virtual OptSignaling optionalSignaling() const;
307 virtual void setOptionalSignaling(OptSignaling sig);
308
310 virtual bool hasScanListIndex() const;
312 virtual unsigned scanListIndex() const;
314 virtual void setScanListIndex(unsigned idx);
316 virtual void clearScanListIndex();
317
319 virtual bool hasGroupListIndex() const;
321 virtual unsigned groupListIndex() const;
323 virtual void setGroupListIndex(unsigned idx);
325 virtual void clearGroupListIndex();
326
328 virtual unsigned twoToneIDIndex() const;
330 virtual void setTwoToneIDIndex(unsigned idx);
332 virtual unsigned fiveToneIDIndex() const;
334 virtual void setFiveToneIDIndex(unsigned idx);
336 virtual unsigned dtmfIDIndex() const;
338 virtual void setDTMFIDIndex(unsigned idx);
339
341 virtual unsigned colorCode() const;
343 virtual void setColorCode(unsigned code);
344
346 virtual DMRChannel::TimeSlot timeSlot() const;
348 virtual void setTimeSlot(DMRChannel::TimeSlot ts);
349
351 virtual bool smsConfirm() const;
353 virtual void enableSMSConfirm(bool enable);
355 virtual bool simplexTDMA() const;
357 virtual void enableSimplexTDMA(bool enable);
359 virtual bool adaptiveTDMA() const;
361 virtual void enableAdaptiveTDMA(bool enable);
363 virtual bool rxAPRS() const;
365 virtual void enableRXAPRS(bool enable);
367 virtual bool enhancedEncryption() const;
369 virtual void enableEnhancedEncryption(bool enable);
371 virtual bool loneWorker() const;
373 virtual void enableLoneWorker(bool enable);
374
376 virtual bool hasEncryptionKeyIndex() const;
378 virtual unsigned encryptionKeyIndex() const;
380 virtual void setEncryptionKeyIndex(unsigned idx);
382 virtual void clearEncryptionKeyIndex();
383
385 virtual QString name() const;
387 virtual void setName(const QString &name);
388
390 virtual Channel *toChannelObj(Context &ctx) const;
392 virtual bool linkChannelObj(Channel *c, Context &ctx) const;
394 virtual bool fromChannelObj(const Channel *c, Context &ctx);
395
396 protected:
398 struct Offset {
400 };
401 };
402
405 {
406 protected:
408 ChannelBitmapElement(uint8_t *ptr, size_t size);
409
410 public:
412 ChannelBitmapElement(uint8_t *ptr);
413
415 static constexpr unsigned int size() { return 0x0200; }
416 };
417
424 {
425 protected:
427 ContactElement(uint8_t *ptr, unsigned size);
428
429 public:
431 explicit ContactElement(uint8_t *ptr);
433 virtual ~ContactElement();
434
436 static constexpr unsigned int size() { return 0x0064; }
437
439 void clear();
441 bool isValid() const;
442
444 virtual DMRContact::Type type() const;
446 virtual void setType(DMRContact::Type type);
447
449 virtual QString name() const;
451 virtual void setName(const QString &name);
452
454 virtual unsigned number() const;
456 virtual void setNumber(unsigned number);
457
462
464 virtual DMRContact *toContactObj(Context &ctx) const;
466 virtual bool fromContactObj(const DMRContact *contact, Context &ctx);
467 };
468
471 {
472 protected:
474 ContactBitmapElement(uint8_t *ptr, size_t size);
475
476 public:
478 ContactBitmapElement(uint8_t *ptr);
479
481 static constexpr unsigned int size() { return 0x0500; }
482 };
483
489 {
490 protected:
492 DTMFContactElement(uint8_t *ptr, unsigned size);
493
494 public:
496 explicit DTMFContactElement(uint8_t *ptr);
498 virtual ~DTMFContactElement();
499
501 static constexpr unsigned int size() { return 0x0018; }
502
504 void clear();
505
507 virtual QString number() const;
509 virtual void setNumber(const QString &number);
510
512 virtual QString name() const;
514 virtual void setName(const QString &name);
515
517 virtual DTMFContact *toContact() const;
519 virtual bool fromContact(const DTMFContact *contact);
520
521 public:
523 struct Limit {
524 static constexpr unsigned int digitCount() { return 14; }
525 static constexpr unsigned int nameLength() { return 15; }
526 };
527
528 protected:
530 struct Offset {
532 static constexpr unsigned int digits() { return 0x0000; }
533 static constexpr unsigned int numDigits() { return 0x0007; }
534 static constexpr unsigned int name() { return 0x0008; }
536 };
537 };
538
541 {
542 protected:
544 DTMFContactBytemapElement(uint8_t *ptr, size_t size);
545
546 public:
548 explicit DTMFContactBytemapElement(uint8_t *ptr);
549
551 static constexpr unsigned int size() { return 0x0100; }
552 };
553
559 {
560 protected:
562 GroupListElement(uint8_t *ptr, unsigned size);
563
564 public:
566 GroupListElement(uint8_t *ptr);
567
569 static constexpr unsigned int size() { return 0x0120; }
570
572 void clear();
574 bool isValid() const;
575
577 virtual QString name() const;
579 virtual void setName(const QString &name);
580
582 virtual bool hasMemberIndex(unsigned n) const;
584 virtual unsigned memberIndex(unsigned n) const;
586 virtual void setMemberIndex(unsigned n, unsigned idx);
588 virtual void clearMemberIndex(unsigned n);
589
593 virtual RXGroupList *toGroupListObj() const;
596 virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const;
598 virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx);
599 };
600
603 {
604 protected:
606 GroupListBitmapElement(uint8_t *ptr, size_t size);
607
608 public:
610 explicit GroupListBitmapElement(uint8_t *ptr);
611
613 static constexpr unsigned int size() { return 0x0020; }
614 };
615
621 {
622 public:
624 enum class PriChannel {
625 Off = 0,
626 Primary = 1,
627 Secondary = 2,
628 Both = 3
629 };
630
632 enum class RevertChannel {
633 Selected = 0,
634 SelectedActive = 1,
635 Primary = 2,
636 Secondary = 3,
637 LastCalled = 4,
638 LastUsed = 5,
639 PrimaryActive = 6,
640 SecondaryActive = 7
641 };
642
643 protected:
645 ScanListElement(uint8_t *ptr, unsigned size);
646
647 public:
649 ScanListElement(uint8_t *ptr);
650
652 static constexpr unsigned int size() { return 0x0090; }
653
655 void clear();
656
658 virtual PriChannel priorityChannels() const;
660 virtual void setPriorityChannels(PriChannel sel);
661
663 virtual bool hasPrimary() const;
665 virtual bool primaryIsSelected() const;
667 virtual unsigned primary() const;
669 virtual void setPrimary(unsigned idx);
671 virtual void setPrimarySelected();
673 virtual void clearPrimaryChannel();
674
676 virtual bool hasSecondary() const;
678 virtual bool secondaryIsSelected() const;
680 virtual unsigned secondary() const;
682 virtual void setSecondary(unsigned idx);
684 virtual void setSecondarySelected();
686 virtual void clearSecondaryChannel();
687
689 virtual unsigned lookBackTimeA() const;
691 virtual void setLookBackTimeA(unsigned sec);
693 virtual unsigned lookBackTimeB() const;
695 virtual void setLookBackTimeB(unsigned sec);
697 virtual unsigned dropOutDelay() const;
699 virtual void setDropOutDelay(unsigned sec);
701 virtual unsigned dwellTime() const;
703 virtual void setDwellTime(unsigned sec);
704
706 virtual RevertChannel revertChannel() const;
708 virtual void setRevertChannel(RevertChannel type);
709
711 virtual QString name() const;
713 virtual void setName(const QString &name);
714
716 virtual bool hasMemberIndex(unsigned n) const;
718 virtual unsigned memberIndex(unsigned n) const;
720 virtual void setMemberIndex(unsigned n, unsigned idx);
722 virtual void clearMemberIndex(unsigned n);
723
726 virtual ScanList *toScanListObj() const;
728 virtual bool linkScanListObj(ScanList *lst, Context &ctx) const;
730 virtual bool fromScanListObj(ScanList *lst, Context &ctx);
731 };
732
735 {
736 protected:
738 ScanListBitmapElement(uint8_t *ptr, size_t size);
739
740 public:
742 ScanListBitmapElement(uint8_t *ptr);
743
745 static constexpr unsigned int size() { return 0x00000020; }
746 };
747
753 {
754 protected:
756 RadioIDElement(uint8_t *ptr, unsigned size);
757
758 public:
760 RadioIDElement(uint8_t *ptr);
761
763 static constexpr unsigned int size() { return 0x0020; }
764
766 void clear();
767
769 virtual unsigned number() const;
771 virtual void setNumber(unsigned number);
772
774 virtual QString name() const;
776 virtual void setName(const QString &name);
777
779 virtual bool fromRadioID(DMRRadioID *id);
781 virtual DMRRadioID *toRadioID() const;
782 };
783
786 {
787 protected:
789 RadioIDBitmapElement(uint8_t *ptr, size_t size);
790
791 public:
793 RadioIDBitmapElement(uint8_t *ptr);
794
796 static constexpr unsigned int size() { return 0x0020; }
797 };
798
807 {
808 public:
810 enum class AutoShutdown {
811 Off = 0, After10min = 1, After30min = 2, After60min = 3, After120min = 4,
812 };
813
814 protected:
816 GeneralSettingsElement(uint8_t *ptr, unsigned size);
817
818 public:
820 void clear();
821
823 virtual bool keyToneEnabled() const = 0;
825 virtual void enableKeyTone(bool enable) = 0;
826
828 virtual bool displayFrequency() const;
830 virtual void enableDisplayFrequency(bool enable);
832 virtual bool autoKeyLock() const;
834 virtual void enableAutoKeyLock(bool enable);
836 virtual Interval autoShutdownDelay() const;
838 virtual void setAutoShutdownDelay(Interval min);
844 virtual bool bootPassword() const;
846 virtual void enableBootPassword(bool enable);
848 virtual unsigned squelchLevelA() const;
850 virtual void setSquelchLevelA(unsigned level);
852 virtual unsigned squelchLevelB() const;
854 virtual void setSquelchLevelB(unsigned level);
855
861 virtual unsigned dmrMicGain() const = 0;
863 virtual void setDMRMicGain(unsigned int gain) = 0;
864
885
906
908 virtual Interval longPressDuration() const = 0;
910 virtual void setLongPressDuration(Interval ms) = 0;
911
913 virtual bool knobLock() const = 0;
915 virtual void enableKnobLock(bool enable) = 0;
917 virtual bool keypadLock() const = 0;
919 virtual void enableKeypadLock(bool enable) = 0;
921 virtual bool sidekeysLock() const = 0;
923 virtual void enableSidekeysLock(bool enable) = 0;
925 virtual bool keyLockForced() const = 0;
927 virtual void enableKeyLockForced(bool enable) = 0;
928
929 public:
931 virtual bool vfoModeA() const = 0;
933 virtual void enableVFOModeA(bool enable) = 0;
935 virtual bool vfoModeB() const = 0;
937 virtual void enableVFOModeB(bool enable) = 0;
938
940 virtual unsigned memoryZoneA() const = 0;
942 virtual void setMemoryZoneA(unsigned zone) = 0;
944 virtual unsigned memoryZoneB() const = 0;
946 virtual void setMemoryZoneB(unsigned zone) = 0;
947
949 virtual bool recording() const = 0;
951 virtual void enableRecording(bool enable) = 0;
952
954 virtual unsigned brightness() const = 0;
956 virtual void setBrightness(unsigned level) = 0;
957
959 virtual bool gps() const = 0;
961 virtual void enableGPS(bool enable) = 0;
963 virtual bool smsAlert() const = 0;
965 virtual void enableSMSAlert(bool enable) = 0;
967 virtual bool activeChannelB() const = 0;
969 virtual void enableActiveChannelB(bool enable) = 0;
971 virtual bool subChannel() const = 0;
973 virtual void enableSubChannel(bool enable) = 0;
975 virtual bool callAlert() const = 0;
977 virtual void enableCallAlert(bool enable) = 0;
978
980 virtual QTimeZone gpsTimeZone() const = 0;
982 virtual void setGPSTimeZone(const QTimeZone &zone) = 0;
984 virtual bool dmrTalkPermit() const = 0;
986 virtual bool fmTalkPermit() const = 0;
988 virtual void enableDMRTalkPermit(bool enable) = 0;
990 virtual void enableFMTalkPermit(bool enable) = 0;
992 virtual bool dmrResetTone() const = 0;
994 virtual void enableDMRResetTone(bool enable) = 0;
995
997 virtual bool idleChannelTone() const = 0;
999 virtual void enableIdleChannelTone(bool enable) = 0;
1001 virtual Interval menuExitTime() const = 0;
1003 virtual void setMenuExitTime(Interval intv) = 0;
1005 virtual bool startupTone() const = 0;
1007 virtual void enableStartupTone(bool enable) = 0;
1009 virtual bool callEndPrompt() const = 0;
1011 virtual void enableCallEndPrompt(bool enable) = 0;
1013 virtual unsigned maxSpeakerVolume() const = 0;
1015 virtual void setMaxSpeakerVolume(unsigned level) = 0;
1017 virtual bool getGPSPosition() const = 0;
1019 virtual void enableGetGPSPosition(bool enable) = 0;
1020
1022 virtual bool volumeChangePrompt() const = 0;
1024 virtual void enableVolumeChangePrompt(bool enable) = 0;
1033
1035 virtual bool displayClock() const = 0;
1037 virtual void enableDisplayClock(bool enable) = 0;
1039 virtual bool enhanceAudio() const = 0;
1041 virtual void enableEnhancedAudio(bool enable) = 0;
1050
1059
1063 virtual unsigned autoRepeaterOffsetFrequencyIndexUHF() const = 0;
1065 virtual void setAutoRepeaterOffsetFrequenyIndexUHF(unsigned idx) = 0;
1071 virtual unsigned autoRepeaterOffsetFrequencyIndexVHF() const = 0;
1073 virtual void setAutoRepeaterOffsetFrequenyIndexVHF(unsigned idx) = 0;
1076
1078 virtual bool showCurrentContact() const = 0;
1080 virtual void enableShowCurrentContact(bool enable) = 0;
1081
1083 virtual void callToneMelody(Melody &melody) const = 0;
1085 virtual void setCallToneMelody(const Melody &melody) = 0;
1087 virtual void idleToneMelody(Melody &melody) const = 0;
1089 virtual void setIdleToneMelody(const Melody &melody) = 0;
1091 virtual void resetToneMelody(Melody &melody) const = 0;
1093 virtual void setResetToneMelody(const Melody &melody) = 0;
1094
1096 virtual bool defaultChannel() const = 0;
1098 virtual void enableDefaultChannel(bool enable) = 0;
1100 virtual unsigned defaultZoneIndexA() const = 0;
1102 virtual void setDefaultZoneIndexA(unsigned idx) = 0;
1104 virtual unsigned defaultZoneIndexB() const = 0;
1106 virtual void setDefaultZoneIndexB(unsigned idx) = 0;
1108 virtual bool defaultChannelAIsVFO() const = 0;
1111 virtual unsigned defaultChannelAIndex() const = 0;
1113 virtual void setDefaultChannelAIndex(unsigned idx) = 0;
1115 virtual void setDefaultChannelAToVFO() = 0;
1117 virtual bool defaultChannelBIsVFO() const = 0;
1120 virtual unsigned defaultChannelBIndex() const = 0;
1122 virtual void setDefaultChannelBIndex(unsigned idx) = 0;
1124 virtual void setDefaultChannelBToVFO() = 0;
1125
1127 virtual bool displayCall() const = 0;
1129 virtual void enableDisplayCall(bool enable) = 0;
1130
1135
1137 virtual bool gpsUnitsImperial() const = 0;
1139 virtual void enableGPSUnitsImperial(bool enable) = 0;
1140
1149
1162
1164 virtual bool showLastHeard() const = 0;
1166 virtual void enableShowLastHeard(bool enable) = 0;
1167
1169 virtual bool keepLastCaller() const = 0;
1171 virtual void enableKeepLastCaller(bool enable) = 0;
1172
1174 virtual bool fromConfig(const Flags &flags, Context &ctx);
1176 virtual bool updateConfig(Context &ctx);
1178 virtual bool linkSettings(RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack());
1179
1180 protected:
1182 struct Offset : public Element::Offset {
1184 static constexpr unsigned int displayMode() { return 0x0001; }
1185 static constexpr unsigned int autoKeyLock() { return 0x0002; }
1186 static constexpr unsigned int autoShutDown() { return 0x0003; }
1187 static constexpr unsigned int bootDisplay() { return 0x0006; }
1188 static constexpr unsigned int bootPassword() { return 0x0007; }
1189 static constexpr unsigned int squelchLevelA() { return 0x0009; }
1190 static constexpr unsigned int squelchLevelB() { return 0x000a; }
1192 };
1193 };
1194
1202 {
1203 protected:
1205 ExtendedSettingsElement(uint8_t *ptr, unsigned size);
1206
1207 public:
1209 virtual bool sendTalkerAlias() const = 0;
1211 virtual void enableSendTalkerAlias(bool enable) = 0;
1212
1214 virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource() const = 0;
1216 virtual void setTalkerAliasSource(AnytoneDMRSettingsExtension::TalkerAliasSource mode) = 0;
1217
1219 virtual AnytoneDMRSettingsExtension::TalkerAliasEncoding talkerAliasEncoding() const = 0;
1221 virtual void setTalkerAliasEncoding(AnytoneDMRSettingsExtension::TalkerAliasEncoding encoding) = 0;
1222
1227
1232
1237
1239 virtual bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
1241 virtual bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1243 virtual bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack());
1244 };
1245
1252 {
1253 protected:
1255 ZoneChannelListElement(uint8_t *ptr, unsigned size);
1256
1257 public:
1259 ZoneChannelListElement(uint8_t *ptr);
1260
1262 static constexpr unsigned int size() { return 0x0400; }
1263
1265 void clear();
1266
1268 virtual bool hasChannelA(unsigned n) const;
1270 virtual unsigned channelIndexA(unsigned n) const;
1272 virtual void setChannelIndexA(unsigned n, unsigned idx);
1274 virtual void clearChannelIndexA(unsigned n);
1275
1277 virtual bool hasChannelB(unsigned n) const;
1279 virtual unsigned channelIndexB(unsigned n) const;
1281 virtual void setChannelIndexB(unsigned n, unsigned idx);
1283 virtual void clearChannelIndexB(unsigned n);
1284 };
1285
1288 {
1289 protected:
1291 ZoneBitmapElement(uint8_t *ptr, size_t size);
1292
1293 public:
1295 ZoneBitmapElement(uint8_t *ptr);
1296
1298 static constexpr unsigned int size() { return 0x0020; }
1299 };
1300
1306 {
1307 protected:
1309 BootSettingsElement(uint8_t *ptr, unsigned size);
1310
1311 public:
1313 BootSettingsElement(uint8_t *ptr);
1314
1316 static constexpr unsigned int size() { return 0x0030; }
1317
1319 void clear();
1320
1322 virtual QString introLine1() const;
1324 virtual void setIntroLine1(const QString &txt);
1326 virtual QString introLine2() const;
1328 virtual void setIntroLine2(const QString &txt);
1329
1331 virtual QString password() const;
1333 virtual void setPassword(const QString &txt);
1334
1336 virtual bool fromConfig(const Flags &flags, Context &ctx);
1338 virtual bool updateConfig(Context &ctx);
1339 };
1340
1346 {
1347 protected:
1349 DMRAPRSSettingsElement(uint8_t *ptr, unsigned size);
1350
1351 public:
1353 explicit DMRAPRSSettingsElement(uint8_t *ptr);
1354
1356 static constexpr unsigned int size() { return 0x0030; }
1357
1359 void clear();
1360
1362 virtual unsigned manualInterval() const;
1364 virtual void setManualInterval(unsigned sec);
1365
1367 virtual bool automatic() const;
1369 virtual unsigned automaticInterval() const;
1371 virtual void setAutomaticInterval(unsigned sec);
1373 virtual void disableAutomatic();
1374
1376 virtual bool fixedLocation() const;
1378 virtual QGeoCoordinate location() const;
1380 virtual void setLocation(const QGeoCoordinate &pos);
1382 virtual void enableFixedLocation(bool enable);
1383
1385 virtual Channel::Power power() const;
1387 virtual void setPower(Channel::Power power);
1388
1390 virtual bool hasChannel(unsigned n) const;
1392 virtual bool channelIsVFOA(unsigned n) const;
1394 virtual bool channelIsVFOB(unsigned n) const;
1396 virtual bool channelIsSelected(unsigned n) const;
1398 virtual unsigned channelIndex(unsigned n) const;
1400 virtual void setChannelIndex(unsigned n, unsigned idx);
1402 virtual void setChannelVFOA(unsigned n);
1404 virtual void setChannelVFOB(unsigned n);
1406 virtual void setChannelSelected(unsigned n);
1408 virtual void clearChannel(unsigned n);
1409
1411 virtual unsigned destination() const;
1413 virtual void setDestination(unsigned id);
1414
1416 virtual DMRContact::Type callType() const;
1418 virtual void setCallType(DMRContact::Type type);
1419
1421 virtual bool timeSlotOverride() const;
1423 virtual DMRChannel::TimeSlot timeslot() const;
1425 virtual void overrideTimeSlot(DMRChannel::TimeSlot ts);
1427 virtual void disableTimeSlotOverride();
1428
1430 virtual bool fromConfig(const Flags &flags, Context &ctx);
1432 virtual bool createGPSSystem(uint8_t i, Context &ctx);
1434 virtual bool linkGPSSystem(uint8_t i, Context &ctx);
1435 };
1436
1439 {
1440 protected:
1442 DMRAPRSMessageElement(uint8_t *ptr, size_t size);
1443
1444 public:
1446 DMRAPRSMessageElement(uint8_t *ptr);
1447
1449 static constexpr unsigned int size() { return 0x0030; }
1450
1451 void clear();
1452
1454 virtual QString message() const;
1456 void setMessage(const QString &message);
1457
1459 virtual bool fromConfig(Codeplug::Flags flags, Context &ctx);
1461 virtual bool updateConfig(Context &ctx) const;
1462
1463 public:
1465 struct Limit {
1466 static constexpr unsigned int length() { return 32; }
1467 };
1468
1469 protected:
1471 struct Offset {
1473 static constexpr unsigned int message() { return 0x0000; }
1475 };
1476 };
1477
1483 {
1484 protected:
1486 RepeaterOffsetListElement(uint8_t *ptr, size_t size);
1487
1488 public:
1490 explicit RepeaterOffsetListElement(uint8_t *ptr);
1491
1493 static constexpr unsigned int size() { return 0x03f0; }
1494
1495 void clear();
1496
1498 virtual bool isSet(unsigned int n) const;
1500 virtual Frequency offset(unsigned int n) const;
1502 virtual void setOffset(unsigned int n, Frequency freq);
1504 virtual void clearOffset(unsigned int n);
1505
1506 public:
1508 struct Limit {
1509 static constexpr unsigned int numEntries() { return 250; }
1510 };
1511
1512 protected:
1514 struct Offset {
1516 static constexpr unsigned int frequencies() { return 0x0000; }
1517 static constexpr unsigned int betweenFrequencies() { return sizeof(uint32_t); }
1519 };
1520 };
1521
1529 {
1530 protected:
1532 MessageListElement(uint8_t *ptr, unsigned size);
1533
1534 public:
1536 explicit MessageListElement(uint8_t *ptr);
1537
1539 static constexpr unsigned int size() { return 0x0010; }
1540
1542 void clear();
1543
1545 virtual bool hasNext() const;
1547 virtual unsigned next() const;
1549 virtual void setNext(unsigned idx);
1551 virtual void clearNext();
1552
1554 virtual bool hasIndex() const;
1556 virtual unsigned index() const;
1558 virtual void setIndex(unsigned idx);
1560 virtual void clearIndex();
1561 };
1562
1568 {
1569 protected:
1571 MessageElement(uint8_t *ptr, unsigned size);
1572
1573 public:
1575 MessageElement(uint8_t *ptr);
1576
1578 static constexpr unsigned int size() { return 0x0100; }
1579
1581 void clear();
1582
1584 virtual QString message() const;
1586 virtual void setMessage(const QString &msg);
1587 };
1588
1591 {
1592 protected:
1594 MessageBytemapElement(uint8_t *ptr, size_t size);
1595
1596 public:
1598 MessageBytemapElement(uint8_t *ptr);
1599
1601 static constexpr unsigned int size() { return 0x0090; }
1602 };
1603
1609 {
1610 public:
1612 enum class Type {
1613 None = 0,
1614 DTMF = 1,
1615 TwoTone = 2,
1616 FiveTone = 3
1617 };
1618
1619 protected:
1621 AnalogQuickCallElement(uint8_t *ptr, unsigned size);
1622
1623 public:
1625 explicit AnalogQuickCallElement(uint8_t *ptr);
1626
1628 static constexpr unsigned int size() { return 0x0002; }
1629
1631 void clear();
1632
1634 virtual Type type() const;
1636 virtual void setType(Type type);
1637
1639 virtual bool hasContactIndex() const;
1641 virtual unsigned contactIndex() const;
1643 virtual void setContactIndex(unsigned idx);
1645 virtual void clearContactIndex();
1646 };
1647
1653 {
1654 protected:
1656 AnalogQuickCallsElement(uint8_t *ptr, size_t size);
1657
1658 public:
1660 AnalogQuickCallsElement(uint8_t *ptr);
1661
1663 static constexpr unsigned int size() { return 0x0100; }
1664
1666 void clear();
1667
1669 uint8_t *quickCall(unsigned int n) const;
1670
1671 public:
1673 struct Limit {
1674 static constexpr unsigned int numEntries() { return 4; }
1675 };
1676
1677 protected:
1679 struct Offset {
1681 static constexpr unsigned int quickCalls() { return 0x0000; }
1683 };
1684 };
1685
1691 {
1692 protected:
1694 StatusMessagesElement(uint8_t *ptr, size_t size);
1695
1696 public:
1698 StatusMessagesElement(uint8_t *ptr);
1699
1701 static constexpr unsigned int size() { return 0x0400; }
1702
1703 void clear();
1704
1706 virtual QString message(unsigned int n) const;
1708 virtual void setMessage(unsigned int n, const QString &msg);
1709
1710 public:
1712 struct Limit {
1713 static constexpr unsigned int numMessages() { return 32; }
1714 static constexpr unsigned int messageLength() { return 32; }
1715 };
1716
1717 protected:
1719 struct Offset {
1721 static constexpr unsigned int messages() { return 0x0000; }
1722 static constexpr unsigned int betweenMessages() { return 0x0020; }
1724 };
1725 };
1726
1729 {
1730 protected:
1732 StatusMessageBitmapElement(uint8_t *ptr, size_t size);
1733
1734 public:
1736 StatusMessageBitmapElement(uint8_t *ptr);
1737
1739 static constexpr unsigned int size() { return 0x0010; }
1740 };
1741
1747 {
1748 public:
1750 enum class Type {
1751 Call = 0,
1752 Menu = 1
1753 };
1754
1756 enum class MenuItem {
1757 SMS = 1,
1758 NewSMS = 2,
1759 HotText = 3,
1760 Inbox = 4,
1761 Outbox = 5,
1762 Contacts = 6,
1763 ManualDial = 7,
1764 CallLog = 8
1765 };
1766
1768 enum class CallType {
1769 Analog = 0,
1770 Digital = 1
1771 };
1772
1774 enum class DigiCallType {
1775 Off = 0xff,
1776 GroupCall = 0,
1777 PrivateCall= 1,
1778 AllCall = 2,
1779 HotText = 3,
1780 CallTip = 4,
1781 StatusMessage = 5
1782 };
1783
1784 protected:
1786 HotKeyElement(uint8_t *ptr, unsigned size);
1787
1788 public:
1790 explicit HotKeyElement(uint8_t *ptr);
1791
1793 static constexpr unsigned int size() { return 0x0030; }
1794
1796 void clear();
1797
1799 virtual Type type() const;
1801 virtual void setType(Type type);
1802
1804 virtual MenuItem menuItem() const;
1807 virtual void setMenuItem(MenuItem item);
1808
1810 virtual CallType callType() const;
1813 virtual void setCallType(CallType type);
1814
1817 virtual DigiCallType digiCallType() const;
1820 virtual void setDigiCallType(DigiCallType type);
1821
1823 virtual bool hasContactIndex() const;
1827 virtual unsigned contactIndex() const;
1830 virtual void setContactIndex(unsigned idx);
1832 virtual void clearContactIndex();
1833
1835 virtual bool hasMessageIndex() const;
1838 virtual unsigned messageIndex() const;
1840 virtual void setMessageIndex(unsigned idx);
1842 virtual void clearMessageIndex();
1843 };
1844
1852 {
1853 protected:
1855 HotKeySettingsElement(uint8_t *ptr, size_t size);
1856
1857 public:
1859 HotKeySettingsElement(uint8_t *ptr);
1860
1862 static constexpr unsigned int size() { return 0x0360; }
1863
1864 void clear();
1865
1867 virtual uint8_t *hotKeySetting(unsigned int n) const;
1868
1869 public:
1871 struct Limit {
1872 static constexpr unsigned int numEntries() { return 18; }
1873 };
1874
1875 protected:
1877 struct Offset {
1879 static constexpr unsigned int hotKeySettings() { return 0x0000; }
1880 static constexpr unsigned int betweenHotKeySettings() { return HotKeySettingsElement::size(); }
1882 };
1883 };
1884
1890 {
1891 public:
1896 class AnalogAlarm: public Element
1897 {
1898 public:
1900 enum class Action {
1901 None = 0,
1902 Background = 1,
1903 TXAlarm = 2,
1904 Both = 3,
1905 };
1906
1908 enum class ENIType {
1909 None = 0,
1910 DTMF = 1,
1911 FiveTone = 2
1912 };
1913
1914 protected:
1916 AnalogAlarm(uint8_t *ptr, unsigned size);
1917
1918 public:
1920 AnalogAlarm(uint8_t *ptr);
1921
1923 static constexpr unsigned int size() { return 0x000a; }
1924
1926 void clear();
1927
1929 virtual Action action() const;
1931 virtual void setAction(Action action);
1932
1934 virtual ENIType encodingType() const;
1936 virtual void setEncodingType(ENIType type);
1937
1939 virtual unsigned emergencyIndex() const;
1941 virtual void setEmergencyIndex(unsigned idx);
1942
1944 virtual unsigned duration() const;
1946 virtual void setDuration(unsigned sec);
1948 virtual unsigned txDuration() const;
1950 virtual void setTXDuration(unsigned sec);
1952 virtual unsigned rxDuration() const;
1954 virtual void setRXDuration(unsigned sec);
1955
1957 virtual bool channelIsSelected() const;
1959 virtual unsigned channelIndex() const;
1961 virtual void setChannelIndex(unsigned idx);
1963 virtual void setChannelSelected();
1964
1966 virtual bool repeatContinuously() const;
1968 virtual unsigned repetitions() const;
1970 virtual void setRepetitions(unsigned num);
1972 virtual void setRepatContinuously();
1973 };
1974
1979 class DigitalAlarm: public Element
1980 {
1981 public:
1983 enum class Action {
1984 None = 0,
1985 Background = 1,
1986 NonLocal = 2,
1987 Local = 3,
1988 };
1989
1990 protected:
1992 DigitalAlarm(uint8_t *ptr, unsigned size);
1993
1994 public:
1996 explicit DigitalAlarm(uint8_t *ptr);
1997
1999 static constexpr unsigned int size() { return 0x000c; }
2000
2002 void clear();
2003
2005 virtual Action action() const;
2007 virtual void setAction(Action action);
2008
2010 virtual unsigned duration() const;
2012 virtual void setDuration(unsigned sec);
2014 virtual unsigned txDuration() const;
2016 virtual void setTXDuration(unsigned sec);
2018 virtual unsigned rxDuration() const;
2020 virtual void setRXDuration(unsigned sec);
2021
2023 virtual bool channelIsSelected() const;
2025 virtual unsigned channelIndex() const;
2027 virtual void setChannelIndex(unsigned idx);
2029 virtual void setChannelSelected();
2030
2032 virtual bool repeatContinuously() const;
2034 virtual unsigned repetitions() const;
2036 virtual void setRepetitions(unsigned num);
2038 virtual void setRepatContinuously();
2039
2041 virtual unsigned voiceBroadcastDuration() const;
2043 virtual void setVoiceBroadcastDuration(unsigned min);
2045 virtual unsigned areaBroadcastDuration() const;
2047 virtual void setAreaBroadcastDuration(unsigned min);
2048
2050 virtual bool vox() const;
2052 virtual void enableVOX(bool enable);
2054 virtual bool rxAlarm() const;
2056 virtual void enableRXAlarm(bool enable);
2057 };
2058
2059 protected:
2061 AlarmSettingElement(uint8_t *ptr, unsigned size);
2062
2063 public:
2065 AlarmSettingElement(uint8_t *ptr);
2066
2068 static constexpr unsigned int size() { return 0x0020; }
2069
2071 void clear();
2072
2074 virtual uint8_t *analog() const;
2076 virtual uint8_t *digital() const;
2077
2078 protected:
2080 struct Offset {
2082 static constexpr unsigned int analog() { return 0x0000; }
2083 static constexpr unsigned int digital() { return 0x000a; }
2085 };
2086 };
2087
2093 {
2094 protected:
2096 DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size);
2097
2098 public:
2100 DigitalAlarmExtensionElement(uint8_t *ptr);
2101
2103 static constexpr unsigned int size() { return 0x0030; }
2104
2106 void clear();
2107
2109 virtual DMRContact::Type callType() const;
2111 virtual void setCallType(DMRContact::Type type);
2112
2114 virtual unsigned destination() const;
2116 virtual void setDestination(unsigned number);
2117
2118 protected:
2120 struct Offset {
2122 static constexpr unsigned int callType() { return 0x0000; }
2123 static constexpr unsigned int destination() { return 0x0023; }
2125 };
2126 };
2127
2133 {
2134 public:
2136 enum class Standard {
2137 ZVEI1 = 0, ZVEI2, ZVEI3, PZVEI, DZVEI, PDZVEI, CCIR1, CCIR2, PCCIR, EEA, EuroSignal, NATEL,
2138 MODAT, CCITT, EIA
2139 };
2140
2141 protected:
2143 FiveToneIDElement(uint8_t *ptr, unsigned size);
2144
2145 public:
2147 FiveToneIDElement(uint8_t *ptr);
2148
2150 static constexpr unsigned int size() { return 0x0020; }
2151
2153 void clear();
2154
2156 virtual Standard standard() const;
2158 virtual void setStandard(Standard std);
2159
2161 virtual unsigned toneDuration() const;
2163 virtual void setToneDuration(unsigned ms);
2164
2166 virtual QString id() const;
2168 virtual void setID(const QString &id);
2169
2171 virtual QString name() const;
2173 virtual void setName(const QString &name);
2174 };
2175
2178 {
2179 protected:
2181 FiveToneIDBitmapElement(uint8_t *ptr, size_t size);
2182
2183 public:
2185 FiveToneIDBitmapElement(uint8_t *ptr);
2186
2188 static constexpr unsigned int size() { return 0x0010; }
2189 };
2190
2196 {
2197 protected:
2199 FiveToneIDListElement(uint8_t *ptr, size_t size);
2200
2201 public:
2203 FiveToneIDListElement(uint8_t *ptr);
2204
2206 static constexpr unsigned int size() { return 0x0c80; }
2207
2208 void clear();
2209
2211 virtual uint8_t *member(unsigned int n) const;
2212
2213 public:
2215 struct Limit {
2216 static constexpr unsigned int numEntries() { return 100; }
2217 };
2218 };
2219
2225 {
2226 public:
2228 enum class Function {
2229 OpenSquelch=0, CallAll, EmergencyAlarm, RemoteKill, RemoteStun, RemoteWakeup,
2230 GroupCall
2231 };
2232
2234 enum class Response {
2235 None=0, Tone, ToneRespond
2236 };
2237
2238 protected:
2240 FiveToneFunctionElement(uint8_t *ptr, unsigned size);
2241
2242 public:
2244 explicit FiveToneFunctionElement(uint8_t *ptr);
2245
2247 static constexpr unsigned int size() { return 0x0020; }
2248
2250 void clear();
2251
2253 virtual Function function() const;
2255 virtual void setFunction(Function function);
2257 virtual Response response() const;
2259 virtual void setResponse(Response response);
2260
2262 virtual QString id() const;
2264 virtual void setID(const QString &id);
2265
2267 virtual QString name() const;
2269 virtual void setName(const QString &name);
2270 };
2271
2277 {
2278 protected:
2280 FiveToneFunctionListElement(uint8_t *ptr, size_t size);
2281
2282 public:
2284 FiveToneFunctionListElement(uint8_t *ptr);
2285
2287 static constexpr unsigned int size() { return 0x0200; }
2288
2289 void clear();
2290
2292 virtual uint8_t *function(unsigned int n) const;
2293
2294 public:
2296 struct Limit {
2297 static constexpr unsigned int numFunctions() { return 16; }
2298 };
2299 };
2300
2306 {
2307 public:
2309 enum class Response {
2310 None = 0, Tone, ToneRespond
2311 };
2314
2315 protected:
2317 FiveToneSettingsElement(uint8_t *ptr, unsigned size);
2318
2319 public:
2321 FiveToneSettingsElement(uint8_t *ptr);
2322
2324 static constexpr unsigned int size() { return 0x0080; }
2325
2327 void clear();
2328
2330 virtual Response decodingResponse() const;
2332 virtual void setDecodingResponse(Response response);
2333
2335 virtual Standard decodingStandard() const;
2337 virtual void setDecodingStandard(Standard standard);
2338
2340 virtual unsigned decodingToneDuration() const;
2342 virtual void setDecodingToneDuration(unsigned ms);
2343
2345 virtual QString id() const;
2347 virtual void setID(const QString &id);
2348
2350 virtual unsigned postEncodeDelay() const;
2352 virtual void setPostEncodeDelay(unsigned ms);
2353
2355 virtual bool hasPTTID() const;
2357 virtual unsigned pttID() const;
2359 virtual void setPTTID(unsigned id);
2361 virtual void clearPTTID();
2362
2364 virtual unsigned autoResetTime() const;
2366 virtual void setAutoResetTime(unsigned s);
2367
2369 virtual unsigned firstDelay() const;
2371 virtual void setFirstDelay(unsigned ms);
2372
2374 virtual bool sidetoneEnabled() const;
2376 virtual void enableSidetone(bool enable);
2378 virtual unsigned stopCode() const;
2380 virtual void setStopCode(unsigned code);
2382 virtual unsigned stopTime() const;
2384 virtual void setStopTime(unsigned ms);
2386 virtual unsigned decodeTime() const;
2388 virtual void setDecodeTime(unsigned ms);
2390 virtual unsigned delayAfterStop() const;
2392 virtual void setDelayAfterStop(unsigned ms);
2394 virtual unsigned preTime() const;
2396 virtual void setPreTime(unsigned ms);
2397
2399 virtual Standard botStandard() const;
2401 virtual void setBOTStandard(Standard standard);
2403 virtual unsigned botToneDuration() const;
2405 virtual void setBOTToneDuration(unsigned ms);
2407 virtual QString botID() const;
2409 virtual void setBOTID(const QString &id);
2410
2412 virtual Standard eotStandard() const;
2414 virtual void setEOTStandard(Standard standard);
2416 virtual unsigned eotToneDuration() const;
2418 virtual void setEOTToneDuration(unsigned ms);
2420 virtual QString eotID() const;
2422 virtual void setEOTID(const QString &id);
2423 };
2424
2430 {
2431 protected:
2433 TwoToneIDElement(uint8_t *ptr, unsigned size);
2434
2435 public:
2437 TwoToneIDElement(uint8_t *ptr);
2438
2440 static constexpr unsigned int size() { return 0x0010; }
2441
2443 void clear();
2444
2446 virtual double firstTone() const;
2448 virtual void setFirstTone(double f);
2449
2451 virtual double secondTone() const;
2453 virtual void setSecondTone(double f);
2454
2456 virtual QString name() const;
2458 virtual void setName(const QString &name);
2459
2460 public:
2462 struct Limit {
2463 static constexpr unsigned int nameLength() { return 7; }
2464 };
2465
2466 protected:
2468 struct Offset {
2470 static constexpr unsigned int firstTone() { return 0x0000; }
2471 static constexpr unsigned int secondTone() { return 0x0002; }
2472 static constexpr unsigned int name() { return 0x0008; }
2474 };
2475 };
2476
2479 {
2480 protected:
2482 TwoToneIDBitmapElement(uint8_t *ptr, size_t size);
2483
2484 public:
2486 TwoToneIDBitmapElement(uint8_t *ptr);
2487
2489 static constexpr unsigned int size() { return 0x0010; }
2490 };
2491
2497 {
2498 public:
2500 enum class Response {
2501 None = 0, Tone, ToneRespond
2502 };
2503
2504 protected:
2506 TwoToneFunctionElement(uint8_t *ptr, unsigned size);
2507
2508 public:
2510 TwoToneFunctionElement(uint8_t *ptr);
2511
2513 static constexpr unsigned int size() { return 0x0020; }
2514
2516 void clear();
2517
2519 virtual double firstTone() const;
2521 virtual void setFirstTone(double f);
2522
2524 virtual double secondTone() const;
2526 virtual void setSecondTone(double f);
2527
2529 virtual Response response() const;
2531 virtual void setResponse(Response resp);
2532
2534 virtual QString name() const;
2536 virtual void setName(const QString &name);
2537
2538 public:
2540 struct Limit {
2541 static constexpr unsigned int nameLength() { return 7; }
2542 };
2543
2544 protected:
2546 struct Offset {
2548 static constexpr unsigned int firstTone() { return 0x0000; }
2549 static constexpr unsigned int secondTone() { return 0x0002; }
2550 static constexpr unsigned int response() { return 0x0004; }
2551 static constexpr unsigned int name() { return 0x0005; }
2553 };
2554 };
2555
2558 {
2559 protected:
2561 TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size);
2562
2563 public:
2565 TwoToneFunctionBitmapElement(uint8_t *ptr);
2566
2568 static constexpr unsigned int size() { return 0x0010; }
2569 };
2570
2576 {
2577 protected:
2579 TwoToneSettingsElement(uint8_t *ptr, unsigned size);
2580
2581 public:
2583 TwoToneSettingsElement(uint8_t *ptr);
2584
2586 static constexpr unsigned int size() { return 0x0010; }
2587
2589 void clear();
2590
2592 virtual unsigned firstToneDuration() const;
2594 virtual void setFirstToneDuration(unsigned ms);
2595
2597 virtual unsigned secondToneDuration() const;
2599 virtual void setSecondToneDuration(unsigned ms);
2600
2602 virtual unsigned longToneDuration() const;
2604 virtual void setLongToneDuration(unsigned ms);
2605
2607 virtual unsigned gapDuration() const;
2609 virtual void setGapDuration(unsigned ms);
2610
2612 virtual unsigned autoResetTime() const;
2614 virtual void setAutoResetTime(unsigned sec);
2615
2617 virtual bool sidetone() const;
2619 virtual void enableSidetone(bool enable);
2620 };
2621
2627 {
2628 public:
2631 None=0, Tone, ToneRespond
2632 };
2633
2634 protected:
2636 DTMFSettingsElement(uint8_t *ptr, unsigned size);
2637
2638 public:
2640 explicit DTMFSettingsElement(uint8_t *ptr);
2641
2643 static constexpr unsigned int size() { return 0x0050; }
2644
2646 void clear();
2647
2649 virtual unsigned intervalSymbol() const;
2651 virtual void setIntervalSymbol(unsigned symb);
2652
2654 virtual unsigned groupCode() const;
2656 virtual void setGroupCode(unsigned symb);
2657
2659 virtual Response response() const;
2661 virtual void setResponse(Response resp);
2662
2664 virtual unsigned preTime() const;
2666 virtual void setPreTime(unsigned ms);
2667
2669 virtual unsigned firstDigitDuration() const;
2671 virtual void setFirstDigitDuration(unsigned ms);
2672
2674 virtual unsigned autoResetTime() const;
2676 virtual void setAutoResetTime(unsigned sec);
2677
2679 virtual QString id() const;
2681 virtual void setID(const QString &id);
2682
2684 virtual unsigned postEncodingDelay() const;
2686 virtual void setPostEncodingDelay(unsigned ms);
2687
2689 virtual unsigned pttIDPause() const;
2691 virtual void setPTTIDPause(unsigned sec);
2692
2694 virtual bool pttIDEnabled() const;
2696 virtual void enablePTTID(bool enable);
2697
2699 virtual unsigned dCodePause() const;
2701 virtual void setDCodePause(unsigned sec);
2702
2704 virtual bool sidetone() const;
2706 virtual void enableSidetone(bool enable);
2707
2709 virtual QString botID() const;
2711 virtual void setBOTID(const QString &id);
2712
2714 virtual QString eotID() const;
2716 virtual void setEOTID(const QString &id);
2717
2719 virtual QString remoteKillID() const;
2721 virtual void setRemoteKillID(const QString &id);
2722
2724 virtual QString remoteStunID() const;
2726 virtual void setRemoteStunID(const QString &id);
2727 };
2728
2734 {
2735 protected:
2737 DTMFIDListElement(uint8_t *ptr, size_t size);
2738
2739 public:
2741 DTMFIDListElement(uint8_t *ptr);
2742
2744 static constexpr unsigned int size() { return 0x0100; }
2745
2746 void clear();
2747
2749 virtual bool hasNumber(unsigned int n) const;
2751 virtual QString number(unsigned int n) const;
2753 virtual void setNumber(unsigned int n, const QString &number);
2755 virtual void clearNumber(unsigned int n);
2756
2757 public:
2759 struct Limit {
2760 static constexpr unsigned int numEntries() { return 16; }
2761 static constexpr unsigned int numberLength() { return 16; }
2762 };
2763 };
2764
2770 {
2771 protected:
2773 WFMChannelListElement(uint8_t *ptr, size_t size);
2774
2775 public:
2777 explicit WFMChannelListElement(uint8_t *ptr);
2778
2780 static constexpr unsigned int size() { return 0x0200; }
2781
2782 void clear();
2783
2785 virtual bool hasChannel(unsigned int n) const;
2787 virtual Frequency channel(unsigned int n) const;
2789 virtual void setChannel(unsigned int n, Frequency freq);
2791 virtual void clearChannel(unsigned int n);
2792
2793 public:
2795 struct Limit {
2796 static constexpr unsigned int numEntries() { return 100; }
2797 };
2798
2799 protected:
2801 struct Offset {
2803 static constexpr unsigned int betweenChannels() { return 0x0004; }
2805 };
2806 };
2807
2810 {
2811 protected:
2813 WFMChannelBitmapElement(uint8_t *ptr, size_t size);
2814
2815 public:
2817 WFMChannelBitmapElement(uint8_t *ptr);
2818
2820 static constexpr unsigned int size() { return 0x0020; }
2821 };
2822
2825 {
2826 protected:
2828 WFMVFOElement(uint8_t *ptr, size_t size);
2829
2830 public:
2832 WFMVFOElement(uint8_t *ptr);
2833
2835 static constexpr unsigned int size() { return 0x0010; }
2836
2837 void clear();
2838
2840 virtual Frequency frequency() const;
2842 virtual void setFrequency(Frequency freq);
2843 };
2844
2847 {
2848 protected:
2850 DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size);
2851
2852 public:
2854 DMREncryptionKeyIDListElement(uint8_t *ptr);
2855
2857 static constexpr unsigned int size() { return 0x0040; }
2858
2859 void clear();
2860
2862 virtual bool hasID(unsigned int n) const;
2864 virtual uint16_t id(unsigned int n) const;
2866 virtual void setID(unsigned int n, uint16_t id);
2868 virtual void clearID(unsigned int n);
2869
2870 public:
2872 struct Limit {
2873 static constexpr unsigned int numEntries() { return 32; }
2874 };
2875
2876 protected:
2878 struct Offset {
2880 static constexpr unsigned int betweenIDs() { return 0x0002; }
2882 };
2883 };
2884
2887 {
2888 protected:
2890 DMREncryptionKeyListElement(uint8_t *ptr, size_t size);
2891
2892 public:
2894 DMREncryptionKeyListElement(uint8_t *ptr);
2895
2897 static constexpr unsigned int size() { return 0x0500; }
2898
2899 void clear();
2900
2902 QByteArray key(unsigned int n) const;
2904 void setKey(unsigned int n, const QByteArray &key);
2905
2906 public:
2908 struct Limit {
2909 static constexpr unsigned numEntries() { return DMREncryptionKeyIDListElement::Limit::numEntries(); }
2910 };
2911
2912 protected:
2914 struct Offset {
2916 static constexpr unsigned int keys() { return 0x0010; }
2917 static constexpr unsigned int betweenKeys() { return 0x0028; }
2919 };
2920 };
2921
2927 {
2928 protected:
2930 ContactMapElement(uint8_t *ptr, unsigned size);
2931
2932 public:
2934 ContactMapElement(uint8_t *ptr);
2935
2937 static constexpr unsigned int size() { return 0x0008; }
2938
2940 void clear();
2942 bool isValid() const;
2943
2945 virtual bool isGroup() const;
2947 virtual unsigned id() const;
2949 virtual void setID(unsigned id, bool group=false);
2951 virtual unsigned index() const;
2953 virtual void setIndex(unsigned idx);
2954 };
2955
2956protected:
2958 AnytoneCodeplug(const QString &label, QObject *parent=nullptr);
2959
2960public:
2962 virtual ~AnytoneCodeplug();
2963
2965 virtual void clear();
2966
2967 Config *preprocess(Config *config, const ErrorStack &err) const;
2968 bool encode(Config *config, const Flags &flags, const ErrorStack &err);
2969
2970 bool decode(Config *config, const ErrorStack &err);
2971 bool postprocess(Config *config, const ErrorStack &err) const;
2972
2973protected:
2974 virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
2975
2977 virtual bool allocateBitmaps() = 0;
2979 virtual void setBitmaps(Context &ctx) = 0;
2980
2983 virtual void allocateUpdated() = 0;
2986 virtual void allocateForDecoding() = 0;
2988 virtual void allocateForEncoding() = 0;
2989
2991 virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2993 virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
2994
2995protected:
2997 QString _label;
2998
2999 // Allow access to protected allocation methods.
3000 friend class AnytoneRadio;
3001};
3002
3003#endif // ANYTONECODEPLUG_HH
Direction
Encodes the auto-repeater offset sign.
Definition anytone_extension.hh:1437
BootDisplay
What to display during boot.
Definition anytone_extension.hh:400
Represents the base class of an analog alarm setting for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1897
virtual void setAction(Action action)
Sets the alarm action.
Definition anytone_codeplug.cc:2987
virtual void setEmergencyIndex(unsigned idx)
Sets the emergency ID index.
Definition anytone_codeplug.cc:3005
virtual unsigned emergencyIndex() const
Returns the emergency ID index.
Definition anytone_codeplug.cc:3001
virtual void setEncodingType(ENIType type)
Sets the encoding type.
Definition anytone_codeplug.cc:2996
AnalogAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2964
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition anytone_codeplug.cc:3045
Action
Possible analog alarm types.
Definition anytone_codeplug.hh:1900
virtual Action action() const
Returns the alarm action.
Definition anytone_codeplug.cc:2983
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition anytone_codeplug.cc:3055
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1923
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition anytone_codeplug.cc:3032
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition anytone_codeplug.cc:3010
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition anytone_codeplug.cc:3019
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition anytone_codeplug.cc:3067
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition anytone_codeplug.cc:3050
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition anytone_codeplug.cc:3028
ENIType
Possible alarm signalling types.
Definition anytone_codeplug.hh:1908
void clear()
Resets the alarm.
Definition anytone_codeplug.cc:2977
virtual unsigned channelIndex() const
Returns the channel index.
Definition anytone_codeplug.cc:3041
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition anytone_codeplug.cc:3014
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition anytone_codeplug.cc:3059
virtual ENIType encodingType() const
Returns the encoding type.
Definition anytone_codeplug.cc:2992
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition anytone_codeplug.cc:3063
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition anytone_codeplug.cc:3023
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition anytone_codeplug.cc:3037
Represents the base class of an digital alarm setting for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1980
virtual void enableRXAlarm(bool enable)
Enables/disables the reception of alarms.
Definition anytone_codeplug.cc:3197
virtual void enableVOX(bool enable)
Enables/disables the VOX for alarms.
Definition anytone_codeplug.cc:3188
virtual bool rxAlarm() const
Returns true if alarms gets received enabled.
Definition anytone_codeplug.cc:3193
virtual void setRepatContinuously()
Sets the alarm to be repeated continuously.
Definition anytone_codeplug.cc:3159
virtual unsigned repetitions() const
Returns the number of alarm repetitions.
Definition anytone_codeplug.cc:3151
virtual void setDuration(unsigned sec)
Sets the alarm duration in seconds.
Definition anytone_codeplug.cc:3106
Action
Possible alarm types.
Definition anytone_codeplug.hh:1983
virtual bool channelIsSelected() const
Returns true if the alarm channel is the selected channel.
Definition anytone_codeplug.cc:3129
virtual void setRepetitions(unsigned num)
Sets the number of alarm repetitions.
Definition anytone_codeplug.cc:3155
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1999
virtual bool repeatContinuously() const
Returns true if the alarm is repeated continuously.
Definition anytone_codeplug.cc:3147
virtual void setAreaBroadcastDuration(unsigned min)
Sets area broadcast duration in minutes.
Definition anytone_codeplug.cc:3178
DigitalAlarm(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3074
virtual unsigned rxDuration() const
Returns the RX duration in seconds.
Definition anytone_codeplug.cc:3120
virtual Action action() const
Returns the alarm action.
Definition anytone_codeplug.cc:3093
virtual void setChannelIndex(unsigned idx)
Sets the channel index.
Definition anytone_codeplug.cc:3137
virtual unsigned duration() const
Returns the alarm duration in seconds.
Definition anytone_codeplug.cc:3102
virtual bool vox() const
Returns true if the VOX gets enabled.
Definition anytone_codeplug.cc:3184
virtual void setAction(Action action)
Sets the alarm action.
Definition anytone_codeplug.cc:3097
virtual unsigned areaBroadcastDuration() const
Returns area broadcast duration in minutes.
Definition anytone_codeplug.cc:3174
virtual unsigned channelIndex() const
Returns the channel index.
Definition anytone_codeplug.cc:3133
virtual void setVoiceBroadcastDuration(unsigned min)
Sets voice broadcast duration in minutes.
Definition anytone_codeplug.cc:3168
virtual unsigned voiceBroadcastDuration() const
Returns voice broadcast duration in minutes.
Definition anytone_codeplug.cc:3164
virtual void setChannelSelected()
Sets the alarm channel to the selected channel.
Definition anytone_codeplug.cc:3142
virtual void setRXDuration(unsigned sec)
Sets the RX duration in seconds.
Definition anytone_codeplug.cc:3124
virtual void setTXDuration(unsigned sec)
Sets the TX duration in seconds.
Definition anytone_codeplug.cc:3115
virtual unsigned txDuration() const
Returns the TX duration in seconds.
Definition anytone_codeplug.cc:3111
void clear()
Resets the digital alarm settings.
Definition anytone_codeplug.cc:3087
Represents the base class of alarm setting entry for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1890
virtual uint8_t * digital() const
Returns a pointer to the digital alarm settings.
Definition anytone_codeplug.cc:3228
void clear()
Clears the alarm settings.
Definition anytone_codeplug.cc:3218
virtual uint8_t * analog() const
Returns a pointer to the analog alarm settings.
Definition anytone_codeplug.cc:3224
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2068
AlarmSettingElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3205
Represents base class of a analog quick call entry for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1609
Type
Analog quick-call types.
Definition anytone_codeplug.hh:1612
AnalogQuickCallElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2715
virtual void setContactIndex(unsigned idx)
Sets the analog contact index.
Definition anytone_codeplug.cc:2751
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1628
virtual void clearContactIndex()
Clears the contact index.
Definition anytone_codeplug.cc:2755
virtual unsigned contactIndex() const
Returns the analog contact index.
Definition anytone_codeplug.cc:2747
void clear()
Resets the quick call entry.
Definition anytone_codeplug.cc:2728
virtual bool hasContactIndex() const
Returns true if an analog contact index is set.
Definition anytone_codeplug.cc:2743
virtual void setType(Type type)
Sets the type of the quick call.
Definition anytone_codeplug.cc:2738
virtual Type type() const
Returns the call type.
Definition anytone_codeplug.cc:2734
Implements the list of analog quick-call settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1653
uint8_t * quickCall(unsigned int n) const
Returns a pointer to the n-th entry.
Definition anytone_codeplug.cc:2783
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1663
void clear()
Clears the quick calls.
Definition anytone_codeplug.cc:2776
AnalogQuickCallsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2763
Represents the base class for bitmaps in all AnyTone codeplugs.
Definition anytone_codeplug.hh:41
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition anytone_codeplug.cc:87
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition anytone_codeplug.cc:78
BitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:60
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition anytone_codeplug.cc:72
void clear()
Clears the bitmap, disables all channels.
Definition anytone_codeplug.cc:67
Represents the base class of the boot settings for all AnyTone codeplug.
Definition anytone_codeplug.hh:1306
virtual bool updateConfig(Context &ctx)
Updates the abstract configuration from this general settings.
Definition anytone_codeplug.cc:2242
virtual void setIntroLine2(const QString &txt)
Sets the second intro line.
Definition anytone_codeplug.cc:2211
virtual void setIntroLine1(const QString &txt)
Sets the first intro line.
Definition anytone_codeplug.cc:2203
void clear()
Resets the boot settings.
Definition anytone_codeplug.cc:2194
virtual QString introLine2() const
Returns the second intro line.
Definition anytone_codeplug.cc:2207
BootSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2181
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1316
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the general settings from the given abstract configuration.
Definition anytone_codeplug.cc:2227
virtual QString password() const
Returns the password.
Definition anytone_codeplug.cc:2216
virtual QString introLine1() const
Returns the first intro line.
Definition anytone_codeplug.cc:2199
virtual void setPassword(const QString &txt)
Sets the password.
Definition anytone_codeplug.cc:2220
Represents the channel bitmaps in all AnyTone codeplugs.
Definition anytone_codeplug.hh:405
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:415
ChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:918
Represents the base class for channel encodings in all AnyTone codeplugs.
Definition anytone_codeplug.hh:107
virtual bool talkaround() const
Returns true if the talkaround is enabled.
Definition anytone_codeplug.cc:389
virtual void setTXCTCSS(const SelectiveCall &tone)
Sets the TX CTCSS tone.
Definition anytone_codeplug.cc:406
virtual void setTXOffset(unsigned hz)
Sets the TX frequency offset in Hz.
Definition anytone_codeplug.cc:214
virtual void setScanListIndex(unsigned idx)
Sets the scan list index (0-based).
Definition anytone_codeplug.cc:532
virtual SelectiveCall txCTCSS() const
Returns the TX CTCSS tone.
Definition anytone_codeplug.cc:402
virtual SelectiveCall txTone() const
Simplified access to TX signaling (tone).
Definition anytone_codeplug.cc:342
virtual void setGroupListIndex(unsigned idx)
Sets the group list index (0-based).
Definition anytone_codeplug.cc:549
virtual bool simplexTDMA() const
Returns true if simplex TDMA is enabled.
Definition anytone_codeplug.cc:614
virtual unsigned twoToneIDIndex() const
Returns the two-tone ID index (0-based).
Definition anytone_codeplug.cc:558
virtual bool adaptiveTDMA() const
Returns true if adaptive TDMA is enabled.
Definition anytone_codeplug.cc:622
virtual unsigned scanListIndex() const
Returns the scan list index (0-based).
Definition anytone_codeplug.cc:528
virtual void setTwoToneDecodeIndex(unsigned idx)
Sets the 2-tone decode index (0-based).
Definition anytone_codeplug.cc:474
virtual void setRXTone(const SelectiveCall &code)
Sets the RX signaling (tone).
Definition anytone_codeplug.cc:320
virtual SignalingMode rxSignalingMode() const
Returns the RX signaling mode.
Definition anytone_codeplug.cc:301
virtual void enableEnhancedEncryption(bool enable)
Enables/disables enhanced encryption.
Definition anytone_codeplug.cc:642
virtual bool rxAPRS() const
Returns true if RX APRS is enabled.
Definition anytone_codeplug.cc:630
virtual void setPower(Channel::Power power)
Sets the channel power.
Definition anytone_codeplug.cc:259
virtual void enableCTCSSPhaseReversal(bool enable)
Enables/disables CTCSS phase reversal.
Definition anytone_codeplug.cc:369
virtual unsigned twoToneDecodeIndex() const
Returns the 2-tone decode index (0-based).
Definition anytone_codeplug.cc:470
virtual void setDTMFIDIndex(unsigned idx)
Sets the DTMF ID index (0-based).
Definition anytone_codeplug.cc:578
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot.
Definition anytone_codeplug.cc:592
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot.
Definition anytone_codeplug.cc:598
virtual OptSignaling optionalSignaling() const
Returns the optional signalling type.
Definition anytone_codeplug.cc:515
Mode
Defines all possible channel modes, see channelMode.
Definition anytone_codeplug.hh:110
@ Digital
Digital (DMR) channel.
@ MixedAnalog
Mixed, analog channel with digital RX.
@ MixedDigital
Mixed, digital channel with analog RX.
virtual void setTXFrequency(unsigned hz)
Sets the TX frequency indirectly.
Definition anytone_codeplug.cc:228
virtual bool ctcssPhaseReversal() const
Returns true if the CTCSS phase reversal is enabled.
Definition anytone_codeplug.cc:365
virtual void setTXDCS(const SelectiveCall &code)
Sets the TX DCS code.
Definition anytone_codeplug.cc:438
virtual void setContactIndex(unsigned idx)
Sets the transmit contact index (0-based).
Definition anytone_codeplug.cc:483
virtual ~ChannelElement()
Destructor.
Definition anytone_codeplug.cc:184
virtual void setColorCode(unsigned code)
Sets the color code.
Definition anytone_codeplug.cc:587
virtual QString name() const
Returns the channel name.
Definition anytone_codeplug.cc:672
virtual Channel * toChannelObj(Context &ctx) const
Constructs a generic Channel object from the codeplug channel.
Definition anytone_codeplug.cc:682
virtual Mode mode() const
Returns the channel mode (analog, digtital, etc).
Definition anytone_codeplug.cc:240
virtual bool loneWorker() const
Returns true if lone worker is enabled.
Definition anytone_codeplug.cc:646
virtual void enableRXCustomCTCSS()
Enables RX custom CTCSS frequency.
Definition anytone_codeplug.cc:426
virtual SelectiveCall rxDCS() const
Returns the RX DCS code.
Definition anytone_codeplug.cc:446
virtual void setRXDCS(const SelectiveCall &code)
Sets the RX DCS code.
Definition anytone_codeplug.cc:453
virtual void enableSimplexTDMA(bool enable)
Enables/disables simplex TDMA confirmation.
Definition anytone_codeplug.cc:618
virtual unsigned txFrequency() const
Returns the TX frequency in Hz.
Definition anytone_codeplug.cc:219
virtual void setMode(Mode mode)
Sets the channel mode.
Definition anytone_codeplug.cc:244
Power
Defines all possible power settings.
Definition anytone_codeplug.hh:118
@ POWER_HIGH
High power, usually 5W.
Definition anytone_codeplug.hh:121
@ POWER_LOW
Low power, usually 1W.
Definition anytone_codeplug.hh:119
@ POWER_MIDDLE
Medium power, usually 2.5W.
Definition anytone_codeplug.hh:120
@ POWER_TURBO
Higher power, usually 7W on VHF and 6W on UHF.
Definition anytone_codeplug.hh:122
virtual unsigned dtmfIDIndex() const
Returns the DTFM ID index (0-based).
Definition anytone_codeplug.cc:574
virtual void setTXTone(const SelectiveCall &code)
Sets the RX signaling (tone).
Definition anytone_codeplug.cc:352
virtual void setRXSignalingMode(SignalingMode mode)
Sets the RX signaling mode.
Definition anytone_codeplug.cc:305
virtual void setRXCTCSS(const SelectiveCall &tone)
Sets the RX CTCSS tone.
Definition anytone_codeplug.cc:422
virtual bool hasGroupListIndex() const
Returns true, if a group list index is set.
Definition anytone_codeplug.cc:541
ChannelElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:172
virtual bool callConfirm() const
Returns true if the call confirm is enabled.
Definition anytone_codeplug.cc:381
virtual unsigned txOffset() const
Returns the TX frequency offset in Hz.
Definition anytone_codeplug.cc:210
virtual unsigned encryptionKeyIndex() const
Returns the AES (enhanced) encryption key index (0-based).
Definition anytone_codeplug.cc:659
virtual Admit admit() const
Returns the admit criterion.
Definition anytone_codeplug.cc:506
virtual void setEncryptionKeyIndex(unsigned idx)
Sets the AES (enahnced) encryption key index (0-based).
Definition anytone_codeplug.cc:663
virtual SelectiveCall txDCS() const
Returns the TX DCS code.
Definition anytone_codeplug.cc:431
virtual bool hasScanListIndex() const
Returns true, if a scan list index is set.
Definition anytone_codeplug.cc:524
virtual void setCustomCTCSSFrequency(double hz)
Sets the custom CTCSS frequency in Hz.
Definition anytone_codeplug.cc:465
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:168
virtual SignalingMode txSignalingMode() const
Returns the TX signaling mode.
Definition anytone_codeplug.cc:333
virtual SelectiveCall rxCTCSS() const
Returns the RX CTCSS tone.
Definition anytone_codeplug.cc:418
RepeaterMode
Defines all possible repeater modes.
Definition anytone_codeplug.hh:126
@ Simplex
Simplex mode, that is TX frequency = RX frequency. tx_offset is ignored.
@ Positive
Repeater mode with positive tx_offset.
@ Negative
Repeater mode with negative tx_offset.
virtual void enableSMSConfirm(bool enable)
Enables/disables SMS confirmation.
Definition anytone_codeplug.cc:610
virtual unsigned rxFrequency() const
Returns the RX frequency in Hz.
Definition anytone_codeplug.cc:201
virtual void setTXSignalingMode(SignalingMode mode)
Sets the TX signaling mode.
Definition anytone_codeplug.cc:337
virtual void setRXFrequency(unsigned hz)
Sets the RX frequency in Hz.
Definition anytone_codeplug.cc:205
virtual bool smsConfirm() const
Returns true if SMS confirmation is enabled.
Definition anytone_codeplug.cc:606
virtual AnytoneFMChannelExtension::SquelchMode squelchMode() const
Returns true if the sequelch is silent and false if open.
Definition anytone_codeplug.cc:497
virtual void enableAdaptiveTDMA(bool enable)
Enables/disables adaptive TDMA.
Definition anytone_codeplug.cc:626
virtual void enableCallConfirm(bool enable)
Enables/disables call confirm.
Definition anytone_codeplug.cc:385
virtual bool rxCTCSSIsCustom() const
Returns true if the RX CTCSS tone frequency is custom (non standard).
Definition anytone_codeplug.cc:414
virtual bool enhancedEncryption() const
Returns true if enhanced encryption is enabled.
Definition anytone_codeplug.cc:638
virtual void enableRXAPRS(bool enable)
Enables/disables RX APRS.
Definition anytone_codeplug.cc:634
virtual void setSquelchMode(AnytoneFMChannelExtension::SquelchMode mode)
Enables/disables silent squelch.
Definition anytone_codeplug.cc:501
virtual bool fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition anytone_codeplug.cc:810
virtual void setRepeaterMode(RepeaterMode mode)
Sets the transmit offset direction.
Definition anytone_codeplug.cc:296
Admit
Defines possible admit criteria.
Definition anytone_codeplug.hh:140
@ DifferentColorCode
For digital channels.
@ SameColorCode
For digital channels.
@ Always
For both channel types.
virtual void setFiveToneIDIndex(unsigned idx)
Sets the five-tone ID index (0-based).
Definition anytone_codeplug.cc:570
virtual bool linkChannelObj(Channel *c, Context &ctx) const
Links a previously constructed channel to the rest of the configuration.
Definition anytone_codeplug.cc:768
virtual unsigned contactIndex() const
Returns the transmit contact index (0-based).
Definition anytone_codeplug.cc:479
virtual void clearScanListIndex()
Clears the scan list index.
Definition anytone_codeplug.cc:536
OptSignaling
Defines all possible optional signalling settings.
Definition anytone_codeplug.hh:150
virtual void clearGroupListIndex()
Clears the group list index.
Definition anytone_codeplug.cc:553
virtual unsigned radioIDIndex() const
Returns the radio ID index (0-based).
Definition anytone_codeplug.cc:488
virtual void enableRXOnly(bool enable)
Enables/disables RX only.
Definition anytone_codeplug.cc:377
virtual double customCTCSSFrequency() const
Returns the custom CTCSS frequency in Hz.
Definition anytone_codeplug.cc:461
virtual unsigned fiveToneIDIndex() const
Returns the five-tone ID index (0-based).
Definition anytone_codeplug.cc:566
virtual Channel::Power power() const
Returns the channel power.
Definition anytone_codeplug.cc:249
virtual FMChannel::Bandwidth bandwidth() const
Returns the band width of the channel.
Definition anytone_codeplug.cc:278
virtual bool txCTCSSIsCustom() const
Returns true if the TX CTCSS tone frequency is custom (non standard).
Definition anytone_codeplug.cc:398
virtual RepeaterMode repeaterMode() const
Returns the transmit offset direction.
Definition anytone_codeplug.cc:292
virtual void enableTXCustomCTCSS()
Enables TX custom CTCSS frequency.
Definition anytone_codeplug.cc:410
virtual void setAdmit(Admit admit)
Sets the admit criterion.
Definition anytone_codeplug.cc:510
virtual void setName(const QString &name)
Sets the channel name.
Definition anytone_codeplug.cc:676
virtual void enableLoneWorker(bool enable)
Enables/disables lone worker.
Definition anytone_codeplug.cc:650
virtual void setTwoToneIDIndex(unsigned idx)
Sets the two-tone ID index (0-based).
Definition anytone_codeplug.cc:562
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the band width of the channel.
Definition anytone_codeplug.cc:284
virtual void clearEncryptionKeyIndex()
Clears the encryption key index.
Definition anytone_codeplug.cc:667
virtual unsigned colorCode() const
Returns the color code.
Definition anytone_codeplug.cc:583
virtual SelectiveCall rxTone() const
Simplified access to RX signaling (tone).
Definition anytone_codeplug.cc:310
virtual void setOptionalSignaling(OptSignaling sig)
Sets the optional signaling type.
Definition anytone_codeplug.cc:519
virtual void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition anytone_codeplug.cc:393
virtual void setRadioIDIndex(unsigned idx)
Sets the radio ID index (0-based).
Definition anytone_codeplug.cc:492
virtual bool hasEncryptionKeyIndex() const
Returns true if an encryption key is set.
Definition anytone_codeplug.cc:655
virtual unsigned groupListIndex() const
Returns the scan list index (0-based).
Definition anytone_codeplug.cc:545
SignalingMode
Possible analog signaling modes.
Definition anytone_codeplug.hh:133
void clear()
Resets the channel.
Definition anytone_codeplug.cc:189
virtual bool rxOnly() const
Returns true if the RX only is enabled.
Definition anytone_codeplug.cc:373
Represents the contact bitmaps in all AnyTone codeplugs.
Definition anytone_codeplug.hh:471
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:481
ContactBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:1060
Represents the base class for conacts in all AnyTone codeplugs.
Definition anytone_codeplug.hh:424
virtual void setNumber(unsigned number)
Sets the contact number.
Definition anytone_codeplug.cc:992
virtual void setName(const QString &name)
Sets the name of the contact.
Definition anytone_codeplug.cc:983
virtual ~ContactElement()
Destructor.
Definition anytone_codeplug.cc:946
virtual bool fromContactObj(const DMRContact *contact, Context &ctx)
Constructs this contact from the give DigitalContact.
Definition anytone_codeplug.cc:1038
ContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:934
virtual DMRContact::Type type() const
Returns the contact type.
Definition anytone_codeplug.cc:961
virtual void setType(DMRContact::Type type)
Sets the contact type.
Definition anytone_codeplug.cc:970
virtual DMRContact * toContactObj(Context &ctx) const
Assembles a DigitalContact from this contact.
Definition anytone_codeplug.cc:1019
virtual void setAlertType(AnytoneContactExtension::AlertType type)
Sets the alert type.
Definition anytone_codeplug.cc:1014
virtual unsigned number() const
Returns the contact number.
Definition anytone_codeplug.cc:988
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:436
virtual QString name() const
Returns the name of the contact.
Definition anytone_codeplug.cc:979
bool isValid() const
Returns true if the element is valid.
Definition anytone_codeplug.cc:956
virtual AnytoneContactExtension::AlertType alertType() const
Returns the alert type.
Definition anytone_codeplug.cc:997
void clear()
Resets the contact element.
Definition anytone_codeplug.cc:951
Represents the base class for entries to the contact indices in all AnyTone codeplugs.
Definition anytone_codeplug.hh:2927
virtual void setIndex(unsigned idx)
Sets the index.
Definition anytone_codeplug.cc:4469
virtual unsigned id() const
Returns the id.
Definition anytone_codeplug.cc:4452
bool isValid() const
Returns true if the contact map is valid.
Definition anytone_codeplug.cc:4442
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2937
virtual bool isGroup() const
Returns true if the entry is a group call.
Definition anytone_codeplug.cc:4447
void clear()
Clears the entry.
Definition anytone_codeplug.cc:4437
virtual void setID(unsigned id, bool group=false)
Encodes ID and group call flag.
Definition anytone_codeplug.cc:4458
ContactMapElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:4424
virtual unsigned index() const
Returns the index.
Definition anytone_codeplug.cc:4465
Represents the base class of a DMR APRS message for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1439
virtual QString message() const
Returns the message.
Definition anytone_codeplug.cc:2532
virtual bool updateConfig(Context &ctx) const
Decodes the message.
Definition anytone_codeplug.cc:2548
void setMessage(const QString &message)
Sets the message.
Definition anytone_codeplug.cc:2537
virtual bool fromConfig(Codeplug::Flags flags, Context &ctx)
Encodes the message.
Definition anytone_codeplug.cc:2542
DMRAPRSMessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2514
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:2527
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1449
Represents the base class of DMR APRS settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1346
virtual Channel::Power power() const
Returns the transmit power.
Definition anytone_codeplug.cc:2339
virtual bool automatic() const
Returns true if the automatic APRS is enabled.
Definition anytone_codeplug.cc:2288
virtual void setManualInterval(unsigned sec)
Sets the manual TX interval in seconds.
Definition anytone_codeplug.cc:2283
virtual void setChannelSelected(unsigned n)
Sets the n-th channel to selected channel.
Definition anytone_codeplug.cc:2400
virtual void setDestination(unsigned id)
Sets the destination DMR ID to send the APRS information to.
Definition anytone_codeplug.cc:2413
virtual void overrideTimeSlot(DMRChannel::TimeSlot ts)
Sets the timeslot.
Definition anytone_codeplug.cc:2448
virtual unsigned manualInterval() const
Returns the Manual TX interval in seconds.
Definition anytone_codeplug.cc:2279
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition anytone_codeplug.cc:2427
virtual bool fixedLocation() const
Returns true if the fixed location beacon is enabled.
Definition anytone_codeplug.cc:2307
virtual void setChannelIndex(unsigned n, unsigned idx)
Sets the n-th channel index.
Definition anytone_codeplug.cc:2388
virtual bool hasChannel(unsigned n) const
Returns true if the n-th channel is set.
Definition anytone_codeplug.cc:2368
virtual void setLocation(const QGeoCoordinate &pos)
Sets the location of the fixed position.
Definition anytone_codeplug.cc:2319
virtual void disableAutomatic()
Disables the automatic APRS.
Definition anytone_codeplug.cc:2302
virtual void setAutomaticInterval(unsigned sec)
Sets the automatic transmit interval in seconds.
Definition anytone_codeplug.cc:2296
virtual bool channelIsSelected(unsigned n) const
Returns true if the n-th channel is selected channel.
Definition anytone_codeplug.cc:2380
virtual void enableFixedLocation(bool enable)
Enables/disables fixed location beacon.
Definition anytone_codeplug.cc:2334
virtual bool timeSlotOverride() const
Returns true if the timeslot of the channel is overridden.
Definition anytone_codeplug.cc:2436
virtual DMRChannel::TimeSlot timeslot() const
Returns the timeslot (only valid if timeSlotOverride returns true).
Definition anytone_codeplug.cc:2440
virtual DMRContact::Type callType() const
Returns the call type.
Definition anytone_codeplug.cc:2418
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1356
virtual void disableTimeSlotOverride()
Disables TS override.
Definition anytone_codeplug.cc:2455
void clear()
Resets the APRS settings.
Definition anytone_codeplug.cc:2274
virtual bool channelIsVFOB(unsigned n) const
Returns true if the n-th channel is VFO B.
Definition anytone_codeplug.cc:2376
virtual void setChannelVFOA(unsigned n)
Sets the n-th channel to VFO A.
Definition anytone_codeplug.cc:2392
DMRAPRSSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2261
virtual void clearChannel(unsigned n)
Resets the n-th channel.
Definition anytone_codeplug.cc:2404
virtual unsigned automaticInterval() const
Returns the automatic transmit interval in seconds.
Definition anytone_codeplug.cc:2292
virtual void setPower(Channel::Power power)
Sets the transmit power.
Definition anytone_codeplug.cc:2349
virtual unsigned destination() const
Returns the destination DMR ID to send the APRS information to.
Definition anytone_codeplug.cc:2409
virtual bool channelIsVFOA(unsigned n) const
Returns true if the n-th channel is VFO A.
Definition anytone_codeplug.cc:2372
virtual QGeoCoordinate location() const
Returns the location of the fixed position.
Definition anytone_codeplug.cc:2311
virtual bool fromConfig(const Flags &flags, Context &ctx)
Updates the GPS settings from the given config.
Definition anytone_codeplug.cc:2460
virtual bool linkGPSSystem(uint8_t i, Context &ctx)
Links GPS system from this GPS settings.
Definition anytone_codeplug.cc:2493
virtual unsigned channelIndex(unsigned n) const
Returns the index of the n-th channel.
Definition anytone_codeplug.cc:2384
virtual void setChannelVFOB(unsigned n)
Sets the n-th channel to VFO B.
Definition anytone_codeplug.cc:2396
virtual bool createGPSSystem(uint8_t i, Context &ctx)
Creates GPS system from this GPS settings.
Definition anytone_codeplug.cc:2486
Represents a list of DMR encryption key IDs.
Definition anytone_codeplug.hh:2847
virtual bool hasID(unsigned int n) const
Returns true if the n-th id is set.
Definition anytone_codeplug.cc:4355
virtual uint16_t id(unsigned int n) const
Returns the ID of the encryption key.
Definition anytone_codeplug.cc:4362
DMREncryptionKeyIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4337
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:4350
virtual void clearID(unsigned int n)
Clears the n-th id.
Definition anytone_codeplug.cc:4376
virtual void setID(unsigned int n, uint16_t id)
Sets the ID of the encryption key.
Definition anytone_codeplug.cc:4369
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2857
Represents a list of DMR encryption keys.
Definition anytone_codeplug.hh:2887
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:4399
QByteArray key(unsigned int n) const
Returns the n-th key.
Definition anytone_codeplug.cc:4407
DMREncryptionKeyListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4386
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2897
void setKey(unsigned int n, const QByteArray &key)
Sets the n-th key.
Definition anytone_codeplug.cc:4414
Represents the DTMF contact byte map, indicating which contacts are valid.
Definition anytone_codeplug.hh:541
DTMFContactBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:1150
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:551
Represents the base class for analog (DTMF) contacts in all AnyTone codeplugs.
Definition anytone_codeplug.hh:489
virtual bool fromContact(const DTMFContact *contact)
Encodes an DTMF contact from the given one.
Definition anytone_codeplug.cc:1140
virtual void setNumber(const QString &number)
Sets the number of the contact.
Definition anytone_codeplug.cc:1111
virtual DTMFContact * toContact() const
Creates an DTMF contact from the entry.
Definition anytone_codeplug.cc:1135
DTMFContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:1076
virtual QString number() const
Returns the number of the contact.
Definition anytone_codeplug.cc:1098
virtual void setName(const QString &name)
Sets the name of the contact.
Definition anytone_codeplug.cc:1130
void clear()
Resets the contact element.
Definition anytone_codeplug.cc:1093
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:501
virtual ~DTMFContactElement()
Destructor.
Definition anytone_codeplug.cc:1088
virtual QString name() const
Returns the name of the contact.
Definition anytone_codeplug.cc:1126
Represents a list of DTMF IDs to be send.
Definition anytone_codeplug.hh:2734
virtual void clearNumber(unsigned int n)
Clears the n-th number.
Definition anytone_codeplug.cc:4229
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2744
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:4201
virtual bool hasNumber(unsigned int n) const
Returns true, if the n-th number is set.
Definition anytone_codeplug.cc:4206
DTMFIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4188
virtual QString number(unsigned int n) const
Returns the n-th number.
Definition anytone_codeplug.cc:4213
virtual void setNumber(unsigned int n, const QString &number)
Sets the n-th number.
Definition anytone_codeplug.cc:4221
Represents the base class of DTMF settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2627
Response
Possible responses to a DTMF decode.
Definition anytone_codeplug.hh:2630
virtual void setFirstDigitDuration(unsigned ms)
Sets the first digit duration in ms.
Definition anytone_codeplug.cc:4045
virtual QString botID() const
Returns the BOT ID.
Definition anytone_codeplug.cc:4120
virtual void setPostEncodingDelay(unsigned ms)
Sets the post encoding delay in ms.
Definition anytone_codeplug.cc:4079
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2643
virtual void setDCodePause(unsigned sec)
Sets the D-code pause in seconds.
Definition anytone_codeplug.cc:4106
virtual unsigned groupCode() const
Returns the group code [0,15].
Definition anytone_codeplug.cc:4014
virtual unsigned dCodePause() const
Returns the D-code pause in seconds.
Definition anytone_codeplug.cc:4102
virtual void setRemoteStunID(const QString &id)
Sets the remote stun ID.
Definition anytone_codeplug.cc:4177
DTMFSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3986
virtual QString id() const
Returns the radio ID.
Definition anytone_codeplug.cc:4059
virtual void setResponse(Response resp)
Sets the response to a DTMF decode.
Definition anytone_codeplug.cc:4027
virtual unsigned preTime() const
Returns the pre time in ms.
Definition anytone_codeplug.cc:4032
virtual unsigned pttIDPause() const
Returns the PTT ID pause in seconds.
Definition anytone_codeplug.cc:4084
virtual void setGroupCode(unsigned symb)
Sets the group code [0,15].
Definition anytone_codeplug.cc:4018
virtual void enablePTTID(bool enable)
Enables/disables the PTT ID.
Definition anytone_codeplug.cc:4097
virtual bool pttIDEnabled() const
Returns true if the PTT ID is enabled.
Definition anytone_codeplug.cc:4093
virtual void setIntervalSymbol(unsigned symb)
Sets the interval/repeat symbol [0,15].
Definition anytone_codeplug.cc:4009
virtual void setRemoteKillID(const QString &id)
Sets the remote kill ID.
Definition anytone_codeplug.cc:4160
virtual void setID(const QString &id)
Sets the radio ID.
Definition anytone_codeplug.cc:4067
virtual unsigned autoResetTime() const
Returns the auto reset time in seconds.
Definition anytone_codeplug.cc:4050
virtual unsigned firstDigitDuration() const
Returns the first digit duration in ms.
Definition anytone_codeplug.cc:4041
virtual void setBOTID(const QString &id)
Sets the BOT ID.
Definition anytone_codeplug.cc:4128
virtual unsigned postEncodingDelay() const
Returns the post encoding delay in ms.
Definition anytone_codeplug.cc:4075
virtual QString eotID() const
Returns the EOT ID.
Definition anytone_codeplug.cc:4136
virtual QString remoteKillID() const
Returns the remote kill ID.
Definition anytone_codeplug.cc:4152
virtual void setPTTIDPause(unsigned sec)
Sets the PTT ID pause in seconds.
Definition anytone_codeplug.cc:4088
virtual QString remoteStunID() const
Returns the remote stun ID.
Definition anytone_codeplug.cc:4169
void clear()
Resets the settings.
Definition anytone_codeplug.cc:3999
virtual void setAutoResetTime(unsigned sec)
Sets the auto reset time in seconds.
Definition anytone_codeplug.cc:4054
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition anytone_codeplug.cc:4036
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition anytone_codeplug.cc:4111
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition anytone_codeplug.cc:4115
virtual Response response() const
Returns the response to a DMTF decode.
Definition anytone_codeplug.cc:4023
virtual unsigned intervalSymbol() const
Returns the interval/repeat symbol [0,15].
Definition anytone_codeplug.cc:4005
virtual void setEOTID(const QString &id)
Sets the EOT ID.
Definition anytone_codeplug.cc:4144
Represents the base class of digital alarm setting extension for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2093
virtual DMRContact::Type callType() const
Returns the call type.
Definition anytone_codeplug.cc:3254
virtual unsigned destination() const
Returns the destination DMR number.
Definition anytone_codeplug.cc:3272
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2103
void clear()
Clears the settings.
Definition anytone_codeplug.cc:3249
virtual void setDestination(unsigned number)
Sets the destination DMR number.
Definition anytone_codeplug.cc:3276
virtual void setCallType(DMRContact::Type type)
Sets the call type.
Definition anytone_codeplug.cc:3263
DigitalAlarmExtensionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3236
Represents the base class for the extended settings element in many AnyTone codeplugs.
Definition anytone_codeplug.hh:1202
virtual void setChannelBNameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the channel name color for the VFO B.
virtual bool linkConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Link config from settings extension.
Definition anytone_codeplug.cc:2093
virtual void setZoneBNameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the zone name color for the VFO B.
virtual bool fromConfig(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the settings from the config.
Definition anytone_codeplug.cc:2041
virtual AnytoneDisplaySettingsExtension::Color zoneBNameColor() const =0
Returns the color of the zone name for VFO B.
virtual void setTalkerAliasEncoding(AnytoneDMRSettingsExtension::TalkerAliasEncoding encoding)=0
Sets the talker alias encoding.
virtual bool sendTalkerAlias() const =0
Returns true if the talker alias is sent.
virtual bool updateConfig(Context &ctx, const ErrorStack &err=ErrorStack())
Update config from settings.
Definition anytone_codeplug.cc:2069
virtual void setZoneANameColor(AnytoneDisplaySettingsExtension::Color)=0
Sets the zone name color for the VFO A.
virtual void enableSendTalkerAlias(bool enable)=0
Enables/disables sending the talker alias.
virtual AnytoneDisplaySettingsExtension::Color zoneANameColor() const =0
Returns the color of the zone name for VFO A.
virtual AnytoneDMRSettingsExtension::TalkerAliasEncoding talkerAliasEncoding() const =0
Returns the talker alias encoding.
virtual AnytoneDisplaySettingsExtension::Color channelBNameColor() const =0
Returns the color of the channel name for VFO B.
virtual AnytoneDMRSettingsExtension::TalkerAliasSource talkerAliasSource() const =0
Returns the talker alias source.
virtual void setTalkerAliasSource(AnytoneDMRSettingsExtension::TalkerAliasSource mode)=0
Sets the talker alias source.
ExtendedSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2034
Represents the base-class for 5Tone function for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2225
virtual void setFunction(Function function)
Sets the function.
Definition anytone_codeplug.cc:3426
virtual QString name() const
Returns the name.
Definition anytone_codeplug.cc:3468
void clear()
Clears the function settings.
Definition anytone_codeplug.cc:3417
virtual Function function() const
Returns the function.
Definition anytone_codeplug.cc:3422
Function
Possible function being performed on 5-tone decoding.
Definition anytone_codeplug.hh:2228
Response
Possible responses to 5-tone decoding.
Definition anytone_codeplug.hh:2234
virtual void setName(const QString &name)
Sets the name.
Definition anytone_codeplug.cc:3472
virtual void setID(const QString &id)
Sets the ID.
Definition anytone_codeplug.cc:3453
virtual void setResponse(Response response)
Sets the response.
Definition anytone_codeplug.cc:3435
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2247
virtual Response response() const
Returns the response.
Definition anytone_codeplug.cc:3431
FiveToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3404
virtual QString id() const
Returns the ID.
Definition anytone_codeplug.cc:3440
Represents the list of five-tone functions for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2277
virtual uint8_t * function(unsigned int n) const
Returns the pointer to the n-th function setting.
Definition anytone_codeplug.cc:3498
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:3493
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2287
FiveToneFunctionListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:3480
Represents the bitmap indicating which five-tone IDs are valid.
Definition anytone_codeplug.hh:2178
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2188
FiveToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:3360
Represents the base-class for 5Tone IDs for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2133
virtual void setStandard(Standard std)
Sets the encoding standard.
Definition anytone_codeplug.cc:3306
FiveToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3284
void clear()
Clears the ID.
Definition anytone_codeplug.cc:3297
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2150
virtual void setID(const QString &id)
Sets the ID.
Definition anytone_codeplug.cc:3333
virtual QString name() const
Returns the name.
Definition anytone_codeplug.cc:3348
virtual unsigned toneDuration() const
Returns the tone duration in ms.
Definition anytone_codeplug.cc:3311
Standard
Possible 5-tone encoding standards.
Definition anytone_codeplug.hh:2136
virtual void setName(const QString &name)
Sets the name.
Definition anytone_codeplug.cc:3352
virtual Standard standard() const
Returns the 5Tone encoding standard.
Definition anytone_codeplug.cc:3302
virtual void setToneDuration(unsigned ms)
Sets the tone duration in ms.
Definition anytone_codeplug.cc:3315
virtual QString id() const
Returns the ID.
Definition anytone_codeplug.cc:3320
Represents the list of five-tone IDs.
Definition anytone_codeplug.hh:2196
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2206
FiveToneIDListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:3376
virtual uint8_t * member(unsigned int n) const
Returns a pointer to the n-th five-tone ID.
Definition anytone_codeplug.cc:3394
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:3389
Represents the base-class for 5Tone settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2306
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition anytone_codeplug.cc:3607
virtual Standard decodingStandard() const
Returns the decoding standard.
Definition anytone_codeplug.cc:3535
virtual unsigned eotToneDuration() const
Returns the EOT tone duration in ms.
Definition anytone_codeplug.cc:3734
void clear()
Resets the 5tone settings.
Definition anytone_codeplug.cc:3521
enum FiveToneIDElement::Standard Standard
Possible 5-tone encoding standards.
Definition anytone_codeplug.hh:2313
virtual QString eotID() const
Returns the 5tone EOT ID.
Definition anytone_codeplug.cc:3743
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2324
virtual void setEOTToneDuration(unsigned ms)
Sets the EOT tone duration in ms.
Definition anytone_codeplug.cc:3738
FiveToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3508
virtual unsigned stopCode() const
Returns the stop code [0,15].
Definition anytone_codeplug.cc:3634
virtual unsigned postEncodeDelay() const
Returns the post-encode delay in ms.
Definition anytone_codeplug.cc:3581
virtual void setAutoResetTime(unsigned s)
Sets the auto-reset time in seconds.
Definition anytone_codeplug.cc:3611
virtual void setStopCode(unsigned code)
Sets the stop code.
Definition anytone_codeplug.cc:3638
virtual void setDecodingResponse(Response response)
Sets the decoding response.
Definition anytone_codeplug.cc:3530
virtual void setStopTime(unsigned ms)
Sets the stop time in ms.
Definition anytone_codeplug.cc:3647
virtual QString botID() const
Returns the 5tone BOT ID.
Definition anytone_codeplug.cc:3697
virtual bool hasPTTID() const
Returns true if the PTT ID is set.
Definition anytone_codeplug.cc:3590
virtual void setID(const QString &id)
Sets the 5tone radio ID.
Definition anytone_codeplug.cc:3566
virtual void setDelayAfterStop(unsigned ms)
Sets the delay after stop in ms.
Definition anytone_codeplug.cc:3665
virtual unsigned decodingToneDuration() const
Returns the decoding tone duration in ms.
Definition anytone_codeplug.cc:3544
virtual QString id() const
Returns the 5tone radio ID.
Definition anytone_codeplug.cc:3553
virtual void setPreTime(unsigned ms)
Sets the pre time in ms.
Definition anytone_codeplug.cc:3674
virtual bool sidetoneEnabled() const
Returns true if the sidetone is enabled.
Definition anytone_codeplug.cc:3625
virtual void setDecodeTime(unsigned ms)
Sets the decode time in ms.
Definition anytone_codeplug.cc:3656
virtual void setPostEncodeDelay(unsigned ms)
Sets the post-encode delay in ms.
Definition anytone_codeplug.cc:3585
virtual void enableSidetone(bool enable)
Enables/disables side tone.
Definition anytone_codeplug.cc:3629
virtual void setDecodingStandard(Standard standard)
Sets the decoding standard.
Definition anytone_codeplug.cc:3539
virtual unsigned firstDelay() const
Returns the first delay in ms.
Definition anytone_codeplug.cc:3616
virtual void setEOTID(const QString &id)
Sets the 5tone EOT ID.
Definition anytone_codeplug.cc:3756
virtual void setBOTStandard(Standard standard)
Sets the BOT standard.
Definition anytone_codeplug.cc:3683
virtual void setDecodingToneDuration(unsigned ms)
Sets the decoding tone duration in ms.
Definition anytone_codeplug.cc:3548
virtual void setPTTID(unsigned id)
Sets the PTT ID [5,75].
Definition anytone_codeplug.cc:3598
virtual unsigned preTime() const
Returns the pre time in ms.
Definition anytone_codeplug.cc:3670
virtual unsigned pttID() const
Returns the PTT ID.
Definition anytone_codeplug.cc:3594
virtual Response decodingResponse() const
Returns the decoding response.
Definition anytone_codeplug.cc:3526
virtual unsigned botToneDuration() const
Returns the BOT tone duration in ms.
Definition anytone_codeplug.cc:3688
virtual void setBOTToneDuration(unsigned ms)
Sets the BOT tone duration in ms.
Definition anytone_codeplug.cc:3692
virtual void setFirstDelay(unsigned ms)
Sets the first delay in ms.
Definition anytone_codeplug.cc:3620
virtual void setBOTID(const QString &id)
Sets the 5tone BOT ID.
Definition anytone_codeplug.cc:3710
virtual void setEOTStandard(Standard standard)
Sets the EOT standard.
Definition anytone_codeplug.cc:3729
virtual unsigned stopTime() const
Returns the stop time in ms.
Definition anytone_codeplug.cc:3643
virtual Standard botStandard() const
Returns the BOT standard.
Definition anytone_codeplug.cc:3679
Response
Possible responses to decoded 5-tone codes.
Definition anytone_codeplug.hh:2309
virtual Standard eotStandard() const
Returns the EOT standard.
Definition anytone_codeplug.cc:3725
virtual unsigned delayAfterStop() const
Returns the delay after stop in ms.
Definition anytone_codeplug.cc:3661
virtual void clearPTTID()
Clears the PTT ID.
Definition anytone_codeplug.cc:3602
virtual unsigned decodeTime() const
Returns the decode time in ms.
Definition anytone_codeplug.cc:3652
Represents the base class for the settings elements in all AnyTone codeplugs.
Definition anytone_codeplug.hh:807
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyALong() const =0
Returns the key function for a long press on the function key 1.
virtual bool updateConfig(Context &ctx)
Updates the abstract config from general settings.
Definition anytone_codeplug.cc:1842
virtual Interval menuExitTime() const =0
Returns the menu exit time in seconds.
virtual unsigned squelchLevelB() const
Squelch level of VFO B, (0=off).
Definition anytone_codeplug.cc:1677
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyBShort() const =0
Returns the key function for a short press on the function key 2/B.
virtual bool autoKeyLock() const
Returns true if auto key-lock is enabled.
Definition anytone_codeplug.cc:1617
virtual void enableSMSAlert(bool enable)=0
Enables/disables SMS alert.
virtual void enableEnhancedAudio(bool enable)=0
Enables/disables "enhanced" audio.
virtual void enableShowCurrentContact(bool enable)=0
Enables/disables display of current contact.
virtual void setFuncKey2Long(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 2.
virtual unsigned maxSpeakerVolume() const =0
Returns the maximum volume.
virtual void enableVolumeChangePrompt(bool enable)=0
Enables/disables the volume change prompt.
virtual void resetToneMelody(Melody &melody) const =0
Returns the reset-tone melody.
virtual void enableShowLastHeard(bool enable)=0
Enables/disables showing last heard.
virtual bool keyLockForced() const =0
Returns true if the "professional" key is locked.
virtual void enableGPSUnitsImperial(bool enable)=0
Enables/disables imperial GPS units.
virtual void setMenuExitTime(Interval intv)=0
Sets the menu exit time in seconds.
virtual unsigned dmrMicGain() const =0
Returns the mirophone gain.
virtual void setAutoRepeaterMinFrequencyVHF(Frequency Hz)=0
Sets the minimum frequency in Hz for the auto-repeater range in VHF band.
virtual bool defaultChannelAIsVFO() const =0
Returns true if the default channel for VFO A is VFO.
virtual void callToneMelody(Melody &melody) const =0
Returns the call-tone melody.
virtual bool fmTalkPermit() const =0
Returns true if the talk permit tone is enabled for digital channels.
virtual void setDefaultChannelAIndex(unsigned idx)=0
Sets the default channel index for VFO A.
virtual void setDefaultZoneIndexA(unsigned idx)=0
Sets the default zone (0-based) for VFO A.
virtual void enableStartupTone(bool enable)=0
Enables/disables the startup tone.
virtual unsigned defaultChannelAIndex() const =0
Returns the default channel index for VFO A.
virtual bool enhanceAudio() const =0
Returns true if the audio is "enhanced".
virtual void setVFOScanType(AnytoneSettingsExtension::VFOScanType type)=0
Sets the VFO scan type.
virtual void setIdleToneMelody(const Melody &melody)=0
Sets the idle-tone melody.
virtual void enableDMRTalkPermit(bool enable)=0
Enables/disables the talk permit tone for digital channels.
virtual void enableGPS(bool enable)=0
Enables/disables recording.
virtual void setDefaultZoneIndexB(unsigned idx)=0
Sets the default zone (0-based) for VFO B.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyAShort() const =0
Returns the key function for a short press on the function key 1/A.
virtual void setAutoRepeaterOffsetFrequenyIndexUHF(unsigned idx)=0
Sets the auto-repeater offset frequency index for UHF.
virtual bool smsAlert() const =0
Returns true if SMS alert is enabled.
virtual Frequency maxVFOScanFrequencyUHF() const =0
Returns the maximum VFO scan frequency for the UHF band in Hz.
virtual void setCallToneMelody(const Melody &melody)=0
Sets the call-tone melody.
virtual bool displayClock() const =0
Returns true if the clock is shown.
virtual void enableDisplayCall(bool enable)=0
Enables/disables call display.
virtual bool defaultChannel() const =0
Returns true if the default boot channel is enabled.
virtual Frequency autoRepeaterMinFrequencyVHF() const =0
Returns the minimum frequency in Hz for the auto-repeater range in VHF band.
virtual bool volumeChangePrompt() const =0
Returns true if the volume change prompt is enabled.
virtual void enableDefaultChannel(bool enable)=0
Enables/disables default boot channel.
virtual void setDefaultChannelBIndex(unsigned idx)=0
Sets the default channel index for VFO B.
virtual void enableKeypadLock(bool enable)=0
Enables/disables the keypad lock.
virtual void enableIdleChannelTone(bool enable)=0
Enables/disables the idle channel tone.
virtual bool keyToneEnabled() const =0
Returns true, if the key tone is enabled.
virtual void enableFMTalkPermit(bool enable)=0
Enables/disables the talk permit tone for analog channels.
virtual bool vfoModeA() const =0
Returns true if the VFO A is in VFO mode.
virtual void enableDisplayClock(bool enable)=0
Enables/disables clock display.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey2Long() const =0
Returns the key function for a long press on the function key 2.
virtual bool gpsUnitsImperial() const =0
Returns true if the GPS units are imperial.
virtual void enableDisplayFrequency(bool enable)
Enables/disables the frequency display.
Definition anytone_codeplug.cc:1612
virtual void setFuncKeyCLong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 3.
virtual QTimeZone gpsTimeZone() const =0
Returns the GPS time zone.
virtual unsigned brightness() const =0
Returns the display brightness.
virtual void setAutoRepeaterMinFrequencyUHF(Frequency Hz)=0
Sets the minimum frequency in Hz for the auto-repeater range in UHF band.
virtual Frequency autoRepeaterMaxFrequencyVHF() const =0
Returns the maximum frequency in Hz for the auto-repeater range in VHF band.
virtual void enableVFOModeA(bool enable)=0
Enables/disables VFO mode for VFO A.
virtual bool callAlert() const =0
Returns true if call alert is enabled.
virtual unsigned autoRepeaterOffsetFrequencyIndexVHF() const =0
Returns the auto-repeater offset frequency index for UHF.
AutoShutdown
Possible automatic shutdown delays.
Definition anytone_codeplug.hh:810
virtual void setAutoRepeaterOffsetFrequenyIndexVHF(unsigned idx)=0
Sets the auto-repeater offset frequency index for VHF.
virtual void setDefaultChannelAToVFO()=0
Sets the default channel for VFO A to be VFO.
virtual bool dmrTalkPermit() const =0
Returns true if the talk permit tone is enabled for digital channels.
GeneralSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:1596
virtual void setMinVFOScanFrequencyVHF(Frequency hz)=0
Sets the minimum VFO scan frequency for the VHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey1Long() const =0
Returns the key function for a long press on the function key 1.
virtual void setSquelchLevelA(unsigned level)
Returns the squelch level for VFO A, (0=off).
Definition anytone_codeplug.cc:1674
virtual Interval longPressDuration() const =0
Returns the long-press duration in ms.
virtual bool keypadLock() const =0
Returns true if the keypad is locked.
virtual bool recording() const =0
Returns true if recording is enabled.
virtual bool displayFrequency() const
Returns true if the radio displays frequecies instead of channels is enabled.
Definition anytone_codeplug.cc:1608
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyCLong() const =0
Returns the key function for a long press on the function key 3.
virtual bool showLastHeard() const =0
Returns true if the last heard is shown while pressing PTT.
virtual void enableSubChannel(bool enable)=0
Enables/disables sub channel.
virtual unsigned defaultZoneIndexB() const =0
Returns the default zone index (0-based) for VFO B.
virtual void setFuncKeyAShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 1/A.
virtual void clearAutoRepeaterOffsetFrequencyIndexUHF()=0
Clears the auto-repeater offset frequency index for UHF.
virtual bool dmrResetTone() const =0
Returns true if the reset tone is enabled for digital calls.
virtual void enableKeepLastCaller(bool enable)=0
Enables/disables keeping the last caller when changing the channel.
virtual AnytoneSettingsExtension::VFOScanType vfoScanType() const =0
Returns the VFO scan type.
virtual void setMemoryZoneB(unsigned zone)=0
Sets the memory zone for VFO B.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyCShort() const =0
Returns the key function for a short press on the function key 3/C.
virtual void setLastCallerDisplayMode(AnytoneDisplaySettingsExtension::LastCallerDisplayMode mode)=0
Sets the last-caller display mode.
virtual bool linkSettings(RadioSettings *settings, Context &ctx, const ErrorStack &err=ErrorStack())
Links the general settings.
Definition anytone_codeplug.cc:1944
virtual bool hasAutoRepeaterOffsetFrequencyIndexUHF() const =0
Returns true if the auto-repeater offset frequency for UHF is set.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey1Short() const =0
Returns the key function for a short press on the function key 1.
virtual void setBrightness(unsigned level)=0
Sets the display brightness.
virtual void setBootDisplay(AnytoneBootSettingsExtension::BootDisplay mode)
Sets the boot display mode.
Definition anytone_codeplug.cc:1656
virtual void enableActiveChannelB(bool enable)=0
Enables/disables VFO B as the active channel.
virtual bool subChannel() const =0
Returns true if sub channel is enabled.
virtual AnytoneDisplaySettingsExtension::LastCallerDisplayMode lastCallerDisplayMode() const =0
Returns the last-caller display mode.
virtual void enableCallEndPrompt(bool enable)=0
Enables/disables the call-end prompt.
virtual void setMinVFOScanFrequencyUHF(Frequency hz)=0
Sets the minimum VFO scan frequency for the UHF band in Hz.
virtual void setFuncKeyBShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 2/B.
virtual bool knobLock() const =0
Returns true if the knob is locked.
virtual bool vfoModeB() const =0
Returns true if the VFO B is in VFO mode.
virtual void setMaxVFOScanFrequencyUHF(Frequency hz)=0
Sets the maximum VFO scan frequency for the UHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKey2Short() const =0
Returns the key function for a short press on the function key 2.
virtual bool defaultChannelBIsVFO() const =0
Returns true if the default channel for VFO B is VFO.
virtual void setCallDisplayColor(AnytoneDisplaySettingsExtension::Color color)=0
Sets the display color for callsigns.
virtual void setGPSTimeZone(const QTimeZone &zone)=0
Sets the GPS time zone.
virtual void enableKeyTone(bool enable)=0
Enables/disables the key-tone.
virtual unsigned memoryZoneA() const =0
Returns the memory zone for VFO A.
virtual void setFuncKeyALong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 1.
virtual void enableKnobLock(bool enable)=0
Enables/disables the knob lock.
virtual Frequency minVFOScanFrequencyVHF() const =0
Returns the minimum VFO scan frequency for the VHF band in Hz.
virtual bool callEndPrompt() const =0
Returns true if the call-end prompt is enabled.
virtual void enableVFOModeB(bool enable)=0
Enables/disables VFO mode for VFO B.
virtual AnytoneAutoRepeaterSettingsExtension::Direction autoRepeaterDirectionA() const =0
Returns the auto repeater offset direction for VFO A.
virtual unsigned defaultChannelBIndex() const =0
Returns the default channel index for VFO B.
virtual bool getGPSPosition() const =0
Returns true if get GPS position is enabled.
virtual Frequency maxVFOScanFrequencyVHF() const =0
Returns the maximum VFO scan frequency for the VHF band in Hz.
virtual AnytoneAutoRepeaterSettingsExtension::Direction autoRepeaterDirectionB() const =0
Returns the auto-repeater direction for VFO B.
virtual AnytoneBootSettingsExtension::BootDisplay bootDisplay() const
Returns the boot display mode.
Definition anytone_codeplug.cc:1652
virtual bool fromConfig(const Flags &flags, Context &ctx)
Encodes the general settings.
Definition anytone_codeplug.cc:1686
virtual void setDefaultChannelBToVFO()=0
Sets the default channel for VFO B to be VFO.
virtual void setFuncKeyBLong(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 2.
virtual void clearAutoRepeaterOffsetFrequencyIndexVHF()=0
Clears the auto-repeater offset frequency index for VHF.
virtual unsigned autoRepeaterOffsetFrequencyIndexUHF() const =0
Returns the auto-repeater offset frequency index for UHF.
virtual void idleToneMelody(Melody &melody) const =0
Returns the idle-tone melody.
virtual void setResetToneMelody(const Melody &melody)=0
Sets the reset-tone melody.
virtual void setAutoRepeaterDirectionA(AnytoneAutoRepeaterSettingsExtension::Direction dir)=0
Sets the auto-repeater offset direction for VFO A.
virtual bool idleChannelTone() const =0
Returns true if the idle channel tone is enabled.
virtual bool startupTone() const =0
Returns true if the startup tone is enabled.
virtual void setDMRMicGain(unsigned int gain)=0
Sets the microphone gain.
virtual void setAutoRepeaterMaxFrequencyVHF(Frequency Hz)=0
Sets the maximum frequency in Hz for the auto-repeater range in VHF band.
virtual AnytoneDisplaySettingsExtension::Color callDisplayColor() const =0
Returns the display color for callsigns.
virtual void enableSidekeysLock(bool enable)=0
Enables/disables the sidekeys lock.
virtual void setLongPressDuration(Interval ms)=0
Sets the long-press duration in ms.
virtual void setFuncKey2Short(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 2.
virtual void setFuncKey1Long(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a long press on the function key 1.
virtual void setFuncKey1Short(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 1.
virtual bool sidekeysLock() const =0
Returns true if the sidekeys are locked.
virtual void setAutoRepeaterDirectionB(AnytoneAutoRepeaterSettingsExtension::Direction dir)=0
Sets the auto-repeater direction for VFO B.
virtual Frequency autoRepeaterMinFrequencyUHF() const =0
Returns the minimum frequency in Hz for the auto-repeater range in UHF band.
virtual void enableBootPassword(bool enable)
Enables/disables boot password.
Definition anytone_codeplug.cc:1665
void clear()
Resets the general settings.
Definition anytone_codeplug.cc:1603
virtual void enableKeyLockForced(bool enable)=0
Enables/disables the "professional" key lock.
virtual void setSquelchLevelB(unsigned level)
Returns the squelch level for VFO B, (0=off).
Definition anytone_codeplug.cc:1681
virtual bool activeChannelB() const =0
Returns true if the active channel is VFO B.
virtual bool keepLastCaller() const =0
Returns true if the last caller is kept when changing channel.
virtual bool showCurrentContact() const =0
Returns true if the current contact is shown.
virtual void setAutoRepeaterMaxFrequencyUHF(Frequency Hz)=0
Sets the maximum frequency in Hz for the auto-repeater range in UHF band.
virtual bool displayCall() const =0
Returns true if the call is displayed instead of the name.
virtual void enableCallAlert(bool enable)=0
Enables/disables call alert.
virtual bool hasAutoRepeaterOffsetFrequencyIndexVHF() const =0
Returns true if the auto-repeater offset frequency for VHF is set.
virtual unsigned memoryZoneB() const =0
Returns the memory zone for VFO B.
virtual Frequency minVFOScanFrequencyUHF() const =0
Returns the minimum VFO scan frequency for the UHF band in Hz.
virtual AnytoneKeySettingsExtension::KeyFunction funcKeyBLong() const =0
Returns the key function for a long press on the function key 2.
virtual void setMaxSpeakerVolume(unsigned level)=0
Sets the maximum volume.
virtual bool gps() const =0
Returns true if GPS is enabled.
virtual void setMemoryZoneA(unsigned zone)=0
Sets the memory zone for VFO A.
virtual Frequency autoRepeaterMaxFrequencyUHF() const =0
Returns the maximum frequency in Hz for the auto-repeater range in UHF band.
virtual void setMaxVFOScanFrequencyVHF(Frequency hz)=0
Sets the maximum VFO scan frequency for the VHF band in Hz.
virtual unsigned defaultZoneIndexA() const =0
Returns the default zone index (0-based) for VFO A.
virtual void setAutoShutdownDelay(Interval min)
Sets the auto-shutdown delay in minutes.
Definition anytone_codeplug.cc:1637
virtual void enableRecording(bool enable)=0
Enables/disables recording.
virtual Interval autoShutdownDelay() const
Returns the auto-shutdown delay in minutes.
Definition anytone_codeplug.cc:1626
virtual void enableDMRResetTone(bool enable)=0
Enables/disables the reset tone for digital calls.
virtual void enableAutoKeyLock(bool enable)
Enables/disables auto key-lock.
Definition anytone_codeplug.cc:1621
virtual void enableGetGPSPosition(bool enable)=0
Enables/disables get GPS position.
virtual bool bootPassword() const
Returns true if boot password is enabled.
Definition anytone_codeplug.cc:1661
virtual void setFuncKeyCShort(AnytoneKeySettingsExtension::KeyFunction func)=0
Sets the key function for a short press on the function key 3/C.
virtual unsigned squelchLevelA() const
Squelch level of VFO A, (0=off).
Definition anytone_codeplug.cc:1670
Represents the bitmap indicating which group list element is valid.
Definition anytone_codeplug.hh:603
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:613
GroupListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:1269
Represents the base class for group lists in all AnyTone codeplugs.
Definition anytone_codeplug.hh:559
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition anytone_codeplug.cc:1204
virtual RXGroupList * toGroupListObj() const
Constructs a new RXGroupList from this group list.
Definition anytone_codeplug.cc:1217
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is valid.
Definition anytone_codeplug.cc:1200
virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx)
Constructs this group list from the given RXGroupList.
Definition anytone_codeplug.cc:1239
void clear()
Clears the group list.
Definition anytone_codeplug.cc:1179
GroupListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:1166
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:569
bool isValid() const
Returns true if the group list is valid.
Definition anytone_codeplug.cc:1186
virtual void setName(const QString &name)
Sets the name of the group list.
Definition anytone_codeplug.cc:1195
virtual bool linkGroupList(RXGroupList *lst, Context &ctx) const
Populates the RXGroupList from this group list.
Definition anytone_codeplug.cc:1222
virtual QString name() const
Returns the name of the group list.
Definition anytone_codeplug.cc:1191
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition anytone_codeplug.cc:1212
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition anytone_codeplug.cc:1208
Represents the base class of a hot-key setting entry for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1747
virtual DigiCallType digiCallType() const
If type returns Type::Call and callType CalLType::Digital, returns the digital call type.
Definition anytone_codeplug.cc:2889
virtual void setContactIndex(unsigned idx)
Sets the contact index.
Definition anytone_codeplug.cc:2906
Type
Hot-key types.
Definition anytone_codeplug.hh:1750
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1793
void clear()
Resets the hot-key entry.
Definition anytone_codeplug.cc:2855
virtual Type type() const
Returns the type of the hot-key entry.
Definition anytone_codeplug.cc:2862
virtual void setMessageIndex(unsigned idx)
Sets the message index.
Definition anytone_codeplug.cc:2923
virtual void clearContactIndex()
Clears the contact index.
Definition anytone_codeplug.cc:2910
DigiCallType
Possible digital call sub-types.
Definition anytone_codeplug.hh:1774
virtual unsigned contactIndex() const
If type is Type::Call, returns the contact index.
Definition anytone_codeplug.cc:2902
virtual void clearMessageIndex()
Clears the message index.
Definition anytone_codeplug.cc:2927
virtual CallType callType() const
If type returns Type::Call, returns the type of the call.
Definition anytone_codeplug.cc:2880
virtual void setMenuItem(MenuItem item)
Sets the menu item.
Definition anytone_codeplug.cc:2875
virtual bool hasContactIndex() const
Returns true if the contact index is set.
Definition anytone_codeplug.cc:2898
HotKeyElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2842
virtual void setCallType(CallType type)
Sets the call type.
Definition anytone_codeplug.cc:2884
CallType
Possible call types.
Definition anytone_codeplug.hh:1768
virtual unsigned messageIndex() const
Returns the message index.
Definition anytone_codeplug.cc:2919
virtual void setType(Type type)
Sets the type of the hot-key entry.
Definition anytone_codeplug.cc:2866
virtual MenuItem menuItem() const
If type returns Type::Menu, returns the menu item.
Definition anytone_codeplug.cc:2871
MenuItem
Possible menu items.
Definition anytone_codeplug.hh:1756
virtual bool hasMessageIndex() const
Returns true if a message index is set.
Definition anytone_codeplug.cc:2915
virtual void setDigiCallType(DigiCallType type)
Sets the digital call type.
Definition anytone_codeplug.cc:2893
Represents the list of hot-key settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1852
HotKeySettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2935
virtual uint8_t * hotKeySetting(unsigned int n) const
Returns a pointer to the n-th hot key setting.
Definition anytone_codeplug.cc:2955
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:2948
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1862
Represents the base class for inverted bitmaps in all AnyTone codeplugs.
Definition anytone_codeplug.hh:60
void clear()
Clears the bitmap, disables all channels.
Definition anytone_codeplug.cc:106
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition anytone_codeplug.cc:111
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition anytone_codeplug.cc:126
InvertedBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:99
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition anytone_codeplug.cc:117
Represents the base class for inverted bytemaps in all AnyTone codeplugs.
Definition anytone_codeplug.hh:84
virtual void setEncoded(unsigned int idx, bool enable)
Enables/disables the specified index.
Definition anytone_codeplug.cc:157
virtual bool isEncoded(unsigned int idx) const
Returns true if the given index is valid.
Definition anytone_codeplug.cc:150
virtual void enableFirst(unsigned int n)
Enables the first n elements.
Definition anytone_codeplug.cc:164
void clear()
Clears the bitmap, disables all channels.
Definition anytone_codeplug.cc:145
InvertedBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:138
Represents the bytemap indicating which message is valid.
Definition anytone_codeplug.hh:1591
MessageBytemapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2699
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1601
Represents base class of a preset message for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1568
MessageElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2669
virtual QString message() const
Returns the message text.
Definition anytone_codeplug.cc:2687
void clear()
Resets the message.
Definition anytone_codeplug.cc:2682
virtual void setMessage(const QString &msg)
Sets the message text.
Definition anytone_codeplug.cc:2691
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1578
Represents the base class of prefabricated message linked list for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1529
virtual void setIndex(unsigned idx)
Sets the index of the message.
Definition anytone_codeplug.cc:2657
virtual bool hasIndex() const
Returns true if there is a message index.
Definition anytone_codeplug.cc:2649
virtual unsigned next() const
Returns the index of the next message in list.
Definition anytone_codeplug.cc:2636
virtual unsigned index() const
Returns the index of the message.
Definition anytone_codeplug.cc:2653
void clear()
Clears the message list item.
Definition anytone_codeplug.cc:2625
virtual void setNext(unsigned idx)
Sets the index of the next message in list.
Definition anytone_codeplug.cc:2640
MessageListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2612
virtual void clearNext()
Clears the next message index.
Definition anytone_codeplug.cc:2644
virtual bool hasNext() const
Returns true if there is a next message (EOL otherwise).
Definition anytone_codeplug.cc:2632
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1539
virtual void clearIndex()
Clears the index of the message.
Definition anytone_codeplug.cc:2661
Represents the bitmap indicating which radio IDs are valid.
Definition anytone_codeplug.hh:786
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:796
RadioIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:1580
Represents the base class for radio IDs in all AnyTone codeplugs.
Definition anytone_codeplug.hh:753
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:763
virtual bool fromRadioID(DMRRadioID *id)
Encodes the given RadioID.
Definition anytone_codeplug.cc:1570
virtual void setName(const QString &name)
Sets the name of the radio ID.
Definition anytone_codeplug.cc:1561
void clear()
Resets the radio ID.
Definition anytone_codeplug.cc:1544
RadioIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:1531
virtual DMRRadioID * toRadioID() const
Constructs a new radio id.
Definition anytone_codeplug.cc:1566
virtual void setNumber(unsigned number)
Sets the number of the radio ID.
Definition anytone_codeplug.cc:1552
virtual QString name() const
Returns the name of the radio ID.
Definition anytone_codeplug.cc:1557
virtual unsigned number() const
Returns the number of the radio ID.
Definition anytone_codeplug.cc:1548
Represents the table of repeater offset frequencies.
Definition anytone_codeplug.hh:1483
virtual bool isSet(unsigned int n) const
Returns true, if the n-th offset frequency is set.
Definition anytone_codeplug.cc:2577
virtual Frequency offset(unsigned int n) const
Returns the n-th offset frequency.
Definition anytone_codeplug.cc:2584
virtual void setOffset(unsigned int n, Frequency freq)
Sets the n-th offset frequency.
Definition anytone_codeplug.cc:2594
RepeaterOffsetListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2557
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:2570
virtual void clearOffset(unsigned int n)
Clears the n-th offset frequency.
Definition anytone_codeplug.cc:2602
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1493
Represents the bitmap indicating which scanlist elements are valid.
Definition anytone_codeplug.hh:735
ScanListBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:1515
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:745
Represents the base class for scan lists in all AnyTone codeplugs.
Definition anytone_codeplug.hh:621
virtual void setSecondarySelected()
Sets the secondary channel to be selected channel.
Definition anytone_codeplug.cc:1363
virtual bool fromScanListObj(ScanList *lst, Context &ctx)
Constructs the binary representation from the give config.
Definition anytone_codeplug.cc:1475
virtual void setSecondary(unsigned idx)
Sets the secondary channel index.
Definition anytone_codeplug.cc:1359
virtual PriChannel priorityChannels() const
Returns the priority channel selection.
Definition anytone_codeplug.cc:1313
ScanListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:1285
virtual QString name() const
Returns the name of the scan list.
Definition anytone_codeplug.cc:1414
virtual void setDropOutDelay(unsigned sec)
Sets the drop out delay in seconds.
Definition anytone_codeplug.cc:1392
virtual bool hasSecondary() const
Returns true if the secondary channel is set.
Definition anytone_codeplug.cc:1347
virtual bool hasPrimary() const
Returns true if the primary channel is set.
Definition anytone_codeplug.cc:1322
virtual bool primaryIsSelected() const
Returns true if the primary channel is set to the selected channel.
Definition anytone_codeplug.cc:1326
virtual unsigned memberIndex(unsigned n) const
Returns the n-th member index.
Definition anytone_codeplug.cc:1427
virtual void setRevertChannel(RevertChannel type)
Sets the revert channel type.
Definition anytone_codeplug.cc:1409
virtual ScanList * toScanListObj() const
Constructs a ScanList object from this definition.
Definition anytone_codeplug.cc:1440
virtual unsigned lookBackTimeA() const
Returns the look back time A in seconds.
Definition anytone_codeplug.cc:1372
virtual void setPrimary(unsigned idx)
Sets the primary channel index.
Definition anytone_codeplug.cc:1334
virtual void setPrimarySelected()
Sets the primary channel to be selected channel.
Definition anytone_codeplug.cc:1338
virtual void setDwellTime(unsigned sec)
Sets the dwell time in seconds.
Definition anytone_codeplug.cc:1400
virtual unsigned primary() const
Returns the primary channel index.
Definition anytone_codeplug.cc:1330
PriChannel
Defines all possible priority channel selections.
Definition anytone_codeplug.hh:624
@ Secondary
Priority Channel Select 2.
@ Both
Priority Channel Select 1 + Priority Channel Select 2.
virtual void setName(const QString &name)
Sets the name of the scan list.
Definition anytone_codeplug.cc:1418
virtual bool secondaryIsSelected() const
Returns true if the secondary channel is set to the selected channel.
Definition anytone_codeplug.cc:1351
virtual void setPriorityChannels(PriChannel sel)
Sets the priority channel selection.
Definition anytone_codeplug.cc:1317
virtual void clearSecondaryChannel()
Clears the secondary channel index.
Definition anytone_codeplug.cc:1367
virtual RevertChannel revertChannel() const
Returns the revert channel type.
Definition anytone_codeplug.cc:1405
virtual bool hasMemberIndex(unsigned n) const
Returns true if the n-th member index is set.
Definition anytone_codeplug.cc:1423
virtual unsigned lookBackTimeB() const
Returns the look back time B in seconds.
Definition anytone_codeplug.cc:1380
virtual void clearPrimaryChannel()
Clears the primary channel index.
Definition anytone_codeplug.cc:1342
virtual void setLookBackTimeA(unsigned sec)
Sets the look back time A in seconds.
Definition anytone_codeplug.cc:1376
RevertChannel
Defines all possible reply channel selections.
Definition anytone_codeplug.hh:632
@ SecondaryActive
Secondary + active channel.
@ SelectedActive
Selected + active channel.
void clear()
Resets the scan list.
Definition anytone_codeplug.cc:1298
virtual void setMemberIndex(unsigned n, unsigned idx)
Sets the n-th member index.
Definition anytone_codeplug.cc:1431
virtual unsigned dropOutDelay() const
Returns the drop out delay in seconds.
Definition anytone_codeplug.cc:1388
virtual void setLookBackTimeB(unsigned sec)
Sets the look back time B in seconds.
Definition anytone_codeplug.cc:1384
virtual void clearMemberIndex(unsigned n)
Clears the n-th member index.
Definition anytone_codeplug.cc:1435
virtual unsigned secondary() const
Returns the secondary channel index.
Definition anytone_codeplug.cc:1355
virtual bool linkScanListObj(ScanList *lst, Context &ctx) const
Links all channels (members and primary channels) with the given scan-list object.
Definition anytone_codeplug.cc:1445
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:652
virtual unsigned dwellTime() const
Returns the dwell time in seconds.
Definition anytone_codeplug.cc:1396
Represents the bitmap, indicating which status messages are valid.
Definition anytone_codeplug.hh:1729
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1739
StatusMessageBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2826
Implements the list of status messages for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1691
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1701
virtual QString message(unsigned int n) const
Returns the n-th status message.
Definition anytone_codeplug.cc:2810
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:2805
StatusMessagesElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2792
virtual void setMessage(unsigned int n, const QString &msg)
Sets the n-th status message.
Definition anytone_codeplug.cc:2816
Rerpesents the two-tone function bitmap, indicating which two-tone functions are valid.
Definition anytone_codeplug.hh:2558
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2568
TwoToneFunctionBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:3895
Represents the base-class for a 2-tone function for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2497
virtual Response response() const
Returns the response.
Definition anytone_codeplug.cc:3874
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition anytone_codeplug.cc:3869
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition anytone_codeplug.cc:3860
Response
Possible responses to a decode.
Definition anytone_codeplug.hh:2500
void clear()
Resets the function.
Definition anytone_codeplug.cc:3851
virtual void setResponse(Response resp)
Sets the response.
Definition anytone_codeplug.cc:3878
virtual QString name() const
Returns the name of the function.
Definition anytone_codeplug.cc:3883
virtual double secondTone() const
Returns the second tone of the sequence.
Definition anytone_codeplug.cc:3865
virtual void setName(const QString &name)
Sets the name of the function.
Definition anytone_codeplug.cc:3887
TwoToneFunctionElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3838
virtual double firstTone() const
Returns the first tone of the sequence.
Definition anytone_codeplug.cc:3856
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2513
Represents the two-tone ID bitmap, indicating the which two-tone IDs are valid.
Definition anytone_codeplug.hh:2479
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2489
TwoToneIDBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:3822
Represents the base-class for a 2-tone ID for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2430
virtual void setSecondTone(double f)
Sets the second tone of the sequence.
Definition anytone_codeplug.cc:3805
virtual QString name() const
Returns the name of the function.
Definition anytone_codeplug.cc:3810
void clear()
Resets the ID.
Definition anytone_codeplug.cc:3787
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2440
virtual void setFirstTone(double f)
Sets the first tone of the sequence.
Definition anytone_codeplug.cc:3796
virtual double firstTone() const
Returns the first tone of the sequence.
Definition anytone_codeplug.cc:3792
virtual void setName(const QString &name)
Sets the name of the function.
Definition anytone_codeplug.cc:3814
TwoToneIDElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3774
virtual double secondTone() const
Returns the second tone of the sequence.
Definition anytone_codeplug.cc:3801
Represents the base class of 2-tone settings for all AnyTone codeplugs.
Definition anytone_codeplug.hh:2576
virtual unsigned gapDuration() const
Returns the gap duration in ms.
Definition anytone_codeplug.cc:3956
virtual void setFirstToneDuration(unsigned ms)
Sets the first tone duration in ms.
Definition anytone_codeplug.cc:3933
virtual bool sidetone() const
Returns true if the sidetone is enabled.
Definition anytone_codeplug.cc:3974
virtual void setSecondToneDuration(unsigned ms)
Sets the second tone duration in ms.
Definition anytone_codeplug.cc:3942
virtual unsigned firstToneDuration() const
Returns the first tone duration in ms.
Definition anytone_codeplug.cc:3929
virtual void enableSidetone(bool enable)
Enables/disables the sidetone.
Definition anytone_codeplug.cc:3978
virtual void setLongToneDuration(unsigned ms)
Sets the long tone duration in ms.
Definition anytone_codeplug.cc:3951
virtual void setAutoResetTime(unsigned sec)
Sets the auto-reset time in seconds.
Definition anytone_codeplug.cc:3969
TwoToneSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:3911
virtual unsigned autoResetTime() const
Returns the auto-reset time in seconds.
Definition anytone_codeplug.cc:3965
virtual unsigned longToneDuration() const
Returns the long tone duration in ms.
Definition anytone_codeplug.cc:3947
virtual unsigned secondToneDuration() const
Returns the second tone duration in ms.
Definition anytone_codeplug.cc:3938
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:2586
void clear()
Resets the settings.
Definition anytone_codeplug.cc:3924
virtual void setGapDuration(unsigned ms)
Sets the gap duration in ms.
Definition anytone_codeplug.cc:3960
Represents the bitmap, indicating which WFM (FM broadcast) channels are valid.
Definition anytone_codeplug.hh:2810
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2820
WFMChannelBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4289
Represents a list of 100 FM broad cast channels.
Definition anytone_codeplug.hh:2770
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2780
virtual void clearChannel(unsigned int n)
Clears the n-th channel frequency.
Definition anytone_codeplug.cc:4279
WFMChannelListElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4240
virtual void setChannel(unsigned int n, Frequency freq)
Sets the n-th channel frequency.
Definition anytone_codeplug.cc:4272
virtual Frequency channel(unsigned int n) const
Returns the n-th channel frequency.
Definition anytone_codeplug.cc:4265
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:4253
virtual bool hasChannel(unsigned int n) const
Returns true, if the n-th channel is set.
Definition anytone_codeplug.cc:4258
Represents the WFM (FM broadcast) VFO frquency.
Definition anytone_codeplug.hh:2825
virtual Frequency frequency() const
Returns the VFO frequency.
Definition anytone_codeplug.cc:4324
WFMVFOElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:4305
void clear()
Abstract method to reset the element within the codeplug.
Definition anytone_codeplug.cc:4318
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:2835
virtual void setFrequency(Frequency freq)
Sets the VFO frequency.
Definition anytone_codeplug.cc:4329
Represents the bitmap indcating which zones are valid.
Definition anytone_codeplug.hh:1288
static constexpr unsigned int size()
The size of the element.
Definition anytone_codeplug.hh:1298
ZoneBitmapElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition anytone_codeplug.cc:2165
Represents the base class for zone channel list for all AnyTone codeplugs.
Definition anytone_codeplug.hh:1252
virtual unsigned channelIndexA(unsigned n) const
Returns the channel index (0-based) for VFO A for the n-th zone.
Definition anytone_codeplug.cc:2132
virtual void setChannelIndexB(unsigned n, unsigned idx)
Sets the channel index (0-based) for VFO B for the n-th zone.
Definition anytone_codeplug.cc:2153
virtual bool hasChannelB(unsigned n) const
Returns true if the channel index for VFO B is set for the n-th zone.
Definition anytone_codeplug.cc:2145
void clear()
Resets the zone channel list.
Definition anytone_codeplug.cc:2121
ZoneChannelListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition anytone_codeplug.cc:2108
virtual bool hasChannelA(unsigned n) const
Returns true if the channel index for VFO A is set for the n-th zone.
Definition anytone_codeplug.cc:2128
virtual void clearChannelIndexA(unsigned n)
Clears the channel index (0-based) for VFO A for the n-th zone.
Definition anytone_codeplug.cc:2140
static constexpr unsigned int size()
Returns the size of the element.
Definition anytone_codeplug.hh:1262
virtual void setChannelIndexA(unsigned n, unsigned idx)
Sets the channel index (0-based) for VFO A for the n-th zone.
Definition anytone_codeplug.cc:2136
virtual void clearChannelIndexB(unsigned n)
Clears the channel index (0-based) for VFO B for the n-th zone.
Definition anytone_codeplug.cc:2157
virtual unsigned channelIndexB(unsigned n) const
Returns the channel index (0-based) for VFO B for the n-th zone.
Definition anytone_codeplug.cc:2149
Base class interface for all Anytone radio codeplugs.
Definition anytone_codeplug.hh:20
AnytoneCodeplug(const QString &label, QObject *parent=nullptr)
Hidden constructor.
Definition anytone_codeplug.cc:4477
virtual void setBitmaps(Context &ctx)=0
Sets all bitmaps for the given config.
bool encode(Config *config, const Flags &flags, const ErrorStack &err)
Encodes a given abstract configuration (config) to the device specific binary code-plug.
Definition anytone_codeplug.cc:4608
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition anytone_codeplug.cc:4488
virtual void allocateUpdated()=0
Allocate all code-plug elements that must be written back to the device to maintain a working codeplu...
virtual void allocateForEncoding()=0
Allocate all code-plug elements that are defined through the common Config.
virtual ~AnytoneCodeplug()
Destructor.
Definition anytone_codeplug.cc:4483
virtual void allocateForDecoding()=0
Allocate all code-plug elements that must be downloaded for decoding.
bool postprocess(Config *config, const ErrorStack &err) const
Retruns a post-processed configuration of the decoded config.
Definition anytone_codeplug.cc:4591
virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes the downloaded codeplug.
Config * preprocess(Config *config, const ErrorStack &err) const
Retruns a prepared configuration for this particular radio.
Definition anytone_codeplug.cc:4572
virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes the given config (via context) to the binary codeplug.
bool decode(Config *config, const ErrorStack &err)
Decodes a binary codeplug to the given abstract configuration config.
Definition anytone_codeplug.cc:4638
virtual bool allocateBitmaps()=0
Allocates the bitmaps.
QString _label
Holds the image label.
Definition anytone_codeplug.hh:2997
virtual bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition anytone_codeplug.cc:4499
AlertType
Possible ring-tone types.
Definition anytone_extension.hh:339
Color
Possible display colors.
Definition anytone_extension.hh:992
LastCallerDisplayMode
What to show from the last caller.
Definition anytone_extension.hh:986
SquelchMode
Possible squelch mode settings.
Definition anytone_extension.hh:159
KeyFunction
All possible key functions.
Definition anytone_extension.hh:603
Implements an interface to Anytone radios.
Definition anytone_radio.hh:34
VFOScanType
Encodes the possible VFO scan types.
Definition anytone_extension.hh:2166
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:273
Represents the abstract base class of all codeplug elements.
Definition codeplug.hh:52
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:26
This class defines the interface all device-specific code-plugs must implement.
Definition codeplug.hh:20
The config class, representing the codeplug configuration.
Definition config.hh:70
uint32_t size() const
Returns the total size of the DFU file.
Definition dfufile.cc:52
TimeSlot
Possible timeslots for digital channels.
Definition channel.hh:389
Represents a digital contact, that is a DMR number.
Definition contact.hh:141
Type
Possible call types for a contact.
Definition contact.hh:155
Represents a DMR radio ID within the abstract config.
Definition radioid.hh:33
Represents an analog contact, that is a DTMF number.
Definition contact.hh:89
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:41
Bandwidth
Possible bandwidth of an analog channel.
Definition channel.hh:240
Represents a time interval.
Definition interval.hh:11
A config item that encodes a melody.
Definition melody.hh:20
Generic representation of a RX group list.
Definition rxgrouplist.hh:14
Represents the common radio-global settings.
Definition radiosettings.hh:15
Generic representation of a scan list.
Definition scanlist.hh:15
Internal offsets within the element.
Definition anytone_codeplug.hh:2080
Some limits for the quick calls.
Definition anytone_codeplug.hh:1673
static constexpr unsigned int numEntries()
The maximum number of quick-call entries.
Definition anytone_codeplug.hh:1674
Some offsets within the element.
Definition anytone_codeplug.hh:1679
Implements encoding of CTCSS tones.
Definition anytone_codeplug.hh:25
static uint8_t encode(const SelectiveCall &tone)
Encodes Signaling::Code CTCSS tones.
Definition anytone_codeplug.cc:40
static SelectiveCall decode(uint8_t code)
Decodes to Signaling::Code CTCSS tones.
Definition anytone_codeplug.cc:49
static SelectiveCall _codeTable[52]
Translation table.
Definition anytone_codeplug.hh:23
Internal used offsets within the channel element.
Definition anytone_codeplug.hh:398
Some limits for the message.
Definition anytone_codeplug.hh:1465
static constexpr unsigned int length()
Maximum message length.
Definition anytone_codeplug.hh:1466
Some internal used offset.
Definition anytone_codeplug.hh:1471
Some limits for the list.
Definition anytone_codeplug.hh:2872
static constexpr unsigned int numEntries()
Maximum number of DMR encryption key IDs.
Definition anytone_codeplug.hh:2873
Some internal used offsets within the element.
Definition anytone_codeplug.hh:2878
Some limits of the list.
Definition anytone_codeplug.hh:2908
static constexpr unsigned numEntries()
Maximum number of keys.
Definition anytone_codeplug.hh:2909
Some offsets within the element.
Definition anytone_codeplug.hh:2914
Some limits for the element.
Definition anytone_codeplug.hh:523
static constexpr unsigned int digitCount()
The max number of digits.
Definition anytone_codeplug.hh:524
static constexpr unsigned int nameLength()
Maximum name length.
Definition anytone_codeplug.hh:525
Internal used offsets within the codeplug.
Definition anytone_codeplug.hh:530
Some limits of the list.
Definition anytone_codeplug.hh:2759
static constexpr unsigned int numberLength()
The maximum length of the numbers.
Definition anytone_codeplug.hh:2761
static constexpr unsigned int numEntries()
The maximum number of entries in the list.
Definition anytone_codeplug.hh:2760
Internal used offsets within the element.
Definition anytone_codeplug.hh:2120
Some limits for the list.
Definition anytone_codeplug.hh:2296
static constexpr unsigned int numFunctions()
The max number of functions.
Definition anytone_codeplug.hh:2297
Some limits for the list.
Definition anytone_codeplug.hh:2215
static constexpr unsigned int numEntries()
Maximum number of entries.
Definition anytone_codeplug.hh:2216
Internal used offsets within the element.
Definition anytone_codeplug.hh:1182
Some limits for this element.
Definition anytone_codeplug.hh:1871
static constexpr unsigned int numEntries()
Maximum number of hot-key entries.
Definition anytone_codeplug.hh:1872
Some internal offsets within the element.
Definition anytone_codeplug.hh:1877
Some limits for the offset frequency table.
Definition anytone_codeplug.hh:1508
static constexpr unsigned int numEntries()
Max number of entries in the table.
Definition anytone_codeplug.hh:1509
Some internal used offsets.
Definition anytone_codeplug.hh:1514
Some limits.
Definition anytone_codeplug.hh:1712
static constexpr unsigned int numMessages()
Maximum number of messages.
Definition anytone_codeplug.hh:1713
static constexpr unsigned int messageLength()
Maximum length of the messages.
Definition anytone_codeplug.hh:1714
Some internal offsets.
Definition anytone_codeplug.hh:1719
Some limits of the element.
Definition anytone_codeplug.hh:2540
static constexpr unsigned int nameLength()
Maximum name length.
Definition anytone_codeplug.hh:2541
Some internal offsets within the element.
Definition anytone_codeplug.hh:2546
Some limits for the element.
Definition anytone_codeplug.hh:2462
static constexpr unsigned int nameLength()
Maximum name length.
Definition anytone_codeplug.hh:2463
Some internal offsets within the element.
Definition anytone_codeplug.hh:2468
Some limits for the channel list.
Definition anytone_codeplug.hh:2795
static constexpr unsigned int numEntries()
Maximum number of channels in the list.
Definition anytone_codeplug.hh:2796
Some internal offsets within the element.
Definition anytone_codeplug.hh:2801
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:11
Encodes a selective call.
Definition signaling.hh:13