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;
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:195
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:47
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition: codeplug.hh:24
The config class, representing the codeplug configuration.
Definition: config.hh:69
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:34
Base class of all TyT codeplugs.
Definition: tyt_codeplug.hh:25
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:449
virtual unsigned channelIndexA() const
Returns the channel index (within zone) for VFO A.
Definition: uv390_codeplug.cc:436
virtual void setChannelIndexA(unsigned idx)
Sets the channel index (within zone) for VFO A.
Definition: uv390_codeplug.cc:440
void clear()
Abstract method to reset the element within the codeplug.
Definition: uv390_codeplug.cc:414
virtual ~BootSettingsElement()
Destructor.
Definition: uv390_codeplug.cc:409
BootSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: uv390_codeplug.cc:397
virtual unsigned channelIndexB() const
Returns the channel index (within zone) for VFO B.
Definition: uv390_codeplug.cc:445
virtual unsigned zoneIndex() const
Returns the boot zone index.
Definition: uv390_codeplug.cc:427
virtual void setZoneIndex(unsigned idx)
Sets the boot zone index.
Definition: uv390_codeplug.cc:431
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:84
ChannelElement(uint8_t *ptr, size_t size)
Constructs a channel from the given memory.
Definition: uv390_codeplug.cc:58
virtual void enableAllowInterrupt(bool enable)
Enables/disables interruption for this channel.
Definition: uv390_codeplug.cc:141
virtual void setSquelch(unsigned value)
Sets the squelch level [0-10].
Definition: uv390_codeplug.cc:105
virtual TyTChannelExtension::KillTone turnOffFreq() const
Returns the remote turn-off/kill frequency for this channel.
Definition: uv390_codeplug.cc:92
virtual void setTurnOffFreq(TyTChannelExtension::KillTone freq)
Sets the remote turn-off/kill frequency for this channel.
Definition: uv390_codeplug.cc:96
virtual bool dcdmLeader() const
Returns true if the radio acts as the leader for this DCDM channel.
Definition: uv390_codeplug.cc:155
virtual void fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: uv390_codeplug.cc:200
virtual void enableDualCapacityDirectMode(bool enable)
Enables/disables dual-capacity direct mode for this channel.
Definition: uv390_codeplug.cc:150
virtual Channel * toChannelObj(const ErrorStack &err=ErrorStack()) const
Constructs a generic Channel object from the codeplug channel.
Definition: uv390_codeplug.cc:165
virtual void enableDCDMLeader(bool enable)
Enables/disables this radio to be the leader for this DCDM channel.
Definition: uv390_codeplug.cc:159
virtual Channel::Power power() const
Returns the power of this channel.
Definition: uv390_codeplug.cc:111
virtual void setPower(Channel::Power pwr)
Sets the power of this channel.
Definition: uv390_codeplug.cc:121
void clear()
Clears/resets the channel and therefore disables it.
Definition: uv390_codeplug.cc:71
virtual bool allowInterrupt() const
Returns true if the channel allows interruption enabled.
Definition: uv390_codeplug.cc:137
virtual bool dualCapacityDirectMode() const
Returns true if the channel has dual-capacity direct mode enabled.
Definition: uv390_codeplug.cc:146
virtual void setInCallCriteria(TyTChannelExtension::InCallCriterion crit)
Sets the in-call criterion for this channel.
Definition: uv390_codeplug.cc:88
virtual unsigned squelch() const
Returns the squelch level [0-10].
Definition: uv390_codeplug.cc:101
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:360
virtual bool keypadTones() const
Returns true, if keypad tones are enabled.
Definition: uv390_codeplug.cc:329
virtual void enableEditRadioID(bool enable)
Enable/disable radio ID editing.
Definition: uv390_codeplug.cc:369
virtual bool fromConfig(const Config *config)
Encodes the general settings.
Definition: uv390_codeplug.cc:374
virtual void enableKeypadTones(bool enable)
Enables/disables the keypad tones.
Definition: uv390_codeplug.cc:333
TransmitMode
Defines all possible transmit modes.
Definition: uv390_codeplug.hh:159
virtual unsigned micLevel() const
Returns the microphone gain.
Definition: uv390_codeplug.cc:356
virtual void setAdditionalDMRId(unsigned n, uint32_t id)
Sets the n-th DMR id.
Definition: uv390_codeplug.cc:351
virtual bool editRadioID() const
If true, radio ID editing is enabled.
Definition: uv390_codeplug.cc:365
virtual void enableChannelVoiceAnnounce(bool enable)
Enables/disables the speech synthesis.
Definition: uv390_codeplug.cc:324
virtual uint32_t additionalDMRId(unsigned n) const
Returns the n-th DMR id.
Definition: uv390_codeplug.cc:347
virtual bool channelVoiceAnnounce() const
Returns true, if the speech synthesis is enabled.
Definition: uv390_codeplug.cc:320
GeneralSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: uv390_codeplug.cc:273
void clear()
Abstract method to reset the element within the codeplug.
Definition: uv390_codeplug.cc:286
virtual bool updateConfig(Config *config)
Updates config from general settings.
Definition: uv390_codeplug.cc:385
virtual void enablePublicZone(bool enable)
Enables/disables public zone.
Definition: uv390_codeplug.cc:342
virtual TransmitMode transmitMode() const
Returns the transmit mode.
Definition: uv390_codeplug.cc:311
virtual bool publicZone() const
Returns true, if public zone is enabled.
Definition: uv390_codeplug.cc:338
virtual void setTransmitMode(TransmitMode mode)
Sets the transmit mode.
Definition: uv390_codeplug.cc:315
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:263
VFOChannelElement(uint8_t *ptr, size_t size)
Constructor from pointer to memory.
Definition: uv390_codeplug.cc:232
virtual ~VFOChannelElement()
Destructor.
Definition: uv390_codeplug.cc:244
QString name() const
Returns the name of this channel.
Definition: uv390_codeplug.cc:249
void setName(const QString &txt)
Sets the name of this channel.
Definition: uv390_codeplug.cc:253
virtual unsigned stepSize() const
Returns the step-size for the VFO channel.
Definition: uv390_codeplug.cc:259
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:1007
void clearTextMessages()
Clears all text messages in the codeplug.
Definition: uv390_codeplug.cc:1012
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:667
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:868
bool decodePrivacyKeys(Config *config, Context &ctx, const ErrorStack &err)
Decodes the encryption keys.
Definition: uv390_codeplug.cc:988
void clearTimestamp()
Clears the time-stamp in the codeplug.
Definition: uv390_codeplug.cc:616
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added zones within the configuration.
Definition: uv390_codeplug.cc:777
void clearScanLists()
Clears all scan lists in the codeplug.
Definition: uv390_codeplug.cc:847
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:906
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:760
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:718
void clear()
Clears and resets the complete codeplug to some default values.
Definition: uv390_codeplug.cc:608
bool decodeButtonSetttings(Config *config, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition: uv390_codeplug.cc:966
bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added scan lists within the configuration.
Definition: uv390_codeplug.cc:884
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition: uv390_codeplug.cc:628
void clearGroupLists()
Clears all RX group lists in the codeplug.
Definition: uv390_codeplug.cc:798
void clearPrivacyKeys()
Clears all encryption keys in the codeplug.
Definition: uv390_codeplug.cc:973
bool encodePrivacyKeys(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes the encryption keys.
Definition: uv390_codeplug.cc:978
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added channels within the configuration.
Definition: uv390_codeplug.cc:683
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:817
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:704
void clearChannels()
Clears all channels in the codeplug.
Definition: uv390_codeplug.cc:645
virtual void clearBootSettings()
Resets the boot setting, e.g.
Definition: uv390_codeplug.cc:1002
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:854
void clearPositioningSystems()
Clears all positioning systems in the codeplug.
Definition: uv390_codeplug.cc:899
UV390Codeplug(QObject *parent=nullptr)
Constructor.
Definition: uv390_codeplug.cc:592
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:804
virtual ~UV390Codeplug()
Destructor.
Definition: uv390_codeplug.cc:603
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:1024
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:743
void clearEmergencySystems()
Clears all emergency systems in the codeplug.
Definition: uv390_codeplug.cc:1017
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:922
bool decodeGeneralSettings(Config *config, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition: uv390_codeplug.cc:639
bool encodeTimestamp()
Sets the time-stamp.
Definition: uv390_codeplug.cc:621
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:652
void clearZones()
Clears all zones in the codeplug.
Definition: uv390_codeplug.cc:734
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:633
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added RX group lists within the configuration.
Definition: uv390_codeplug.cc:833
bool linkPositioningSystems(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added positioning systems within the configuration.
Definition: uv390_codeplug.cc:939
bool encodeButtonSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the button settings.
Definition: uv390_codeplug.cc:959
void clearButtonSettings()
Clears the button settings in the codeplug.
Definition: uv390_codeplug.cc:954
void clearContacts()
Clears all contacts in the codeplug.
Definition: uv390_codeplug.cc:697