1 #ifndef GD77_CODEPLUG_HH
2 #define GD77_CODEPLUG_HH
4 #include "radioddity_codeplug.hh"
5 #include "signaling.hh"
179 static constexpr
unsigned int size() {
return 0x0050; }
209 static constexpr
unsigned int size() {
return 0x1480; }
211 uint8_t *
get(
unsigned n)
const;
248 uint8_t *
get(
unsigned n)
const;
314 static constexpr
unsigned int buttonSettings() {
return 0x000108; }
315 static constexpr
unsigned int messages() {
return 0x000128; }
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
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Channel representation within the binary codeplug.
Definition: gd77_codeplug.hh:72
virtual ARTSMode artsMode() const
Returns the ARTS mode.
Definition: gd77_codeplug.cc:73
PTTId
PTT ID send.
Definition: gd77_codeplug.hh:91
virtual STEAngle steAngle() const
Returns the STE angle.
Definition: gd77_codeplug.cc:82
virtual void enableTightSquelch(bool enable)
Enables/disables tight squelch.
Definition: gd77_codeplug.cc:104
virtual PTTId pttIDMode() const
Returns the PTT ID mode.
Definition: gd77_codeplug.cc:91
STEAngle
STE angle.
Definition: gd77_codeplug.hh:83
@ STE_180DEG
180 degree.
Definition: gd77_codeplug.hh:86
@ STE_120DEG
120 degree.
Definition: gd77_codeplug.hh:85
@ STE_240DEG
240 degree.
Definition: gd77_codeplug.hh:87
@ STE_FREQUENCY
STE Frequency.
Definition: gd77_codeplug.hh:84
virtual void setSTEAngle(STEAngle angle)
Sets the STE angle.
Definition: gd77_codeplug.cc:86
virtual void enableLoneWorker(bool enable)
Enables/disables lone worker.
Definition: gd77_codeplug.cc:113
virtual void setPTTIDMode(PTTId mode)
Sets the PTT ID mode.
Definition: gd77_codeplug.cc:95
ARTSMode
ARTS send.
Definition: gd77_codeplug.hh:75
virtual bool squelchIsTight() const
Returns true if the squech type is tight.
Definition: gd77_codeplug.cc:100
void clear()
Resets the channel.
Definition: gd77_codeplug.cc:65
ChannelElement(uint8_t *ptr, size_t size)
Hidden Constructor.
Definition: gd77_codeplug.cc:52
virtual bool loneWorker() const
Returns true if lone worker is enabled.
Definition: gd77_codeplug.cc:109
virtual void setARTSMode(ARTSMode mode)
Sets the ARTS mode.
Definition: gd77_codeplug.cc:77
virtual void enableAutoscan(bool enable)
Enables/disables auto scan.
Definition: gd77_codeplug.cc:122
virtual bool autoscan() const
Returns true if auto scan is enabled.
Definition: gd77_codeplug.cc:118
Table of RX group lists.
Definition: gd77_codeplug.hh:199
uint8_t * get(unsigned n) const
Returns a pointer to the n-th group list.
Definition: gd77_codeplug.cc:246
GroupListBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: gd77_codeplug.cc:233
static constexpr unsigned int size()
Size of the element.
Definition: gd77_codeplug.hh:209
Represents an RX group list within the codeplug.
Definition: gd77_codeplug.hh:169
static constexpr unsigned int size()
Size of the group list element.
Definition: gd77_codeplug.hh:179
GroupListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: gd77_codeplug.cc:217
Bank of scan lists for the GD77.
Definition: gd77_codeplug.hh:237
ScanListBankElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: gd77_codeplug.cc:191
uint8_t * get(unsigned n) const
Returns a pointer to the n-th scan list.
Definition: gd77_codeplug.cc:209
void clear()
Clears the scan list bank.
Definition: gd77_codeplug.cc:204
Represents a single scan list within the GD77 codeplug.
Definition: gd77_codeplug.hh:219
void clear()
Resets the scan list.
Definition: gd77_codeplug.cc:182
ScanListElement(uint8_t *ptr, unsigned size)
Hidden constructor.
Definition: gd77_codeplug.cc:169
Represents, encodes and decodes the device specific codeplug for a Radioddity GD-77.
Definition: gd77_codeplug.hh:63
bool encodeGroupLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all group lists.
Definition: gd77_codeplug.cc:617
bool decodeGeneralSettings(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given configuration from the general settings.
Definition: gd77_codeplug.cc:278
bool encodeScanLists(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all scan lists.
Definition: gd77_codeplug.cc:318
bool createGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Creates all group lists.
Definition: gd77_codeplug.cc:632
void clearContacts()
Clears all contacts in the codeplug.
Definition: gd77_codeplug.cc:539
bool createContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds a digital contact to the configuration for each one in the codeplug.
Definition: gd77_codeplug.cc:559
bool encodeBootText(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes boot text.
Definition: gd77_codeplug.cc:453
void clearMessages()
Clears the messages.
Definition: gd77_codeplug.cc:298
bool encodeGeneralSettings(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the general settings from the given configuration.
Definition: gd77_codeplug.cc:268
void clearEncryption()
Clears all encryption keys.
Definition: gd77_codeplug.cc:665
bool linkZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Links all zones within the configuration.
Definition: gd77_codeplug.cc:520
bool encodeDTMFContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all DTMF contacts.
Definition: gd77_codeplug.cc:581
void clearMenuSettings()
Clears menu settings.
Definition: gd77_codeplug.cc:443
bool linkScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Links all scan lists.
Definition: gd77_codeplug.cc:348
void clearBootText()
Clears boot text.
Definition: gd77_codeplug.cc:448
bool encodeMessages(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())
Encodes preset messages.
Definition: gd77_codeplug.cc:302
void clearChannels()
Clear all channels.
Definition: gd77_codeplug.cc:362
bool createScanLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Creates all scan lists.
Definition: gd77_codeplug.cc:333
void clearScanLists()
Clears all scan lists.
Definition: gd77_codeplug.cc:311
void clearBootSettings()
Clear boot settings.
Definition: gd77_codeplug.cc:438
void clearDTMFContacts()
Clears all DTMF contacts in the codeplug.
Definition: gd77_codeplug.cc:575
bool encodeEncryption(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err)
Encodes all encryption keys defined.
Definition: gd77_codeplug.cc:671
bool createZones(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds zones to the configuration.
Definition: gd77_codeplug.cc:504
GD77Codeplug(QObject *parent=nullptr)
Constructs an empty codeplug for the GD-77.
Definition: gd77_codeplug.cc:254
bool encodeButtonSettings(Context &ctx, const Flags &flags, const ErrorStack &err=ErrorStack())
Encodes button settings.
Definition: gd77_codeplug.cc:288
bool encodeContacts(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes all digital contacts in the configuration into the codeplug.
Definition: gd77_codeplug.cc:545
bool linkGroupLists(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Links all group lists.
Definition: gd77_codeplug.cc:645
bool encodeZones(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encodes zones.
Definition: gd77_codeplug.cc:482
void clearGroupLists()
Clears all group lists.
Definition: gd77_codeplug.cc:610
bool encodeChannels(Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
Encode all channels.
Definition: gd77_codeplug.cc:374
bool linkEncryption(Config *config, Context &ctx, const ErrorStack &err)
Links all encryption keys.
Definition: gd77_codeplug.cc:688
void clearZones()
Clears all zones.
Definition: gd77_codeplug.cc:474
void clearButtonSettings()
Clears the button settings.
Definition: gd77_codeplug.cc:284
bool createDTMFContacts(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds all DTMF contacts to the configuration.
Definition: gd77_codeplug.cc:595
bool decodeBootText(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Updates the given configuration from the boot text settings.
Definition: gd77_codeplug.cc:461
bool createEncryption(Config *config, Context &ctx, const ErrorStack &err)
Creates all encryption keys.
Definition: gd77_codeplug.cc:679
void clearGeneralSettings()
Clears the general settings in the codeplug.
Definition: gd77_codeplug.cc:263
bool linkChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Links all channels.
Definition: gd77_codeplug.cc:419
bool decodeButtonSettings(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes the button settings.
Definition: gd77_codeplug.cc:293
bool createChannels(Config *config, Context &ctx, const ErrorStack &err=ErrorStack())
Adds all defined channels to the configuration.
Definition: gd77_codeplug.cc:400
bool decodeMessages(Context &ctx, const ErrorStack &err=ErrorStack())
Decodes preset messages.
Definition: gd77_codeplug.cc:306
void clearVFOSettings()
Clears the VFO settings.
Definition: gd77_codeplug.cc:468
Implements the base for all Radioddity channel encodings.
Definition: radioddity_codeplug.hh:33
virtual Mode mode() const
Returns the channel mode.
Definition: radioddity_codeplug.cc:89
Implements a base class of group list memory banks for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:543
Represents a base class for all group lists within Radioddity codeplugs.
Definition: radioddity_codeplug.hh:478
Implements the base class of scan lists banks for all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:717
Implements the base class for scan lists of all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:597
Base class of all Radioddity codeplugs.
Definition: radioddity_codeplug.hh:24
Limits of the element.
Definition: gd77_codeplug.hh:183
static constexpr unsigned int memberCount()
Maximum member count.
Definition: gd77_codeplug.hh:185
Internal used offsets within the codeplug.
Definition: gd77_codeplug.hh:312
Some limits for the group list.
Definition: radioddity_codeplug.hh:519