libdrmconf 0.15.0
A library to program DMR radios.
Loading...
Searching...
No Matches
OpenUV380Codeplug Class Reference

Represents, encodes and decodes the device specific codeplug for Open MD-UV380 firmware. More...

#include <openuv380_codeplug.hh>

Inheritance diagram for OpenUV380Codeplug:
Collaboration diagram for OpenUV380Codeplug:

Classes

struct  Limit
 Some Limits for this codeplug. More...
struct  ImageIndex
 Internal used image indices. More...
struct  Offset
 Some offsets. More...

Public Member Functions

 OpenUV380Codeplug (QObject *parent=nullptr)
 Constructs an empty codeplug for the Open MD-UV380.
void clearGeneralSettings ()
 Clears the general settings in the codeplug.
bool encodeGeneralSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Updates the general settings from the given configuration.
bool decodeGeneralSettings (Context &ctx, const ErrorStack &err=ErrorStack())
 Updates the given configuration from the general settings.
void clearDTMFSettings ()
 Clears the DTMF settings.
bool encodeDTMFSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes DTMF settings.
bool decodeDTMFSettings (Context &ctx, const ErrorStack &err=ErrorStack())
 Decodes the DTMF settings.
void clearAPRSSettings ()
 Clears the APRS settings.
bool encodeAPRSSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes APRS settings.
bool decodeAPRSSettings (Context &ctx, const ErrorStack &err=ErrorStack())
 Decodes the APRS settings.
bool linkAPRSSettings (Context &ctx, const ErrorStack &err=ErrorStack())
 Links the APRS settings.
void clearContacts ()
 Clears all contacts in the codeplug.
bool encodeContacts (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes all digital contacts in the configuration into the codeplug.
bool createContacts (Context &ctx, const ErrorStack &err=ErrorStack())
 Adds a digital contact to the configuration for each one in the codeplug.
void clearDTMFContacts ()
 Clears all DTMF contacts in the codeplug.
bool encodeDTMFContacts (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes all DTMF contacts.
bool createDTMFContacts (Context &ctx, const ErrorStack &err=ErrorStack())
 Adds all DTMF contacts to the configuration.
void clearChannels ()
 Clear all channels.
bool encodeChannels (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encode all channels.
bool createChannels (Context &ctx, const ErrorStack &err=ErrorStack())
 Adds all defined channels to the configuration.
bool linkChannels (Context &ctx, const ErrorStack &err=ErrorStack())
 Links all channels.
void clearBootSettings ()
 Clear boot settings.
bool encodeBootSettings (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes boot settings.
bool decodeBootSettings (Context &ctx, const ErrorStack &err=ErrorStack())
 Decodes the boot settings.
void clearVFOSettings ()
 Clears the VFO settings.
void clearZones ()
 Clears all zones.
bool encodeZones (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes zones.
bool createZones (Context &ctx, const ErrorStack &err=ErrorStack())
 Adds zones to the configuration.
bool linkZones (Context &ctx, const ErrorStack &err=ErrorStack())
 Links all zones within the configuration.
void clearGroupLists ()
 Clears all group lists.
bool encodeGroupLists (const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack())
 Encodes all group lists.
bool createGroupLists (Context &ctx, const ErrorStack &err=ErrorStack())
 Creates all group lists.
bool linkGroupLists (Context &ctx, const ErrorStack &err=ErrorStack())
 Links all group lists.
Public Member Functions inherited from OpenGD77BaseCodeplug
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.
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.

Additional Inherited Members

Public Types inherited from OpenGD77BaseCodeplug
enum  ImageType { EEPROM = 0 , FLASH = 1 }
 Possible image types.
Static Public Member Functions inherited from OpenGD77BaseCodeplug
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 inherited from OpenGD77BaseCodeplug
 OpenGD77BaseCodeplug (QObject *parent=nullptr)
 Default hidden constructor.
Protected Member Functions inherited from Codeplug
 Codeplug (QObject *parent=nullptr)
 Hidden default constructor.
Protected Attributes inherited from DFUFile
QVector< Image > _images
 The list of images.

Detailed Description

Represents, encodes and decodes the device specific codeplug for Open MD-UV380 firmware.

This codeplug is almost identical to the original GD77 codeplug.

Member Function Documentation

◆ clearAPRSSettings()

void OpenUV380Codeplug::clearAPRSSettings ( )
virtual

Clears the APRS settings.

Implements OpenGD77BaseCodeplug.

◆ clearBootSettings()

void OpenUV380Codeplug::clearBootSettings ( )
virtual

Clear boot settings.

Implements OpenGD77BaseCodeplug.

◆ clearChannels()

void OpenUV380Codeplug::clearChannels ( )
virtual

Clear all channels.

Implements OpenGD77BaseCodeplug.

◆ clearContacts()

void OpenUV380Codeplug::clearContacts ( )
virtual

Clears all contacts in the codeplug.

Implements OpenGD77BaseCodeplug.

◆ clearDTMFContacts()

void OpenUV380Codeplug::clearDTMFContacts ( )
virtual

Clears all DTMF contacts in the codeplug.

Implements OpenGD77BaseCodeplug.

◆ clearDTMFSettings()

void OpenUV380Codeplug::clearDTMFSettings ( )
virtual

Clears the DTMF settings.

Implements OpenGD77BaseCodeplug.

◆ clearGeneralSettings()

void OpenUV380Codeplug::clearGeneralSettings ( )
virtual

Clears the general settings in the codeplug.

Implements OpenGD77BaseCodeplug.

◆ clearGroupLists()

void OpenUV380Codeplug::clearGroupLists ( )
virtual

Clears all group lists.

Implements OpenGD77BaseCodeplug.

◆ clearVFOSettings()

void OpenUV380Codeplug::clearVFOSettings ( )
virtual

Clears the VFO settings.

Implements OpenGD77BaseCodeplug.

◆ clearZones()

void OpenUV380Codeplug::clearZones ( )
virtual

Clears all zones.

Implements OpenGD77BaseCodeplug.

◆ createChannels()

bool OpenUV380Codeplug::createChannels ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Adds all defined channels to the configuration.

Implements OpenGD77BaseCodeplug.

◆ createContacts()

bool OpenUV380Codeplug::createContacts ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Adds a digital contact to the configuration for each one in the codeplug.

Implements OpenGD77BaseCodeplug.

◆ createDTMFContacts()

bool OpenUV380Codeplug::createDTMFContacts ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Adds all DTMF contacts to the configuration.

Implements OpenGD77BaseCodeplug.

◆ createGroupLists()

bool OpenUV380Codeplug::createGroupLists ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Creates all group lists.

Implements OpenGD77BaseCodeplug.

◆ createZones()

bool OpenUV380Codeplug::createZones ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Adds zones to the configuration.

Implements OpenGD77BaseCodeplug.

◆ decodeAPRSSettings()

bool OpenUV380Codeplug::decodeAPRSSettings ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Decodes the APRS settings.

Implements OpenGD77BaseCodeplug.

◆ decodeBootSettings()

bool OpenUV380Codeplug::decodeBootSettings ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Decodes the boot settings.

Implements OpenGD77BaseCodeplug.

◆ decodeDTMFSettings()

bool OpenUV380Codeplug::decodeDTMFSettings ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Decodes the DTMF settings.

Implements OpenGD77BaseCodeplug.

◆ decodeGeneralSettings()

bool OpenUV380Codeplug::decodeGeneralSettings ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Updates the given configuration from the general settings.

Implements OpenGD77BaseCodeplug.

◆ encodeAPRSSettings()

bool OpenUV380Codeplug::encodeAPRSSettings ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes APRS settings.

Implements OpenGD77BaseCodeplug.

◆ encodeBootSettings()

bool OpenUV380Codeplug::encodeBootSettings ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes boot settings.

Implements OpenGD77BaseCodeplug.

◆ encodeChannels()

bool OpenUV380Codeplug::encodeChannels ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encode all channels.

Implements OpenGD77BaseCodeplug.

◆ encodeContacts()

bool OpenUV380Codeplug::encodeContacts ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes all digital contacts in the configuration into the codeplug.

Implements OpenGD77BaseCodeplug.

◆ encodeDTMFContacts()

bool OpenUV380Codeplug::encodeDTMFContacts ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes all DTMF contacts.

Implements OpenGD77BaseCodeplug.

◆ encodeDTMFSettings()

bool OpenUV380Codeplug::encodeDTMFSettings ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes DTMF settings.

Implements OpenGD77BaseCodeplug.

◆ encodeGeneralSettings()

bool OpenUV380Codeplug::encodeGeneralSettings ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Updates the general settings from the given configuration.

Implements OpenGD77BaseCodeplug.

◆ encodeGroupLists()

bool OpenUV380Codeplug::encodeGroupLists ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes all group lists.

Implements OpenGD77BaseCodeplug.

◆ encodeZones()

bool OpenUV380Codeplug::encodeZones ( const Flags & flags,
Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Encodes zones.

Implements OpenGD77BaseCodeplug.

◆ linkAPRSSettings()

bool OpenUV380Codeplug::linkAPRSSettings ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Links the APRS settings.

Implements OpenGD77BaseCodeplug.

◆ linkChannels()

bool OpenUV380Codeplug::linkChannels ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Links all channels.

Implements OpenGD77BaseCodeplug.

◆ linkGroupLists()

bool OpenUV380Codeplug::linkGroupLists ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Links all group lists.

Implements OpenGD77BaseCodeplug.

◆ linkZones()

bool OpenUV380Codeplug::linkZones ( Context & ctx,
const ErrorStack & err = ErrorStack() )
virtual

Links all zones within the configuration.

Implements OpenGD77BaseCodeplug.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/openuv380_codeplug.hh
  • /builddir/build/BUILD/qdmr-0.15.0-build/qdmr-0.15.0/lib/openuv380_codeplug.cc