1 #ifndef MD390CODEPLUG_HH
2 #define MD390CODEPLUG_HH
4 #include "dm1701_codeplug.hh"
157 static constexpr
unsigned int messages() {
return 0x002180; }
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
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::ChannelElement to implement the DM-1701 specific settings.
Definition: dm1701_codeplug.hh:58
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Extends the common TyTCodeplug::ChannelElement to implement the MD-390 specific settings.
Definition: md390_codeplug.hh:46
virtual void enableCompressedUDPHeader(bool enable)
Enables/disables 'compressed UDP data header'.
Definition: md390_codeplug.cc:72
void clear()
Abstract method to reset the element within the codeplug.
Definition: md390_codeplug.cc:61
virtual Channel * toChannelObj(const ErrorStack &err=ErrorStack()) const
Constructs a generic Channel object from the codeplug channel.
Definition: md390_codeplug.cc:77
virtual bool compressedUDPHeader() const
Returns true if the 'compressed UDP data header' is enabled.
Definition: md390_codeplug.cc:68
ChannelElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: md390_codeplug.cc:48
virtual void fromChannelObj(const Channel *c, Context &ctx)
Initializes this codeplug channel from the given generic configuration.
Definition: md390_codeplug.cc:91
Device specific implementation of the codeplug for the TyT MD-390(U/V).
Definition: md390_codeplug.hh:37
bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists in the configuration into the codeplug.
Definition: md390_codeplug.cc:405
bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a zone to the configuration for each one in the codeplug.
Definition: md390_codeplug.cc:358
void clearTextMessages()
Clears all text messages in the codeplug.
Definition: md390_codeplug.cc:604
void clearPrivacyKeys()
Clears all encryption keys in the codeplug.
Definition: md390_codeplug.cc:574
void clearScanLists()
Clears all scan lists in the codeplug.
Definition: md390_codeplug.cc:448
bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all channels in the configuration into the codeplug.
Definition: md390_codeplug.cc:247
bool encodeTextMessages(Context &ctx, const Flags &flags, const ErrorStack &err)
Encodes text messages.
Definition: md390_codeplug.cc:609
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: md390_codeplug.cc:204
bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a channel to the configuration for each one in the codeplug.
Definition: md390_codeplug.cc:262
MD390Codeplug(QObject *parent=nullptr)
Empty constructor.
Definition: md390_codeplug.cc:160
bool encodeTimestamp()
Sets the time-stamp.
Definition: md390_codeplug.cc:216
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: md390_codeplug.cc:523
bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists in the configuration into the codeplug.
Definition: md390_codeplug.cc:455
bool decodeGeneralSettings(Config *config, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition: md390_codeplug.cc:234
bool linkScanLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added scan lists within the configuration.
Definition: md390_codeplug.cc:485
bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition: md390_codeplug.cc:313
bool encodePrivacyKeys(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes the encryption keys.
Definition: md390_codeplug.cc:579
bool postprocess(Config *config, const ErrorStack &err) const
Retruns a post-processed configuration of the decoded config.
Definition: md390_codeplug.cc:188
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: md390_codeplug.cc:418
bool encodeButtonSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes the button settings.
Definition: md390_codeplug.cc:560
bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all zones in the configuration into the codeplug.
Definition: md390_codeplug.cc:337
bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a scan list to the configuration for each one in the codeplug.
Definition: md390_codeplug.cc:469
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added zones within the configuration.
Definition: md390_codeplug.cc:375
bool decodeButtonSetttings(Config *config, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition: md390_codeplug.cc:567
bool decodePrivacyKeys(Config *config, Context &ctx, const ErrorStack &err)
Decodes the encryption keys.
Definition: md390_codeplug.cc:590
bool linkPositioningSystems(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added positioning systems within the configuration.
Definition: md390_codeplug.cc:540
void clearChannels()
Clears all channels in the codeplug.
Definition: md390_codeplug.cc:240
void clearContacts()
Clears all contacts in the codeplug.
Definition: md390_codeplug.cc:292
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: md390_codeplug.cc:507
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition: md390_codeplug.cc:223
void clearZones()
Clears all zones in the codeplug.
Definition: md390_codeplug.cc:329
void clearGroupLists()
Clears all RX group lists in the codeplug.
Definition: md390_codeplug.cc:399
void clearEmergencySystems()
Clears all emergency systems in the codeplug.
Definition: md390_codeplug.cc:625
bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition: md390_codeplug.cc:299
void clearMenuSettings()
Clears the menu settings in the codeplug.
Definition: md390_codeplug.cc:620
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added RX group lists within the configuration.
Definition: md390_codeplug.cc:434
void clearTimestamp()
Clears the time-stamp in the codeplug.
Definition: md390_codeplug.cc:211
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all added channels within the configuration.
Definition: md390_codeplug.cc:278
bool decodeTextMessages(Context &ctx, const ErrorStack &err)
Decodes text messages.
Definition: md390_codeplug.cc:614
Config * preprocess(Config *config, const ErrorStack &err) const
Retruns a prepared configuration for this particular radio.
Definition: md390_codeplug.cc:170
bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition: md390_codeplug.cc:228
void clearPositioningSystems()
Clears all positioning systems in the codeplug.
Definition: md390_codeplug.cc:500
void clearButtonSettings()
Clears the button settings in the codeplug.
Definition: md390_codeplug.cc:555
Base class of all TyT codeplugs.
Definition: tyt_codeplug.hh:26
Some internal offsets within the codeplug.
Definition: md390_codeplug.hh:155