1#ifndef OPENGD77_CODEPLUG_HH
2#define OPENGD77_CODEPLUG_HH
4#include "opengd77base_codeplug.hh"
5#include "opengd77_extension.hh"
109 struct Limit:
public Element::Limit {
118 static constexpr unsigned int settings() {
return EEPROM; }
119 static constexpr unsigned int dtmfSettings() {
return EEPROM; }
120 static constexpr unsigned int aprsSettings() {
return EEPROM; }
121 static constexpr unsigned int dtmfContacts() {
return EEPROM; }
122 static constexpr unsigned int channelBank0() {
return EEPROM; }
123 static constexpr unsigned int bootSettings() {
return EEPROM; }
124 static constexpr unsigned int vfoA() {
return EEPROM; }
125 static constexpr unsigned int vfoB() {
return EEPROM; }
126 static constexpr unsigned int zoneBank() {
return EEPROM; }
127 static constexpr unsigned int additionalSettings() {
return FLASH; }
128 static constexpr unsigned int channelBank1() {
return FLASH; }
129 static constexpr unsigned int contacts() {
return FLASH; }
130 static constexpr unsigned int groupLists() {
return FLASH; }
137 static constexpr unsigned int settings() {
return 0x000080; }
138 static constexpr unsigned int dtmfSettings() {
return 0x001470; }
139 static constexpr unsigned int aprsSettings() {
return 0x001588; }
140 static constexpr unsigned int dtmfContacts() {
return 0x002f88; }
141 static constexpr unsigned int channelBank0() {
return 0x003780; }
142 static constexpr unsigned int bootSettings() {
return 0x007518; }
143 static constexpr unsigned int vfoA() {
return 0x007590; }
144 static constexpr unsigned int vfoB() {
return 0x0075c8; }
145 static constexpr unsigned int zoneBank() {
return 0x008010; }
146 static constexpr unsigned int additionalSettings() {
return 0x000000; }
147 static constexpr unsigned int channelBank1() {
return 0x07b1b0; }
148 static constexpr unsigned int contacts() {
return 0x087620; }
149 static constexpr unsigned int groupLists() {
return 0x08d620; }
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 encodeAPRSSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes APRS settings.
Definition opengd77_codeplug.cc:68
void clearZones()
Clears all zones.
Definition opengd77_codeplug.cc:244
bool createContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition opengd77_codeplug.cc:115
bool linkAPRSSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Links the APRS settings.
Definition opengd77_codeplug.cc:83
bool createChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Adds all defined channels to the configuration.
Definition opengd77_codeplug.cc:180
void clearDTMFSettings()
Clears the DTMF settings.
Definition opengd77_codeplug.cc:45
void clearBootSettings()
Clear boot settings.
Definition opengd77_codeplug.cc:232
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition opengd77_codeplug.cc:25
bool createGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Creates all group lists.
Definition opengd77_codeplug.cc:277
bool decodeAPRSSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the APRS settings.
Definition opengd77_codeplug.cc:77
bool linkChannels(Context &ctx, const ErrorStack &err=ErrorStack())
Links all channels.
Definition opengd77_codeplug.cc:206
OpenGD77Codeplug(QObject *parent=nullptr)
Constructs an empty codeplug for the GD-77.
Definition opengd77_codeplug.cc:11
bool encodeGroupLists(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists.
Definition opengd77_codeplug.cc:271
void clearChannels()
Clear all channels.
Definition opengd77_codeplug.cc:141
bool encodeDTMFSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes DTMF settings.
Definition opengd77_codeplug.cc:50
void clearContacts()
Clears all contacts in the codeplug.
Definition opengd77_codeplug.cc:104
void clearGroupLists()
Clears all group lists.
Definition opengd77_codeplug.cc:266
bool decodeDTMFSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the DTMF settings.
Definition opengd77_codeplug.cc:56
bool linkZones(Context &ctx, const ErrorStack &err=ErrorStack())
Links all zones within the configuration.
Definition opengd77_codeplug.cc:261
bool linkGroupLists(Context &ctx, const ErrorStack &err=ErrorStack())
Links all group lists.
Definition opengd77_codeplug.cc:283
bool createDTMFContacts(Context &ctx, const ErrorStack &err=ErrorStack())
Adds all DTMF contacts to the configuration.
Definition opengd77_codeplug.cc:133
bool decodeGeneralSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition opengd77_codeplug.cc:39
bool encodeDTMFContacts(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all DTMF contacts.
Definition opengd77_codeplug.cc:126
void clearVFOSettings()
Clears the VFO settings.
Definition opengd77_codeplug.cc:238
void clearDTMFContacts()
Clears all DTMF contacts in the codeplug.
Definition opengd77_codeplug.cc:121
bool encodeGeneralSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition opengd77_codeplug.cc:30
void clearAPRSSettings()
Clears the APRS settings.
Definition opengd77_codeplug.cc:63
bool encodeChannels(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encode all channels.
Definition opengd77_codeplug.cc:152
bool decodeBootSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the boot settings.
Definition opengd77_codeplug.cc:97
bool encodeZones(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes zones.
Definition opengd77_codeplug.cc:249
bool createZones(Context &ctx, const ErrorStack &err=ErrorStack())
Adds zones to the configuration.
Definition opengd77_codeplug.cc:255
bool encodeBootSettings(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes boot settings.
Definition opengd77_codeplug.cc:90
bool encodeContacts(const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition opengd77_codeplug.cc:109
Internal used image indices.
Definition opengd77_codeplug.hh:116
Some Limits for this codeplug.
Definition opengd77_codeplug.hh:109
static constexpr unsigned int channelBanks()
Number of channel banks.
Definition opengd77_codeplug.hh:111
Some offsets.
Definition opengd77_codeplug.hh:135