1#ifndef OPENUV380_CODEPLUG_HH
2#define OPENUV380_CODEPLUG_HH
4#include "opengd77base_codeplug.hh"
5#include "opengd77_extension.hh"
66 struct Limit:
public Element::Limit {
75 static constexpr unsigned int settings() {
return FLASH; }
76 static constexpr unsigned int dtmfSettings() {
return FLASH; }
77 static constexpr unsigned int aprsSettings() {
return FLASH; }
78 static constexpr unsigned int dtmfContacts() {
return FLASH; }
79 static constexpr unsigned int channelBank0() {
return FLASH; }
80 static constexpr unsigned int bootSettings() {
return FLASH; }
81 static constexpr unsigned int vfoA() {
return FLASH; }
82 static constexpr unsigned int vfoB() {
return FLASH; }
83 static constexpr unsigned int zoneBank() {
return FLASH; }
84 static constexpr unsigned int additionalSettings() {
return FLASH; }
85 static constexpr unsigned int channelBank1() {
return FLASH; }
86 static constexpr unsigned int contacts() {
return FLASH; }
87 static constexpr unsigned int groupLists() {
return FLASH; }
94 static constexpr unsigned int settings() {
return 0x00000080; }
95 static constexpr unsigned int dtmfSettings() {
return 0x00001470; }
96 static constexpr unsigned int aprsSettings() {
return 0x00001588; }
97 static constexpr unsigned int dtmfContacts() {
return 0x00002f88; }
98 static constexpr unsigned int channelBank0() {
return 0x00003780; }
99 static constexpr unsigned int bootSettings() {
return 0x00007518; }
100 static constexpr unsigned int vfoA() {
return 0x00007590; }
101 static constexpr unsigned int vfoB() {
return 0x000075c8; }
102 static constexpr unsigned int zoneBank() {
return 0x00008010; }
103 static constexpr unsigned int additionalSettings() {
return 0x00020000; }
104 static constexpr unsigned int channelBank1() {
return 0x0009b1b0; }
105 static constexpr unsigned int contacts() {
return 0x000a7620; }
106 static constexpr unsigned int groupLists() {
return 0x000ad620; }
Base class for all codeplug contexts.
Definition codeplug.hh:331
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:24
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:43
OpenGD77BaseCodeplug(QObject *parent=nullptr)
Default hidden constructor.
Definition opengd77base_codeplug.cc:2560
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all channels.
Definition openuv380_codeplug.cc:207
bool encodeZones(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes zones.
Definition openuv380_codeplug.cc:254
bool encodeBootSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes boot settings.
Definition openuv380_codeplug.cc:91
bool createZones(Context &ctx, const ErrorStack &err=ErrorStack())
Adds zones to the configuration.
Definition openuv380_codeplug.cc:260
bool decodeBootSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the boot settings.
Definition openuv380_codeplug.cc:98
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition openuv380_codeplug.cc:31
bool decodeAPRSSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the APRS settings.
Definition openuv380_codeplug.cc:78
OpenUV380Codeplug(QObject *parent=nullptr)
Constructs an empty codeplug for the Open MD-UV380.
Definition openuv380_codeplug.cc:14
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all zones within the configuration.
Definition openuv380_codeplug.cc:266
bool encodeDTMFSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes DTMF settings.
Definition openuv380_codeplug.cc:51
void clearBootSettings()
Clear boot settings.
Definition openuv380_codeplug.cc:237
void clearChannels()
Clear all channels.
Definition openuv380_codeplug.cc:142
bool decodeDTMFSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the DTMF settings.
Definition openuv380_codeplug.cc:57
bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Adds all defined channels to the configuration.
Definition openuv380_codeplug.cc:181
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition openuv380_codeplug.cc:26
bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Creates all group lists.
Definition openuv380_codeplug.cc:282
bool encodeGroupLists(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists.
Definition openuv380_codeplug.cc:276
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all group lists.
Definition openuv380_codeplug.cc:288
void clearZones()
Clears all zones.
Definition openuv380_codeplug.cc:249
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition openuv380_codeplug.cc:40
bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition openuv380_codeplug.cc:116
void clearVFOSettings()
Clears the VFO settings.
Definition openuv380_codeplug.cc:243
bool encodeAPRSSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes APRS settings.
Definition openuv380_codeplug.cc:69
void clearAPRSSettings()
Clears the APRS settings.
Definition openuv380_codeplug.cc:64
bool encodeContacts(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition openuv380_codeplug.cc:110
bool encodeChannels(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encode all channels.
Definition openuv380_codeplug.cc:153
void clearGroupLists()
Clears all group lists.
Definition openuv380_codeplug.cc:271
void clearDTMFSettings()
Clears the DTMF settings.
Definition openuv380_codeplug.cc:46
void clearContacts()
Clears all contacts in the codeplug.
Definition openuv380_codeplug.cc:105
bool linkAPRSSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Links the APRS settings.
Definition openuv380_codeplug.cc:84
void clearDTMFContacts()
Clears all DTMF contacts in the codeplug.
Definition openuv380_codeplug.cc:122
bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Adds all DTMF contacts to the configuration.
Definition openuv380_codeplug.cc:134
bool encodeDTMFContacts(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all DTMF contacts.
Definition openuv380_codeplug.cc:127
Internal used image indices.
Definition openuv380_codeplug.hh:73
Some Limits for this codeplug.
Definition openuv380_codeplug.hh:66
static constexpr unsigned int channelBanks()
Number of channel banks.
Definition openuv380_codeplug.hh:68
Some offsets.
Definition openuv380_codeplug.hh:92