|
libdrmconf 0.13.3
A library to program DMR radios.
|
Base codeplug for all OpenGD77 based firmware variants. More...
#include <opengd77base_codeplug.hh>


Classes | |
| class | AdditionalSettingsElement |
| Encodes some additional settings for OpenGD77 based radios. More... | |
| class | APRSSettingsBankElement |
| APRS System bank. More... | |
| class | APRSSettingsElement |
| APRS system for OpenGD77 devices. More... | |
| class | BootSettingsElement |
| Implements the base class of boot settings for all OpenGD77 codeplugs. More... | |
| class | ChannelBankElement |
| Implements the base for channel banks in Radioddity codeplugs. More... | |
| class | ChannelElement |
| Implements the base for all OpenGD77 channel encodings. More... | |
| class | ContactBankElement |
| Encodes the contact bank. More... | |
| class | ContactElement |
| Implements digital contacts in OpenGD77 codeplugs. More... | |
| class | DTMFContactBankElement |
| DTMF contact bank. More... | |
| class | DTMFContactElement |
| DTMF contact element. More... | |
| class | GeneralSettingsElement |
| Encodes the settings element for all OpenGD77 codeplugs. More... | |
| class | GroupListBankElement |
| Encodes a group list bank for all OpenGD77 codeplugs. More... | |
| class | GroupListElement |
| Encodes a group list for all OpenGD77 codeplugs. More... | |
| class | SatelliteBankElement |
| Implements the satellite config bank. More... | |
| class | SatelliteElement |
| Encodes a satellite for the OpenGD77 devices. More... | |
| class | VFOChannelElement |
| VFO Channel representation within the binary codeplug. More... | |
| class | ZoneBankElement |
| Implements the base class for all zone banks of OpenGD77 codeplugs. More... | |
| class | ZoneElement |
| Represents a zone within OpenGD77 codeplugs. More... | |
Public Types | |
| enum | ImageType { EEPROM = 0 , FLASH = 1 } |
| Possible image types. | |
Public Member Functions | |
| virtual void | clear () |
| Clears and resets the complete codeplug to some default values. | |
| bool | index (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) const |
| Indexes all elements of the codeplug. | |
| bool | decode (Config *config, const ErrorStack &err=ErrorStack()) |
Decodes a binary codeplug to the given abstract configuration config. | |
| bool | postprocess (Config *config, const ErrorStack &err=ErrorStack()) const |
| Returns a post-processed configuration of the decoded config. | |
| Config * | preprocess (Config *config, const ErrorStack &err=ErrorStack()) const |
| Returns a prepared configuration for this particular radio. | |
| bool | encode (Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack()) |
Encodes a given abstract configuration (config) to the device specific binary code-plug. | |
| 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 context. | |
| virtual bool | encodeElements (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Encodes the given generic configuration as a binary codeplug using the given context. | |
| virtual void | clearGeneralSettings ()=0 |
| Clears the general settings in the codeplug. | |
| virtual bool | encodeGeneralSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Updates the general settings from the given configuration. | |
| virtual bool | decodeGeneralSettings (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Updates the given configuration from the general settings. | |
| virtual void | clearDTMFSettings ()=0 |
| Clears the DTMF settings. | |
| virtual bool | encodeDTMFSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes DTMF settings. | |
| virtual bool | decodeDTMFSettings (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Decodes the DTMF settings. | |
| virtual void | clearAPRSSettings ()=0 |
| Clears the APRS settings. | |
| virtual bool | encodeAPRSSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes APRS settings. | |
| virtual bool | decodeAPRSSettings (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Decodes the APRS settings. | |
| virtual bool | linkAPRSSettings (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Links the APRS settings. | |
| virtual void | clearDTMFContacts ()=0 |
| Clears all DTMF contacts in the codeplug. | |
| virtual bool | encodeDTMFContacts (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes all DTMF contacts. | |
| virtual bool | createDTMFContacts (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Adds all DTMF contacts to the configuration. | |
| virtual void | clearChannels ()=0 |
| Clear all channels. | |
| virtual bool | encodeChannels (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encode all channels. | |
| virtual bool | createChannels (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Adds all defined channels to the configuration. | |
| virtual bool | linkChannels (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Links all channels. | |
| virtual void | clearBootSettings ()=0 |
| Clear boot settings. | |
| virtual bool | encodeBootSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes boot settings. | |
| virtual bool | decodeBootSettings (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Decodes the boot settings. | |
| virtual void | clearVFOSettings ()=0 |
| Clears the VFO settings. | |
| virtual void | clearZones ()=0 |
| Clears all zones. | |
| virtual bool | encodeZones (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes zones. | |
| virtual bool | createZones (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Adds zones to the configuration. | |
| virtual bool | linkZones (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Links all zones within the configuration. | |
| virtual void | clearContacts ()=0 |
| Clears all contacts in the codeplug. | |
| virtual bool | encodeContacts (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes all digital contacts in the configuration into the codeplug. | |
| virtual bool | createContacts (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Adds a digital contact to the configuration for each one in the codeplug. | |
| virtual void | clearGroupLists ()=0 |
| Clears all group lists. | |
| virtual bool | encodeGroupLists (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Encodes all group lists. | |
| virtual bool | createGroupLists (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Creates all group lists. | |
| virtual bool | linkGroupLists (Context &ctx, const ErrorStack &err=ErrorStack())=0 |
| Links all group lists. | |
Public Member Functions inherited from Codeplug | |
| virtual | ~Codeplug () |
| Destructor. | |
Public Member Functions inherited from DFUFile | |
| DFUFile (QObject *parent=nullptr) | |
| Constructs an empty DFU file object. | |
| uint32_t | size () const |
| Returns the total size of the DFU file. | |
| uint32_t | memSize () const |
| Returns the total memory size stored in the DFU file. | |
| int | numImages () const |
| Returns the number of images within the DFU file. | |
| const Image & | image (int i) const |
Returns a reference to the i-th image of the file. | |
| Image & | image (int i) |
Returns a reference to the i-th image of the file. | |
| void | addImage (const QString &name, uint8_t altSettings=1) |
| Adds a new image to the file. | |
| void | addImage (const Image &img) |
| Adds an image to the file. | |
| void | remImage (int i) |
Deletes the i-th image from the file. | |
| bool | isAligned (unsigned blocksize) const |
| Checks if all image addresses and sizes is aligned with the given block size. | |
| bool | read (const QString &filename, const ErrorStack &err=ErrorStack()) |
| Reads the specified DFU file. | |
| bool | read (QFile &file, const ErrorStack &err=ErrorStack()) |
| Reads the specified DFU file. | |
| bool | write (const QString &filename, const ErrorStack &err=ErrorStack()) |
| Writes to the specified file. | |
| bool | write (QFile &file, const ErrorStack &err=ErrorStack()) |
| Writes to the specified file. | |
| void | dump (QTextStream &stream) const |
| Dumps a text representation of the DFU file structure to the specified text stream. | |
| virtual bool | isAllocated (uint32_t offset, uint32_t img=0) const |
Returns true if the specified address (and image) is allocated. | |
| virtual unsigned char * | data (uint32_t offset, uint32_t img=0) |
| Returns a pointer to the encoded raw data at the specified offset. | |
| virtual const unsigned char * | data (uint32_t offset, uint32_t img=0) const |
| Returns a const pointer to the encoded raw data at the specified offset. | |
Static Public Member Functions | |
| static uint32_t | encodeAngle (double degee) |
| Encodes an angle used to store locations. | |
| static double | decodeAngle (uint32_t code) |
| Decodes an angle used to store locations. | |
| static uint16_t | encodeSelectiveCall (const SelectiveCall &call) |
| Encodes a selective call (tx/rx tone). | |
| static SelectiveCall | decodeSelectiveCall (uint16_t code) |
| Decodes a selective call (tx/rx tone). | |
Protected Member Functions | |
| OpenGD77BaseCodeplug (QObject *parent=nullptr) | |
| Default hidden constructor. | |
Protected Member Functions inherited from Codeplug | |
| Codeplug (QObject *parent=nullptr) | |
| Hidden default constructor. | |
Additional Inherited Members | |
Protected Attributes inherited from DFUFile | |
| QVector< Image > | _images |
| The list of images. | |
Base codeplug for all OpenGD77 based firmware variants.
|
pure virtual |
Clears the APRS settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clear boot settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clear all channels.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears all contacts in the codeplug.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears all DTMF contacts in the codeplug.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears the DTMF settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears the general settings in the codeplug.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears all group lists.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears the VFO settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Clears all zones.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Adds all defined channels to the configuration.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Adds a digital contact to the configuration for each one in the codeplug.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Adds all DTMF contacts to the configuration.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Creates all group lists.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Adds zones to the configuration.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
virtual |
Decodes a binary codeplug to the given abstract configuration config.
This must be implemented by the device-specific codeplug.
Implements Codeplug.
|
pure virtual |
Decodes the APRS settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Decodes the boot settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Decodes the DTMF settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Updates the given configuration from the general settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
virtual |
Encodes a given abstract configuration (config) to the device specific binary code-plug.
This must be implemented by the device-specific codeplug.
Implements Codeplug.
|
pure virtual |
Encodes APRS settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes boot settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encode all channels.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes all digital contacts in the configuration into the codeplug.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes all DTMF contacts.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes DTMF settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Updates the general settings from the given configuration.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes all group lists.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Encodes zones.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
virtual |
Indexes all elements of the codeplug.
This method must be implemented by any device or vendor specific codeplug to map config objects to indices used within the binary codeplug to address each element (e.g., channels, contacts etc.).
Implements Codeplug.
|
pure virtual |
Links the APRS settings.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Links all channels.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Links all group lists.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
pure virtual |
Links all zones within the configuration.
Implemented in OpenGD77Codeplug, and OpenUV380Codeplug.
|
virtual |
Returns a post-processed configuration of the decoded config.
By default, the passed config is returned.
Reimplemented from Codeplug.
|
virtual |
Returns a prepared configuration for this particular radio.
All unsupported features are removed from the copy. The default implementation only copies the config.
Reimplemented from Codeplug.