libdrmconf  0.12.0
A library to program DMR radios.
radioddity_codeplug.hh
1 #ifndef RADIODDITYCODEPLUG_HH
2 #define RADIODDITYCODEPLUG_HH
3 
4 #include "codeplug.hh"
5 #include "signaling.hh"
6 #include "channel.hh"
7 #include "contact.hh"
8 #include "radioddity_extensions.hh"
9 #include "ranges.hh"
10 
11 
12 class DMRContact;
13 class Zone;
14 class RXGroupList;
15 class ScanList;
16 
24 {
25  Q_OBJECT
26 
27 public:
33  {
34  public:
36  enum Mode {
38  MODE_DIGITAL = 1
39  };
40 
42  enum Admit {
45  ADMIT_COLOR = 2
46  };
47 
49  enum PrivacyGroup {
51  PRIVGR_53474C39 = 1
52  };
53 
54  protected:
56  ChannelElement(uint8_t *ptr, size_t size);
57 
58  public:
60  explicit ChannelElement(uint8_t *ptr);
62  virtual ~ChannelElement();
63 
65  virtual void clear();
66 
68  virtual QString name() const;
70  virtual void setName(const QString &n);
71 
73  virtual uint32_t rxFrequency() const;
75  virtual void setRXFrequency(uint32_t freq);
77  virtual uint32_t txFrequency() const;
79  virtual void setTXFrequency(uint32_t freq);
80 
82  virtual Mode mode() const;
84  virtual void setMode(Mode mode);
85 
87  virtual unsigned txTimeOut() const;
89  virtual void setTXTimeOut(unsigned tot);
91  virtual unsigned txTimeOutRekeyDelay() const;
93  virtual void setTXTimeOutRekeyDelay(unsigned delay);
94 
96  virtual Admit admitCriterion() const;
98  virtual void setAdmitCriterion(Admit admit);
99 
101  virtual bool hasScanList() const;
103  virtual unsigned scanListIndex() const;
105  virtual void setScanListIndex(unsigned index);
106 
108  virtual Signaling::Code rxTone() const;
110  virtual void setRXTone(Signaling::Code code);
112  virtual Signaling::Code txTone() const;
114  virtual void setTXTone(Signaling::Code code);
115 
117  virtual unsigned txSignalingIndex() const;
119  virtual void setTXSignalingIndex(unsigned index);
121  virtual unsigned rxSignalingIndex() const;
123  virtual void setRXSignalingIndex(unsigned index);
124 
126  virtual PrivacyGroup privacyGroup() const;
128  virtual void setPrivacyGroup(PrivacyGroup grp);
129 
131  virtual unsigned txColorCode() const;
133  virtual void setTXColorCode(unsigned cc);
134 
136  virtual bool hasGroupList() const;
138  virtual unsigned groupListIndex() const;
140  virtual void setGroupListIndex(unsigned index);
141 
143  virtual unsigned rxColorCode() const;
145  virtual void setRXColorCode(unsigned cc);
146 
148  virtual bool hasEmergencySystem() const;
150  virtual unsigned emergencySystemIndex() const;
152  virtual void setEmergencySystemIndex(unsigned index);
153 
155  virtual bool hasContact() const;
157  virtual unsigned contactIndex() const;
159  virtual void setContactIndex(unsigned index);
160 
162  virtual bool dataCallConfirm() const;
164  virtual void enableDataCallConfirm(bool enable);
166  virtual bool emergencyAlarmACK() const;
168  virtual void enableEmergencyAlarmACK(bool enable);
170  virtual bool privateCallConfirm() const;
172  virtual void enablePrivateCallConfirm(bool enable);
174  virtual bool privacyEnabled() const;
176  virtual void enablePrivacy(bool enable);
177 
179  virtual DMRChannel::TimeSlot timeSlot() const;
181  virtual void setTimeSlot(DMRChannel::TimeSlot ts);
182 
184  virtual bool dualCapacityDirectMode() const;
186  virtual void enableDualCapacityDirectMode(bool enable);
188  virtual bool nonSTEFrequency() const;
190  virtual void enableNonSTEFrequency(bool enable);
191 
193  virtual FMChannel::Bandwidth bandwidth() const;
195  virtual void setBandwidth(FMChannel::Bandwidth bw);
196 
198  virtual bool rxOnly() const;
200  virtual void enableRXOnly(bool enable);
202  virtual bool talkaround() const;
204  virtual void enableTalkaround(bool enable);
206  virtual bool vox() const;
208  virtual void enableVOX(bool enable);
209 
211  virtual Channel::Power power() const;
213  virtual void setPower(Channel::Power pwr);
214 
216  virtual Channel *toChannelObj(Context &ctx) const;
218  virtual bool linkChannelObj(Channel *c, Context &ctx) const;
220  virtual bool fromChannelObj(const Channel *c, Context &ctx);
221  };
222 
228  {
229  protected:
231  ChannelBankElement(uint8_t *ptr, unsigned size);
232 
233  public:
235  explicit ChannelBankElement(uint8_t *ptr);
237  virtual ~ChannelBankElement();
238 
240  void clear();
241 
243  virtual bool isEnabled(unsigned idx) const ;
245  virtual void enable(unsigned idx, bool enabled);
247  virtual uint8_t *get(unsigned idx) const;
248  };
249 
255  {
256  public:
258  enum class OffsetMode {
259  Off = 0,
260  Positive = 1,
261  Negative = 2
262  };
263 
265  enum class StepSize {
266  SS2_5kHz = 0,
267  SS5kHz = 1,
268  SS6_25kHz = 2,
269  SS10kHz = 3,
270  SS12_5kHz = 4,
271  SS20kHz = 5,
272  SS30kHz = 6,
273  SS50kHz = 7
274  };
275 
276  protected:
278  VFOChannelElement(uint8_t *ptr, unsigned size);
279 
280  public:
282  explicit VFOChannelElement(uint8_t *ptr);
283 
284  void clear();
285 
287  QString name() const;
289  void setName(const QString &name);
290 
292  virtual double stepSize() const;
294  virtual void setStepSize(double kHz);
295 
297  virtual OffsetMode offsetMode() const;
299  virtual double txOffset() const;
301  virtual void setTXOffset(double f);
303  virtual void setOffsetMode(OffsetMode mode);
304  };
305 
306 
311  class ContactElement: public Element
312  {
313  protected:
315  ContactElement(uint8_t *ptr, unsigned size);
316 
317  public:
319  explicit ContactElement(uint8_t *ptr);
321  virtual ~ContactElement();
322 
324  void clear();
326  bool isValid() const;
327 
329  virtual QString name() const;
331  virtual void setName(const QString name);
332 
334  virtual unsigned number() const;
336  virtual void setNumber(unsigned id);
337 
339  virtual DMRContact::Type type() const;
341  virtual void setType(DMRContact::Type type);
342 
344  virtual bool ring() const;
346  virtual void enableRing(bool enable);
347 
349  virtual unsigned ringStyle() const;
351  virtual void setRingStyle(unsigned style);
352 
354  virtual DMRContact *toContactObj(Context &ctx) const;
356  virtual void fromContactObj(const DMRContact *obj, Context &ctx);
357  };
358 
365  {
366  protected:
368  DTMFContactElement(uint8_t *ptr, unsigned size);
369 
370  public:
372  explicit DTMFContactElement(uint8_t *ptr);
374  virtual ~DTMFContactElement();
375 
377  void clear();
379  bool isValid() const;
380 
382  virtual QString name() const;
384  virtual void setName(const QString &name);
385 
387  virtual QString number() const;
389  virtual void setNumber(const QString &number);
390 
392  virtual DTMFContact *toContactObj(Context &ctx) const;
394  virtual void fromContactObj(const DTMFContact *obj, Context &ctx);
395  };
396 
402  class ZoneElement: public Element
403  {
404  protected:
406  ZoneElement(uint8_t *ptr, unsigned size);
407 
408  public:
410  explicit ZoneElement(uint8_t *ptr);
411  virtual ~ZoneElement();
412 
414  void clear();
416  bool isValid() const;
417 
419  virtual QString name() const;
421  virtual void setName(const QString &name);
422 
425  virtual bool hasMember(unsigned n) const;
427  virtual unsigned member(unsigned n) const;
429  virtual void setMember(unsigned n, unsigned idx);
431  virtual void clearMember(unsigned n);
432 
434  virtual Zone *toZoneObj(Context &ctx) const;
437  virtual bool linkZoneObj(Zone *zone, Context &ctx) const;
439  virtual void fromZoneObjA(const Zone *zone, Context &ctx);
441  virtual void fromZoneObjB(const Zone *zone, Context &ctx);
442  };
443 
449  class ZoneBankElement: public Element
450  {
451  protected:
453  ZoneBankElement(uint8_t *ptr, unsigned size);
454 
455  public:
457  explicit ZoneBankElement(uint8_t *ptr);
460 
462  void clear();
463 
465  virtual bool isEnabled(unsigned idx) const ;
467  virtual void enable(unsigned idx, bool enabled);
469  virtual uint8_t *get(unsigned idx) const;
470  };
471 
477  class GroupListElement: public Element
478  {
479  protected:
481  GroupListElement(uint8_t *ptr, unsigned size);
482 
483  public:
485  explicit GroupListElement(uint8_t *ptr);
487  virtual ~GroupListElement();
488 
490  static constexpr unsigned int size() { return 0x0030; }
491 
493  void clear();
494 
496  virtual QString name() const;
498  virtual void setName(const QString &name);
499 
502  virtual bool hasMember(unsigned n) const;
504  virtual unsigned member(unsigned n) const;
506  virtual void setMember(unsigned n, unsigned idx);
508  virtual void clearMember(unsigned n);
509 
511  virtual RXGroupList *toRXGroupListObj(Context &ctx, const ErrorStack &err=ErrorStack());
513  virtual bool linkRXGroupListObj(int ncnt, RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack()) const;
515  virtual void fromRXGroupListObj(const RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack());
516 
517  public:
519  struct Limit {
521  static constexpr unsigned int nameLength() { return 16; }
523  static constexpr unsigned int memberCount() { return 16; }
524  };
525 
526  protected:
528  struct Offset {
530  static constexpr unsigned int name() { return 0x0000; }
531  static constexpr unsigned int members() { return 0x0010; }
532  static constexpr unsigned int betweenMembers() { return 0x0002; }
534  };
535  };
536 
543  {
544  protected:
546  GroupListBankElement(uint8_t *ptr, unsigned size);
547 
548  public:
550  explicit GroupListBankElement(uint8_t *ptr);
552  virtual ~GroupListBankElement();
553 
555  static constexpr unsigned int size() { return 0x0c80; }
556 
558  void clear();
559 
561  virtual bool isEnabled(unsigned n) const;
563  virtual unsigned contactCount(unsigned n) const;
566  virtual void setContactCount(unsigned n, unsigned size);
568  virtual void disable(unsigned n);
569 
571  virtual uint8_t *get(unsigned n) const;
572 
573  public:
575  struct Limit {
577  static constexpr unsigned int memberCount() { return 64; }
578  };
579 
580  protected:
582  struct Offset {
584  static constexpr unsigned int contactCount() { return 0x0000; }
585  static constexpr unsigned int betweenContactCounts() { return 0x0000; }
586  static constexpr unsigned int groupLists() { return 0x0080; }
588  };
589  };
590 
596  class ScanListElement: public Element
597  {
598  public:
600  enum Mode {
601  PL_NONPRI = 0,
603  PL_PRI = 2,
604  PL_PRI_NONPRI = 3
605  };
606 
607  protected:
609  ScanListElement(uint8_t *ptr, unsigned size);
610 
611  public:
613  explicit ScanListElement(uint8_t *ptr);
615  virtual ~ScanListElement();
616 
618  void clear();
619 
621  virtual QString name() const;
623  virtual void setName(const QString &name);
624 
626  virtual bool channelMark() const;
628  virtual void enableChannelMark(bool enable);
629 
631  virtual Mode mode() const;
633  virtual void setMode(Mode mode);
634 
636  virtual bool talkback() const;
638  virtual void enableTalkback(bool enable);
639 
641  virtual bool hasMember(unsigned n) const;
643  virtual bool isSelected(unsigned n) const;
645  virtual unsigned member(unsigned n) const;
647  virtual void setMember(unsigned n, unsigned idx);
649  virtual void setSelected(unsigned n);
651  virtual void clearMember(unsigned n);
652 
654  virtual bool hasPrimary() const;
656  virtual bool primaryIsSelected() const;
658  virtual unsigned primary() const;
660  virtual void setPrimary(unsigned idx);
662  virtual void setPrimarySelected();
664  virtual void clearPrimary();
665 
667  virtual bool hasSecondary() const;
669  virtual bool secondaryIsSelected() const;
671  virtual unsigned secondary() const;
673  virtual void setSecondary(unsigned idx);
675  virtual void setSecondarySelected();
677  virtual void clearSecondary();
678 
681  virtual bool hasRevert() const;
683  virtual bool revertIsSelected() const;
685  virtual unsigned revert() const;
687  virtual void setRevert(unsigned idx);
689  virtual void setRevertSelected();
691  virtual void clearRevert();
692 
694  virtual unsigned holdTime() const;
696  virtual void setHoldTime(unsigned ms);
697 
699  virtual unsigned prioritySampleTime() const;
701  virtual void setPrioritySampleTime(unsigned ms);
702 
704  virtual ScanList *toScanListObj(Context &ctx) const;
706  virtual bool linkScanListObj(ScanList *lst, Context &ctx) const;
708  virtual void fromScanListObj(const ScanList *lst, Context &ctx);
709  };
710 
717  {
718  protected:
720  ScanListBankElement(uint8_t *ptr, unsigned size);
721 
722  public:
724  explicit ScanListBankElement(uint8_t *ptr);
726  virtual ~ScanListBankElement();
727 
729  void clear();
730 
732  virtual bool isEnabled(unsigned n) const;
734  virtual void enable(unsigned n, bool enabled);
736  virtual uint8_t *get(unsigned n) const;
737  };
738 
745  {
746  public:
753 
754  protected:
756  GeneralSettingsElement(uint8_t *ptr, unsigned size);
757 
758  public:
760  explicit GeneralSettingsElement(uint8_t *ptr);
762  virtual ~GeneralSettingsElement();
763 
765  void clear();
766 
768  virtual QString name() const;
770  virtual void setName(const QString &name);
771 
773  virtual unsigned radioID() const;
775  virtual void setRadioID(unsigned id);
776 
778  virtual unsigned preambleDuration() const;
780  virtual void setPreambleDuration(unsigned ms);
781 
783  virtual MonitorType monitorType() const;
785  virtual void setMonitorType(MonitorType type);
786 
788  virtual unsigned voxSensitivity() const;
790  virtual void setVOXSensitivity(unsigned value);
791 
793  virtual unsigned lowBatteryWarnInterval() const;
795  virtual void setLowBatteryWarnInterval(unsigned sec);
796 
798  virtual unsigned callAlertDuration() const;
800  virtual void setCallAlertDuration(unsigned sec);
801 
803  virtual unsigned loneWorkerResponsePeriod() const;
805  virtual void setLoneWorkerResponsePeriod(unsigned min);
807  virtual unsigned loneWorkerReminderPeriod() const;
809  virtual void setLoneWorkerReminderPeriod(unsigned sec);
810 
812  virtual unsigned groupCallHangTime() const;
814  virtual void setGroupCallHangTime(unsigned ms);
816  virtual unsigned privateCallHangTime() const;
818  virtual void setPrivateCallHangTime(unsigned ms);
819 
821  virtual bool downChannelModeVFO() const;
823  virtual void enableDownChannelModeVFO(bool enable);
825  virtual bool upChannelModeVFO() const;
827  virtual void enableUpChannelModeVFO(bool enable);
829  virtual bool resetTone() const;
831  virtual void enableResetTone(bool enable);
833  virtual bool unknownNumberTone() const;
835  virtual void enableUnknownNumberTone(bool enable);
837  virtual ARTSTone artsToneMode() const;
839  virtual void setARTSToneMode(ARTSTone mode);
840 
842  virtual bool digitalTalkPermitTone() const;
844  virtual void enableDigitalTalkPermitTone(bool enable);
846  virtual bool analogTalkPermitTone() const;
848  virtual void enableAnalogTalkPermitTone(bool enable);
850  virtual bool selftestTone() const;
852  virtual void enableSelftestTone(bool enable);
854  virtual bool channelFreeIndicationTone() const;
856  virtual void enableChannelFreeIndicationTone(bool enable);
858  virtual bool allTonesDisabled() const;
860  virtual void disableAllTones(bool disable);
862  virtual bool batsaveRX() const;
864  virtual void enableBatsaveRX(bool enable);
866  virtual bool batsavePreamble() const;
868  virtual void enableBatsavePreamble(bool enable);
869 
871  virtual bool allLEDsDisabled() const;
873  virtual void disableAllLEDs(bool disable);
875  virtual bool quickKeyOverrideInhibited() const;
877  virtual void inhibitQuickKeyOverride(bool inhibit);
878 
880  virtual bool txExitTone() const;
882  virtual void enableTXExitTone(bool enable);
884  virtual bool txOnActiveChannel() const;
886  virtual void enableTXOnActiveChannel(bool enable);
888  virtual bool animation() const;
890  virtual void enableAnimation(bool enable);
892  virtual ScanMode scanMode() const;
894  virtual void setScanMode(ScanMode mode);
895 
897  virtual unsigned repeaterEndDelay() const;
899  virtual void setRepeaterEndDelay(unsigned delay);
901  virtual unsigned repeaterSTE() const;
903  virtual void setRepeaterSTE(unsigned ste);
904 
906  virtual bool hasProgPassword() const;
908  virtual QString progPassword() const;
910  virtual void setProgPassword(const QString &pwd);
912  virtual void clearProgPassword();
913 
915  virtual bool fromConfig(const Config *conf, Context &ctx);
917  virtual bool updateConfig(Config *conf, Context &ctx);
918  };
919 
925  {
926  public:
928  struct KeyFunction {
929  public:
934 
935  protected:
937  enum Action {
938  None = 0x00,
939  ToggleAllAlertTones = 0x01,
940  EmergencyOn = 0x02,
941  EmergencyOff = 0x03,
942  ToggleMonitor = 0x05,
943  NuiaceDelete = 0x06,
944  OneTouch1 = 0x07,
945  OneTouch2 = 0x08,
946  OneTouch3 = 0x09,
947  OneTouch4 = 0x0a,
948  OneTouch5 = 0x0b,
949  OneTouch6 = 0x0c,
950  ToggleRepeatTalkaround = 0x0d,
951  ToggleScan = 0x0e,
952  TogglePrivacy = 0x10,
953  ToggleVox = 0x11,
954  ZoneSelect = 0x12,
955  BatteryIndicator = 0x13,
956  ToggleLoneWorker = 0x14,
957  PhoneExit = 0x16,
958  ToggleFlashLight = 0x1a,
959  ToggleFMRadio = 0x1b
960  };
961  };
962 
964  enum class OneTouchAction {
965  None = 0x00,
966  DigitalCall = 0x10,
967  DigitalMessage = 0x11,
968  AnalogCall = 0x20
969  };
970 
971  protected:
973  ButtonSettingsElement(uint8_t *ptr, unsigned size);
974 
975  public:
977  explicit ButtonSettingsElement(uint8_t *ptr);
979  virtual ~ButtonSettingsElement();
980 
982  void clear();
983 
985  virtual Interval longPressDuration() const;
987  virtual void setLongPressDuration(Interval ms);
988 
997 
1006 
1015 
1017  virtual OneTouchAction oneTouchAction(unsigned n) const;
1019  virtual unsigned oneTouchContact(unsigned n) const;
1021  virtual unsigned oneTouchMessage(unsigned n) const;
1023  virtual void disableOneTouch(unsigned n);
1025  virtual void setOneTouchDigitalCall(unsigned n, unsigned index);
1027  virtual void setOneTouchDigitalMessage(unsigned n, unsigned index);
1029  virtual void setOneTouchAnalogCall(unsigned n);
1030 
1032  bool encode(Context &ctx, const ErrorStack &err=ErrorStack());
1034  bool decode(Context &ctx, const ErrorStack &err=ErrorStack());
1035 
1036  public:
1038  struct Limits {
1040  static constexpr TimeRange longPressDuration() {
1042  }
1044  static constexpr unsigned int oneTouchActions() { return 6; }
1045  };
1046 
1047  protected:
1049  struct Offset {
1051  static constexpr unsigned int longPressDuration() { return 0x0001; }
1052  static constexpr unsigned int sk1ShortPress() { return 0x0002; }
1053  static constexpr unsigned int sk1LongPress() { return 0x0003; }
1054  static constexpr unsigned int sk2ShortPress() { return 0x0004; }
1055  static constexpr unsigned int sk2LongPress() { return 0x0005; }
1056  static constexpr unsigned int tkShortPress() { return 0x0006; }
1057  static constexpr unsigned int tkLongPress() { return 0x0007; }
1058  static constexpr unsigned int oneTouchActions() { return 0x0008; }
1059  static constexpr unsigned int betweenOneTouchActions() { return 0x0004; }
1061  };
1062  };
1063 
1069  {
1070  public:
1072  enum class ChannelDisplayMode {
1073  Number = 0,
1074  Name = 1,
1075  Frequency = 2
1076  };
1077 
1079  enum class DualWatchMode {
1080  DualDual = 1,
1081  DualSingle = 2
1082  };
1083 
1084  protected:
1086  MenuSettingsElement(uint8_t *ptr, unsigned size);
1087 
1088  public:
1090  explicit MenuSettingsElement(uint8_t *ptr);
1092  virtual ~MenuSettingsElement();
1093 
1095  void clear();
1096 
1098  virtual unsigned menuHangTime() const;
1100  virtual void setMenuHangTime(unsigned sec);
1101 
1103  virtual bool message() const;
1105  virtual void enableMessage(bool enable);
1107  virtual bool scanStart() const;
1109  virtual void enableScanStart(bool enable);
1111  virtual bool editScanList() const;
1113  virtual void enableEditScanList(bool enable);
1115  virtual bool callAlert() const;
1117  virtual void enableCallAlert(bool enable);
1119  virtual bool editContact() const;
1121  virtual void enableEditContact(bool enable);
1123  virtual bool manualDial() const;
1125  virtual void enableManualDial(bool enable);
1127  virtual bool radioCheck() const;
1129  virtual void enableRadioCheck(bool enable);
1131  virtual bool remoteMonitor() const;
1133  virtual void enableRemoteMonitor(bool enable);
1134 
1136  virtual bool radioEnable() const;
1138  virtual void enableRadioEnable(bool enable);
1140  virtual bool radioDisable() const;
1142  virtual void enableRadioDisable(bool enable);
1144  virtual bool progPassword() const;
1146  virtual void enableProgPassword(bool enable);
1148  virtual bool talkaround() const;
1150  virtual void enableTalkaround(bool enable);
1152  virtual bool tone() const;
1154  virtual void enableTone(bool enable);
1156  virtual bool power() const;
1158  virtual void enablePower(bool enable);
1160  virtual bool backlight() const;
1162  virtual void enableBacklight(bool enable);
1164  virtual bool introScreen() const;
1166  virtual void enableIntroScreen(bool enable);
1167 
1169  virtual bool keypadLock() const;
1171  virtual void enableKeypadLock(bool enable);
1173  virtual bool ledIndicator() const;
1175  virtual void enableLEDIndicator(bool enable);
1177  virtual bool squelch() const;
1179  virtual void enableSquelch(bool enable);
1181  virtual bool privacy() const;
1183  virtual void enablePrivacy(bool enable);
1185  virtual bool vox() const;
1187  virtual void enableVOX(bool enable);
1189  virtual bool passwordLock() const;
1191  virtual void enablePasswordLock(bool enable);
1193  virtual bool missedCalls() const;
1195  virtual void enableMissedCalls(bool enable);
1197  virtual bool answeredCalls() const;
1199  virtual void enableAnsweredCalls(bool enable);
1200 
1202  virtual bool outgoingCalls() const;
1204  virtual void enableOutgoingCalls(bool enable);
1206  virtual bool channelDisplay() const;
1208  virtual void enableChannelDisplay(bool enable);
1210  virtual bool dualWatch() const;
1212  virtual void enableDualWatch(bool enable);
1213 
1215  virtual unsigned keypadLockTime() const;
1217  virtual void setKeypadLockTime(unsigned sec);
1218 
1220  virtual unsigned backlightTime() const;
1222  virtual void setBacklightTime(unsigned sec);
1223 
1225  virtual ChannelDisplayMode channelDisplayMode() const;
1227  virtual void setChannelDisplayMode(ChannelDisplayMode mode);
1228 
1230  virtual bool keyTone() const;
1232  virtual void enableKeyTone(bool enable);
1233 
1235  virtual DualWatchMode dualWatchMode() const;
1237  virtual void setDualWatchMode(DualWatchMode mode);
1238  };
1239 
1245  {
1246  protected:
1248  BootSettingsElement(uint8_t *ptr, unsigned size);
1249 
1250  public:
1252  explicit BootSettingsElement(uint8_t *ptr);
1254  virtual ~BootSettingsElement();
1255 
1257  void clear();
1258 
1260  virtual bool bootText() const;
1262  virtual void enableBootText(bool enable);
1263 
1265  virtual bool bootPasswordEnabled() const;
1267  virtual void enableBootPassword(bool enable);
1269  virtual unsigned bootPassword() const;
1271  virtual void setBootPassword(unsigned passwd);
1272  };
1273 
1278  class BootTextElement: public Element
1279  {
1280  protected:
1282  BootTextElement(uint8_t *ptr, unsigned size);
1283 
1284  public:
1286  explicit BootTextElement(uint8_t *ptr);
1288  virtual ~BootTextElement();
1289 
1291  void clear();
1292 
1294  virtual QString line1() const;
1296  virtual void setLine1(const QString &text);
1298  virtual QString line2() const;
1300  virtual void setLine2(const QString &text);
1301 
1303  virtual void fromConfig(Config *conf);
1305  virtual void updateConfig(Config *conf);
1306  };
1307 
1313  {
1314  protected:
1316  MessageBankElement(uint8_t *ptr, unsigned size);
1317 
1318  public:
1320  explicit MessageBankElement(uint8_t *ptr);
1322  virtual ~MessageBankElement();
1323 
1325  static constexpr unsigned int size() { return 0x1248; }
1327  void clear();
1328 
1330  virtual unsigned numMessages() const;
1332  virtual QString message(unsigned n) const;
1334  virtual void appendMessage(const QString msg);
1335 
1337  virtual bool encode(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack());
1339  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack());
1340 
1341  public:
1343  struct Limit {
1344  static constexpr unsigned int messages() { return 32; }
1345  static constexpr unsigned int messageLength() { return 144; }
1346  };
1347 
1348  protected:
1350  struct Offset {
1352  static constexpr unsigned int messageConut() { return 0x0000; }
1353  static constexpr unsigned int messageLengths() { return 0x0008; }
1354  static constexpr unsigned int messages() { return 0x0048; }
1355  static constexpr unsigned int betweenMessages() { return Limit::messageLength(); }
1357  };
1358  };
1359 
1360 
1366  {
1367  public:
1370  enum class PrivacyType {
1371  None,
1372  Basic
1373  };
1374 
1375  protected:
1377  EncryptionElement(uint8_t *ptr, size_t size);
1378 
1379  public:
1381  explicit EncryptionElement(uint8_t *ptr);
1383  virtual ~EncryptionElement();
1384 
1385  void clear();
1386 
1388  virtual PrivacyType privacyType() const;
1390  virtual void setPrivacyType(PrivacyType type);
1391 
1394  virtual bool isBasicKeySet(unsigned n) const;
1396  virtual QByteArray basicKey(unsigned n) const;
1398  virtual void setBasicKey(unsigned n, const QByteArray &key);
1400  virtual void clearBasicKey(unsigned n);
1401 
1403  virtual bool fromCommercialExt(CommercialExtension *ext, Context &ctx);
1405  virtual bool updateCommercialExt(Context &ctx);
1407  virtual bool linkCommercialExt(CommercialExtension *ext, Context &ctx);
1408 
1409  public:
1411  struct Limit {
1413  static constexpr unsigned int basicEncryptionKeys() { return 16; }
1414  };
1415 
1416  };
1417 
1418 protected:
1420  explicit RadioddityCodeplug(QObject *parent=nullptr);
1421 
1422 public:
1424  virtual ~RadioddityCodeplug();
1425 
1427  virtual void clear();
1428 
1429  bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
1430 
1431  bool decode(Config *config, const ErrorStack &err=ErrorStack());
1432  bool postprocess(Config *config, const ErrorStack &err) const;
1433 
1434  Config *preprocess(Config *config, const ErrorStack &err) const;
1435  bool encode(Config *config, const Flags &flags = Flags(), const ErrorStack &err=ErrorStack());
1436 
1437 public:
1440  virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack());
1442  virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
1443 
1445  virtual void clearGeneralSettings() = 0;
1447  virtual bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1449  virtual bool decodeGeneralSettings(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1450 
1452  virtual void clearButtonSettings() = 0;
1454  virtual bool encodeButtonSettings(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack()) = 0;
1456  virtual bool decodeButtonSettings(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1457 
1459  virtual void clearMessages() = 0;
1461  virtual bool encodeMessages(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack()) = 0;
1463  virtual bool decodeMessages(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1464 
1466  virtual void clearContacts() = 0;
1468  virtual bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1470  virtual bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1471 
1473  virtual void clearDTMFContacts() = 0;
1475  virtual bool encodeDTMFContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1477  virtual bool createDTMFContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1478 
1480  virtual void clearChannels() = 0;
1482  virtual bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1484  virtual bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1486  virtual bool linkChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1487 
1489  virtual void clearBootSettings() = 0;
1490 
1492  virtual void clearMenuSettings() = 0;
1493 
1495  virtual void clearBootText() = 0;
1497  virtual bool encodeBootText(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1499  virtual bool decodeBootText(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1500 
1502  virtual void clearVFOSettings() = 0;
1503 
1505  virtual void clearZones() = 0;
1507  virtual bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1509  virtual bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1511  virtual bool linkZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1512 
1514  virtual void clearScanLists() = 0;
1516  virtual bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1518  virtual bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1520  virtual bool linkScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1521 
1523  virtual void clearGroupLists() = 0;
1525  virtual bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1527  virtual bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1529  virtual bool linkGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1530 
1532  virtual void clearEncryption() = 0;
1534  virtual bool encodeEncryption(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1536  virtual bool createEncryption(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1538  virtual bool linkEncryption(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1539 };
1540 
1541 #endif // RADIODDITYCODEPLUG_HH
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition: channel.hh:61
Base class for all codeplug contexts.
Definition: codeplug.hh:238
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:51
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:25
This class defines the interface all device-specific code-plugs must implement.
Definition: codeplug.hh:19
Implements the generic extension for the codeplug to represent some commercial features of DMR.
Definition: commercial_extension.hh:11
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 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
static constexpr Interval fromMilliseconds(unsigned long long ms)
Definition: interval.hh:57
Generic representation of a RX group list.
Definition: rxgrouplist.hh:14
Function
Possible function key actions.
Definition: radioddity_extensions.hh:31
Implements the base class of boot settings for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:1245
virtual bool bootPasswordEnabled() const
Returns true if the boot password is enabled.
Definition: radioddity_codeplug.cc:2427
virtual bool bootText() const
Returns true if the text is shown on boot, other wise an image is shown.
Definition: radioddity_codeplug.cc:2418
void clear()
Resets the settings.
Definition: radioddity_codeplug.cc:2409
BootSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:2392
virtual void enableBootPassword(bool enable)
Enables/disables the boot password.
Definition: radioddity_codeplug.cc:2431
virtual ~BootSettingsElement()
Destructor.
Definition: radioddity_codeplug.cc:2404
virtual unsigned bootPassword() const
Returns the boot password (6 digit).
Definition: radioddity_codeplug.cc:2436
virtual void enableBootText(bool enable)
Enables/disables boot text.
Definition: radioddity_codeplug.cc:2422
virtual void setBootPassword(unsigned passwd)
Sets the boot password (6 digit).
Definition: radioddity_codeplug.cc:2440
Implements the base class of boot messages for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:1279
virtual void setLine1(const QString &text)
Sets the first line.
Definition: radioddity_codeplug.cc:2474
virtual QString line1() const
Returns the first line.
Definition: radioddity_codeplug.cc:2470
void clear()
Resets the intro text.
Definition: radioddity_codeplug.cc:2464
virtual QString line2() const
Returns the Second line.
Definition: radioddity_codeplug.cc:2479
virtual void updateConfig(Config *conf)
Updates the configuration with the boot text settings.
Definition: radioddity_codeplug.cc:2494
virtual void setLine2(const QString &text)
Sets the second line.
Definition: radioddity_codeplug.cc:2483
virtual ~BootTextElement()
Destructor.
Definition: radioddity_codeplug.cc:2459
BootTextElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:2447
virtual void fromConfig(Config *conf)
Encodes boot text settings from configuration.
Definition: radioddity_codeplug.cc:2488
Implements the base class of button settings for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:925
ButtonSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:1881
virtual void setOneTouchDigitalMessage(unsigned n, unsigned index)
Configures n-th one-touch action as a digital message using given index.
Definition: radioddity_codeplug.cc:1993
void clear()
Clears the button settings.
Definition: radioddity_codeplug.cc:1898
virtual RadioddityButtonSettingsExtension::Function tkLongPress() const
Returns the top-key long-press action.
Definition: radioddity_codeplug.cc:1962
virtual OneTouchAction oneTouchAction(unsigned n) const
Returns the n-th one-touch action.
Definition: radioddity_codeplug.cc:1971
virtual unsigned oneTouchContact(unsigned n) const
Returns the n-th one-touch contact index (if action is OneTouchAction::DigitalCall).
Definition: radioddity_codeplug.cc:1975
virtual RadioddityButtonSettingsExtension::Function sk1ShortPress() const
Returns the side-key 1 short-press action.
Definition: radioddity_codeplug.cc:1920
bool encode(Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the button settings (if set).
Definition: radioddity_codeplug.cc:2006
virtual unsigned oneTouchMessage(unsigned n) const
Returns the n-th one-touch message index (if action is OneTouchAction::DigitalMessage).
Definition: radioddity_codeplug.cc:1979
virtual ~ButtonSettingsElement()
Destructor.
Definition: radioddity_codeplug.cc:1893
virtual void setSK1ShortPress(RadioddityButtonSettingsExtension::Function action)
Sets the side-key 1 short-press action.
Definition: radioddity_codeplug.cc:1924
virtual void setTKShortPress(RadioddityButtonSettingsExtension::Function action)
Sets the top-key short-press action.
Definition: radioddity_codeplug.cc:1958
virtual void setOneTouchAnalogCall(unsigned n)
Configures n-th one-touch action as a analog call.
Definition: radioddity_codeplug.cc:1999
virtual void disableOneTouch(unsigned n)
Disables the n-th one-touch action.
Definition: radioddity_codeplug.cc:1983
virtual void setSK1LongPress(RadioddityButtonSettingsExtension::Function action)
Sets the side-key 1 long-press action.
Definition: radioddity_codeplug.cc:1932
virtual void setSK2LongPress(RadioddityButtonSettingsExtension::Function action)
Sets the side-key 2 long-press action.
Definition: radioddity_codeplug.cc:1949
virtual void setSK2ShortPress(RadioddityButtonSettingsExtension::Function action)
Sets the side-key 2 short-press action.
Definition: radioddity_codeplug.cc:1941
bool decode(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition: radioddity_codeplug.cc:2025
virtual void setTKLongPress(RadioddityButtonSettingsExtension::Function action)
Sets the top-key long-press action.
Definition: radioddity_codeplug.cc:1966
virtual Interval longPressDuration() const
Returns the long-press duration in ms.
Definition: radioddity_codeplug.cc:1911
virtual void setLongPressDuration(Interval ms)
Sets the long-press duration in ms.
Definition: radioddity_codeplug.cc:1915
virtual RadioddityButtonSettingsExtension::Function sk2LongPress() const
Returns the side-key 2 long-press action.
Definition: radioddity_codeplug.cc:1945
virtual void setOneTouchDigitalCall(unsigned n, unsigned index)
Configures n-th one-touch action as a digital call to contact index.
Definition: radioddity_codeplug.cc:1987
virtual RadioddityButtonSettingsExtension::Function sk1LongPress() const
Returns the side-key 1 long-press action.
Definition: radioddity_codeplug.cc:1928
virtual RadioddityButtonSettingsExtension::Function sk2ShortPress() const
Returns the side-key 2 short-press action.
Definition: radioddity_codeplug.cc:1937
virtual RadioddityButtonSettingsExtension::Function tkShortPress() const
Returns the top-key short-press action.
Definition: radioddity_codeplug.cc:1954
OneTouchAction
Possible one-touch actions.
Definition: radioddity_codeplug.hh:964
Implements the base for channel banks in Radioddity codeplugs.
Definition: radioddity_codeplug.hh:228
virtual ~ChannelBankElement()
Destructor.
Definition: radioddity_codeplug.cc:477
virtual uint8_t * get(unsigned idx) const
Returns a pointer to the channel at the given index.
Definition: radioddity_codeplug.cc:498
virtual void enable(unsigned idx, bool enabled)
Enable/disable a channel in the bank.
Definition: radioddity_codeplug.cc:492
ChannelBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:465
void clear()
Clears the bank.
Definition: radioddity_codeplug.cc:482
virtual bool isEnabled(unsigned idx) const
Returns true if the channel is enabled.
Definition: radioddity_codeplug.cc:487
Implements the base for all Radioddity channel encodings.
Definition: radioddity_codeplug.hh:33
virtual bool hasGroupList() const
Returns true if a group list is set.
Definition: radioddity_codeplug.cc:189
virtual void setRXSignalingIndex(unsigned index)
Sets RX signaling index (+1).
Definition: radioddity_codeplug.cc:166
virtual ~ChannelElement()
Destructor.
Definition: radioddity_codeplug.cc:29
virtual unsigned txSignalingIndex() const
Returns TX signaling index (+1).
Definition: radioddity_codeplug.cc:154
virtual unsigned emergencySystemIndex() const
Returns the emergency system index (+1).
Definition: radioddity_codeplug.cc:215
virtual void setTXFrequency(uint32_t freq)
Sets the TX frequency of the channel.
Definition: radioddity_codeplug.cc:84
virtual bool nonSTEFrequency() const
Returns true if non-STE is frequency (?!).
Definition: radioddity_codeplug.cc:287
virtual bool hasScanList() const
Returns true if a scan list is set.
Definition: radioddity_codeplug.cc:124
virtual void enablePrivacy(bool enable)
Enables/disables privacy.
Definition: radioddity_codeplug.cc:265
virtual void setContactIndex(unsigned index)
Sets the transmit contact index (+1).
Definition: radioddity_codeplug.cc:232
virtual void setPrivacyGroup(PrivacyGroup grp)
Sets the privacy group.
Definition: radioddity_codeplug.cc:175
virtual bool fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: radioddity_codeplug.cc:408
Mode
Possible channel types.
Definition: radioddity_codeplug.hh:36
@ MODE_ANALOG
Analog channel, aka FM.
Definition: radioddity_codeplug.hh:37
@ MODE_DIGITAL
Digital channel, aka DMR.
Definition: radioddity_codeplug.hh:38
virtual uint32_t txFrequency() const
Returns the TX frequency of the channel.
Definition: radioddity_codeplug.cc:80
virtual Admit admitCriterion() const
Returns the admit criterion.
Definition: radioddity_codeplug.cc:115
virtual unsigned txColorCode() const
Returns the TX color code.
Definition: radioddity_codeplug.cc:180
virtual void setTXTimeOut(unsigned tot)
Sets the TX timeout in seconds.
Definition: radioddity_codeplug.cc:102
virtual void enableTalkaround(bool enable)
Enables/disables talkaround.
Definition: radioddity_codeplug.cc:317
virtual unsigned scanListIndex() const
Returns the scan list index (+1).
Definition: radioddity_codeplug.cc:128
virtual void setGroupListIndex(unsigned index)
Sets the group-list index (+1).
Definition: radioddity_codeplug.cc:197
virtual void enableDataCallConfirm(bool enable)
Enables/disables data-call-confirm.
Definition: radioddity_codeplug.cc:241
virtual void setRXColorCode(unsigned cc)
Sets the RX color code.
Definition: radioddity_codeplug.cc:206
virtual bool dataCallConfirm() const
Returns true if data-call-confirm is enabled.
Definition: radioddity_codeplug.cc:237
virtual void enableEmergencyAlarmACK(bool enable)
Enables/disables emergency alarm ACK.
Definition: radioddity_codeplug.cc:249
virtual Signaling::Code txTone() const
Returns the TX subtone.
Definition: radioddity_codeplug.cc:145
virtual void enableRXOnly(bool enable)
Enables/disables RX only.
Definition: radioddity_codeplug.cc:309
virtual void setAdmitCriterion(Admit admit)
Sets the admit criterion.
Definition: radioddity_codeplug.cc:119
virtual void enableNonSTEFrequency(bool enable)
Enables/disables non-STE is frequency (?!).
Definition: radioddity_codeplug.cc:291
virtual bool talkaround() const
Returns true if talkaround is enabled.
Definition: radioddity_codeplug.cc:313
virtual unsigned contactIndex() const
Returns the transmit contact index (+1).
Definition: radioddity_codeplug.cc:228
virtual uint32_t rxFrequency() const
Returns the RX frequency of the channel.
Definition: radioddity_codeplug.cc:72
ChannelElement(uint8_t *ptr, size_t size)
Constructs a channel from the given memory.
Definition: radioddity_codeplug.cc:17
virtual void setMode(Mode mode)
Sets the channel mode.
Definition: radioddity_codeplug.cc:93
virtual void setPower(Channel::Power pwr)
Sets the power setting of the channel.
Definition: radioddity_codeplug.cc:334
virtual Mode mode() const
Returns the channel mode.
Definition: radioddity_codeplug.cc:89
virtual Signaling::Code rxTone() const
Returns the RX subtone.
Definition: radioddity_codeplug.cc:137
virtual unsigned groupListIndex() const
Returns the group-list index (+1).
Definition: radioddity_codeplug.cc:193
virtual PrivacyGroup privacyGroup() const
Returns the privacy group.
Definition: radioddity_codeplug.cc:171
virtual unsigned txTimeOutRekeyDelay() const
Returns the transmit time-out re-key delay in seconds.
Definition: radioddity_codeplug.cc:106
virtual void setScanListIndex(unsigned index)
Sets the scan list index (+1).
Definition: radioddity_codeplug.cc:132
virtual bool privacyEnabled() const
Returns true if privacy is enabled.
Definition: radioddity_codeplug.cc:261
virtual bool privateCallConfirm() const
Returns true if private-call-confirm is enabled.
Definition: radioddity_codeplug.cc:253
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot of the channel.
Definition: radioddity_codeplug.cc:270
virtual void setRXFrequency(uint32_t freq)
Sets the RX frequency of the channel.
Definition: radioddity_codeplug.cc:76
virtual Channel * toChannelObj(Context &ctx) const
Constructs a generic Channel object from the codeplug channel.
Definition: radioddity_codeplug.cc:349
virtual void clear()
Resets the channel.
Definition: radioddity_codeplug.cc:34
virtual Channel::Power power() const
Returns the power setting of the channel.
Definition: radioddity_codeplug.cc:330
virtual bool vox() const
Returns true if VOX is enabled.
Definition: radioddity_codeplug.cc:321
virtual void enablePrivateCallConfirm(bool enable)
Enables/disables private-call-confirm.
Definition: radioddity_codeplug.cc:257
virtual bool hasEmergencySystem() const
Returns true if an emergency system is set.
Definition: radioddity_codeplug.cc:211
virtual unsigned rxSignalingIndex() const
Returns RX signaling index (+1).
Definition: radioddity_codeplug.cc:162
virtual void setEmergencySystemIndex(unsigned index)
Sets the emergency system index (+1).
Definition: radioddity_codeplug.cc:219
PrivacyGroup
Possible privacy groups, not used in ham radio.
Definition: radioddity_codeplug.hh:49
@ PRIVGR_NONE
No privacy group, default.
Definition: radioddity_codeplug.hh:50
@ PRIVGR_53474C39
Privacy group 53474C39 (wtf?).
Definition: radioddity_codeplug.hh:51
virtual FMChannel::Bandwidth bandwidth() const
Returns the bandwidth.
Definition: radioddity_codeplug.cc:296
virtual bool emergencyAlarmACK() const
Returns true if emergency alarm ACK is enabled.
Definition: radioddity_codeplug.cc:245
Admit
Possible admit criteria.
Definition: radioddity_codeplug.hh:42
@ ADMIT_CH_FREE
Allow TX on channel free.
Definition: radioddity_codeplug.hh:44
@ ADMIT_ALWAYS
Allow always.
Definition: radioddity_codeplug.hh:43
@ ADMIT_COLOR
Allow TX on matching color-code.
Definition: radioddity_codeplug.hh:45
virtual QString name() const
Returns the name of the channel.
Definition: radioddity_codeplug.cc:63
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the bandwidth.
Definition: radioddity_codeplug.cc:300
virtual bool linkChannelObj(Channel *c, Context &ctx) const
Links a previously constructed channel to the rest of the configuration.
Definition: radioddity_codeplug.cc:391
virtual bool rxOnly() const
Returns true if RX only is enabled.
Definition: radioddity_codeplug.cc:305
virtual unsigned rxColorCode() const
Returns the RX color code.
Definition: radioddity_codeplug.cc:202
virtual void setTXTone(Signaling::Code code)
Sets the TX subtone.
Definition: radioddity_codeplug.cc:149
virtual void setName(const QString &n)
Sets the name of the channel.
Definition: radioddity_codeplug.cc:67
virtual bool hasContact() const
Returns true if a TX contact is set.
Definition: radioddity_codeplug.cc:224
virtual void setTXColorCode(unsigned cc)
Sets the TX color code.
Definition: radioddity_codeplug.cc:184
virtual void setTXTimeOutRekeyDelay(unsigned delay)
Sets the transmit time-out re-key delay in seconds.
Definition: radioddity_codeplug.cc:110
virtual unsigned txTimeOut() const
Returns the TX timeout in seconds.
Definition: radioddity_codeplug.cc:98
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot of the channel.
Definition: radioddity_codeplug.cc:274
virtual void enableDualCapacityDirectMode(bool enable)
Enables/disables the dual-capacity direct mode.
Definition: radioddity_codeplug.cc:283
virtual void setTXSignalingIndex(unsigned index)
Sets TX signaling index (+1).
Definition: radioddity_codeplug.cc:158
virtual void enableVOX(bool enable)
Enables/disables VOX.
Definition: radioddity_codeplug.cc:325
virtual void setRXTone(Signaling::Code code)
Sets the RX subtone.
Definition: radioddity_codeplug.cc:141
virtual bool dualCapacityDirectMode() const
Returns true if the dual-capacity direct mode is enabled.
Definition: radioddity_codeplug.cc:279
Implements the base for digital contacts in Radioddity codeplugs.
Definition: radioddity_codeplug.hh:312
virtual unsigned ringStyle() const
Returns the ring tone style for this contact [0-10].
Definition: radioddity_codeplug.cc:673
virtual DMRContact * toContactObj(Context &ctx) const
Constructs a DigitalContact instance from this codeplug contact.
Definition: radioddity_codeplug.cc:683
virtual void enableRing(bool enable)
Enables/disables ring tone for this contact.
Definition: radioddity_codeplug.cc:665
virtual void fromContactObj(const DMRContact *obj, Context &ctx)
Resets this codeplug contact from the given DigitalContact.
Definition: radioddity_codeplug.cc:691
ContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:592
virtual void setName(const QString name)
Sets the name of the contact.
Definition: radioddity_codeplug.cc:628
virtual void setRingStyle(unsigned style)
Sets the ring tone style for this contact [0-10].
Definition: radioddity_codeplug.cc:677
virtual bool ring() const
Returns true if the ring tone is enabled for this contact.
Definition: radioddity_codeplug.cc:661
virtual ~ContactElement()
Destructor.
Definition: radioddity_codeplug.cc:604
void clear()
Resets the contact.
Definition: radioddity_codeplug.cc:609
bool isValid() const
Returns true if the contact is valid.
Definition: radioddity_codeplug.cc:619
virtual void setNumber(unsigned id)
Sets the DMR number of the contact.
Definition: radioddity_codeplug.cc:637
virtual unsigned number() const
Returns the DMR number of the contact.
Definition: radioddity_codeplug.cc:633
virtual DMRContact::Type type() const
Returns the call type.
Definition: radioddity_codeplug.cc:642
virtual QString name() const
Returns the name of the contact.
Definition: radioddity_codeplug.cc:624
virtual void setType(DMRContact::Type type)
Sets the call type.
Definition: radioddity_codeplug.cc:652
Implements a base DTMF (analog) contact for Radioddity codeplugs.
Definition: radioddity_codeplug.hh:365
virtual void setName(const QString &name)
Sets the name of the conact.
Definition: radioddity_codeplug.cc:738
DTMFContactElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:708
void clear()
Resets the contact.
Definition: radioddity_codeplug.cc:725
virtual QString number() const
Returns the number of the contact.
Definition: radioddity_codeplug.cc:743
virtual ~DTMFContactElement()
Destructor.
Definition: radioddity_codeplug.cc:720
virtual QString name() const
Returns the name of the contact.
Definition: radioddity_codeplug.cc:734
virtual void fromContactObj(const DTMFContact *obj, Context &ctx)
Resets this codeplug contact from the given DTMFContact.
Definition: radioddity_codeplug.cc:760
virtual DTMFContact * toContactObj(Context &ctx) const
Constructs a DTMFContact instance from this codeplug contact.
Definition: radioddity_codeplug.cc:752
bool isValid() const
Returns true if the contact is valid.
Definition: radioddity_codeplug.cc:729
virtual void setNumber(const QString &number)
Sets the number of the contact.
Definition: radioddity_codeplug.cc:747
Represents all encryption keys and settings within the codeplug on the device.
Definition: radioddity_codeplug.hh:1366
virtual void setPrivacyType(PrivacyType type)
Sets the privacy type.
Definition: radioddity_codeplug.cc:2610
virtual PrivacyType privacyType() const
Returns the privacy type set.
Definition: radioddity_codeplug.cc:2606
void clear()
Abstract method to reset the element within the codeplug.
Definition: radioddity_codeplug.cc:2598
PrivacyType
Encodes possible privacy types.
Definition: radioddity_codeplug.hh:1370
virtual QByteArray basicKey(unsigned n) const
Returns the n-th "basic" key (32bit).
Definition: radioddity_codeplug.cc:2622
virtual bool updateCommercialExt(Context &ctx)
Constructs the encryption extension.
Definition: radioddity_codeplug.cc:2674
virtual bool linkCommercialExt(CommercialExtension *ext, Context &ctx)
Links the given encryption extension.
Definition: radioddity_codeplug.cc:2696
virtual void clearBasicKey(unsigned n)
Resets the n-th basic key.
Definition: radioddity_codeplug.cc:2638
virtual ~EncryptionElement()
Destructor.
Definition: radioddity_codeplug.cc:2593
virtual bool fromCommercialExt(CommercialExtension *ext, Context &ctx)
Encodes given encryption extension.
Definition: radioddity_codeplug.cc:2648
virtual bool isBasicKeySet(unsigned n) const
Returns true if the n-th "basic" key (32bit) is set.
Definition: radioddity_codeplug.cc:2615
virtual void setBasicKey(unsigned n, const QByteArray &key)
Sets the n-th "basic" key (32bit).
Definition: radioddity_codeplug.cc:2628
EncryptionElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: radioddity_codeplug.cc:2581
Implements the base class of general settings for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:745
virtual bool allTonesDisabled() const
Returns true if all tones are disabled.
Definition: radioddity_codeplug.cc:1595
virtual void enableUpChannelModeVFO(bool enable)
Enables/disables up-channel mode is VFO.
Definition: radioddity_codeplug.cc:1532
virtual void setRepeaterEndDelay(unsigned delay)
Sets the repeater end delay in [0-10].
Definition: radioddity_codeplug.cc:1674
virtual bool batsaveRX() const
Returns true if reception is disabled for battery saving.
Definition: radioddity_codeplug.cc:1603
virtual void setCallAlertDuration(unsigned sec)
Sets the call-allert duration in seconds.
Definition: radioddity_codeplug.cc:1481
virtual unsigned preambleDuration() const
Returns the preamble duration in ms.
Definition: radioddity_codeplug.cc:1440
RadiodditySettingsExtension::MonitorType MonitorType
Use monitor type from extension.
Definition: radioddity_codeplug.hh:748
virtual void enableDownChannelModeVFO(bool enable)
Enables/disables down-channel mode is VFO.
Definition: radioddity_codeplug.cc:1524
virtual void enableBatsaveRX(bool enable)
Enables/disables battery saving by disabling RX.
Definition: radioddity_codeplug.cc:1607
virtual bool animation() const
Returns true if animation is enabled.
Definition: radioddity_codeplug.cc:1653
virtual void enableSelftestTone(bool enable)
Enables/disables reset tone.
Definition: radioddity_codeplug.cc:1583
virtual unsigned radioID() const
Returns the DMR radio ID.
Definition: radioddity_codeplug.cc:1431
virtual void enableDigitalTalkPermitTone(bool enable)
Enables/disables digital channel talk permit tone.
Definition: radioddity_codeplug.cc:1567
virtual ~GeneralSettingsElement()
Destructor.
Definition: radioddity_codeplug.cc:1367
virtual void setMonitorType(MonitorType type)
Sets the monitor type.
Definition: radioddity_codeplug.cc:1453
virtual bool batsavePreamble() const
Returns true if preable is disabled for battery saving.
Definition: radioddity_codeplug.cc:1611
GeneralSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:1355
virtual unsigned privateCallHangTime() const
Returns the private call hang time in ms.
Definition: radioddity_codeplug.cc:1511
virtual QString name() const
Returns the radio name.
Definition: radioddity_codeplug.cc:1422
virtual void setName(const QString &name)
Sets the radio name.
Definition: radioddity_codeplug.cc:1426
virtual bool channelFreeIndicationTone() const
Returns true if the channel free indication tone is enabled.
Definition: radioddity_codeplug.cc:1587
virtual void inhibitQuickKeyOverride(bool inhibit)
Inhibits quick-key override.
Definition: radioddity_codeplug.cc:1632
virtual bool upChannelModeVFO() const
Returns true if the up-channel mode is VFO.
Definition: radioddity_codeplug.cc:1528
virtual void disableAllTones(bool disable)
Disables/enables all tones.
Definition: radioddity_codeplug.cc:1599
virtual void enableAnimation(bool enable)
Enables/disables animation.
Definition: radioddity_codeplug.cc:1657
virtual QString progPassword() const
Returns the programming password.
Definition: radioddity_codeplug.cc:1691
virtual bool allLEDsDisabled() const
Returns true if all LEDs are disabled.
Definition: radioddity_codeplug.cc:1620
virtual void disableAllLEDs(bool disable)
Disables/enables all LEDs.
Definition: radioddity_codeplug.cc:1624
void clear()
Resets the general settings.
Definition: radioddity_codeplug.cc:1372
virtual bool digitalTalkPermitTone() const
Returns true if the digital channel talk permit tone is enabled.
Definition: radioddity_codeplug.cc:1563
virtual bool analogTalkPermitTone() const
Returns true if the analog channel talk permit tone is enabled.
Definition: radioddity_codeplug.cc:1571
virtual void setLoneWorkerResponsePeriod(unsigned min)
Sets the lone-worker response period in minutes.
Definition: radioddity_codeplug.cc:1490
RadiodditySettingsExtension::ScanMode ScanMode
Use scan mode from extension.
Definition: radioddity_codeplug.hh:752
virtual void setGroupCallHangTime(unsigned ms)
Sets the group call hang time in ms.
Definition: radioddity_codeplug.cc:1507
virtual void clearProgPassword()
Resets the programming password.
Definition: radioddity_codeplug.cc:1699
virtual void enableBatsavePreamble(bool enable)
Enables/disables battery saving by disabling preamble.
Definition: radioddity_codeplug.cc:1615
RadioddityToneSettingsExtension::ARTSTone ARTSTone
Use ARTS tone mode from extension.
Definition: radioddity_codeplug.hh:750
virtual bool unknownNumberTone() const
Returns true if the unknown number tone is enabled.
Definition: radioddity_codeplug.cc:1545
virtual unsigned repeaterEndDelay() const
Returns the repeater end delay in [0-10].
Definition: radioddity_codeplug.cc:1670
virtual ARTSTone artsToneMode() const
Returns the ARTS tone mode.
Definition: radioddity_codeplug.cc:1554
virtual void enableUnknownNumberTone(bool enable)
Enables/disables reset tone.
Definition: radioddity_codeplug.cc:1549
virtual bool hasProgPassword() const
Returns true if a programming password is set.
Definition: radioddity_codeplug.cc:1687
virtual unsigned loneWorkerReminderPeriod() const
Returns the lone-worker reminder period in seconds.
Definition: radioddity_codeplug.cc:1494
virtual void setRadioID(unsigned id)
Sets the DMR radio ID.
Definition: radioddity_codeplug.cc:1435
virtual ScanMode scanMode() const
Returns the scan mode.
Definition: radioddity_codeplug.cc:1661
virtual bool txOnActiveChannel() const
Returns true if the radio transmits on the active channel on double monitor.
Definition: radioddity_codeplug.cc:1645
virtual unsigned voxSensitivity() const
Returns the VOX sensitivity [1-10], 0=disabled.
Definition: radioddity_codeplug.cc:1458
virtual void setLowBatteryWarnInterval(unsigned sec)
Sets the low-battery warn interval in seconds.
Definition: radioddity_codeplug.cc:1472
virtual void enableChannelFreeIndicationTone(bool enable)
Enables/disables channel free indication tone.
Definition: radioddity_codeplug.cc:1591
virtual MonitorType monitorType() const
Returns the monitor type.
Definition: radioddity_codeplug.cc:1449
virtual void setARTSToneMode(ARTSTone mode)
Sets the ARTS tone mode.
Definition: radioddity_codeplug.cc:1558
virtual unsigned repeaterSTE() const
Returns the repeater STE in [0-10].
Definition: radioddity_codeplug.cc:1678
virtual void setRepeaterSTE(unsigned ste)
Sets the repeater STE in [0-10].
Definition: radioddity_codeplug.cc:1682
virtual unsigned groupCallHangTime() const
Returns the group call hang time in ms.
Definition: radioddity_codeplug.cc:1503
virtual unsigned callAlertDuration() const
Returns the call-alert duration in seconds.
Definition: radioddity_codeplug.cc:1477
virtual void setPrivateCallHangTime(unsigned ms)
Sets the private call hang time in ms.
Definition: radioddity_codeplug.cc:1515
virtual void enableTXExitTone(bool enable)
Enables/disables TX exit tone.
Definition: radioddity_codeplug.cc:1641
virtual void setPreambleDuration(unsigned ms)
Sets the preamble duration in ms.
Definition: radioddity_codeplug.cc:1444
virtual unsigned loneWorkerResponsePeriod() const
Returns the lone-worker response period in minutes.
Definition: radioddity_codeplug.cc:1486
virtual void enableAnalogTalkPermitTone(bool enable)
Enables/disables analog channel talk permit tone.
Definition: radioddity_codeplug.cc:1575
virtual bool downChannelModeVFO() const
Returns true if the down-channel mode is VFO.
Definition: radioddity_codeplug.cc:1520
virtual bool quickKeyOverrideInhibited() const
Returns true if quick-key override is inhibited.
Definition: radioddity_codeplug.cc:1628
virtual bool resetTone() const
Returns true if the reset tone is enabled.
Definition: radioddity_codeplug.cc:1537
virtual unsigned lowBatteryWarnInterval() const
Returns the low-battery warn interval in seconds.
Definition: radioddity_codeplug.cc:1468
virtual void setVOXSensitivity(unsigned value)
Sets the VOX sensitivity.
Definition: radioddity_codeplug.cc:1462
virtual void setProgPassword(const QString &pwd)
Sets the programming password.
Definition: radioddity_codeplug.cc:1695
virtual bool fromConfig(const Config *conf, Context &ctx)
Encodes the general setting from the given config.
Definition: radioddity_codeplug.cc:1704
virtual bool txExitTone() const
Returns true if the TX exit tone is enabled.
Definition: radioddity_codeplug.cc:1637
virtual void enableResetTone(bool enable)
Enables/disables reset tone.
Definition: radioddity_codeplug.cc:1541
virtual void setScanMode(ScanMode mode)
Sets the scan mode.
Definition: radioddity_codeplug.cc:1665
virtual bool selftestTone() const
Returns true if the reset tone is enabled.
Definition: radioddity_codeplug.cc:1579
virtual void setLoneWorkerReminderPeriod(unsigned sec)
Sets the lone-worker reminder period in seconds.
Definition: radioddity_codeplug.cc:1498
virtual bool updateConfig(Config *conf, Context &ctx)
Updates the given config from this settings.
Definition: radioddity_codeplug.cc:1759
virtual void enableTXOnActiveChannel(bool enable)
Enables/disables transmission on active channel on double monitor.
Definition: radioddity_codeplug.cc:1649
Implements a base class of group list memory banks for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:543
virtual unsigned contactCount(unsigned n) const
Returns the number of contacts in the n-th group list.
Definition: radioddity_codeplug.cc:1044
virtual bool isEnabled(unsigned n) const
Returns true if the n-th group list is enabled.
Definition: radioddity_codeplug.cc:1040
static constexpr unsigned int size()
Returns the size of the element.
Definition: radioddity_codeplug.hh:555
virtual void setContactCount(unsigned n, unsigned size)
Sets the number of contacts in the n-th group list.
Definition: radioddity_codeplug.cc:1048
void clear()
Resets the bank.
Definition: radioddity_codeplug.cc:1035
virtual void disable(unsigned n)
Disables the n-th group list.
Definition: radioddity_codeplug.cc:1052
GroupListBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:1018
virtual ~GroupListBankElement()
Destructor.
Definition: radioddity_codeplug.cc:1030
virtual uint8_t * get(unsigned n) const
Returns a pointer to the n-th group list.
Definition: radioddity_codeplug.cc:1057
Represents a base class for all group lists within Radioddity codeplugs.
Definition: radioddity_codeplug.hh:478
virtual unsigned member(unsigned n) const
Returns the n-th member index (+1).
Definition: radioddity_codeplug.cc:960
virtual QString name() const
Returns the name of the group list.
Definition: radioddity_codeplug.cc:945
virtual void clearMember(unsigned n)
Clears the n-th member index.
Definition: radioddity_codeplug.cc:968
GroupListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:922
virtual void setMember(unsigned n, unsigned idx)
Sets the n-th member index (+1).
Definition: radioddity_codeplug.cc:964
void clear()
Resets the group list.
Definition: radioddity_codeplug.cc:939
virtual bool linkRXGroupListObj(int ncnt, RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack()) const
Links a previously constructed RXGroupList to the rest of the generic configuration.
Definition: radioddity_codeplug.cc:979
virtual void fromRXGroupListObj(const RXGroupList *lst, Context &ctx, const ErrorStack &err=ErrorStack())
Reset this codeplug representation from a RXGroupList object.
Definition: radioddity_codeplug.cc:993
virtual RXGroupList * toRXGroupListObj(Context &ctx, const ErrorStack &err=ErrorStack())
Constructs a RXGroupList object from the codeplug representation.
Definition: radioddity_codeplug.cc:973
virtual ~GroupListElement()
Destructor.
Definition: radioddity_codeplug.cc:934
static constexpr unsigned int size()
Size of the element.
Definition: radioddity_codeplug.hh:490
virtual bool hasMember(unsigned n) const
Returns true if the group list has an n-th member.
Definition: radioddity_codeplug.cc:954
virtual void setName(const QString &name)
Sets the name of the group list.
Definition: radioddity_codeplug.cc:949
Implements the base class of menu settings for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:1069
virtual bool message() const
Returns true if the message menu is shown.
Definition: radioddity_codeplug.cc:2123
virtual void setMenuHangTime(unsigned sec)
Sets the menu hang time in seconds.
Definition: radioddity_codeplug.cc:2117
virtual bool squelch() const
Returns true if the squelch menu is shown.
Definition: radioddity_codeplug.cc:2269
virtual bool privacy() const
Returns true if the privacy menu is shown.
Definition: radioddity_codeplug.cc:2277
virtual void enableKeyTone(bool enable)
Enables/disables the keytone.
Definition: radioddity_codeplug.cc:2375
virtual bool radioEnable() const
Returns true if the radio-enable menu is shown.
Definition: radioddity_codeplug.cc:2188
virtual void enableRadioCheck(bool enable)
Enables/disables the radioCheck menu.
Definition: radioddity_codeplug.cc:2175
virtual void enablePower(bool enable)
Enables/disables the power menu.
Definition: radioddity_codeplug.cc:2232
virtual void enablePasswordLock(bool enable)
Enables/disables the password-lock menu.
Definition: radioddity_codeplug.cc:2297
virtual void enableRadioEnable(bool enable)
Enables/disables the radio-enable menu.
Definition: radioddity_codeplug.cc:2192
virtual void enableAnsweredCalls(bool enable)
Enables/disables the answered-calls menu.
Definition: radioddity_codeplug.cc:2313
virtual void enableProgPassword(bool enable)
Enables/disables the programming-password menu.
Definition: radioddity_codeplug.cc:2208
virtual bool tone() const
Returns true if the tone menu is shown.
Definition: radioddity_codeplug.cc:2220
virtual bool editContact() const
Returns true if the edit-contact menu is shown.
Definition: radioddity_codeplug.cc:2155
virtual void setDualWatchMode(DualWatchMode mode)
Sets the dual-watch mode.
Definition: radioddity_codeplug.cc:2384
virtual bool dualWatch() const
Returns true if the dual-watch menu is shown.
Definition: radioddity_codeplug.cc:2335
virtual bool introScreen() const
Returns true if the intro-screen menu is shown.
Definition: radioddity_codeplug.cc:2244
virtual bool keypadLock() const
Returns true if the keypad-lock menu is shown.
Definition: radioddity_codeplug.cc:2253
virtual void enableTalkaround(bool enable)
Enables/disables the talkaround menu.
Definition: radioddity_codeplug.cc:2216
virtual void enableMissedCalls(bool enable)
Enables/disables the missed-calls menu.
Definition: radioddity_codeplug.cc:2305
virtual void enablePrivacy(bool enable)
Enables/disables the privacy menu.
Definition: radioddity_codeplug.cc:2281
virtual void enableRadioDisable(bool enable)
Enables/disables the radio-disable menu.
Definition: radioddity_codeplug.cc:2200
virtual unsigned keypadLockTime() const
Returns the keypad lock time in seconds.
Definition: radioddity_codeplug.cc:2344
virtual unsigned menuHangTime() const
Returns the menu hang-time in seconds.
Definition: radioddity_codeplug.cc:2113
virtual bool keyTone() const
Returns true if the keytone is enabled.
Definition: radioddity_codeplug.cc:2371
virtual void enableManualDial(bool enable)
Enables/disables the manual-dial menu.
Definition: radioddity_codeplug.cc:2167
virtual void enableRemoteMonitor(bool enable)
Enables/disables the message menu.
Definition: radioddity_codeplug.cc:2183
virtual bool passwordLock() const
Returns true if the password-lock menu is shown.
Definition: radioddity_codeplug.cc:2293
virtual bool backlight() const
Returns true if the backlight menu is shown.
Definition: radioddity_codeplug.cc:2236
DualWatchMode
Possible dual-watch modes.
Definition: radioddity_codeplug.hh:1079
virtual unsigned backlightTime() const
Retunrns the backlight time in seconds.
Definition: radioddity_codeplug.cc:2353
virtual void enableEditContact(bool enable)
Enables/disables the edit-contact menu.
Definition: radioddity_codeplug.cc:2159
virtual bool vox() const
Returns true if the VOX menu is shown.
Definition: radioddity_codeplug.cc:2285
virtual bool talkaround() const
Returns true if the talkaround menu is shown.
Definition: radioddity_codeplug.cc:2212
virtual bool editScanList() const
Returns true if the edit scan-list menu is shown.
Definition: radioddity_codeplug.cc:2139
virtual bool remoteMonitor() const
Returns true if the remote-monitor menu is shown.
Definition: radioddity_codeplug.cc:2179
virtual void enableKeypadLock(bool enable)
Enables/disables the keypad-lock menu.
Definition: radioddity_codeplug.cc:2257
virtual bool progPassword() const
Returns true if the programming-password menu is shown.
Definition: radioddity_codeplug.cc:2204
virtual void enableCallAlert(bool enable)
Enables/disables the call-alert menu.
Definition: radioddity_codeplug.cc:2151
virtual bool manualDial() const
Returns true if the manual-dial menu is shown.
Definition: radioddity_codeplug.cc:2163
ChannelDisplayMode
Possible channel display modes.
Definition: radioddity_codeplug.hh:1072
virtual void enableOutgoingCalls(bool enable)
Enables/disables the outgoing-calls menu.
Definition: radioddity_codeplug.cc:2322
virtual bool ledIndicator() const
Returns true if the LED-indicator menu is shown.
Definition: radioddity_codeplug.cc:2261
virtual void enableEditScanList(bool enable)
Enables/disables the edit scan-list menu.
Definition: radioddity_codeplug.cc:2143
virtual bool radioCheck() const
Returns true if the radio-check menu is shown.
Definition: radioddity_codeplug.cc:2171
virtual bool callAlert() const
Returns true if the call-alert menu is shown.
Definition: radioddity_codeplug.cc:2147
virtual void enableMessage(bool enable)
Enables/disables the message menu.
Definition: radioddity_codeplug.cc:2127
virtual void enableTone(bool enable)
Enables/disables the tone menu.
Definition: radioddity_codeplug.cc:2224
virtual bool power() const
Returns true if the power menu is shown.
Definition: radioddity_codeplug.cc:2228
virtual bool answeredCalls() const
Returns true if the answered-calls menu is shown.
Definition: radioddity_codeplug.cc:2309
virtual bool scanStart() const
Returns true if the scan-start menu is shown.
Definition: radioddity_codeplug.cc:2131
void clear()
Resets the menu settings.
Definition: radioddity_codeplug.cc:2064
virtual void setBacklightTime(unsigned sec)
Sets the backlight time in seconds.
Definition: radioddity_codeplug.cc:2357
virtual void setKeypadLockTime(unsigned sec)
Sets the keypad lock time in seconds.
Definition: radioddity_codeplug.cc:2348
virtual void enableBacklight(bool enable)
Enables/disables the backlight menu.
Definition: radioddity_codeplug.cc:2240
virtual bool missedCalls() const
Returns true if the missed-calls menu is shown.
Definition: radioddity_codeplug.cc:2301
virtual void enableVOX(bool enable)
Enables/disables the VOX menu.
Definition: radioddity_codeplug.cc:2289
virtual ChannelDisplayMode channelDisplayMode() const
Returns the channel display mode.
Definition: radioddity_codeplug.cc:2362
virtual void enableChannelDisplay(bool enable)
Enables/disables the channel display mode menu.
Definition: radioddity_codeplug.cc:2331
virtual DualWatchMode dualWatchMode() const
Returns the dual-watch mode.
Definition: radioddity_codeplug.cc:2380
virtual ~MenuSettingsElement()
Destructor.
Definition: radioddity_codeplug.cc:2059
virtual bool channelDisplay() const
Returns true if the channel display-mode menu is shown.
Definition: radioddity_codeplug.cc:2327
virtual void setChannelDisplayMode(ChannelDisplayMode mode)
Sets the channel display mode.
Definition: radioddity_codeplug.cc:2366
virtual bool radioDisable() const
Returns true if the radio-disable menu is shown.
Definition: radioddity_codeplug.cc:2196
MenuSettingsElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:2047
virtual void enableDualWatch(bool enable)
Enables/disables the dual-watch menu.
Definition: radioddity_codeplug.cc:2339
virtual void enableIntroScreen(bool enable)
Enables/disables the message menu.
Definition: radioddity_codeplug.cc:2248
virtual void enableScanStart(bool enable)
Enables/disables the scan-start menu.
Definition: radioddity_codeplug.cc:2135
virtual void enableLEDIndicator(bool enable)
Enables/disables the LED-indicator menu.
Definition: radioddity_codeplug.cc:2265
virtual void enableSquelch(bool enable)
Enables/disables the squelch menu.
Definition: radioddity_codeplug.cc:2273
virtual bool outgoingCalls() const
Returns true if the outgoing-calls menu is shown.
Definition: radioddity_codeplug.cc:2318
Implements the base class of a message bank for all Radioddity message banks.
Definition: radioddity_codeplug.hh:1313
virtual QString message(unsigned n) const
Returns the n-th message.
Definition: radioddity_codeplug.cc:2533
virtual ~MessageBankElement()
Destructor.
Definition: radioddity_codeplug.cc:2515
virtual unsigned numMessages() const
Returns the number of messages.
Definition: radioddity_codeplug.cc:2529
MessageBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:2503
virtual bool encode(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())
Encodes all preset messages.
Definition: radioddity_codeplug.cc:2553
static constexpr unsigned int size()
Returns the size of the message bank.
Definition: radioddity_codeplug.hh:1325
virtual void appendMessage(const QString msg)
Appends a message to the list.
Definition: radioddity_codeplug.cc:2539
void clear()
Resets all messages.
Definition: radioddity_codeplug.cc:2520
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes all preset messages.
Definition: radioddity_codeplug.cc:2564
Implements the base class of scan lists banks for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:717
virtual bool isEnabled(unsigned n) const
Returns true if the n-th scan list is enabled.
Definition: radioddity_codeplug.cc:1335
virtual ~ScanListBankElement()
Destructor.
Definition: radioddity_codeplug.cc:1325
virtual void enable(unsigned n, bool enabled)
Enable/disable n-th scan list.
Definition: radioddity_codeplug.cc:1339
virtual uint8_t * get(unsigned n) const
Returns a pointer to the n-th scan list.
Definition: radioddity_codeplug.cc:1347
void clear()
Resets the scan list bank.
Definition: radioddity_codeplug.cc:1330
ScanListBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:1313
Implements the base class for scan lists of all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:597
virtual bool hasSecondary() const
Returns true if the secondary priority channel is set.
Definition: radioddity_codeplug.cc:1181
virtual void clearPrimary()
Clears the primary priority channel.
Definition: radioddity_codeplug.cc:1176
virtual unsigned secondary() const
Return the channel index for the secondary priority channel.
Definition: radioddity_codeplug.cc:1189
virtual void fromScanListObj(const ScanList *lst, Context &ctx)
Initializes this codeplug representation from the given ScanList object.
Definition: radioddity_codeplug.cc:1281
virtual void setName(const QString &name)
Sets the name of the scan list.
Definition: radioddity_codeplug.cc:1099
virtual void clearSecondary()
Clears the secondary priority channel.
Definition: radioddity_codeplug.cc:1201
ScanListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:1065
virtual ~ScanListElement()
Destructor.
Definition: radioddity_codeplug.cc:1077
virtual void setSelected(unsigned n)
Sets the n-th member to be the selected channel.
Definition: radioddity_codeplug.cc:1147
virtual void setRevertSelected()
Sets the revert channel to be the selected one.
Definition: radioddity_codeplug.cc:1222
void clear()
Resets the scan list.
Definition: radioddity_codeplug.cc:1082
virtual void clearMember(unsigned n)
Clears the n-th member.
Definition: radioddity_codeplug.cc:1151
virtual bool revertIsSelected() const
Returns true if the revert channel is the selected channel.
Definition: radioddity_codeplug.cc:1210
virtual unsigned revert() const
Return the channel index for the revert channel.
Definition: radioddity_codeplug.cc:1214
virtual bool secondaryIsSelected() const
Returns true if the secondary priority channel is the selected channel.
Definition: radioddity_codeplug.cc:1185
virtual void enableTalkback(bool enable)
Enables/disables talk back.
Definition: radioddity_codeplug.cc:1126
virtual void setPrioritySampleTime(unsigned ms)
Sets the priority sample time in ms.
Definition: radioddity_codeplug.cc:1244
virtual void enableChannelMark(bool enable)
Enables/disables channel mark.
Definition: radioddity_codeplug.cc:1108
virtual void setMember(unsigned n, unsigned idx)
Sets the n-th member index.
Definition: radioddity_codeplug.cc:1143
virtual Mode mode() const
Returns the scan mode.
Definition: radioddity_codeplug.cc:1113
virtual void setRevert(unsigned idx)
Sets the revert channel index.
Definition: radioddity_codeplug.cc:1218
virtual void setSecondarySelected()
Sets the secondary priority channel to be the selected channel.
Definition: radioddity_codeplug.cc:1197
virtual unsigned prioritySampleTime() const
Returns the priority sample time in ms.
Definition: radioddity_codeplug.cc:1240
virtual bool hasPrimary() const
Returns true if the primary priority channel is set.
Definition: radioddity_codeplug.cc:1156
virtual void clearRevert()
Clears the revert channel, sets it to last active.
Definition: radioddity_codeplug.cc:1226
virtual unsigned member(unsigned n) const
Returns the n-th member index.
Definition: radioddity_codeplug.cc:1139
virtual bool hasRevert() const
Returns true if the revert channel is set, if false the radio will transmit on the last active channe...
Definition: radioddity_codeplug.cc:1206
virtual bool linkScanListObj(ScanList *lst, Context &ctx) const
Links a previously constructed ScanList object to the rest of the generic configuration.
Definition: radioddity_codeplug.cc:1255
virtual void setSecondary(unsigned idx)
Sets the secondary priority channel index.
Definition: radioddity_codeplug.cc:1193
virtual void setMode(Mode mode)
Sets the scan mode.
Definition: radioddity_codeplug.cc:1117
virtual void setHoldTime(unsigned ms)
Sets the hold time in ms.
Definition: radioddity_codeplug.cc:1235
virtual bool talkback() const
Returns true if talk back is enabled.
Definition: radioddity_codeplug.cc:1122
virtual bool hasMember(unsigned n) const
Returns true if the n-th member is set.
Definition: radioddity_codeplug.cc:1131
virtual ScanList * toScanListObj(Context &ctx) const
Constructs a ScanList object from this codeplug representation.
Definition: radioddity_codeplug.cc:1249
virtual unsigned primary() const
Return the channel index for the primary priority channel.
Definition: radioddity_codeplug.cc:1164
virtual bool primaryIsSelected() const
Returns true if the primary priority channel is the selected channel.
Definition: radioddity_codeplug.cc:1160
Mode
Possible priority channel types.
Definition: radioddity_codeplug.hh:600
@ PL_PRI_NONPRI
Priority and non-priority channels.
Definition: radioddity_codeplug.hh:604
@ PL_DISABLE
Disable priority channels.
Definition: radioddity_codeplug.hh:602
@ PL_NONPRI
Only non-priority channels.
Definition: radioddity_codeplug.hh:601
@ PL_PRI
Only priority channels.
Definition: radioddity_codeplug.hh:603
virtual bool isSelected(unsigned n) const
Returns true if the n-th member is selected channel.
Definition: radioddity_codeplug.cc:1135
virtual unsigned holdTime() const
Returns the hold time in ms.
Definition: radioddity_codeplug.cc:1231
virtual void setPrimarySelected()
Sets the primary priority channel to be the selected channel.
Definition: radioddity_codeplug.cc:1172
virtual bool channelMark() const
Returns true if channel mark is enabled.
Definition: radioddity_codeplug.cc:1104
virtual QString name() const
Returns the name of the scan list.
Definition: radioddity_codeplug.cc:1095
virtual void setPrimary(unsigned idx)
Sets the primary priority channel index.
Definition: radioddity_codeplug.cc:1168
VFO Channel representation within the binary codeplug.
Definition: radioddity_codeplug.hh:255
VFOChannelElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:506
virtual void setOffsetMode(OffsetMode mode)
Sets the transmit frequency offset mode.
Definition: radioddity_codeplug.cc:576
virtual void setStepSize(double kHz)
Sets the tuning step-size in kHz.
Definition: radioddity_codeplug.cc:552
OffsetMode
Possible offset frequency modes.
Definition: radioddity_codeplug.hh:258
@ Positive
Transmit offset frequency is positive (TX above RX).
@ Off
Disables transmit frequency offset.
@ Negative
Transmit offset frequency is negative (TX below RX).
virtual void setTXOffset(double f)
Sets the transmit frequency offset in MHz.
Definition: radioddity_codeplug.cc:584
void setName(const QString &name)
The VFO channel has no name.
Definition: radioddity_codeplug.cc:531
virtual OffsetMode offsetMode() const
Returns the transmit frequency offset mode.
Definition: radioddity_codeplug.cc:572
StepSize
Possible tuning step sizes.
Definition: radioddity_codeplug.hh:265
QString name() const
The VFO channel has no name.
Definition: radioddity_codeplug.cc:527
virtual double txOffset() const
Returns the transmit frequency offset.
Definition: radioddity_codeplug.cc:580
void clear()
Resets the channel.
Definition: radioddity_codeplug.cc:519
virtual double stepSize() const
Returns the tuning step-size in kHz.
Definition: radioddity_codeplug.cc:537
Implements the base class for all zone banks of Radioddity codeplugs.
Definition: radioddity_codeplug.hh:450
void clear()
Resets the bank.
Definition: radioddity_codeplug.cc:899
virtual uint8_t * get(unsigned idx) const
Returns a pointer to the channel at the given index.
Definition: radioddity_codeplug.cc:914
ZoneBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:882
~ZoneBankElement()
Destructor.
Definition: radioddity_codeplug.cc:894
virtual void enable(unsigned idx, bool enabled)
Enable/disable a channel in the bank.
Definition: radioddity_codeplug.cc:909
virtual bool isEnabled(unsigned idx) const
Returns true if the channel is enabled.
Definition: radioddity_codeplug.cc:904
Represents a zone within Radioddity codeplugs.
Definition: radioddity_codeplug.hh:403
virtual void fromZoneObjA(const Zone *zone, Context &ctx)
Resets this codeplug zone representation from the given generic Zone object.
Definition: radioddity_codeplug.cc:850
void clear()
Resets the zone.
Definition: radioddity_codeplug.cc:787
virtual QString name() const
Returns the name of the zone.
Definition: radioddity_codeplug.cc:797
virtual bool linkZoneObj(Zone *zone, Context &ctx) const
Links a previously constructed Zone object to the rest of the configuration.
Definition: radioddity_codeplug.cc:831
virtual void fromZoneObjB(const Zone *zone, Context &ctx)
Resets this codeplug zone representation from the given generic Zone object.
Definition: radioddity_codeplug.cc:865
virtual unsigned member(unsigned n) const
Returns the n-th member index (+1).
Definition: radioddity_codeplug.cc:810
virtual void setName(const QString &name)
Sets the name of the zone.
Definition: radioddity_codeplug.cc:801
virtual bool hasMember(unsigned n) const
Returns true if a member is stored at the given index.
Definition: radioddity_codeplug.cc:806
ZoneElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: radioddity_codeplug.cc:770
virtual void setMember(unsigned n, unsigned idx)
Sets the n-th member index (+1).
Definition: radioddity_codeplug.cc:814
virtual Zone * toZoneObj(Context &ctx) const
Constructs a generic Zone object from this codeplug zone.
Definition: radioddity_codeplug.cc:823
bool isValid() const
Returns true if the zone is valid.
Definition: radioddity_codeplug.cc:792
virtual void clearMember(unsigned n)
Clears the n-th member index.
Definition: radioddity_codeplug.cc:818
Base class of all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:24
virtual bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Creates all scan lists.
virtual bool decodeMessages(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes preset messages.
virtual void clearChannels()=0
Clear all channels.
virtual void clearGeneralSettings()=0
Clears the general settings in the codeplug.
virtual bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes zones.
bool encode(Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack())
Encodes a given abstract configuration (config) to the device specific binary code-plug.
Definition: radioddity_codeplug.cc:2818
virtual bool createDTMFContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds all DTMF contacts to the configuration.
virtual bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Creates all group lists.
virtual bool encodeBootText(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes boot text.
virtual bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all scan lists.
virtual bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a digital contact to the configuration for each one in the codeplug.
virtual bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds all defined channels to the configuration.
virtual void clearVFOSettings()=0
Clears the VFO settings.
virtual bool encodeDTMFContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all DTMF contacts.
virtual bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encode all channels.
virtual void clearMessages()=0
Clears the messages.
virtual bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds zones to the configuration.
virtual void clearScanLists()=0
Clears all scan lists.
virtual bool linkGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all group lists.
RadioddityCodeplug(QObject *parent=nullptr)
Hidden constructor, use a device specific class to instantiate.
Definition: radioddity_codeplug.cc:2706
virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the binary codeplug and stores its content in the given generic configuration using the given...
Definition: radioddity_codeplug.cc:2926
virtual bool linkScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all scan lists.
virtual bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all digital contacts in the configuration into the codeplug.
virtual void clearBootText()=0
Clears boot text.
virtual bool encodeButtonSettings(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())=0
Encodes button settings.
virtual bool linkEncryption(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all encryption keys.
virtual bool decodeBootText(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Updates the given configuration from the boot text settings.
bool decode(Config *config, const ErrorStack &err=ErrorStack())
Decodes a binary codeplug to the given abstract configuration config.
Definition: radioddity_codeplug.cc:2899
virtual void clearZones()=0
Clears all zones.
bool postprocess(Config *config, const ErrorStack &err) const
Retruns a post-processed configuration of the decoded config.
Definition: radioddity_codeplug.cc:2910
virtual bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Updates the general settings from the given configuration.
virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the given generic configuration as a binary codeplug using the given context.
Definition: radioddity_codeplug.cc:2836
virtual ~RadioddityCodeplug()
Destructor.
Definition: radioddity_codeplug.cc:2712
virtual void clearEncryption()=0
Clears all encryption keys.
virtual void clearDTMFContacts()=0
Clears all DTMF contacts in the codeplug.
bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition: radioddity_codeplug.cc:2749
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition: radioddity_codeplug.cc:2717
virtual void clearMenuSettings()=0
Clears menu settings.
virtual void clearButtonSettings()=0
Clears the button settings.
virtual bool encodeEncryption(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all encryption keys defined.
virtual void clearBootSettings()=0
Clear boot settings.
virtual bool createEncryption(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Creates all encryption keys.
virtual void clearGroupLists()=0
Clears all group lists.
virtual bool decodeButtonSettings(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes the button settings.
virtual bool decodeGeneralSettings(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Updates the given configuration from the general settings.
Config * preprocess(Config *config, const ErrorStack &err) const
Retruns a prepared configuration for this particular radio.
Definition: radioddity_codeplug.cc:2799
virtual bool linkChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all channels.
virtual void clearContacts()=0
Clears all contacts in the codeplug.
virtual bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all group lists.
virtual bool encodeMessages(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())=0
Encodes preset messages.
virtual bool linkZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all zones within the configuration.
MonitorType
Possible monitor types.
Definition: radioddity_extensions.hh:372
ScanMode
Possible scan modes.
Definition: radioddity_extensions.hh:379
ARTSTone
Possible ARTS tone settings.
Definition: radioddity_extensions.hh:135
Simple range class representing some range in some data type.
Definition: ranges.hh:14
Generic representation of a scan list.
Definition: scanlist.hh:15
Code
This huge enum lists all possible RX/TX tones that can be associated with analog channels.
Definition: signaling.hh:18
Represents a zone within the generic configuration.
Definition: zone.hh:15
Helper type to encode frequencies without any rounding error.
Definition: frequency.hh:11
Encoding/decoding of function key actions.
Definition: radioddity_codeplug.hh:928
static RadioddityButtonSettingsExtension::Function decode(uint8_t action)
Decodes the action.
Definition: radioddity_codeplug.cc:1851
Action
Possible function key actions.
Definition: radioddity_codeplug.hh:937
@ ToggleMonitor
Toggle monitor on channel.
Definition: radioddity_codeplug.hh:942
@ OneTouch2
Performs the second of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:945
@ OneTouch6
Performs the sixt of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:949
@ OneTouch4
Performs the fourth of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:947
@ None
Disables button.
Definition: radioddity_codeplug.hh:938
@ OneTouch1
Performs the first of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:944
@ OneTouch3
Performs the third of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:946
@ OneTouch5
Performs the fifth of 6 user-programmable actions (call, message).
Definition: radioddity_codeplug.hh:948
static uint8_t encode(RadioddityButtonSettingsExtension::Function func)
Encodes the given function.
Definition: radioddity_codeplug.cc:1821
Some limits.
Definition: radioddity_codeplug.hh:1038
static constexpr TimeRange longPressDuration()
Range of valid long-press durations.
Definition: radioddity_codeplug.hh:1040
static constexpr unsigned int oneTouchActions()
Number of one-touch actions.
Definition: radioddity_codeplug.hh:1044
Internal used offsets within the element.
Definition: radioddity_codeplug.hh:1049
Some limits for the encryption element.
Definition: radioddity_codeplug.hh:1411
static constexpr unsigned int basicEncryptionKeys()
The maximum number of (basic) encryption keys.
Definition: radioddity_codeplug.hh:1413
Some limits for the group list bank.
Definition: radioddity_codeplug.hh:575
static constexpr unsigned int memberCount()
Maximum number of members.
Definition: radioddity_codeplug.hh:577
Internal used offset within the element.
Definition: radioddity_codeplug.hh:582
Some limits for the group list.
Definition: radioddity_codeplug.hh:519
static constexpr unsigned int memberCount()
Maximum member count.
Definition: radioddity_codeplug.hh:523
static constexpr unsigned int nameLength()
Maximum name length.
Definition: radioddity_codeplug.hh:521
Some internal offsets within the element.
Definition: radioddity_codeplug.hh:528
Some limits.
Definition: radioddity_codeplug.hh:1343
static constexpr unsigned int messageLength()
Maximum length of each message.
Definition: radioddity_codeplug.hh:1345
static constexpr unsigned int messages()
Maximum number of messages.
Definition: radioddity_codeplug.hh:1344
Some internal used offset.
Definition: radioddity_codeplug.hh:1350