libdrmconf  0.11.3
A library to program DMR radios.
Classes | Public Member Functions | Protected Member Functions | List of all members
RadioddityCodeplug Class Referenceabstract

Base class of all Radioddity codeplugs. More...

#include <radioddity_codeplug.hh>

Inheritance diagram for RadioddityCodeplug:
Inheritance graph
[legend]
Collaboration diagram for RadioddityCodeplug:
Collaboration graph
[legend]

Classes

class  BootSettingsElement
 Implements the base class of boot settings for all Radioddity codeplugs. More...
 
class  BootTextElement
 Implements the base class of boot messages for all Radioddity codeplugs. More...
 
class  ButtonSettingsElement
 Implements the base class of button settings for all Radioddity codeplugs. More...
 
class  ChannelBankElement
 Implements the base for channel banks in Radioddity codeplugs. More...
 
class  ChannelElement
 Implements the base for all Radioddity channel encodings. More...
 
class  ContactElement
 Implements the base for digital contacts in Radioddity codeplugs. More...
 
class  DTMFContactElement
 Implements a base DTMF (analog) contact for Radioddity codeplugs. More...
 
class  EncryptionElement
 Represents all encryption keys and settings within the codeplug on the device. More...
 
class  GeneralSettingsElement
 Implements the base class of general settings for all Radioddity codeplugs. More...
 
class  GroupListBankElement
 Implements a base class of group list memory banks for all Radioddity codeplugs. More...
 
class  GroupListElement
 Represents a base class for all group lists within Radioddity codeplugs. More...
 
class  MenuSettingsElement
 Implements the base class of menu settings for all Radioddity codeplugs. More...
 
class  MessageBankElement
 Implements the base class of a message bank for all Radioddity message banks. More...
 
class  ScanListBankElement
 Implements the base class of scan lists banks for all Radioddity codeplugs. More...
 
class  ScanListElement
 Implements the base class for scan lists of all Radioddity codeplugs. More...
 
class  VFOChannelElement
 VFO Channel representation within the binary codeplug. More...
 
class  ZoneBankElement
 Implements the base class for all zone banks of Radioddity codeplugs. More...
 
class  ZoneElement
 Represents a zone within Radioddity codeplugs. More...
 

Public Member Functions

virtual ~RadioddityCodeplug ()
 Destructor.
 
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. More...
 
bool decode (Config *config, const ErrorStack &err=ErrorStack())
 Decodes the binary codeplug and stores its content in the given generic configuration.
 
bool encode (Config *config, const Flags &flags=Flags(), const ErrorStack &err=ErrorStack())
 Encodes the given generic configuration as a binary codeplug.
 
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 (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Updates the general settings from the given configuration.
 
virtual bool decodeGeneralSettings (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Updates the given configuration from the general settings.
 
virtual void clearButtonSettings ()=0
 Clears the button settings.
 
virtual void clearMessages ()=0
 Clears the messages.
 
virtual void clearContacts ()=0
 Clears all contacts in the codeplug.
 
virtual bool encodeContacts (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes all digital contacts in the configuration into the codeplug.
 
virtual bool createContacts (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Adds a digital contact to the configuration for each one in the codeplug.
 
virtual void clearDTMFContacts ()=0
 Clears all DTMF contacts in the codeplug.
 
virtual bool encodeDTMFContacts (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes all DTMF contacts.
 
virtual bool createDTMFContacts (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Adds all DTMF contacts to the configuration.
 
virtual void clearChannels ()=0
 Clear all channels.
 
virtual bool encodeChannels (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encode all channels.
 
virtual bool createChannels (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Adds all defined channels to the configuration.
 
virtual bool linkChannels (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Links all channels.
 
virtual void clearBootSettings ()=0
 Clear boot settings.
 
virtual void clearMenuSettings ()=0
 Clears menu settings.
 
virtual void clearBootText ()=0
 Clears boot text.
 
virtual bool encodeBootText (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes boot text.
 
virtual bool decodeBootText (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Updates the given configuration from the boot text settings.
 
virtual void clearVFOSettings ()=0
 Clears the VFO settings.
 
virtual void clearZones ()=0
 Clears all zones.
 
virtual bool encodeZones (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes zones.
 
virtual bool createZones (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Adds zones to the configuration.
 
virtual bool linkZones (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Links all zones within the configuration.
 
virtual void clearScanLists ()=0
 Clears all scan lists.
 
virtual bool encodeScanLists (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes all scan lists.
 
virtual bool createScanLists (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Creates all scan lists.
 
virtual bool linkScanLists (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Links all scan lists.
 
virtual void clearGroupLists ()=0
 Clears all group lists.
 
virtual bool encodeGroupLists (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes all group lists.
 
virtual bool createGroupLists (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Creates all group lists.
 
virtual bool linkGroupLists (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Links all group lists.
 
virtual void clearEncryption ()=0
 Clears all encryption keys.
 
virtual bool encodeEncryption (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Encodes all encryption keys defined.
 
virtual bool createEncryption (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Creates all encryption keys.
 
virtual bool linkEncryption (Config *config, Context &ctx, const ErrorStack &err=ErrorStack())=0
 Links all encryption keys.
 
- 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 Imageimage (int i) const
 Returns a reference to the i-th image of the file.
 
Imageimage (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. More...
 
bool read (QFile &file, const ErrorStack &err=ErrorStack())
 Reads the specified DFU file. More...
 
bool write (const QString &filename, const ErrorStack &err=ErrorStack())
 Writes to the specified file. More...
 
bool write (QFile &file, const ErrorStack &err=ErrorStack())
 Writes to the specified file. More...
 
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.
 

Protected Member Functions

 RadioddityCodeplug (QObject *parent=nullptr)
 Hidden constructor, use a device specific class to instantiate.
 
- 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.
 

Detailed Description

Base class of all Radioddity codeplugs.

This class implements the majority of all codeplug elements present in all Radioddity codeplugs (also some derivatives like OpenGD77). This eases the support of several Radioddity radios, as only the differences in the codeplug to this base class must be implemented.

Member Function Documentation

◆ index()

bool RadioddityCodeplug::index ( Config config,
Context ctx,
const ErrorStack err = ErrorStack() 
) const
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.


The documentation for this class was generated from the following files: