1 #ifndef UV390_CODEPLUG_HH
2 #define UV390_CODEPLUG_HH
4 #include "dm1701_codeplug.hh"
83 virtual unsigned squelch()
const;
129 QString
name()
const;
130 void setName(
const QString &txt);
161 LAST_CALL_AND_HAND_CH = 1,
163 DESIGNED_AND_HAND_CH = 3,
277 virtual bool txMode()
const;
368 static constexpr
unsigned int messages() {
return 0x002180; }
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition: channel.hh:61
Base class for all codeplug contexts.
Definition: codeplug.hh:238
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:51
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:25
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
Extends the common TyTCodeplug::GeneralSettingsElement to implement the DM-1701 specific settings.
Definition: dm1701_codeplug.hh:121
Extended zone data for the DM-1701.
Definition: dm1701_codeplug.hh:228
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
InCallCriterion
Possible in-call criterions.
Definition: tyt_extensions.hh:76
KillTone
Possible kill-tone settings.
Definition: tyt_extensions.hh:70
Represents a single channel (analog or digital) within the TyT codeplug.
Definition: tyt_codeplug.hh:35
Base class of all TyT codeplugs.
Definition: tyt_codeplug.hh:26
Represents the boot-time settings (selected zone and channels) within the UV390 code-plug.
Definition: uv390_codeplug.hh:212
virtual void setChannelIndexB(unsigned idx)
Sets the channel index (within zone) for VFO B.
Definition: uv390_codeplug.cc:446
virtual unsigned channelIndexA() const
Returns the channel index (within zone) for VFO A.
Definition: uv390_codeplug.cc:433
virtual void setChannelIndexA(unsigned idx)
Sets the channel index (within zone) for VFO A.
Definition: uv390_codeplug.cc:437
void clear()
Abstract method to reset the element within the codeplug.
Definition: uv390_codeplug.cc:411
virtual ~BootSettingsElement()
Destructor.
Definition: uv390_codeplug.cc:406
BootSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: uv390_codeplug.cc:394
virtual unsigned channelIndexB() const
Returns the channel index (within zone) for VFO B.
Definition: uv390_codeplug.cc:442
virtual unsigned zoneIndex() const
Returns the boot zone index.
Definition: uv390_codeplug.cc:424
virtual void setZoneIndex(unsigned idx)
Sets the boot zone index.
Definition: uv390_codeplug.cc:428
Extends the TyTCodeplug::ChannelElement for the TyT MD-UV390 and Retevis RT3S.
Definition: uv390_codeplug.hh:60
virtual TyTChannelExtension::InCallCriterion inCallCriteria() const
Returns the in-call criterion for this channel.
Definition: uv390_codeplug.cc:81
ChannelElement(uint8_t *ptr, size_t size)
Constructs a channel from the given memory.
Definition: uv390_codeplug.cc:55
virtual void enableAllowInterrupt(bool enable)
Enables/disables interruption for this channel.
Definition: uv390_codeplug.cc:138
virtual void setSquelch(unsigned value)
Sets the squelch level [0-10].
Definition: uv390_codeplug.cc:102
virtual TyTChannelExtension::KillTone turnOffFreq() const
Returns the remote turn-off/kill frequency for this channel.
Definition: uv390_codeplug.cc:89
virtual void setTurnOffFreq(TyTChannelExtension::KillTone freq)
Sets the remote turn-off/kill frequency for this channel.
Definition: uv390_codeplug.cc:93
virtual bool dcdmLeader() const
Returns true if the radio acts as the leader for this DCDM channel.
Definition: uv390_codeplug.cc:152
virtual void fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: uv390_codeplug.cc:197
virtual void enableDualCapacityDirectMode(bool enable)
Enables/disables dual-capacity direct mode for this channel.
Definition: uv390_codeplug.cc:147
virtual Channel * toChannelObj(const ErrorStack &err=ErrorStack()) const
Constructs a generic Channel object from the codeplug channel.
Definition: uv390_codeplug.cc:162
virtual void enableDCDMLeader(bool enable)
Enables/disables this radio to be the leader for this DCDM channel.
Definition: uv390_codeplug.cc:156
virtual Channel::Power power() const
Returns the power of this channel.
Definition: uv390_codeplug.cc:108
virtual void setPower(Channel::Power pwr)
Sets the power of this channel.
Definition: uv390_codeplug.cc:118
void clear()
Clears/resets the channel and therefore disables it.
Definition: uv390_codeplug.cc:68
virtual bool allowInterrupt() const
Returns true if the channel allows interruption enabled.
Definition: uv390_codeplug.cc:134
virtual bool dualCapacityDirectMode() const
Returns true if the channel has dual-capacity direct mode enabled.
Definition: uv390_codeplug.cc:143
virtual void setInCallCriteria(TyTChannelExtension::InCallCriterion crit)
Sets the in-call criterion for this channel.
Definition: uv390_codeplug.cc:85
virtual unsigned squelch() const
Returns the squelch level [0-10].
Definition: uv390_codeplug.cc:98
Extends the common TyTCodeplug::GeneralSettings to implement the MD-UV390 specific settings.
Definition: uv390_codeplug.hh:147
virtual void setMICLevel(unsigned val)
Sets the microphone gain.
Definition: uv390_codeplug.cc:357
virtual bool keypadTones() const
Returns true, if keypad tones are enabled.
Definition: uv390_codeplug.cc:326
virtual void enableEditRadioID(bool enable)
Enable/disable radio ID editing.
Definition: uv390_codeplug.cc:366
virtual bool fromConfig(const Config *config)
Encodes the general settings.
Definition: uv390_codeplug.cc:371
virtual void enableKeypadTones(bool enable)
Enables/disables the keypad tones.
Definition: uv390_codeplug.cc:330
TransmitMode
Defines all possible transmit modes.
Definition: uv390_codeplug.hh:159
virtual unsigned micLevel() const
Returns the microphone gain.
Definition: uv390_codeplug.cc:353
virtual void setAdditionalDMRId(unsigned n, uint32_t id)
Sets the n-th DMR id.
Definition: uv390_codeplug.cc:348
virtual bool editRadioID() const
If true, radio ID editing is enabled.
Definition: uv390_codeplug.cc:362
virtual void enableChannelVoiceAnnounce(bool enable)
Enables/disables the speech synthesis.
Definition: uv390_codeplug.cc:321
virtual uint32_t additionalDMRId(unsigned n) const
Returns the n-th DMR id.
Definition: uv390_codeplug.cc:344
virtual bool channelVoiceAnnounce() const
Returns true, if the speech synthesis is enabled.
Definition: uv390_codeplug.cc:317
GeneralSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: uv390_codeplug.cc:270
void clear()
Abstract method to reset the element within the codeplug.
Definition: uv390_codeplug.cc:283
virtual bool updateConfig(Config *config)
Updates config from general settings.
Definition: uv390_codeplug.cc:382
virtual void enablePublicZone(bool enable)
Enables/disables public zone.
Definition: uv390_codeplug.cc:339
virtual TransmitMode transmitMode() const
Returns the transmit mode.
Definition: uv390_codeplug.cc:308
virtual bool publicZone() const
Returns true, if public zone is enabled.
Definition: uv390_codeplug.cc:335
virtual void setTransmitMode(TransmitMode mode)
Sets the transmit mode.
Definition: uv390_codeplug.cc:312
Implements a VFO channel for TyT radios.
Definition: uv390_codeplug.hh:118
virtual void setStepSize(unsigned ss_hz)
Sets the step-size for the VFO channel in Hz.
Definition: uv390_codeplug.cc:260
VFOChannelElement(uint8_t *ptr, size_t size)
Constructor from pointer to memory.
Definition: uv390_codeplug.cc:229
virtual ~VFOChannelElement()
Destructor.
Definition: uv390_codeplug.cc:241
QString name() const
Returns the name of this channel.
Definition: uv390_codeplug.cc:246
void setName(const QString &txt)
Sets the name of this channel.
Definition: uv390_codeplug.cc:250
virtual unsigned stepSize() const
Returns the step-size for the VFO channel.
Definition: uv390_codeplug.cc:256
Device specific implementation of the codeplug for the TyT MD-UV390.
Definition: uv390_codeplug.hh:51
void clearMenuSettings()
Clears the menu settings in the codeplug.
Definition: uv390_codeplug.cc:1004
void clearTextMessages()
Clears all text messages in the codeplug.
Definition: uv390_codeplug.cc:1010
bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a channel to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:664
bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a scan list to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:865
bool decodePrivacyKeys(Config *config, Context &ctx, const ErrorStack &err)
Decodes the encryption keys.
Definition: uv390_codeplug.cc:985
void clearTimestamp()
Clears the time-stamp in the codeplug.
Definition: uv390_codeplug.cc:613
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added zones within the configuration.
Definition: uv390_codeplug.cc:774
void clearScanLists()
Clears all scan lists in the codeplug.
Definition: uv390_codeplug.cc:844
bool encodePositioningSystems(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all DMR positioning systems in the configuration into the codeplug.
Definition: uv390_codeplug.cc:903
bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a zone to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:757
bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:715
void clear()
Clears and resets the complete codeplug to some default values.
Definition: uv390_codeplug.cc:605
bool decodeButtonSetttings(Config *config, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition: uv390_codeplug.cc:963
bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added scan lists within the configuration.
Definition: uv390_codeplug.cc:881
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition: uv390_codeplug.cc:625
void clearGroupLists()
Clears all RX group lists in the codeplug.
Definition: uv390_codeplug.cc:795
void clearPrivacyKeys()
Clears all encryption keys in the codeplug.
Definition: uv390_codeplug.cc:970
bool encodePrivacyKeys(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes the encryption keys.
Definition: uv390_codeplug.cc:975
bool encodeTextMessages(Context &ctx, const Flags &flags, const ErrorStack &err)
Encodes text messages.
Definition: uv390_codeplug.cc:1015
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added channels within the configuration.
Definition: uv390_codeplug.cc:680
bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a RX group list to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:814
bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition: uv390_codeplug.cc:701
void clearChannels()
Clears all channels in the codeplug.
Definition: uv390_codeplug.cc:642
virtual void clearBootSettings()
Resets the boot setting, e.g.
Definition: uv390_codeplug.cc:999
bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists in the configuration into the codeplug.
Definition: uv390_codeplug.cc:851
void clearPositioningSystems()
Clears all positioning systems in the codeplug.
Definition: uv390_codeplug.cc:896
UV390Codeplug(QObject *parent=nullptr)
Constructor.
Definition: uv390_codeplug.cc:589
bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists in the configuration into the codeplug.
Definition: uv390_codeplug.cc:801
virtual ~UV390Codeplug()
Destructor.
Definition: uv390_codeplug.cc:600
DM1701Codeplug::ZoneExtElement ZoneExtElement
Reuse zone extension from DM1701.
Definition: uv390_codeplug.hh:139
virtual void clearVFOSettings()
Clears the VFO A & B.
Definition: uv390_codeplug.cc:1033
bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all zones in the configuration into the codeplug.
Definition: uv390_codeplug.cc:740
void clearEmergencySystems()
Clears all emergency systems in the codeplug.
Definition: uv390_codeplug.cc:1026
bool createPositioningSystems(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a GPS positioning system to the configuration for each one in the codeplug.
Definition: uv390_codeplug.cc:919
bool decodeTextMessages(Context &ctx, const ErrorStack &err)
Decodes text messages.
Definition: uv390_codeplug.cc:1020
bool decodeGeneralSettings(Config *config, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition: uv390_codeplug.cc:636
bool encodeTimestamp()
Sets the time-stamp.
Definition: uv390_codeplug.cc:618
bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all channels in the configuration into the codeplug.
Definition: uv390_codeplug.cc:649
void clearZones()
Clears all zones in the codeplug.
Definition: uv390_codeplug.cc:731
bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition: uv390_codeplug.cc:630
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added RX group lists within the configuration.
Definition: uv390_codeplug.cc:830
bool linkPositioningSystems(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added positioning systems within the configuration.
Definition: uv390_codeplug.cc:936
bool encodeButtonSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the button settings.
Definition: uv390_codeplug.cc:956
void clearButtonSettings()
Clears the button settings in the codeplug.
Definition: uv390_codeplug.cc:951
void clearContacts()
Clears all contacts in the codeplug.
Definition: uv390_codeplug.cc:694
Some internal offsets within the codeplug.
Definition: uv390_codeplug.hh:366