1 #ifndef TYTEXTENSION_HH
2 #define TYTEXTENSION_HH
4 #include "configobject.hh"
16 Q_CLASSINFO(
"description",
"Settings for MD-390, RT8, MD-UV390, RT3S, MD-2017, RT82, DM-1701, RT84.")
17 Q_CLASSINFO(
"longDescription",
"Device specific channel settings for TyT and Retevis devices."
18 "Including TyT MD-390, MD-UV390, MD-2017, Retevis RT8, RT3S and RT82"
19 " as well as Baofeng DM-1701.")
59 Q_CLASSINFO(
"dmrSquelchDescription",
"Sets the squelch level for DMR channels. "
60 "Only applicable for MD-UV390 and MD-2017")
65 Low=0, Medium=1, High=2
71 Tone259_2Hz=0, Tone55_2Hz=1, Off=3
77 Always = 0, AdmitCriterion=1, TXInterrupt=2
697 Q_CLASSINFO(
"powerSaveModeDescription",
"Puts the radio into sleep-mode when idle.")
698 Q_CLASSINFO(
"powerSaveModeLongDescription",
699 "When enabled, the radio enters a sleep mode when idle. That is, when on receive and "
700 "there is no activity on the current channel. However, the radio may need some time "
701 "to wake up from this mode. Hence, the 'wakeupPreamble' need to be enabled by all "
702 "radios in the network to provide this wake-up delay.")
705 Q_CLASSINFO(
"wakeupPreambleDescription",
"If enabled, the radio will transmit a short wake-up "
706 "preamble before each call.")
760 Q_CLASSINFO("
description", "Settings for MD-390, RT8, MD-
UV390, RT3S, MD-2017, RT82.")
761 Q_CLASSINFO("
longDescription", "Device specific radio settings for TyT and Retevis devices."
762 "Including TyT MD-390, MD-
UV390, MD-2017
as well
as Retevis RT8, "
767 enum class MonitorType {
Base class of all device/vendor specific confiuration extensions.
Definition: configobject.hh:246
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
QString longDescription() const
Returns the long description of this instance if set by a class info.
Definition: configobject.cc:958
const Object * as() const
Casts this object to the given type.
Definition: configobject.hh:153
QString description() const
Returns the description of this instance if set by a class info.
Definition: configobject.cc:950
Represents the TyT channel extension.
Definition: tyt_extensions.hh:13
void setRXRefFrequency(RefFrequency ref)
Sets the reference frequency setting for RX.
Definition: tyt_extensions.cc:118
RefFrequency txRefFrequency() const
Returns the reference frequency setting for TX.
Definition: tyt_extensions.cc:126
void enableDataCallConfirmed(bool enable)
Enables/disables data-call confirmation.
Definition: tyt_extensions.cc:70
void enableDCDMLeader(bool enable)
Enables/disables this radio to be the leader on a DCDM simplex channel.
Definition: tyt_extensions.cc:238
bool dcdm() const
Returns true if the DCDM mode is enabled.
Definition: tyt_extensions.cc:222
bool dcdmLeader() const
Returns true if this radio is the leader for a DCDM simplex channel.
Definition: tyt_extensions.cc:234
void setDMRSquelch(unsigned int sq)
Sets the squelch-level for DMR channels.
Definition: tyt_extensions.cc:142
void enableEmergencyAlarmConfirmed(bool enable)
Enables/disables emergency-call confirmation.
Definition: tyt_extensions.cc:94
bool reverseBurst() const
Returns true if the reverse burst is enabled.
Definition: tyt_extensions.cc:174
void enableTalkaround(bool enable)
Enables/disables the talk-around feature.
Definition: tyt_extensions.cc:58
bool _autoScan
Holds the auto-scan flag.
Definition: tyt_extensions.hh:171
void setKillTone(KillTone tone)
Sets the kill-tone frequency.
Definition: tyt_extensions.cc:190
KillTone killTone() const
Returns the kill tone frequency.
Definition: tyt_extensions.cc:186
bool privateCallConfirmed() const
Returns true if private call confirmation is enabled.
Definition: tyt_extensions.cc:78
bool _displayPTTId
Holds the display PTT ID flag.
Definition: tyt_extensions.hh:181
unsigned int dmrSquelch() const
Squelch level for DMR channels.
Definition: tyt_extensions.cc:138
bool _tightSquelch
Holds the tightSquelch flag.
Definition: tyt_extensions.hh:189
void enableDisplayPTTId(bool enable)
Enables/disables analog PTT ID display.
Definition: tyt_extensions.cc:106
void setInCallCriterion(InCallCriterion crit)
Sets the in-call criterion.
Definition: tyt_extensions.cc:202
bool loneWorker() const
Returns true if the lone worker feature is enabled.
Definition: tyt_extensions.cc:30
bool emergencyAlarmConfirmed() const
Returns true if emergency calls are confirmed.
Definition: tyt_extensions.cc:90
bool _reverseBurst
Holds the reverse burst flag.
Definition: tyt_extensions.hh:193
Q_INVOKABLE TyTChannelExtension(QObject *parent=nullptr)
Default constructor.
Definition: tyt_extensions.cc:7
bool tightSquelch() const
Returns true if the tight squelch is enabled.
Definition: tyt_extensions.cc:150
void enableAutoScan(bool enable)
Enables/disables the auto-scan feature.
Definition: tyt_extensions.cc:46
RefFrequency
Possible reference frequency settings for RX & TX.
Definition: tyt_extensions.hh:64
bool _talkaround
Holds the talk around flag.
Definition: tyt_extensions.hh:173
void enableTightSquelch(bool enable)
Enables/disables the tight squelch.
Definition: tyt_extensions.cc:154
bool autoScan() const
Returns true if the auto scan feature is enabled.
Definition: tyt_extensions.cc:42
bool _allowInterrupt
Holds the interrupt flag.
Definition: tyt_extensions.hh:201
bool talkaround() const
Returns true if the talk around feature is enabled.
Definition: tyt_extensions.cc:54
bool _dcdmLeader
Holds the DCDM-leader flag.
Definition: tyt_extensions.hh:205
InCallCriterion
Possible in-call criterions.
Definition: tyt_extensions.hh:76
ConfigItem * clone() const
Clones this item.
Definition: tyt_extensions.cc:19
RefFrequency _rxRefFrequency
Holds the reference frequency setting for RX.
Definition: tyt_extensions.hh:183
bool _privateCallConfirmed
Holds the private-call confirmation flag.
Definition: tyt_extensions.hh:177
bool displayPTTId() const
Returns true if analog PTT IDs are shown.
Definition: tyt_extensions.cc:102
InCallCriterion _inCallCriterion
Holds the in-call criterion.
Definition: tyt_extensions.hh:199
void enableLoneWorker(bool enable)
Enables/disables the lone-worker feature.
Definition: tyt_extensions.cc:34
void enableAllowInterrupt(bool enable)
Enables/disables interrupt.
Definition: tyt_extensions.cc:214
unsigned int _dmrSquelch
The squelch level [0-10] for DMR channels.
Definition: tyt_extensions.hh:207
bool compressedUDPHeader() const
Returns true if the compressed UDP header is enabled.
Definition: tyt_extensions.cc:162
RefFrequency _txRefFrequency
Holds the reference frequency setting for TX.
Definition: tyt_extensions.hh:185
bool _emergencyAlarmConfirmed
Holds the emergency-call confirmation flag.
Definition: tyt_extensions.hh:179
void setTXRefFrequency(RefFrequency ref)
Sets the reference frequency setting for TX.
Definition: tyt_extensions.cc:130
KillTone _killTone
Holds the kill tone setting.
Definition: tyt_extensions.hh:197
bool allowInterrupt() const
Returns true if interrupt is allowed.
Definition: tyt_extensions.cc:210
void enableCompressedUDPHeader(bool enable)
Enables/disables the compressed UDP header.
Definition: tyt_extensions.cc:166
KillTone
Possible kill-tone settings.
Definition: tyt_extensions.hh:70
bool _dataCallConfirmed
Holds the data-call confirmation flag.
Definition: tyt_extensions.hh:175
bool dataCallConfirmed() const
Returns true if data call confirmation is enabled.
Definition: tyt_extensions.cc:66
bool _loneWorker
Holds the lone-worker flag.
Definition: tyt_extensions.hh:169
void enablePrivateCallConfirmed(bool enable)
Enables/disables private-call confirmation.
Definition: tyt_extensions.cc:82
InCallCriterion inCallCriterion() const
Returns the in-call criterion.
Definition: tyt_extensions.cc:198
void enableDCDM(bool enable)
Enables/disables the DCDM mode.
Definition: tyt_extensions.cc:226
bool _compressedUDPHeader
Holds the compressed UDP header flag.
Definition: tyt_extensions.hh:191
bool _dcdm
Holds the DCDM flag.
Definition: tyt_extensions.hh:203
RefFrequency rxRefFrequency() const
Returns the reference frequency setting for RX.
Definition: tyt_extensions.cc:114
void enableReverseBurst(bool enable)
Enables/disables reverse burst.
Definition: tyt_extensions.cc:178
Groups several extension for TyT devices.
Definition: tyt_extensions.hh:1025
TyTButtonSettings * buttonSettings
The button settings for TyT devices.
Definition: tyt_extensions.hh:1029
Q_INVOKABLE TyTConfigExtension(QObject *parent=nullptr)
Constructor.
Definition: tyt_extensions.cc:1305
TyTButtonSettings * _buttonSettings
Owns the button settings extension.
Definition: tyt_extensions.hh:1051
ConfigItem * clone() const
Clones this item.
Definition: tyt_extensions.cc:1313
TyTMenuSettings * menuSettings
The menu settings for TyT devices.
Definition: tyt_extensions.hh:1031
TyTMenuSettings * _menuSettings
Owns the menu settings extension.
Definition: tyt_extensions.hh:1053
Represents device specific scan-list settings for TyT devices.
Definition: tyt_extensions.hh:214
unsigned _prioritySampleTime
The sample time for priority channels in ms.
Definition: tyt_extensions.hh:245
Q_INVOKABLE TyTScanListExtension(QObject *parent=nullptr)
Default constructor.
Definition: tyt_extensions.cc:258
ConfigItem * clone() const
Clones this item.
Definition: tyt_extensions.cc:265
void setHoldTime(unsigned ms)
Sets the hold time im ms.
Definition: tyt_extensions.cc:279
unsigned holdTime
Holds the hold time in ms.
Definition: tyt_extensions.hh:218
unsigned _holdTime
The hold time in ms.
Definition: tyt_extensions.hh:243
unsigned prioritySampleTime
Holds the sample time in ms for priority channels.
Definition: tyt_extensions.hh:220
void setPrioritySampleTime(unsigned ms)
Sets the sample time for priority channels in ms.
Definition: tyt_extensions.cc:291
Represents the TyT general settings extension.
Definition: tyt_extensions.hh:678
void enableChannelMode(bool enable)
Enables/disables channel mode for the radio.
Definition: tyt_extensions.cc:1006
bool _privateCallMatch
If true, the private call IDs must match.
Definition: tyt_extensions.hh:1014
unsigned radioProgPassword
If radioProgPasswordEnabled is true, specifies the radio programming password.
Definition: tyt_extensions.hh:750
unsigned _powerOnPassword
Holds the power-on password.
Definition: tyt_extensions.hh:1006
unsigned analogScanHangTime
The analog channel scan hang time in ms.
Definition: tyt_extensions.hh:734
bool _channelMode
If true, the radio is in channel (memory) mode.
Definition: tyt_extensions.hh:974
bool channelFreeIndicationTone
If true, the channel free tone is enabled.
Definition: tyt_extensions.hh:692
unsigned _lowBatteryWarnInterval
Holds the low-battery warn interval.
Definition: tyt_extensions.hh:982
unsigned channelHangTime
Holds the channel hang time in ms.
Definition: tyt_extensions.hh:758
void setGroupCallHangTime(unsigned ms)
Sets the group-call hang time in ms.
Definition: tyt_extensions.cc:1052
unsigned lowBatteryWarnInterval
The low battery warn interval in seconds.
Definition: tyt_extensions.hh:722
unsigned _txPreambleDuration
Holds the TX preamble duration.
Definition: tyt_extensions.hh:976
void setMonitorType(MonitorType type)
Sets the monitor type.
Definition: tyt_extensions.cc:885
void enableBootPicture(bool enable)
Enables the boot picture.
Definition: tyt_extensions.cc:993
unsigned _groupCallHangTime
Holds the group-call hang time.
Definition: tyt_extensions.hh:978
bool channelModeA
If true or channelMode is true, the VFO A is in channel mode.
Definition: tyt_extensions.hh:712
bool channelModeB
If true or channelMode is true, the VFO B is in channel mode.
Definition: tyt_extensions.hh:714
void enableRadioProgPassword(bool enable)
Enables the radio programming password.
Definition: tyt_extensions.cc:1228
MonitorType monitorType
The monitor type setting.
Definition: tyt_extensions.hh:682
void setLowBatteryWarnInterval(unsigned sec)
Sets the low-battery warn interval in seconds.
Definition: tyt_extensions.cc:1076
void setRadioProgPassword(unsigned passwd)
Sets the radio programming password.
Definition: tyt_extensions.cc:1239
void enableChannelFreeIndicationTone(bool enable)
Enables channel-free indication tone.
Definition: tyt_extensions.cc:945
bool _channelModeB
If true or channelMode is true, the VFO B is in channel (memory) mode.
Definition: tyt_extensions.hh:972
void setCallAlertToneDuration(unsigned sec)
Sets the call alert-tone duration in seconds.
Definition: tyt_extensions.cc:1099
callbool bootPicture
If true, a picture is shown during boot.
Definition: tyt_extensions.hh:708
unsigned _backlightDuration
Holds the backlight duration.
Definition: tyt_extensions.hh:998
void setPCProgPassword(const QString &passwd)
Sets PC programming password.
Definition: tyt_extensions.cc:1251
void setTXPreambleDuration(unsigned ms)
Sets the TX preamble duration in ms.
Definition: tyt_extensions.cc:1040
bool allLEDsDisabled
If true, all LEDs are disabled.
Definition: tyt_extensions.hh:684
bool radioProgPasswordEnabled
If true the radio programming password is enabled.
Definition: tyt_extensions.hh:748
unsigned loneWorkerResponseTime
The lone-worker response time in minutes.
Definition: tyt_extensions.hh:728
unsigned callAlertToneDuration
The call alert duration in seconds.
Definition: tyt_extensions.hh:726
void enableKeypadLockManual(bool enable)
Sets the keypad lock to manual.
Definition: tyt_extensions.cc:1182
bool powerSaveMode
If true, the power save mode is enabled.
Definition: tyt_extensions.hh:696
bool powerOnPasswordEnabled
If true the power-on password is enabled.
Definition: tyt_extensions.hh:744
bool _powerOnPasswordEnabled
If true, the power-on password is enabled.
Definition: tyt_extensions.hh:1004
unsigned txPreambleDuration
The transmit preamble duration in ms.
Definition: tyt_extensions.hh:716
bool _allTonesDisabled
If true, all tones are disabled.
Definition: tyt_extensions.hh:962
unsigned _digitalScanHangTime
Holds the scan hang-time for digital channels.
Definition: tyt_extensions.hh:992
bool backlightAlwaysOn
If true, the backlight is always on.
Definition: tyt_extensions.hh:736
unsigned groupCallHangTime
The group hang time in ms.
Definition: tyt_extensions.hh:718
bool callAlertToneContinuous
If true, the call alert-tone is continuous.
Definition: tyt_extensions.hh:724
QString _pcProgPassword
Holds the PC programming password.
Definition: tyt_extensions.hh:1012
unsigned digitalScanHangTime
The digital channel scan hang time in ms.
Definition: tyt_extensions.hh:732
void disableAllLEDs(bool disable)
Disables all LEDs.
Definition: tyt_extensions.cc:897
bool allTonesDisabled
If true, all tones are disabled.
Definition: tyt_extensions.hh:694
void enableWakeupPreamble(bool enable)
Enables transmission of wakeup preamble.
Definition: tyt_extensions.cc:981
unsigned backlightDuration
If backlightAlwaysOn is false, specifies the backlight duration in seconds.
Definition: tyt_extensions.hh:738
bool talkPermitToneDigital
If true, the talk permit tone for digital channels is enabled.
Definition: tyt_extensions.hh:686
void enableChannelModeA(bool enable)
Enables/disables channel mode for the VFO A.
Definition: tyt_extensions.cc:1017
void setPrivateCallHangTime(unsigned ms)
Sets the private-call hang time in ms.
Definition: tyt_extensions.cc:1064
bool talkPermitToneAnalog
If true, the talk permit tone for analog channels is enabled.
Definition: tyt_extensions.hh:688
ConfigItem * clone() const
Clones this item.
Definition: tyt_extensions.cc:870
bool passwordAndLock
If true, the password and lock is enabled.
Definition: tyt_extensions.hh:690
void setLoneWorkerReminderTime(unsigned sec)
Sets the lone-worker reminder timer in seconds.
Definition: tyt_extensions.cc:1123
unsigned _privateCallHangTime
Holds the private-call hang time.
Definition: tyt_extensions.hh:980
unsigned privateCallHangTime
The private hang time in ms.
Definition: tyt_extensions.hh:720
unsigned powerOnPassword
If powerOnPasswordEnabled is true, specifies the power-on password.
Definition: tyt_extensions.hh:746
bool _channelModeA
If true or channelMode is true, the VFO A is in channel (memory) mode.
Definition: tyt_extensions.hh:970
unsigned keypadLockTime
If keypadLockManual is false, specifies the keypad lock time.
Definition: tyt_extensions.hh:742
bool _channelFreeIndicationTone
If true, the channel free indication tone is enabled.
Definition: tyt_extensions.hh:960
unsigned _loneWorkerReminderTime
Holds the lone-worker reminder time.
Definition: tyt_extensions.hh:990
Q_INVOKABLE TyTSettingsExtension(QObject *parent=nullptr)
Possible monitor types.
Definition: tyt_extensions.cc:852
bool _talkPermitToneDigital
If true the talk-permit tone is enabled for digital channels.
Definition: tyt_extensions.hh:954
void setKeypadLockTime(unsigned sec)
Sets the keypad lock time in seconds.
Definition: tyt_extensions.cc:1193
bool _wakeupPreamble
If true, the wake-up preamble is sent.
Definition: tyt_extensions.hh:966
bool _groupCallMatch
If true, the group call IDs must match.
Definition: tyt_extensions.hh:1016
void enablePowerSaveMode(bool enable)
Enables the power save mode.
Definition: tyt_extensions.cc:969
bool _radioProgPasswordEnabled
If true, the radio programming password is enabled.
Definition: tyt_extensions.hh:1008
void enableTalkPermitToneDigital(bool enable)
Enables the talk permit tone for digital channels.
Definition: tyt_extensions.cc:909
void enableChannelModeB(bool enable)
Enables/disables channel mode for the VFO B.
Definition: tyt_extensions.cc:1028
bool keypadLockManual
If true, the keypad is locked manually.
Definition: tyt_extensions.hh:740
unsigned _analogScanHangTime
Holds the scan hang-time for analog channels.
Definition: tyt_extensions.hh:994
void enableTalkPermitToneAnalog(bool enable)
Enables the talk permit tone for analog channels.
Definition: tyt_extensions.cc:921
unsigned _keypadLockTime
Holds the keypad lock time.
Definition: tyt_extensions.hh:1002
unsigned loneWorkerReminderTime
The lone-worker reminder time in seconds.
Definition: tyt_extensions.hh:730
bool wakeupPreamble() const
Returns true if the wake-up preamble is sent.
Definition: tyt_extensions.cc:977
void setChannelHangTime(unsigned ms)
Sets the channel hang time in ms.
Definition: tyt_extensions.cc:1287
bool _powerSaveMode
If true, the power save mode is enabled.
Definition: tyt_extensions.hh:964
bool _talkPermitToneAnalog
If true the talk-permit tone is enabled for analog channels.
Definition: tyt_extensions.hh:956
bool _passwdAndLock
If true the password and lock is enabled.
Definition: tyt_extensions.hh:958
void enableBacklightAlwaysOn(bool enable)
Enables the backlight continuously.
Definition: tyt_extensions.cc:1159
void enablePrivateCallMatch(bool enable)
Enables/disables private call match.
Definition: tyt_extensions.cc:1263
void enableGroupCallMatch(bool enable)
Enables/disables group call match.
Definition: tyt_extensions.cc:1275
bool _keypadLockManual
If true, the keypad lock is manual.
Definition: tyt_extensions.hh:1000
unsigned _callAlertToneDuration
Holds the call alert-tone duration.
Definition: tyt_extensions.hh:986
void setAnalogScanHangTime(unsigned ms)
Sets the scan hang-time for analog channels.
Definition: tyt_extensions.cc:1147
void setDigitalScanHangTime(unsigned ms)
Sets the scan hang-time for digital channels.
Definition: tyt_extensions.cc:1135
void enablePasswordAndLock(bool enable)
Enables the password and lock.
Definition: tyt_extensions.cc:933
bool _callAlertToneContinuous
If true, the call alert-tone is continuous.
Definition: tyt_extensions.hh:984
MonitorType _monitorType
Holds the monitor type.
Definition: tyt_extensions.hh:950
void enableCallAlertToneContinuous(bool enable)
Sets the call alert-tone continuous.
Definition: tyt_extensions.cc:1088
bool privateCallMatch
If true, the private call IDs must match.
Definition: tyt_extensions.hh:754
bool _allLEDsDisabled
If true all LEDs are disabled.
Definition: tyt_extensions.hh:952
void enablePowerOnPassword(bool enable)
Enables the power on password.
Definition: tyt_extensions.cc:1205
void setPowerOnPassword(unsigned passwd)
Sets the power-on password.
Definition: tyt_extensions.cc:1216
unsigned _channelHangTime
Holds the channel hang time in ms.
Definition: tyt_extensions.hh:1018
void setBacklightDuration(unsigned sec)
Sets the backlight duration in seconds.
Definition: tyt_extensions.cc:1170
bool _backlightAlwaysOn
If true, the backlight is always on.
Definition: tyt_extensions.hh:996
bool channelMode
If true, the radio is in channel mode.
Definition: tyt_extensions.hh:710
unsigned _radioProgPassword
Holds the radio programming password.
Definition: tyt_extensions.hh:1010
bool _bootPicture
If true the boot picture is enabled.
Definition: tyt_extensions.hh:968
bool groupCallMatch
If true, the group call IDs must match.
Definition: tyt_extensions.hh:756
unsigned _loneWorkerResponseTime
Holds the lone-worker response time.
Definition: tyt_extensions.hh:988
QString pcProgPassword
Specifies the PC programming password.
Definition: tyt_extensions.hh:752
void setLoneWorkerResponseTime(unsigned min)
Sets the lone-worker response time in minutes.
Definition: tyt_extensions.cc:1111
void disableAllTones(bool disable)
Disables all tones.
Definition: tyt_extensions.cc:957
Implements an USB interface to the TYT MD-UV390 & Retevis RT3S VHF/UHF 5W DMR (Tier I&II) radios.
Definition: uv390.hh:37