libdrmconf  0.12.0
A library to program DMR radios.
tyt_codeplug.hh
1 #ifndef TYT_CODEPLUG_HH
2 #define TYT_CODEPLUG_HH
3 
4 #include <QDateTime>
5 
6 #include "codeplug.hh"
7 #include "signaling.hh"
8 #include "channel.hh"
9 #include "contact.hh"
10 #include "tyt_extensions.hh"
11 
12 class DMRContact;
13 class Zone;
14 class RXGroupList;
15 class ScanList;
16 class GPSSystem;
17 class SMSExtension;
18 class SMSTemplate;
19 
25 class TyTCodeplug : public Codeplug
26 {
27  Q_OBJECT
28 
29 public:
35  {
36  public:
38  enum Mode {
40  MODE_DIGITAL = 2
41  };
42 
44  enum Bandwidth {
46  BW_20_KHZ = 1,
47  BW_25_KHZ = 2
48  };
49 
51  enum PrivacyType {
52  PRIV_NONE = 0,
53  PRIV_BASIC = 1,
54  PRIV_ENHANCED = 2
55  };
56 
58  enum Admit {
61  ADMIT_TONE = 2,
63  };
64 
65  protected:
67  ChannelElement(uint8_t *ptr, size_t size);
68 
69  public:
71  ChannelElement(uint8_t *ptr);
73  virtual ~ChannelElement();
74 
76  bool isValid() const;
78  void clear();
79 
81  virtual Mode mode() const;
83  virtual void setMode(Mode setMode);
84 
86  virtual FMChannel::Bandwidth bandwidth() const;
88  virtual void setBandwidth(FMChannel::Bandwidth bw);
89 
91  virtual bool autoScan() const;
93  virtual void enableAutoScan(bool enable);
94 
96  virtual bool loneWorker() const;
98  virtual void enableLoneWorker(bool enable);
99 
101  virtual bool talkaround() const;
103  virtual void enableTalkaround(bool enable);
104 
106  virtual bool rxOnly() const;
108  virtual void enableRXOnly(bool enable);
109 
111  virtual DMRChannel::TimeSlot timeSlot() const;
113  virtual void setTimeSlot(DMRChannel::TimeSlot ts);
114 
116  virtual uint8_t colorCode() const;
118  virtual void setColorCode(uint8_t ts);
119 
121  virtual uint8_t privacyIndex() const;
123  virtual void setPrivacyIndex(uint8_t ts);
125  virtual PrivacyType privacyType() const;
127  virtual void setPrivacyType(PrivacyType type);
128 
130  virtual bool privateCallConfirm() const;
132  virtual void enablePrivateCallConfirm(bool enable);
133 
135  virtual bool dataCallConfirm() const;
137  virtual void enableDataCallConfirm(bool enable);
138 
147 
149  virtual bool emergencyAlarmACK() const;
151  virtual void enableEmergencyAlarmACK(bool enable);
152 
154  virtual bool displayPTTId() const;
156  virtual void enableDisplayPTTId(bool enable);
157 
159  virtual bool vox() const;
161  virtual void enableVOX(bool enable);
162 
164  virtual Admit admitCriterion() const;
166  virtual void setAdmitCriterion(Admit admit);
167 
169  virtual uint16_t contactIndex() const;
171  virtual void setContactIndex(uint16_t idx);
172 
174  virtual unsigned txTimeOut() const;
176  virtual void setTXTimeOut(unsigned tot);
178  virtual uint8_t txTimeOutRekeyDelay() const;
180  virtual void setTXTimeOutRekeyDelay(uint8_t delay);
181 
183  virtual uint8_t emergencySystemIndex() const;
185  virtual void setEmergencySystemIndex(uint8_t idx);
186 
188  virtual uint8_t scanListIndex() const;
190  virtual void setScanListIndex(uint8_t idx);
191 
193  virtual uint8_t groupListIndex() const;
195  virtual void setGroupListIndex(uint8_t idx);
196 
198  virtual uint8_t positioningSystemIndex() const;
200  virtual void setPositioningSystemIndex(uint8_t idx);
201 
203  virtual bool dtmfDecode(uint8_t idx) const;
205  virtual void setDTMFDecode(uint8_t idx, bool enable);
206 
208  virtual uint32_t rxFrequency() const;
210  virtual void setRXFrequency(uint32_t Hz);
212  virtual uint32_t txFrequency() const;
214  virtual void setTXFrequency(uint32_t Hz);
215 
217  virtual Signaling::Code rxSignaling() const;
219  virtual void setRXSignaling(Signaling::Code code);
221  virtual Signaling::Code txSignaling() const;
223  virtual void setTXSignaling(Signaling::Code code);
225  virtual uint8_t rxSignalingSystemIndex() const;
227  virtual void setRXSignalingSystemIndex(uint8_t idx);
229  virtual uint8_t txSignalingSystemIndex() const;
231  virtual void setTXSignalingSystemIndex(uint8_t idx);
232 
234  virtual bool txGPSInfo() const;
236  virtual void enableTXGPSInfo(bool enable);
238  virtual bool rxGPSInfo() const;
240  virtual void enableRXGPSInfo(bool enable);
241 
243  virtual QString name() const;
245  virtual void setName(const QString &setName);
246 
248  virtual Channel *toChannelObj(const ErrorStack &err=ErrorStack()) const;
250  virtual bool linkChannelObj(Channel *c, Context &ctx, const ErrorStack &err=ErrorStack()) const;
252  virtual void fromChannelObj(const Channel *c, Context &ctx);
253  };
254 
260  {
261  protected:
263  ContactElement(uint8_t *ptr, size_t size);
264 
265  public:
267  ContactElement(uint8_t *ptr);
269  virtual ~ContactElement();
270 
271  void clear();
272  bool isValid() const;
273 
275  virtual uint32_t dmrId() const;
277  virtual void setDMRId(uint32_t id);
278 
280  virtual DMRContact::Type callType() const;
282  virtual void setCallType(DMRContact::Type type);
283 
285  virtual bool ringTone() const;
287  virtual void enableRingTone(bool enable);
288 
290  virtual QString name() const;
292  virtual void setName(const QString &nm);
293 
295  virtual bool fromContactObj(const DMRContact *contact);
297  virtual DMRContact *toContactObj() const;
298  };
299 
307  {
308  protected:
310  ZoneElement(uint8_t *ptr, size_t size);
311 
312  public:
314  ZoneElement(uint8_t *ptr);
316  virtual ~ZoneElement();
317 
318  void clear();
319  bool isValid() const;
320 
322  virtual QString name() const;
324  virtual void setName(const QString &setName);
325 
327  virtual uint16_t memberIndex(unsigned n) const;
329  virtual void setMemberIndex(unsigned n, uint16_t idx);
330 
332  virtual bool fromZoneObj(const Zone *zone, Context &ctx);
334  virtual Zone *toZoneObj() const;
336  virtual bool linkZone(Zone *zone, Context &ctx) const;
337  };
338 
344  {
345  protected:
347  GroupListElement(uint8_t *ptr, size_t size);
348 
349  public:
351  GroupListElement(uint8_t *ptr);
353  virtual ~GroupListElement();
354 
355  void clear();
356  bool isValid() const;
357 
359  virtual QString name() const;
361  virtual void setName(const QString &nm);
362 
364  virtual uint16_t memberIndex(unsigned n) const;
366  virtual void setMemberIndex(unsigned n, uint16_t idx);
367 
369  virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx);
371  virtual RXGroupList *toGroupListObj(Context &ctx);
373  virtual bool linkGroupListObj(RXGroupList *lst, Context &ctx);
374  };
375 
381  {
382  protected:
384  ScanListElement(uint8_t *ptr, size_t size);
385 
386  public:
388  ScanListElement(uint8_t *ptr);
390  virtual ~ScanListElement();
391 
392  bool isValid() const;
393  void clear();
394 
396  virtual QString name() const;
398  virtual void setName(const QString &nm);
399 
401  virtual uint16_t priorityChannel1Index() const;
403  virtual void setPriorityChannel1Index(uint16_t idx);
404 
406  virtual uint16_t priorityChannel2Index() const;
408  virtual void setPriorityChannel2Index(uint16_t idx);
409 
411  virtual uint16_t txChannelIndex() const;
413  virtual void setTXChannelIndex(uint16_t idx);
414 
416  virtual unsigned holdTime() const;
418  virtual void setHoldTime(unsigned time);
419 
421  virtual unsigned prioritySampleTime() const;
423  virtual void setPrioritySampleTime(unsigned time);
424 
426  virtual uint16_t memberIndex(unsigned n) const;
428  virtual void setMemberIndex(unsigned n, uint16_t idx);
429 
431  virtual bool fromScanListObj(const ScanList *lst, Context &ctx);
433  virtual ScanList *toScanListObj(Context &ctx);
435  virtual bool linkScanListObj(ScanList *lst, Context &ctx);
436  };
437 
443  {
444  protected:
446  GeneralSettingsElement(uint8_t *ptr, size_t size);
447 
448  public:
450  explicit GeneralSettingsElement(uint8_t *ptr);
452  virtual ~GeneralSettingsElement();
453 
454  void clear();
455 
457  virtual QString introLine1() const;
459  virtual void setIntroLine1(const QString line);
461  virtual QString introLine2() const;
463  virtual void setIntroLine2(const QString line);
464 
466  virtual TyTSettingsExtension::MonitorType monitorType() const;
468  virtual void setMonitorType(TyTSettingsExtension::MonitorType type);
469 
471  virtual bool allLEDsDisabled() const;
473  virtual void disableAllLEDs(bool disable);
474 
476  virtual bool savePreamble() const;
478  virtual void setSavePreamble(bool enable);
480  virtual bool saveModeRX() const;
482  virtual void setSaveModeRX(bool enable);
484  virtual bool allTonesDisabled() const;
486  virtual void disableAllTones(bool disable);
488  virtual bool chFreeIndicationTone() const;
490  virtual void setChFreeIndicationTone(bool enable);
492  virtual bool passwdAndLock() const;
494  virtual void enablePasswdAndLock(bool enable);
496  virtual bool talkPermitToneDigital() const;
498  virtual void enableTalkPermitToneDigital(bool enable);
500  virtual bool talkPermitToneAnalog() const;
502  virtual void enableTalkPermitToneAnalog(bool enable);
503 
505  virtual bool introPicture() const;
507  virtual void enableIntroPicture(bool enable);
508 
510  virtual uint32_t dmrId() const;
512  virtual void setDMRId(uint32_t id);
513 
515  virtual unsigned txPreambleDuration() const;
517  virtual void setTXPreambleDuration(unsigned ms);
519  virtual unsigned groupCallHangTime() const;
521  virtual void setGroupCallHangTime(unsigned ms);
523  virtual unsigned privateCallHangTime() const;
525  virtual void setPrivateCallHangTime(unsigned ms);
527  virtual unsigned voxSesitivity() const;
529  virtual void setVOXSesitivity(unsigned ms);
531  virtual unsigned lowBatteryInterval() const;
533  virtual void setLowBatteryInterval(unsigned sec);
534 
536  virtual bool callAlertToneIsContinuous() const;
538  virtual unsigned callAlertToneDuration() const;
540  virtual void setCallAlertToneDuration(unsigned sec);
542  virtual void setCallAlertToneContinuous();
543 
545  virtual unsigned loneWorkerResponseTime() const;
547  virtual void setLoneWorkerResponseTime(unsigned min);
549  virtual unsigned loneWorkerReminderTime() const;
551  virtual void setLoneWorkerReminderTime(unsigned min);
553  virtual unsigned scanDigitalHangTime() const;
555  virtual void setScanDigitalHangTime(unsigned ms);
557  virtual unsigned scanAnalogHangTime() const;
559  virtual void setScanAnalogHangTime(unsigned ms);
560 
562  virtual bool backlightIsAlways() const;
564  virtual unsigned backlightTime() const;
566  virtual void setBacklightTime(unsigned sec);
568  virtual void backlightTimeSetAlways();
569 
571  virtual bool keypadLockIsManual() const;
573  virtual unsigned keypadLockTime() const;
575  virtual void setKeypadLockTime(unsigned sec);
577  virtual void keypadLockTimeSetManual();
578 
580  virtual uint32_t powerOnPassword() const;
582  virtual void setPowerOnPassword(uint32_t passwd);
583 
585  virtual bool radioProgPasswordEnabled() const;
587  virtual uint32_t radioProgPassword() const;
589  virtual void setRadioProgPassword(uint32_t passwd);
591  virtual void radioProgPasswordDisable();
592 
594  virtual bool pcProgPasswordEnabled() const;
596  virtual QString pcProgPassword() const;
598  virtual void setPCProgPassword(const QString &pass);
600  virtual void pcProgPasswordDisable();
601 
603  virtual QString radioName() const;
605  virtual void setRadioName(const QString &name);
606 
608  virtual bool fromConfig(const Config *config);
610  virtual bool updateConfig(Config *config);
611  };
612 
618  {
619  protected:
621  TimestampElement(uint8_t *ptr, size_t size);
622 
623  public:
625  explicit TimestampElement(uint8_t *ptr);
627  virtual ~TimestampElement();
628 
629  void clear();
630 
632  virtual QDateTime timestamp() const;
634  virtual void setTimestamp(const QDateTime &ts);
635 
637  virtual QString cpsVersion() const;
638  };
639 
645  {
646  protected:
648  GPSSystemElement(uint8_t *ptr, size_t size);
649 
650  public:
652  explicit GPSSystemElement(uint8_t *ptr);
654  virtual ~GPSSystemElement();
655 
656  bool isValid() const;
657  void clear();
658 
660  virtual bool revertChannelIsSelected() const;
662  virtual uint16_t revertChannelIndex() const;
664  virtual void setRevertChannelIndex(uint16_t idx);
666  virtual void setRevertChannelSelected();
667 
669  virtual bool repeatIntervalDisabled() const;
671  virtual unsigned repeatInterval() const;
673  virtual void setRepeatInterval(unsigned sec);
675  virtual void disableRepeatInterval();
676 
678  virtual bool destinationContactDisabled() const;
680  virtual uint16_t destinationContactIndex() const;
682  virtual void setDestinationContactIndex(uint16_t idx);
684  virtual void disableDestinationContact();
685 
687  virtual bool fromGPSSystemObj(GPSSystem *sys, Context &ctx);
689  virtual GPSSystem *toGPSSystemObj();
691  virtual bool linkGPSSystemObj(GPSSystem *sys, Context &ctx);
692  };
693 
699  {
700  protected:
702  MenuSettingsElement(uint8_t *ptr, size_t size);
703 
704  public:
706  explicit MenuSettingsElement(uint8_t *ptr);
708  virtual ~MenuSettingsElement();
709 
710  void clear();
711 
713  virtual bool menuHangtimeIsInfinite() const;
715  virtual unsigned menuHangtime() const;
717  virtual void setMenuHangtime(unsigned sec);
719  virtual void infiniteMenuHangtime();
720 
722  virtual bool textMessage() const;
724  virtual void enableTextMessage(bool enable);
726  virtual bool callAlert() const;
728  virtual void enableCallAlert(bool enable);
730  virtual bool contactEditing() const;
732  virtual void enableContactEditing(bool enable);
734  virtual bool manualDial() const;
736  virtual void enableManualDial(bool enable);
738  virtual bool remoteRadioCheck() const;
740  virtual void enableRemoteRadioCheck(bool enable);
742  virtual bool remoteMonitor() const;
744  virtual void enableRemoteMonitor(bool enable);
746  virtual bool remoteRadioEnable() const;
748  virtual void enableRemoteRadioEnable(bool enable);
750  virtual bool remoteRadioDisable() const;
752  virtual void enableRemoteRadioDisable(bool enable);
753 
755  virtual bool scan() const;
757  virtual void enableScan(bool enable);
759  virtual bool scanListEditing() const;
761  virtual void enableScanListEditing(bool enable);
763  virtual bool callLogMissed() const;
765  virtual void enableCallLogMissed(bool enable);
767  virtual bool callLogAnswered() const;
769  virtual void enableCallLogAnswered(bool enable);
771  virtual bool callLogOutgoing() const;
773  virtual void enableCallLogOutgoing(bool enable);
775  virtual bool talkaround() const;
777  virtual void enableTalkaround(bool enable);
779  virtual bool alertTone() const;
781  virtual void enableAlertTone(bool enable);
782 
784  virtual bool power() const;
786  virtual void enablePower(bool enable);
788  virtual bool backlight() const;
790  virtual void enableBacklight(bool enable);
792  virtual bool bootScreen() const;
794  virtual void enableBootScreen(bool enable);
796  virtual bool keypadLock() const;
798  virtual void enableKeypadLock(bool enable);
800  virtual bool ledIndicator() const;
802  virtual void enableLEDIndicator(bool enable);
804  virtual bool squelch() const;
806  virtual void enableSquelch(bool enable);
808  virtual bool vox() const;
810  virtual void enableVOX(bool enable);
811 
813  virtual bool password() const;
815  virtual void enablePassword(bool enable);
817  virtual bool displayMode() const;
819  virtual void enableDisplayMode(bool enable);
821  virtual bool radioProgramming() const;
823  virtual void enableRadioProgramming(bool enable);
824 
826  virtual bool fromConfig(const Config *config);
828  virtual bool updateConfig(Config *config);
829  };
830 
836  {
837  public:
840 
841  protected:
843  ButtonSettingsElement(uint8_t *ptr, size_t size);
844 
845  public:
847  explicit ButtonSettingsElement(uint8_t *ptr);
849  virtual ~ButtonSettingsElement();
850 
851  void clear();
852 
854  virtual ButtonAction sideButton1Short() const;
856  virtual void setSideButton1Short(ButtonAction action);
858  virtual ButtonAction sideButton1Long() const;
860  virtual void setSideButton1Long(ButtonAction action);
861 
863  virtual ButtonAction sideButton2Short() const;
865  virtual void setSideButton2Short(ButtonAction action);
867  virtual ButtonAction sideButton2Long() const;
869  virtual void setSideButton2Long(ButtonAction action);
870 
872  virtual unsigned longPressDuration() const;
874  virtual void setLongPressDuration(unsigned ms);
875 
877  virtual bool fromConfig(const Config *config);
879  virtual bool updateConfig(Config *config);
880  };
881 
887  {
888  public:
890  enum Action {
891  CALL = 0b0000,
892  MESSAGE = 0b0001,
893  DTMF1 = 0b1000,
894  DTMF2 = 0b1001,
895  DTMF3 = 0b1010,
896  DTMF4 = 0b1011
897  };
898 
900  enum Type {
901  Disabled = 0b00,
902  Digital = 0b01,
903  Analog = 0b10
904  };
905 
906  protected:
908  OneTouchSettingElement(uint8_t *ptr, size_t size);
909 
910  public:
912  explicit OneTouchSettingElement(uint8_t *ptr);
914  virtual ~OneTouchSettingElement();
915 
916  bool isValid() const;
917  void clear();
918 
920  virtual Action action() const;
922  virtual void setAction(Action action);
923 
925  virtual Type actionType() const;
927  virtual void setActionType(Type action);
928 
930  virtual uint8_t messageIndex() const;
932  virtual void setMessageIndex(uint8_t idx);
933 
935  virtual uint16_t contactIndex() const;
937  virtual void setContactIndex(uint16_t idx);
938  };
939 
945  {
946  protected:
948  EmergencySettingsElement(uint8_t *ptr, size_t size);
949 
950  public:
952  explicit EmergencySettingsElement(uint8_t *ptr);
954  virtual ~EmergencySettingsElement();
955 
956  virtual void clear();
957 
959  virtual bool emergencyRemoteMonitor() const;
961  virtual void enableEmergencyRemoteMonitor(bool enable);
963  virtual bool remoteMonitor() const;
965  virtual void enableRemoteMonitor(bool enable);
967  virtual bool radioDisable() const;
969  virtual void enableRadioDisable(bool enable);
970 
972  virtual unsigned remoteMonitorDuration() const;
974  virtual void setRemoteMonitorDuration(unsigned sec);
975 
977  virtual unsigned txTimeOut() const;
979  virtual void setTXTimeOut(unsigned ms);
980 
982  virtual unsigned messageLimit() const;
984  virtual void setMessageLimit(unsigned limit);
985  };
986 
992  {
993  public:
995  enum AlarmType {
996  DISABLED = 0,
997  REGULAR = 1,
998  SILENT = 2,
999  SILENT_W_VOICE = 3
1000  };
1002  enum AlarmMode {
1003  ALARM = 0,
1005  ALARM_W_VOICE = 2
1006  };
1007 
1008  protected:
1010  EmergencySystemElement(uint8_t *ptr, size_t size);
1011 
1012  public:
1014  explicit EmergencySystemElement(uint8_t *ptr);
1016  virtual ~EmergencySystemElement();
1017 
1018  bool isValid() const;
1019  void clear();
1020 
1022  virtual QString name() const;
1024  virtual void setName(const QString &name);
1025 
1027  virtual AlarmType alarmType() const;
1029  virtual void setAlarmType(AlarmType type);
1031  virtual AlarmMode alarmMode() const;
1033  virtual void setAlarmMode(AlarmMode mode);
1034 
1036  virtual unsigned impoliteRetries() const;
1038  virtual void setImpoliteRetries(unsigned num);
1039 
1041  virtual unsigned politeRetries() const;
1043  virtual void setPoliteRetries(unsigned num);
1044 
1046  virtual unsigned hotMICDuration() const;
1048  virtual void setHotMICDuration(unsigned sec);
1049 
1051  virtual bool revertChannelIsSelected() const;
1053  virtual uint16_t revertChannelIndex() const;
1055  virtual void setRevertChannelIndex(uint16_t idx);
1057  virtual void revertChannelSelected();
1058  };
1059 
1065  {
1066  protected:
1068  EncryptionElement(uint8_t *ptr, size_t size);
1069 
1070  public:
1072  explicit EncryptionElement(uint8_t *ptr);
1074  virtual ~EncryptionElement();
1075 
1076  void clear();
1077 
1079  static constexpr unsigned int size() { return 0x00b0; }
1080 
1083  virtual bool isEnhancedKeySet(unsigned n) const;
1085  virtual QByteArray enhancedKey(unsigned n) const;
1087  virtual void setEnhancedKey(unsigned n, const QByteArray &key);
1088 
1091  virtual bool isBasicKeySet(unsigned n) const;
1093  virtual QByteArray basicKey(unsigned n) const;
1095  virtual void setBasicKey(unsigned n, const QByteArray &key);
1096 
1098  virtual bool fromCommercialExt(CommercialExtension *encr, Context &ctx);
1100  virtual bool updateCommercialExt(Context &ctx);
1102  virtual bool linkCommercialExt(CommercialExtension *ext, Context &ctx);
1103 
1104  public:
1106  struct Limit {
1108  static constexpr unsigned int basicKeys() { return 16; }
1110  static constexpr unsigned int advancedKeys() { return 8; }
1111  };
1112 
1113  protected:
1115  struct Offset {
1117  static constexpr unsigned int advancedKeys() { return 0x0000; }
1118  static constexpr unsigned int betweenAdvancedKeys() { return 0x0010; }
1119  static constexpr unsigned int basicKeys() { return 0x0090; }
1120  static constexpr unsigned int betweenBasicKeys() { return 0x0002; }
1122  };
1123  };
1124 
1125 
1127  class MessageElement: public Element
1128  {
1129  protected:
1131  MessageElement(uint8_t *ptr, size_t size);
1132 
1133  public:
1135  MessageElement(uint8_t *ptr);
1136 
1138  static constexpr unsigned int size() { return 0x00120; }
1139 
1140  void clear();
1141 
1142  bool isValid() const;
1143 
1145  virtual QString text() const;
1147  virtual void setText(const QString &text);
1148 
1150  virtual bool encode(SMSTemplate *sms, const ErrorStack &err=ErrorStack());
1152  virtual SMSTemplate *decode(const ErrorStack &err=ErrorStack());
1153 
1154  public:
1156  struct Limit {
1157  static constexpr unsigned int length() { return 144; }
1158  };
1159  };
1160 
1163  {
1164  protected:
1166  MessageBankElement(uint8_t *ptr, size_t size);
1167 
1168  public:
1170  MessageBankElement(uint8_t *ptr);
1171 
1173  static constexpr unsigned int size() { return MessageElement::size()*Limit::messages(); }
1174 
1175  void clear();
1176 
1178  virtual MessageElement message(unsigned int i) const;
1179 
1181  virtual bool encode(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack());
1183  virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack());
1184 
1185  public:
1187  struct Limit {
1188  static constexpr unsigned int messages() { return 50; }
1189  };
1190  };
1191 
1192 
1193 protected:
1195  explicit TyTCodeplug(QObject *parent = nullptr);
1196 
1197 public:
1199  virtual ~TyTCodeplug();
1200 
1202  virtual void clear();
1203 
1204  bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const;
1205 
1207  bool decode(Config *config, const ErrorStack &err=ErrorStack());
1209  bool encode(Config *config, const Flags &flags = Flags(), const ErrorStack &err=ErrorStack());
1210 
1211 public:
1214  virtual bool decodeElements(Context &ctx, const ErrorStack &err=ErrorStack());
1216  virtual bool encodeElements(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack());
1217 
1219  virtual void clearTimestamp() = 0;
1221  virtual bool encodeTimestamp() = 0;
1222 
1224  virtual void clearGeneralSettings() = 0;
1226  virtual bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1228  virtual bool decodeGeneralSettings(Config *config, const ErrorStack &err=ErrorStack()) = 0;
1229 
1231  virtual void clearContacts() = 0;
1233  virtual bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1235  virtual bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1236 
1238  virtual void clearGroupLists() = 0;
1240  virtual bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1242  virtual bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1244  virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1245 
1247  virtual void clearChannels() = 0;
1249  virtual bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1251  virtual bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1253  virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1254 
1256  virtual void clearZones() = 0;
1258  virtual bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1260  virtual bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1262  virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1263 
1265  virtual void clearScanLists() = 0;
1267  virtual bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1269  virtual bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1271  virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1272 
1274  virtual void clearPositioningSystems() = 0;
1276  virtual bool encodePositioningSystems(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1278  virtual bool createPositioningSystems(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1280  virtual bool linkPositioningSystems(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1281 
1283  virtual void clearButtonSettings() = 0;
1285  virtual bool encodeButtonSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1287  virtual bool decodeButtonSetttings(Config *config, const ErrorStack &err=ErrorStack()) = 0;
1288 
1290  virtual void clearPrivacyKeys() = 0;
1292  virtual bool encodePrivacyKeys(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1294  virtual bool decodePrivacyKeys(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1295 
1297  virtual void clearMenuSettings() = 0;
1298 
1300  virtual void clearTextMessages() = 0;
1302  virtual bool encodeTextMessages(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack()) = 0;
1304  virtual bool decodeTextMessages(Context &ctx, const ErrorStack &err=ErrorStack()) = 0;
1305 
1307  virtual void clearEmergencySystems() = 0;
1308 };
1309 
1310 #endif // TYT_CODEPLUG_HH
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
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
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
This class represents a GPS signalling system within the codeplug.
Definition: gpssystem.hh:64
Generic representation of a RX group list.
Definition: rxgrouplist.hh:14
Extension collecting all settings associated with SMS messages.
Definition: smsextension.hh:55
Represents a SMS message template (pre defined message).
Definition: smsextension.hh:11
Generic representation of a scan list.
Definition: scanlist.hh:15
Code
This huge enum lists all possible RX/TX tones that can be associated with analog channels.
Definition: signaling.hh:18
ButtonAction
Possible actions for the side-buttons.
Definition: tyt_extensions.hh:281
RefFrequency
Possible reference frequency settings for RX & TX.
Definition: tyt_extensions.hh:64
Represents all button settings within the codeplug on the radio.
Definition: tyt_codeplug.hh:836
virtual void setSideButton1Long(ButtonAction action)
Sets the action for a short press on side button 1.
Definition: tyt_codeplug.cc:2279
virtual void setSideButton2Long(ButtonAction action)
Sets the action for a short press on side button 2.
Definition: tyt_codeplug.cc:2297
virtual bool fromConfig(const Config *config)
Encodes the button settings.
Definition: tyt_codeplug.cc:2311
virtual ButtonAction sideButton2Long() const
Returns the action for a long press on side button 2.
Definition: tyt_codeplug.cc:2293
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2253
virtual unsigned longPressDuration() const
Returns the long-press duration in ms.
Definition: tyt_codeplug.cc:2302
virtual void setLongPressDuration(unsigned ms)
Sets the long-press duration in ms.
Definition: tyt_codeplug.cc:2306
virtual void setSideButton1Short(ButtonAction action)
Sets the action for a short press on side button 1.
Definition: tyt_codeplug.cc:2270
virtual void setSideButton2Short(ButtonAction action)
Sets the action for a short press on side button 2.
Definition: tyt_codeplug.cc:2288
virtual ~ButtonSettingsElement()
Destructor.
Definition: tyt_codeplug.cc:2248
virtual ButtonAction sideButton1Long() const
Returns the action for a long press on side button 1.
Definition: tyt_codeplug.cc:2275
virtual bool updateConfig(Config *config)
Updates config from button settings.
Definition: tyt_codeplug.cc:2326
virtual ButtonAction sideButton1Short() const
Returns the action for a short press on side button 1.
Definition: tyt_codeplug.cc:2266
virtual ButtonAction sideButton2Short() const
Returns the action for a short press on side button 2.
Definition: tyt_codeplug.cc:2284
ButtonSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2236
enum TyTButtonSettings::ButtonAction ButtonAction
The possible button actions.
Definition: tyt_codeplug.hh:839
Represents a single channel (analog or digital) within the TyT codeplug.
Definition: tyt_codeplug.hh:35
virtual void enableTalkaround(bool enable)
Enables/disables talkaround for this channel.
Definition: tyt_codeplug.cc:144
virtual void setPositioningSystemIndex(uint8_t idx)
Sets the positioning system index (+1) for this channel.
Definition: tyt_codeplug.cc:328
virtual void setTXTimeOutRekeyDelay(uint8_t delay)
Sets the transmit time-out re-key delay in seconds.
Definition: tyt_codeplug.cc:292
virtual Channel * toChannelObj(const ErrorStack &err=ErrorStack()) const
Constructs a generic Channel object from the codeplug channel.
Definition: tyt_codeplug.cc:423
virtual uint8_t txSignalingSystemIndex() const
Returns the signaling system index (+1) for TX.
Definition: tyt_codeplug.cc:387
virtual bool rxOnly() const
Returns true if the channel has rx only enabled.
Definition: tyt_codeplug.cc:149
virtual uint8_t rxSignalingSystemIndex() const
Returns the signaling system index (+1) for RX.
Definition: tyt_codeplug.cc:378
virtual void setRXSignaling(Signaling::Code code)
Sets the CTCSS/DSC signaling for RX.
Definition: tyt_codeplug.cc:364
virtual uint8_t colorCode() const
Returns the color code of this channel.
Definition: tyt_codeplug.cc:172
bool isValid() const
Returns true if channel is valid/enabled.
Definition: tyt_codeplug.cc:42
virtual void setTXFrequency(uint32_t Hz)
Sets the TX frequency in Hz.
Definition: tyt_codeplug.cc:355
void clear()
Clears/resets the channel and therefore disables it.
Definition: tyt_codeplug.cc:47
Mode
Possible modes for the channel, i.e.
Definition: tyt_codeplug.hh:38
@ MODE_DIGITAL
Digital channel.
Definition: tyt_codeplug.hh:40
@ MODE_ANALOG
Analog channel.
Definition: tyt_codeplug.hh:39
virtual void setTXSignaling(Signaling::Code code)
Sets the CTCSS/DSC signaling for TX.
Definition: tyt_codeplug.cc:373
virtual uint32_t txFrequency() const
Returns the TX frequency in Hz.
Definition: tyt_codeplug.cc:351
virtual uint32_t rxFrequency() const
Returns the RX frequency in Hz.
Definition: tyt_codeplug.cc:342
virtual void enableDataCallConfirm(bool enable)
Enables/disables data call confirmation for this channel.
Definition: tyt_codeplug.cc:212
virtual uint16_t contactIndex() const
Returns the transmit contact index (+1) for this channel.
Definition: tyt_codeplug.cc:271
virtual void setTXRefFrequency(TyTChannelExtension::RefFrequency ref)
Sets some weird reference frequency setting for transmission.
Definition: tyt_codeplug.cc:248
virtual void setContactIndex(uint16_t idx)
Sets the transmit contact index (+1) for this channel.
Definition: tyt_codeplug.cc:275
virtual unsigned txTimeOut() const
Returns the transmit time-out in seconds.
Definition: tyt_codeplug.cc:279
virtual void setRXSignalingSystemIndex(uint8_t idx)
Sets the signaling system index (+1) for RX.
Definition: tyt_codeplug.cc:382
virtual void setTXTimeOut(unsigned tot)
Sets the transmit time-out in seconds.
Definition: tyt_codeplug.cc:283
virtual bool dataCallConfirm() const
Returns true if the channel has data call confirmation enabled.
Definition: tyt_codeplug.cc:208
virtual void setAdmitCriterion(Admit admit)
Sets the admit criterion for this channel.
Definition: tyt_codeplug.cc:266
PrivacyType
Possible privacy types.
Definition: tyt_codeplug.hh:51
@ PRIV_NONE
No privacy.
Definition: tyt_codeplug.hh:52
@ PRIV_BASIC
Basic privacy.
Definition: tyt_codeplug.hh:53
@ PRIV_ENHANCED
Enhanced privacy.
Definition: tyt_codeplug.hh:54
virtual void setPrivacyIndex(uint8_t ts)
Sets the index of the privacy system (key).
Definition: tyt_codeplug.cc:185
virtual bool privateCallConfirm() const
Returns true if the channel has private call confirmation enabled.
Definition: tyt_codeplug.cc:199
ChannelElement(uint8_t *ptr, size_t size)
Constructs a channel from the given memory.
Definition: tyt_codeplug.cc:25
virtual PrivacyType privacyType() const
Returns the type of the privacy system.
Definition: tyt_codeplug.cc:190
virtual Mode mode() const
Returns the mode of the channel.
Definition: tyt_codeplug.cc:99
virtual void enablePrivateCallConfirm(bool enable)
Enables/disables private call confirmation for this channel.
Definition: tyt_codeplug.cc:203
virtual void enableRXGPSInfo(bool enable)
Enables/disables reception of GPS information for this channel.
Definition: tyt_codeplug.cc:409
virtual void setTXSignalingSystemIndex(uint8_t idx)
Sets the signaling system index (+1) for TX.
Definition: tyt_codeplug.cc:391
virtual bool txGPSInfo() const
Returns true if the channel transmits GPS information enabled.
Definition: tyt_codeplug.cc:396
virtual void enableLoneWorker(bool enable)
Enables/disables lone worker for this channel.
Definition: tyt_codeplug.cc:135
virtual void enableRXOnly(bool enable)
Enables/disables rx only for this channel.
Definition: tyt_codeplug.cc:153
virtual ~ChannelElement()
Destructor.
Definition: tyt_codeplug.cc:37
virtual void enableDisplayPTTId(bool enable)
Enables/disables PTT ID display for this channel.
Definition: tyt_codeplug.cc:239
virtual QString name() const
Returns the name of this channel.
Definition: tyt_codeplug.cc:414
virtual TyTChannelExtension::RefFrequency rxRefFrequency() const
Returns some weird reference frequency setting for reception.
Definition: tyt_codeplug.cc:217
Bandwidth
Bandwidth of the channel.
Definition: tyt_codeplug.hh:44
@ BW_25_KHZ
25kHz wide.
Definition: tyt_codeplug.hh:47
@ BW_20_KHZ
20 kHz (really?)
Definition: tyt_codeplug.hh:46
@ BW_12_5_KHZ
12.5 kHz narrow, (default for binary channels).
Definition: tyt_codeplug.hh:45
Admit
TX Admit criterion.
Definition: tyt_codeplug.hh:58
@ ADMIT_ALWAYS
Always allow TX.
Definition: tyt_codeplug.hh:59
@ ADMIT_COLOR
Allow TX if color-code matches.
Definition: tyt_codeplug.hh:62
@ ADMIT_CH_FREE
Allow TX if channel is free.
Definition: tyt_codeplug.hh:60
@ ADMIT_TONE
Allow TX if CTCSS tone matches.
Definition: tyt_codeplug.hh:61
virtual uint8_t scanListIndex() const
Returns the scan-list index (+1) for this channel.
Definition: tyt_codeplug.cc:306
virtual Admit admitCriterion() const
Returns the admit criterion for this channel.
Definition: tyt_codeplug.cc:262
virtual TyTChannelExtension::RefFrequency txRefFrequency() const
Returns some weird reference frequency setting for transmission.
Definition: tyt_codeplug.cc:244
virtual bool linkChannelObj(Channel *c, Context &ctx, const ErrorStack &err=ErrorStack()) const
Links a previously constructed channel to the rest of the configuration.
Definition: tyt_codeplug.cc:503
virtual DMRChannel::TimeSlot timeSlot() const
Returns the time slot of this channel.
Definition: tyt_codeplug.cc:158
virtual bool displayPTTId() const
Returns true if the channel has display PTT ID enabled.
Definition: tyt_codeplug.cc:235
virtual FMChannel::Bandwidth bandwidth() const
Returns the bandwidth of the (analog) channel.
Definition: tyt_codeplug.cc:108
virtual uint8_t positioningSystemIndex() const
Returns the positioning system index (+1) for this channel.
Definition: tyt_codeplug.cc:324
virtual void setPrivacyType(PrivacyType type)
Sets the type of the privacy system.
Definition: tyt_codeplug.cc:194
virtual bool talkaround() const
Returns true if the channel has talkaround enabled.
Definition: tyt_codeplug.cc:140
virtual uint8_t privacyIndex() const
Returns the index of the privacy system (key).
Definition: tyt_codeplug.cc:181
virtual void setScanListIndex(uint8_t idx)
Sets the scan-list index (+1) for this channel.
Definition: tyt_codeplug.cc:310
virtual void setRXRefFrequency(TyTChannelExtension::RefFrequency ref)
Sets some weird reference frequency setting for reception.
Definition: tyt_codeplug.cc:221
virtual void setTimeSlot(DMRChannel::TimeSlot ts)
Sets the time slot of this channel.
Definition: tyt_codeplug.cc:164
virtual void enableAutoScan(bool enable)
Enables/disables auto scan for this channel.
Definition: tyt_codeplug.cc:126
virtual void enableVOX(bool enable)
Enables/disables VOX for this channel.
Definition: tyt_codeplug.cc:257
virtual void setBandwidth(FMChannel::Bandwidth bw)
Sets the bandwidth of the (analog) channel.
Definition: tyt_codeplug.cc:114
virtual bool dtmfDecode(uint8_t idx) const
Returns true if the channel has DTMF decoding enabled.
Definition: tyt_codeplug.cc:333
virtual void setMode(Mode setMode)
Sets the mode of the channel.
Definition: tyt_codeplug.cc:103
virtual void setEmergencySystemIndex(uint8_t idx)
Sets the emergency system index (+1) for this channel.
Definition: tyt_codeplug.cc:301
virtual uint8_t emergencySystemIndex() const
Returns the emergency system index (+1) for this channel.
Definition: tyt_codeplug.cc:297
virtual bool emergencyAlarmACK() const
Returns true if the channel has alarm confirmation enabled.
Definition: tyt_codeplug.cc:226
virtual void setDTMFDecode(uint8_t idx, bool enable)
Enables/disables DTMF decoding this channel.
Definition: tyt_codeplug.cc:337
virtual void enableEmergencyAlarmACK(bool enable)
Enables/disables alarm confirmation for this channel.
Definition: tyt_codeplug.cc:230
virtual Signaling::Code rxSignaling() const
Returns the CTCSS/DSC signaling for RX.
Definition: tyt_codeplug.cc:360
virtual void setGroupListIndex(uint8_t idx)
Sets the RX group list index (+1) for this channel.
Definition: tyt_codeplug.cc:319
virtual uint8_t txTimeOutRekeyDelay() const
Returns the transmit time-out re-key delay in seconds.
Definition: tyt_codeplug.cc:288
virtual void setName(const QString &setName)
Sets the name of this channel.
Definition: tyt_codeplug.cc:418
virtual void setColorCode(uint8_t ts)
Sets the color code of this channel.
Definition: tyt_codeplug.cc:176
virtual bool rxGPSInfo() const
Returns true if the channel receives GPS information enabled.
Definition: tyt_codeplug.cc:405
virtual void setRXFrequency(uint32_t Hz)
Sets the RX frequency in Hz.
Definition: tyt_codeplug.cc:346
virtual void fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: tyt_codeplug.cc:565
virtual Signaling::Code txSignaling() const
Returns the CTCSS/DSC signaling for TX.
Definition: tyt_codeplug.cc:369
virtual bool loneWorker() const
Returns true if the channel has lone worker enabled.
Definition: tyt_codeplug.cc:131
virtual void enableTXGPSInfo(bool enable)
Enables/disables transmission of GPS information for this channel.
Definition: tyt_codeplug.cc:400
virtual bool vox() const
Returns true if the channel has VOX enabled.
Definition: tyt_codeplug.cc:253
virtual uint8_t groupListIndex() const
Returns the RX group list index (+1) for this channel.
Definition: tyt_codeplug.cc:315
virtual bool autoScan() const
Returns true if the channel has auto scan enabled.
Definition: tyt_codeplug.cc:122
Represents a digital (DMR) contact within the codeplug.
Definition: tyt_codeplug.hh:260
virtual DMRContact::Type callType() const
Returns the call-type of the contact.
Definition: tyt_codeplug.cc:715
virtual void setDMRId(uint32_t id)
Sets the DMR ID of the contact.
Definition: tyt_codeplug.cc:702
virtual void enableRingTone(bool enable)
Enables/disables the ring-tone for this contact.
Definition: tyt_codeplug.cc:711
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:687
virtual bool ringTone() const
Returns true if the ring-tone is enabled for this contact.
Definition: tyt_codeplug.cc:707
virtual DMRContact * toContactObj() const
Creates a contact.
Definition: tyt_codeplug.cc:744
virtual QString name() const
Returns the name of the contact.
Definition: tyt_codeplug.cc:735
virtual uint32_t dmrId() const
Returns the DMR ID of the contact.
Definition: tyt_codeplug.cc:697
virtual ~ContactElement()
Destructor.
Definition: tyt_codeplug.cc:676
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:681
ContactElement(uint8_t *ptr, size_t size)
Constructor.
Definition: tyt_codeplug.cc:664
virtual bool fromContactObj(const DMRContact *contact)
Encodes the give contact.
Definition: tyt_codeplug.cc:749
virtual void setCallType(DMRContact::Type type)
Sets the call-type of the contact.
Definition: tyt_codeplug.cc:726
virtual void setName(const QString &nm)
Sets the name of the contact.
Definition: tyt_codeplug.cc:739
Represents the emergency settings within the codeplug on the radio.
Definition: tyt_codeplug.hh:945
virtual void setTXTimeOut(unsigned ms)
Sets the TX time-out in ms.
Definition: tyt_codeplug.cc:2485
virtual void enableRemoteMonitor(bool enable)
Enables/disables remote monitor.
Definition: tyt_codeplug.cc:2458
virtual void enableEmergencyRemoteMonitor(bool enable)
Enables/disables emergency remote monitor.
Definition: tyt_codeplug.cc:2449
virtual bool remoteMonitor() const
Returns true if remote monitor is enabled.
Definition: tyt_codeplug.cc:2454
virtual ~EmergencySettingsElement()
Destructor.
Definition: tyt_codeplug.cc:2428
virtual void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2433
EmergencySettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2416
virtual void enableRadioDisable(bool enable)
Enables/disables radio disable.
Definition: tyt_codeplug.cc:2467
virtual unsigned messageLimit() const
Returns the message limit.
Definition: tyt_codeplug.cc:2490
virtual void setMessageLimit(unsigned limit)
Sets the message limit.
Definition: tyt_codeplug.cc:2494
virtual unsigned remoteMonitorDuration() const
Returns the remote monitor duration in seconds.
Definition: tyt_codeplug.cc:2472
virtual unsigned txTimeOut() const
Returns the TX time-out in ms.
Definition: tyt_codeplug.cc:2481
virtual bool radioDisable() const
Returns true if radio disable is enabled.
Definition: tyt_codeplug.cc:2463
virtual void setRemoteMonitorDuration(unsigned sec)
Sets the remote monitor duration in seconds.
Definition: tyt_codeplug.cc:2476
virtual bool emergencyRemoteMonitor() const
Returns true if emergency remote monitor is enabled.
Definition: tyt_codeplug.cc:2445
Represents a single emergency system within the radio.
Definition: tyt_codeplug.hh:992
virtual void setPoliteRetries(unsigned num)
Sets the number of polite retries.
Definition: tyt_codeplug.cc:2578
virtual ~EmergencySystemElement()
Destructor.
Definition: tyt_codeplug.cc:2514
AlarmType
Possible alarm type for the system.
Definition: tyt_codeplug.hh:995
@ REGULAR
Regular alarm sound.
Definition: tyt_codeplug.hh:997
@ SILENT
Silent alarm.
Definition: tyt_codeplug.hh:998
@ SILENT_W_VOICE
silent alarm with voice.
Definition: tyt_codeplug.hh:999
@ DISABLED
No alarm at all.
Definition: tyt_codeplug.hh:996
virtual AlarmType alarmType() const
Returns the alarm type of the system.
Definition: tyt_codeplug.cc:2547
virtual unsigned politeRetries() const
Returns the number of polite retries.
Definition: tyt_codeplug.cc:2574
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:2519
EmergencySystemElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2502
virtual void setAlarmMode(AlarmMode mode)
Sets the alarm mode of the system.
Definition: tyt_codeplug.cc:2560
virtual void setName(const QString &name)
Sets the name of the system.
Definition: tyt_codeplug.cc:2542
virtual uint16_t revertChannelIndex() const
Returns the index of the revert channel.
Definition: tyt_codeplug.cc:2596
virtual void setHotMICDuration(unsigned sec)
Sets the hot MIC duration in seconds.
Definition: tyt_codeplug.cc:2587
virtual bool revertChannelIsSelected() const
Returns true if the revert channel is the selected one.
Definition: tyt_codeplug.cc:2592
virtual void revertChannelSelected()
Sets revert channel to selected channel.
Definition: tyt_codeplug.cc:2604
AlarmMode
Possible alarm modes for the system.
Definition: tyt_codeplug.hh:1002
@ ALARM_W_VOICE
Alarm + call + voice?
Definition: tyt_codeplug.hh:1005
@ ALARM_W_CALL
Alarm + call.
Definition: tyt_codeplug.hh:1004
@ ALARM
Just alarm.
Definition: tyt_codeplug.hh:1003
virtual void setRevertChannelIndex(uint16_t idx)
Sets the revert channel index.
Definition: tyt_codeplug.cc:2600
virtual unsigned impoliteRetries() const
Returns the number of impolite retries.
Definition: tyt_codeplug.cc:2565
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2524
virtual void setImpoliteRetries(unsigned num)
Sets the number of impolite retries.
Definition: tyt_codeplug.cc:2569
virtual unsigned hotMICDuration() const
Returns the hot MIC duration in seconds.
Definition: tyt_codeplug.cc:2583
virtual void setAlarmType(AlarmType type)
Sets the alarm type of the system.
Definition: tyt_codeplug.cc:2551
virtual QString name() const
Returns the name of the system.
Definition: tyt_codeplug.cc:2538
virtual AlarmMode alarmMode() const
Returns the alarm mode of the system.
Definition: tyt_codeplug.cc:2556
Represents all encryption keys and settings within the codeplug on the device.
Definition: tyt_codeplug.hh:1065
virtual QByteArray enhancedKey(unsigned n) const
Returns the n-th "enhanced" key (128bit).
Definition: tyt_codeplug.cc:2643
virtual QByteArray basicKey(unsigned n) const
Returns the n-th "basic" key (16bit).
Definition: tyt_codeplug.cc:2664
virtual void setBasicKey(unsigned n, const QByteArray &key)
Sets the n-th "basic" key (16bit).
Definition: tyt_codeplug.cc:2668
static constexpr unsigned int size()
Returns the size of the element.
Definition: tyt_codeplug.hh:1079
virtual bool isEnhancedKeySet(unsigned n) const
Returns true if the n-th "enhanced" key (128bit) is set.
Definition: tyt_codeplug.cc:2634
virtual void setEnhancedKey(unsigned n, const QByteArray &key)
Sets the n-th "enhanced" key (128bit).
Definition: tyt_codeplug.cc:2648
virtual bool updateCommercialExt(Context &ctx)
Updates the commercial extension.
Definition: tyt_codeplug.cc:2690
virtual bool fromCommercialExt(CommercialExtension *encr, Context &ctx)
Encodes given commercial extension.
Definition: tyt_codeplug.cc:2675
virtual ~EncryptionElement()
Destructor.
Definition: tyt_codeplug.cc:2624
virtual bool linkCommercialExt(CommercialExtension *ext, Context &ctx)
Links the given encryption extension.
Definition: tyt_codeplug.cc:2717
EncryptionElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2612
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2629
virtual bool isBasicKeySet(unsigned n) const
Returns true if the n-th "basic" key (16bit) is set.
Definition: tyt_codeplug.cc:2656
Represents a single GPS system within the codeplug.
Definition: tyt_codeplug.hh:645
virtual void setRevertChannelIndex(uint16_t idx)
Sets the revert channel index (+1).
Definition: tyt_codeplug.cc:1767
virtual ~GPSSystemElement()
Destructor.
Definition: tyt_codeplug.cc:1739
virtual bool repeatIntervalDisabled() const
Returns true if the repeat interval is disabled.
Definition: tyt_codeplug.cc:1776
virtual void setDestinationContactIndex(uint16_t idx)
Sets the destination contact index (+1).
Definition: tyt_codeplug.cc:1801
virtual uint16_t revertChannelIndex() const
Returns the revert channel index (+1).
Definition: tyt_codeplug.cc:1763
virtual void disableRepeatInterval()
Disables the GPS repeat interval.
Definition: tyt_codeplug.cc:1788
virtual void disableDestinationContact()
Disables the destination contact.
Definition: tyt_codeplug.cc:1805
virtual GPSSystem * toGPSSystemObj()
Constructs a GPS system.
Definition: tyt_codeplug.cc:1823
virtual void setRevertChannelSelected()
Sets the revert channel to the current one.
Definition: tyt_codeplug.cc:1771
virtual bool fromGPSSystemObj(GPSSystem *sys, Context &ctx)
Encodes the given GPS system.
Definition: tyt_codeplug.cc:1810
virtual bool revertChannelIsSelected() const
Returns true if the revert channel is the current one.
Definition: tyt_codeplug.cc:1759
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:1750
virtual bool linkGPSSystemObj(GPSSystem *sys, Context &ctx)
Links the given GPS system.
Definition: tyt_codeplug.cc:1828
virtual bool destinationContactDisabled() const
Returns true if the destination contact is disabled.
Definition: tyt_codeplug.cc:1793
virtual uint16_t destinationContactIndex() const
Returns the destination contact index (+1).
Definition: tyt_codeplug.cc:1797
GPSSystemElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:1727
virtual unsigned repeatInterval() const
Returns the repeat interval.
Definition: tyt_codeplug.cc:1780
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:1744
virtual void setRepeatInterval(unsigned sec)
Sets the repeat interval in seconds.
Definition: tyt_codeplug.cc:1784
Codeplug representation of the general settings.
Definition: tyt_codeplug.hh:443
virtual bool saveModeRX() const
Returns true, if save RX mode is enabled.
Definition: tyt_codeplug.cc:1293
virtual void setGroupCallHangTime(unsigned ms)
Sets the group call hang time.
Definition: tyt_codeplug.cc:1379
virtual void setCallAlertToneContinuous()
Sets the call-alert tone continuous.
Definition: tyt_codeplug.cc:1428
virtual TyTSettingsExtension::MonitorType monitorType() const
Returns the monitor type.
Definition: tyt_codeplug.cc:1266
virtual void setScanDigitalHangTime(unsigned ms)
Sets the scan digital hang time.
Definition: tyt_codeplug.cc:1455
virtual bool callAlertToneIsContinuous() const
Returns true if the call-alert is continuous.
Definition: tyt_codeplug.cc:1415
virtual unsigned callAlertToneDuration() const
Returns the call-alert tone duration.
Definition: tyt_codeplug.cc:1419
virtual void setScanAnalogHangTime(unsigned ms)
Sets the scan analog hang time.
Definition: tyt_codeplug.cc:1465
virtual void setLoneWorkerResponseTime(unsigned min)
Sets the lone-worker response time.
Definition: tyt_codeplug.cc:1437
virtual QString radioName() const
Returns the radio name.
Definition: tyt_codeplug.cc:1550
virtual ~GeneralSettingsElement()
Destructor.
Definition: tyt_codeplug.cc:1187
virtual QString introLine2() const
Returns the second intro line.
Definition: tyt_codeplug.cc:1257
virtual QString introLine1() const
Returns the first intro line.
Definition: tyt_codeplug.cc:1248
virtual void setRadioName(const QString &name)
Sets the radio name.
Definition: tyt_codeplug.cc:1554
virtual void keypadLockTimeSetManual()
Set keypad lock to manual.
Definition: tyt_codeplug.cc:1502
virtual unsigned keypadLockTime() const
Returns the keypad lock time.
Definition: tyt_codeplug.cc:1493
virtual unsigned txPreambleDuration() const
Returns the TX preamble duration.
Definition: tyt_codeplug.cc:1365
virtual unsigned privateCallHangTime() const
Returns the private call hang time.
Definition: tyt_codeplug.cc:1385
virtual void setPCProgPassword(const QString &pass)
Sets the PC programming password.
Definition: tyt_codeplug.cc:1541
virtual void setSaveModeRX(bool enable)
Enables/disables save mode RX.
Definition: tyt_codeplug.cc:1297
virtual unsigned scanDigitalHangTime() const
Returns the scan digital hang time.
Definition: tyt_codeplug.cc:1451
virtual void setRadioProgPassword(uint32_t passwd)
Sets the 8-digit radio programming password.
Definition: tyt_codeplug.cc:1524
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:1192
virtual bool backlightIsAlways() const
Returns true if the backlight is always on.
Definition: tyt_codeplug.cc:1471
virtual uint32_t dmrId() const
Returns the default DMR ID of the radio.
Definition: tyt_codeplug.cc:1356
virtual uint32_t powerOnPassword() const
Returns the 8-digit power-on password.
Definition: tyt_codeplug.cc:1507
virtual unsigned scanAnalogHangTime() const
Returns the scan analog hang time.
Definition: tyt_codeplug.cc:1461
virtual bool talkPermitToneDigital() const
Returns true, if the talk permit tone is enabled for DMR channels.
Definition: tyt_codeplug.cc:1329
virtual void setIntroLine2(const QString line)
Sets the second intro line.
Definition: tyt_codeplug.cc:1261
virtual void setTXPreambleDuration(unsigned ms)
Sets the TX preamble duration.
Definition: tyt_codeplug.cc:1369
virtual bool allLEDsDisabled() const
Returns true if all LEDs are disabled.
Definition: tyt_codeplug.cc:1275
virtual bool allTonesDisabled() const
Returns true, if all tones are disabled.
Definition: tyt_codeplug.cc:1302
virtual bool updateConfig(Config *config)
Updates config from general settings.
Definition: tyt_codeplug.cc:1615
GeneralSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:1175
virtual unsigned loneWorkerResponseTime() const
Returns the lone-worker response time.
Definition: tyt_codeplug.cc:1433
virtual void setBacklightTime(unsigned sec)
Sets the backlight time.
Definition: tyt_codeplug.cc:1479
virtual void radioProgPasswordDisable()
Disables the radio programming password.
Definition: tyt_codeplug.cc:1528
virtual void setLoneWorkerReminderTime(unsigned min)
Sets the lone-worker reminder time.
Definition: tyt_codeplug.cc:1446
virtual void setLowBatteryInterval(unsigned sec)
Sets the low-battery warning interval.
Definition: tyt_codeplug.cc:1409
virtual void setIntroLine1(const QString line)
Sets the first intro line.
Definition: tyt_codeplug.cc:1252
virtual QString pcProgPassword() const
Returns the PC programming password.
Definition: tyt_codeplug.cc:1537
virtual bool pcProgPasswordEnabled() const
Returns true, if the PC programming password is enabled.
Definition: tyt_codeplug.cc:1533
virtual void setVOXSesitivity(unsigned ms)
Sets the group call hang time.
Definition: tyt_codeplug.cc:1399
virtual unsigned lowBatteryInterval() const
Returns the low-battery warning interval.
Definition: tyt_codeplug.cc:1405
virtual void setPrivateCallHangTime(unsigned ms)
Sets the private call hang time.
Definition: tyt_codeplug.cc:1389
virtual unsigned voxSesitivity() const
Returns the VOX sensitivity.
Definition: tyt_codeplug.cc:1395
virtual bool talkPermitToneAnalog() const
Returns true, if the talk permit tone is enabled for analog channels.
Definition: tyt_codeplug.cc:1338
virtual void disableAllTones(bool disable)
Enables/disables all tones.
Definition: tyt_codeplug.cc:1306
virtual void pcProgPasswordDisable()
Disables the PC programming password.
Definition: tyt_codeplug.cc:1545
virtual bool radioProgPasswordEnabled() const
Returns true, if the radio programming password is enabled.
Definition: tyt_codeplug.cc:1516
virtual void backlightTimeSetAlways()
Turns the backlight always on.
Definition: tyt_codeplug.cc:1484
virtual unsigned groupCallHangTime() const
Returns the group call hang time.
Definition: tyt_codeplug.cc:1375
virtual void setDMRId(uint32_t id)
Sets the default DMR ID of the radio.
Definition: tyt_codeplug.cc:1360
virtual void setKeypadLockTime(unsigned sec)
Sets the keypad lock time.
Definition: tyt_codeplug.cc:1497
virtual void enableIntroPicture(bool enable)
Enables/disables the intro picture.
Definition: tyt_codeplug.cc:1351
virtual uint32_t radioProgPassword() const
Returns the 8-digit radio programming password.
Definition: tyt_codeplug.cc:1520
virtual bool fromConfig(const Config *config)
Encodes the general settings.
Definition: tyt_codeplug.cc:1559
virtual bool savePreamble() const
Returns true, if save preamble is enabled.
Definition: tyt_codeplug.cc:1284
virtual void disableAllLEDs(bool disable)
Enables/disables all LEDs.
Definition: tyt_codeplug.cc:1279
virtual void setSavePreamble(bool enable)
Enables/disables save preamble.
Definition: tyt_codeplug.cc:1288
virtual bool introPicture() const
Returns true, if intro picture is enabled.
Definition: tyt_codeplug.cc:1347
virtual unsigned backlightTime() const
Returns the backlight time.
Definition: tyt_codeplug.cc:1475
virtual void enablePasswdAndLock(bool enable)
Enables/disables password and lock.
Definition: tyt_codeplug.cc:1324
virtual void setMonitorType(TyTSettingsExtension::MonitorType type)
Sets the monitor type.
Definition: tyt_codeplug.cc:1270
virtual bool chFreeIndicationTone() const
Returns true, if the channel free indication tone is enabled.
Definition: tyt_codeplug.cc:1311
virtual void setCallAlertToneDuration(unsigned sec)
Sets the call-alert tone duration.
Definition: tyt_codeplug.cc:1423
virtual void setChFreeIndicationTone(bool enable)
Enables/disables the channel free indication tone.
Definition: tyt_codeplug.cc:1315
virtual unsigned loneWorkerReminderTime() const
Returns the lone-worker reminder time.
Definition: tyt_codeplug.cc:1442
virtual void setPowerOnPassword(uint32_t passwd)
Sets the 8-digit power-on password.
Definition: tyt_codeplug.cc:1511
virtual bool passwdAndLock() const
Returns true, if password and lock is enabled.
Definition: tyt_codeplug.cc:1320
virtual void enableTalkPermitToneAnalog(bool enable)
Enables/disables talk permit tone for analog channels.
Definition: tyt_codeplug.cc:1342
virtual bool keypadLockIsManual() const
Returns true if the keypad lock is manual.
Definition: tyt_codeplug.cc:1489
virtual void enableTalkPermitToneDigital(bool enable)
Enables/disables talk permit tone for DMR channels.
Definition: tyt_codeplug.cc:1333
Representation of an RX group list within the codeplug.
Definition: tyt_codeplug.hh:344
virtual ~GroupListElement()
Destructor.
Definition: tyt_codeplug.cc:861
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:871
virtual uint16_t memberIndex(unsigned n) const
Returns the n-th member index.
Definition: tyt_codeplug.cc:886
GroupListElement(uint8_t *ptr, size_t size)
Constructor.
Definition: tyt_codeplug.cc:849
virtual RXGroupList * toGroupListObj(Context &ctx)
Creates a group list object.
Definition: tyt_codeplug.cc:920
virtual QString name() const
Returns the name of the group list.
Definition: tyt_codeplug.cc:876
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:866
virtual bool fromGroupListObj(const RXGroupList *lst, Context &ctx)
Encodes the given group list.
Definition: tyt_codeplug.cc:896
virtual void setMemberIndex(unsigned n, uint16_t idx)
Sets the n-th member index.
Definition: tyt_codeplug.cc:891
virtual bool linkGroupListObj(RXGroupList *lst, Context &ctx)
Links the given group list.
Definition: tyt_codeplug.cc:928
virtual void setName(const QString &nm)
Sets the name of the group list.
Definition: tyt_codeplug.cc:881
Represents all menu settings within the codeplug on the radio.
Definition: tyt_codeplug.hh:699
virtual void enableAlertTone(bool enable)
Enables/disables tone/alert menu.
Definition: tyt_codeplug.cc:2056
virtual void enableContactEditing(bool enable)
Enables/disables contact editing.
Definition: tyt_codeplug.cc:1948
virtual bool scan() const
Returns true if scan menu is enabled.
Definition: tyt_codeplug.cc:1998
virtual bool remoteMonitor() const
Returns true if remote monitor menu is enabled.
Definition: tyt_codeplug.cc:1971
virtual void enableRemoteRadioDisable(bool enable)
Enables/disables radio disable menu.
Definition: tyt_codeplug.cc:1993
virtual void enableCallLogOutgoing(bool enable)
Enables/disables call-log outgoing menu.
Definition: tyt_codeplug.cc:2038
MenuSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:1847
virtual void enableScan(bool enable)
Enables/disables scan menu.
Definition: tyt_codeplug.cc:2002
virtual bool callLogMissed() const
Returns true if call-log missed menu is enabled.
Definition: tyt_codeplug.cc:2016
virtual void enablePassword(bool enable)
Enables/disables password menu.
Definition: tyt_codeplug.cc:2128
virtual void enableRemoteRadioEnable(bool enable)
Enables/disables radio enable menu.
Definition: tyt_codeplug.cc:1984
virtual bool displayMode() const
Returns true if display mode menu is enabled.
Definition: tyt_codeplug.cc:2133
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:1864
virtual bool backlight() const
Returns true if backlight menu is enabled.
Definition: tyt_codeplug.cc:2070
virtual void enableManualDial(bool enable)
Enables/disables manual dial.
Definition: tyt_codeplug.cc:1957
virtual void enableKeypadLock(bool enable)
Enables/disables keypad lock menu.
Definition: tyt_codeplug.cc:2092
virtual bool scanListEditing() const
Returns true if edit scan-list menu is enabled.
Definition: tyt_codeplug.cc:2007
virtual bool talkaround() const
Returns true if talkaround menu is enabled.
Definition: tyt_codeplug.cc:2043
virtual void enableRemoteRadioCheck(bool enable)
Enables/disables contact radio-check menu.
Definition: tyt_codeplug.cc:1966
virtual bool contactEditing() const
Returns true if contact editing is enabled.
Definition: tyt_codeplug.cc:1944
virtual void enablePower(bool enable)
Enables/disables power menu.
Definition: tyt_codeplug.cc:2065
virtual bool keypadLock() const
Returns true if keypad lock menu is enabled.
Definition: tyt_codeplug.cc:2088
virtual void enableDisplayMode(bool enable)
Enables/disables display mode menu.
Definition: tyt_codeplug.cc:2137
virtual bool alertTone() const
Returns true if tone/alert menu is enabled.
Definition: tyt_codeplug.cc:2052
virtual void enableScanListEditing(bool enable)
Enables/disables edit scan-list menu.
Definition: tyt_codeplug.cc:2011
virtual bool callLogOutgoing() const
Returns true if call-log outgoing menu is enabled.
Definition: tyt_codeplug.cc:2034
virtual unsigned menuHangtime() const
Returns the menu hang time in seconds.
Definition: tyt_codeplug.cc:1913
virtual bool fromConfig(const Config *config)
Encodes the menu settings.
Definition: tyt_codeplug.cc:2152
virtual void enableSquelch(bool enable)
Enables/disables squelch menu.
Definition: tyt_codeplug.cc:2110
virtual void enableVOX(bool enable)
Enables/disables VOX menu.
Definition: tyt_codeplug.cc:2119
virtual bool callLogAnswered() const
Returns true if call-log answered menu is enabled.
Definition: tyt_codeplug.cc:2025
virtual void setMenuHangtime(unsigned sec)
Sets the menu hang time in seconds.
Definition: tyt_codeplug.cc:1917
virtual void enableCallAlert(bool enable)
Enables/disables call alert menu.
Definition: tyt_codeplug.cc:1939
virtual void enableCallLogMissed(bool enable)
Enables/disables call-log missed menu.
Definition: tyt_codeplug.cc:2020
virtual void enableRemoteMonitor(bool enable)
Enables/disables remote monitor menu.
Definition: tyt_codeplug.cc:1975
virtual void enableRadioProgramming(bool enable)
Enables/disables program radio menu.
Definition: tyt_codeplug.cc:2146
virtual bool ledIndicator() const
Returns true if LED indicator menu is enabled.
Definition: tyt_codeplug.cc:2097
virtual bool menuHangtimeIsInfinite() const
Returns true if the menu hang time is infinite.
Definition: tyt_codeplug.cc:1909
virtual void enableBootScreen(bool enable)
Enables/disables intro screen menu.
Definition: tyt_codeplug.cc:2083
virtual void enableCallLogAnswered(bool enable)
Enables/disables call-log answered menu.
Definition: tyt_codeplug.cc:2029
virtual void infiniteMenuHangtime()
Sets the menu hang time to be infinite.
Definition: tyt_codeplug.cc:1921
virtual bool password() const
Returns true if password menu is enabled.
Definition: tyt_codeplug.cc:2124
virtual void enableTextMessage(bool enable)
Enables/disables text message menu.
Definition: tyt_codeplug.cc:1930
virtual bool remoteRadioEnable() const
Returns true if radio enable menu is enabled.
Definition: tyt_codeplug.cc:1980
virtual bool squelch() const
Returns true if squelch menu is enabled.
Definition: tyt_codeplug.cc:2106
virtual ~MenuSettingsElement()
Destructor.
Definition: tyt_codeplug.cc:1859
virtual void enableBacklight(bool enable)
Enables/disables backlight menu.
Definition: tyt_codeplug.cc:2074
virtual void enableLEDIndicator(bool enable)
Enables/disables LED indicator menu.
Definition: tyt_codeplug.cc:2101
virtual bool callAlert() const
Returns true if call alert menu is enabled.
Definition: tyt_codeplug.cc:1935
virtual bool radioProgramming() const
Returns true if program radio menu is enabled.
Definition: tyt_codeplug.cc:2142
virtual void enableTalkaround(bool enable)
Enables/disables talkaround menu.
Definition: tyt_codeplug.cc:2047
virtual bool textMessage() const
Returns true if text message menu is enabled.
Definition: tyt_codeplug.cc:1926
virtual bool bootScreen() const
Returns true if intro screen menu is enabled.
Definition: tyt_codeplug.cc:2079
virtual bool power() const
Returns true if power menu is enabled.
Definition: tyt_codeplug.cc:2061
virtual bool updateConfig(Config *config)
Updates config from menu settings.
Definition: tyt_codeplug.cc:2191
virtual bool manualDial() const
Returns true if manual dial is enabled.
Definition: tyt_codeplug.cc:1953
virtual bool remoteRadioDisable() const
Returns true if radio disable menu is enabled.
Definition: tyt_codeplug.cc:1989
virtual bool vox() const
Returns true if VOX menu is enabled.
Definition: tyt_codeplug.cc:2115
virtual bool remoteRadioCheck() const
Returns true if contact radio-check menu is enabled.
Definition: tyt_codeplug.cc:1962
Bank of pre-defined SMS text messages.
Definition: tyt_codeplug.hh:1163
virtual MessageElement message(unsigned int i) const
Returns the i-th message.
Definition: tyt_codeplug.cc:2802
MessageBankElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2783
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2796
virtual bool encode(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())
Encodes all messages.
Definition: tyt_codeplug.cc:2808
virtual bool decode(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes all messages.
Definition: tyt_codeplug.cc:2824
static constexpr unsigned int size()
The size of the element.
Definition: tyt_codeplug.hh:1173
Basic pre-defined SMS text message.
Definition: tyt_codeplug.hh:1128
virtual QString text() const
Retunrs the text of the message.
Definition: tyt_codeplug.cc:2749
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:2744
virtual bool encode(SMSTemplate *sms, const ErrorStack &err=ErrorStack())
Encodes the given SMS template.
Definition: tyt_codeplug.cc:2758
virtual void setText(const QString &text)
Sets the text of the message.
Definition: tyt_codeplug.cc:2753
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2739
virtual SMSTemplate * decode(const ErrorStack &err=ErrorStack())
Decodes the given SMS template.
Definition: tyt_codeplug.cc:2767
MessageElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2726
static constexpr unsigned int size()
The size of the element.
Definition: tyt_codeplug.hh:1138
Represents a single one-touch setting within the codeplug on the radio.
Definition: tyt_codeplug.hh:887
virtual void setAction(Action action)
Sets the action to perform.
Definition: tyt_codeplug.cc:2381
virtual uint16_t contactIndex() const
Returns the contact index +1.
Definition: tyt_codeplug.cc:2404
virtual ~OneTouchSettingElement()
Destructor.
Definition: tyt_codeplug.cc:2358
virtual uint8_t messageIndex() const
Returns the message index +1.
Definition: tyt_codeplug.cc:2395
virtual void setMessageIndex(uint8_t idx)
Sets the message index +1.
Definition: tyt_codeplug.cc:2399
Type
Possible one-touch action types.
Definition: tyt_codeplug.hh:900
@ Digital
Digital call/message.
Definition: tyt_codeplug.hh:902
@ Analog
Analog call.
Definition: tyt_codeplug.hh:903
@ Disabled
Disabled one-touch.
Definition: tyt_codeplug.hh:901
virtual void setActionType(Type action)
Sets the type of the action.
Definition: tyt_codeplug.cc:2390
OneTouchSettingElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:2346
virtual void setContactIndex(uint16_t idx)
Sets the contact index +1.
Definition: tyt_codeplug.cc:2408
virtual Action action() const
Returns the action to perform.
Definition: tyt_codeplug.cc:2377
Action
Possible one-touch actions.
Definition: tyt_codeplug.hh:890
@ CALL
Call someone, see contact.
Definition: tyt_codeplug.hh:891
@ MESSAGE
Send a message, see message.
Definition: tyt_codeplug.hh:892
@ DTMF4
Analog call DTMF system 4.
Definition: tyt_codeplug.hh:896
@ DTMF2
Analog call DTMF system 2.
Definition: tyt_codeplug.hh:894
@ DTMF3
Analog call DTMF system 3.
Definition: tyt_codeplug.hh:895
@ DTMF1
Analog call DTMF system 1.
Definition: tyt_codeplug.hh:893
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:2363
virtual Type actionType() const
Returns the type of the action.
Definition: tyt_codeplug.cc:2386
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:2368
Represents a scan list within the codeplug.
Definition: tyt_codeplug.hh:381
virtual unsigned holdTime() const
Returns the hold time in ms.
Definition: tyt_codeplug.cc:1028
virtual void setPriorityChannel1Index(uint16_t idx)
Set the index (+1) of the first priority channel.
Definition: tyt_codeplug.cc:1003
virtual void setHoldTime(unsigned time)
Sets the hold time in ms.
Definition: tyt_codeplug.cc:1033
virtual void setMemberIndex(unsigned n, uint16_t idx)
Sets the n-th member index.
Definition: tyt_codeplug.cc:1053
virtual ScanList * toScanListObj(Context &ctx)
Creates a scan list.
Definition: tyt_codeplug.cc:1106
virtual void setPriorityChannel2Index(uint16_t idx)
Set the index (+1) of the second priority channel.
Definition: tyt_codeplug.cc:1013
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:970
virtual uint16_t txChannelIndex() const
Returns the index (+1) of the TX channel.
Definition: tyt_codeplug.cc:1018
virtual bool fromScanListObj(const ScanList *lst, Context &ctx)
Encodes the given scan list.
Definition: tyt_codeplug.cc:1058
virtual uint16_t priorityChannel1Index() const
Returns the index (+1) of the first priority channel.
Definition: tyt_codeplug.cc:998
virtual unsigned prioritySampleTime() const
Returns the priority sample time in ms.
Definition: tyt_codeplug.cc:1038
virtual QString name() const
Returns the name of the scan list.
Definition: tyt_codeplug.cc:988
ScanListElement(uint8_t *ptr, size_t size)
Constructor.
Definition: tyt_codeplug.cc:953
virtual uint16_t memberIndex(unsigned n) const
Returns the n-th member index.
Definition: tyt_codeplug.cc:1048
virtual ~ScanListElement()
Destructor.
Definition: tyt_codeplug.cc:965
virtual void setTXChannelIndex(uint16_t idx)
Sets the index (+1) of the TX channel.
Definition: tyt_codeplug.cc:1023
virtual void setName(const QString &nm)
Sets the name of the scan list.
Definition: tyt_codeplug.cc:993
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:975
virtual void setPrioritySampleTime(unsigned time)
Sets the priority sample time in ms.
Definition: tyt_codeplug.cc:1043
virtual bool linkScanListObj(ScanList *lst, Context &ctx)
Links the scan list object.
Definition: tyt_codeplug.cc:1122
virtual uint16_t priorityChannel2Index() const
Returns the index (+1) of the second priority channel.
Definition: tyt_codeplug.cc:1008
Codeplug representation of programming time-stamp and CPS version.
Definition: tyt_codeplug.hh:618
virtual void setTimestamp(const QDateTime &ts)
Sets the time stamp.
Definition: tyt_codeplug.cc:1700
virtual QString cpsVersion() const
Returns the CPS version.
Definition: tyt_codeplug.cc:1710
virtual ~TimestampElement()
Destructor.
Definition: tyt_codeplug.cc:1683
virtual QDateTime timestamp() const
Returns the time stamp.
Definition: tyt_codeplug.cc:1695
TimestampElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_codeplug.cc:1671
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:1688
Represents a zone within the codeplug.
Definition: tyt_codeplug.hh:307
virtual bool linkZone(Zone *zone, Context &ctx) const
Links the created zone to channels.
Definition: tyt_codeplug.cc:829
virtual bool fromZoneObj(const Zone *zone, Context &ctx)
Encodes a given zone object.
Definition: tyt_codeplug.cc:810
virtual QString name() const
Returns the name of the zone.
Definition: tyt_codeplug.cc:792
virtual uint16_t memberIndex(unsigned n) const
Returns the index (+1) of the n-th member.
Definition: tyt_codeplug.cc:801
ZoneElement(uint8_t *ptr, size_t size)
Constructor.
Definition: tyt_codeplug.cc:765
virtual void setName(const QString &setName)
Sets the name of the zone.
Definition: tyt_codeplug.cc:796
virtual void setMemberIndex(unsigned n, uint16_t idx)
Sets the index (+1) of the n-th member.
Definition: tyt_codeplug.cc:805
virtual Zone * toZoneObj() const
Creates a zone.
Definition: tyt_codeplug.cc:822
virtual ~ZoneElement()
Desturctor.
Definition: tyt_codeplug.cc:777
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_codeplug.cc:787
bool isValid() const
Returns true if the pointer is not null.
Definition: tyt_codeplug.cc:782
Base class of all TyT codeplugs.
Definition: tyt_codeplug.hh:26
virtual void clearContacts()=0
Clears all contacts in the codeplug.
virtual bool decodeTextMessages(Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes text messages.
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 void clearPositioningSystems()=0
Clears all positioning systems in the codeplug.
virtual void clearGeneralSettings()=0
Clears the general settings in the codeplug.
virtual void clear()
Clears and resets the complete codeplug to some default values.
Definition: tyt_codeplug.cc:2918
virtual bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a zone to the configuration for each one in the codeplug.
bool index(Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const
Indexes all elements of the codeplug.
Definition: tyt_codeplug.cc:2855
virtual void clearMenuSettings()=0
Clears the menu settings in the codeplug.
virtual bool encodeTimestamp()=0
Sets the time-stamp.
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 encodePrivacyKeys(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes the encryption keys.
virtual bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all added channels within the 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: tyt_codeplug.cc:2981
virtual bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all added scan lists within the configuration.
virtual bool createPositioningSystems(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a GPS positioning system to the configuration for each one in the codeplug.
virtual bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all channels in the configuration into the codeplug.
virtual void clearGroupLists()=0
Clears all RX group lists in the codeplug.
bool encode(Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack())
Encodes the given generic configuration as a binary codeplug.
Definition: tyt_codeplug.cc:2949
virtual bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all group lists in the configuration into the codeplug.
virtual void clearTimestamp()=0
Clears the time-stamp in the codeplug.
virtual void clearScanLists()=0
Clears all scan lists in the codeplug.
virtual bool decodePrivacyKeys(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Decodes the encryption keys.
virtual ~TyTCodeplug()
Destructor.
Definition: tyt_codeplug.cc:2850
virtual bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all added zones within the configuration.
virtual bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a channel to the configuration for each one in the codeplug.
virtual bool linkPositioningSystems(Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all added positioning systems within the configuration.
virtual bool decodeButtonSetttings(Config *config, const ErrorStack &err=ErrorStack())=0
Decodes the button settings.
bool decode(Config *config, const ErrorStack &err=ErrorStack())
Decodes the binary codeplug and stores its content in the given generic configuration.
Definition: tyt_codeplug.cc:2968
virtual void clearButtonSettings()=0
Clears the button settings in the codeplug.
virtual bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())=0
Links all added RX group lists within the configuration.
virtual void clearChannels()=0
Clears all channels in the codeplug.
virtual void clearEmergencySystems()=0
Clears all emergency systems in the codeplug.
virtual void clearZones()=0
Clears all zones in the codeplug.
virtual bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a scan list to the configuration for each one in the codeplug.
virtual bool decodeGeneralSettings(Config *config, const ErrorStack &err=ErrorStack())=0
Updates the given configuration from the general settings.
TyTCodeplug(QObject *parent=nullptr)
Empty constructor.
Definition: tyt_codeplug.cc:2844
virtual bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
Adds a RX group list to the configuration for each one in the codeplug.
virtual bool encodePositioningSystems(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all DMR positioning systems in the configuration into the codeplug.
virtual bool encodeButtonSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes the button settings.
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: tyt_codeplug.cc:3052
virtual bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all zones in the configuration into the codeplug.
virtual void clearPrivacyKeys()=0
Clears all encryption keys in the codeplug.
virtual bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
Encodes all scan lists in the configuration into the codeplug.
virtual bool encodeTextMessages(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())=0
Encodes text messages.
virtual void clearTextMessages()=0
Clears all text messages in the codeplug.
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.
Represents a zone within the generic configuration.
Definition: zone.hh:15
Some limits for the element.
Definition: tyt_codeplug.hh:1106
static constexpr unsigned int advancedKeys()
Specifies the maximum number of advanced (AES) encryption keys (128bit).
Definition: tyt_codeplug.hh:1110
static constexpr unsigned int basicKeys()
Specifies the maxumum number of basic (DMR) encryption keys (16bit).
Definition: tyt_codeplug.hh:1108
Some internal offsets.
Definition: tyt_codeplug.hh:1115
Some Limits.
Definition: tyt_codeplug.hh:1187
Some limits.
Definition: tyt_codeplug.hh:1156
static constexpr unsigned int length()
Maximum message length.
Definition: tyt_codeplug.hh:1157