1#ifndef DM1701_CODEPLUG_HH
2#define DM1701_CODEPLUG_HH
4#include "tyt_codeplug.hh"
106 QString
name()
const;
107 void setName(
const QString &txt);
321 static constexpr unsigned int messages() {
return 0x002180; }
The base class of all channels (analog and digital) of a codeplug configuration.
Definition channel.hh:37
Power
Specifies the prefix for every ID assigned to every channel during serialization.
Definition channel.hh:64
Base class for all codeplug contexts.
Definition codeplug.hh:331
Represents the abstract base class of all codeplug elements.
Definition codeplug.hh:65
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:70
uint32_t size() const
Returns the total size of the DFU file.
Definition dfufile.cc:52
void clear()
Abstract method to reset the element within the codeplug.
Definition dm1701_codeplug.cc:68
virtual void setPower(Channel::Power pwr)
Sets the power of this channel.
Definition dm1701_codeplug.cc:104
Channel * toChannelObj(const ErrorStack &err=ErrorStack()) const
Constructs a generic Channel object from the codeplug channel.
Definition dm1701_codeplug.cc:118
virtual void enableReverseBurst(bool enable)
Enables/disables reverse burst.
Definition dm1701_codeplug.cc:93
virtual Channel::Power power() const
Returns the power of this channel.
Definition dm1701_codeplug.cc:98
virtual void enableTightSquelch(bool enable)
Enables/disables tight squelch.
Definition dm1701_codeplug.cc:84
virtual bool tightSquelchEnabled() const
Returns true if the squelch is 'tight'.
Definition dm1701_codeplug.cc:80
void fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition dm1701_codeplug.cc:136
ChannelElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dm1701_codeplug.cc:55
virtual bool reverseBurst() const
Returns true if the reversed burst is enabled.
Definition dm1701_codeplug.cc:89
virtual bool channelMode() const
Returns true, if the radio is in channel (and not VFO) mode.
Definition dm1701_codeplug.cc:240
virtual bool fromConfig(const Config *config)
Encodes the general settings.
Definition dm1701_codeplug.cc:285
GeneralSettingsElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition dm1701_codeplug.cc:194
virtual void enablePrivateCallMatch(bool enable)
Enables/disables private-call match.
Definition dm1701_codeplug.cc:261
virtual bool groupCallMatch() const
Returns true if group-call match is enabled.
Definition dm1701_codeplug.cc:249
void clear()
Abstract method to reset the element within the codeplug.
Definition dm1701_codeplug.cc:207
virtual void setTimeZone(const QTimeZone &zone)
Sets the time-zone.
Definition dm1701_codeplug.cc:270
virtual bool channelModeB() const
Returns true, if VFO B is in channel mode.
Definition dm1701_codeplug.cc:231
virtual bool privateCallMatch() const
Returns true if private-call match is enabled.
Definition dm1701_codeplug.cc:257
virtual void enableChannelModeA(bool enable)
Enables/disables the channel mode for VFO A.
Definition dm1701_codeplug.cc:226
virtual void enableChannelModeB(bool enable)
Enables/disables the channel mode for VFO B.
Definition dm1701_codeplug.cc:235
virtual bool channelModeA() const
Returns true, if VFO A is in channel mode.
Definition dm1701_codeplug.cc:222
virtual unsigned channelHangTime() const
Returns the channel hang time in ms.
Definition dm1701_codeplug.cc:276
virtual void setChannelHangTime(unsigned dur)
Sets the channel hang time in ms.
Definition dm1701_codeplug.cc:280
virtual bool updateConfig(Config *config)
Updates config from general settings.
Definition dm1701_codeplug.cc:306
virtual void enableChannelMode(bool enable)
Enable/disable channel mode.
Definition dm1701_codeplug.cc:244
virtual QTimeZone timeZone() const
Returns the time-zone.
Definition dm1701_codeplug.cc:266
virtual void enableGroupCallMatch(bool enable)
Enables/disables group-call match.
Definition dm1701_codeplug.cc:253
virtual void setStepSize(unsigned ss_hz)
Sets the step-size for the VFO channel in Hz.
Definition dm1701_codeplug.cc:184
QString name() const
Returns the name of this channel.
Definition dm1701_codeplug.cc:170
VFOChannelElement(uint8_t *ptr, size_t size)
Constructor from pointer to memory.
Definition dm1701_codeplug.cc:153
void setName(const QString &txt)
Sets the name of this channel.
Definition dm1701_codeplug.cc:174
virtual ~VFOChannelElement()
Destructor.
Definition dm1701_codeplug.cc:165
virtual unsigned stepSize() const
Returns the step-size for the VFO channel.
Definition dm1701_codeplug.cc:180
virtual void setMemberIndexB(unsigned n, uint16_t idx)
Returns the n-th member index of the channel list for B.
Definition dm1701_codeplug.cc:480
virtual uint16_t memberIndexA(unsigned n) const
Returns the n-th member index of the channel list for A.
Definition dm1701_codeplug.cc:465
virtual bool linkZoneObj(Zone *zone, Context &ctx)
Links the given zone object.
Definition dm1701_codeplug.cc:505
virtual ~ZoneExtElement()
Destructor.
Definition dm1701_codeplug.cc:455
virtual bool fromZoneObj(const Zone *zone, Context &ctx)
Encodes the given zone.
Definition dm1701_codeplug.cc:485
virtual uint16_t memberIndexB(unsigned n) const
Returns the n-th member index of the channel list for B.
Definition dm1701_codeplug.cc:475
virtual void setMemberIndexA(unsigned n, uint16_t idx)
Sets the n-th member index of the channel list for A.
Definition dm1701_codeplug.cc:470
ZoneExtElement(uint8_t *ptr, size_t size)
Constructor.
Definition dm1701_codeplug.cc:443
void clear()
Abstract method to reset the element within the codeplug.
Definition dm1701_codeplug.cc:460
void clearContacts()
Clears all contacts in the codeplug.
Definition dm1701_codeplug.cc:626
bool encodeScanLists(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists in the configuration into the codeplug.
Definition dm1701_codeplug.cc:782
bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added scan lists within the configuration.
Definition dm1701_codeplug.cc:812
bool createPositioningSystems(Context &ctx, const ErrorStack &err)
Adds a GPS positioning system to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:921
bool decodeTextMessages(Context &ctx, const ErrorStack &err)
Decodes text messages.
Definition dm1701_codeplug.cc:889
void clearMenuSettings()
Clears the menu settings in the codeplug.
Definition dm1701_codeplug.cc:827
bool encodeContacts(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition dm1701_codeplug.cc:633
void clearChannels()
Clears all channels in the codeplug.
Definition dm1701_codeplug.cc:574
bool createScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a scan list to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:796
void clearScanLists()
Clears all scan lists in the codeplug.
Definition dm1701_codeplug.cc:775
void clearTimestamp()
Clears the time-stamp in the codeplug.
Definition dm1701_codeplug.cc:545
bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:647
void clearTextMessages()
Clears all text messages in the codeplug.
Definition dm1701_codeplug.cc:879
void clearPositioningSystems()
Clears all positioning systems in the codeplug.
Definition dm1701_codeplug.cc:909
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition dm1701_codeplug.cc:562
bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a channel to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:596
bool createZones(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a zone to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:689
bool linkPositioningSystems(Context &ctx, const ErrorStack &err)
Links all added positioning systems within the configuration.
Definition dm1701_codeplug.cc:928
virtual ~DM1701Codeplug()
Destructor.
Definition dm1701_codeplug.cc:540
bool decodePrivacyKeys(Context &ctx, const ErrorStack &err)
Decodes the encryption keys.
Definition dm1701_codeplug.cc:866
void clearGroupLists()
Clears all RX group lists in the codeplug.
Definition dm1701_codeplug.cc:726
virtual void clearVFOSettings()
Resets VFO settings.
Definition dm1701_codeplug.cc:902
bool encodeZones(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all zones in the configuration into the codeplug.
Definition dm1701_codeplug.cc:672
bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a RX group list to the configuration for each one in the codeplug.
Definition dm1701_codeplug.cc:745
bool encodeGroupLists(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists in the configuration into the codeplug.
Definition dm1701_codeplug.cc:732
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added channels within the configuration.
Definition dm1701_codeplug.cc:612
bool encodeTextMessages(Context &ctx, const Flags &flags, const ErrorStack &err)
Encodes text messages.
Definition dm1701_codeplug.cc:884
bool encodePositioningSystems(const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes all DMR positioning systems in the configuration into the codeplug.
Definition dm1701_codeplug.cc:914
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added RX group lists within the configuration.
Definition dm1701_codeplug.cc:761
bool encodeTimestamp()
Sets the time-stamp.
Definition dm1701_codeplug.cc:550
void clearZones()
Clears all zones in the codeplug.
Definition dm1701_codeplug.cc:663
void clearPrivacyKeys()
Clears all encryption keys in the codeplug.
Definition dm1701_codeplug.cc:851
void clearButtonSettings()
Clears the button settings in the codeplug.
Definition dm1701_codeplug.cc:832
void clearEmergencySystems()
Clears all emergency systems in the codeplug.
Definition dm1701_codeplug.cc:895
bool encodeButtonSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the button settings.
Definition dm1701_codeplug.cc:837
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition dm1701_codeplug.cc:557
bool encodePrivacyKeys(const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes the encryption keys.
Definition dm1701_codeplug.cc:856
DM1701Codeplug(QObject *parent=nullptr)
Constructor.
Definition dm1701_codeplug.cc:529
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added zones within the configuration.
Definition dm1701_codeplug.cc:706
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition dm1701_codeplug.cc:568
bool decodeButtonSetttings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition dm1701_codeplug.cc:844
bool encodeChannels(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all channels in the configuration into the codeplug.
Definition dm1701_codeplug.cc:581
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
Represents a single channel (analog or digital) within the TyT codeplug.
Definition tyt_codeplug.hh:35
static constexpr unsigned int size()
Returns the size of the element.
Definition tyt_codeplug.hh:81
Codeplug representation of the general settings.
Definition tyt_codeplug.hh:525
TyTCodeplug(QObject *parent=nullptr)
Empty constructor.
Definition tyt_codeplug.cc:2884
Represents a zone within the generic configuration.
Definition zone.hh:15
Some internal offsets within the codeplug.
Definition dm1701_codeplug.hh:319