| libdrmconf
    0.11.3
    A library to program DMR radios. | 
Represents and encodes the binary format for the call-sign database within the radio. More...
#include <opengd77_callsigndb.hh>


| Classes | |
| struct | userdb_entry_t | 
| Represents a user-db entry within the binary codeplug.  More... | |
| struct | userdb_t | 
| Represents the binary call-sign database header.  More... | |
| Public Member Functions | |
| OpenGD77CallsignDB (QObject *parent=nullptr) | |
| Constructor. | |
| virtual | ~OpenGD77CallsignDB () | 
| Destructor. | |
| virtual bool | encode (UserDatabase *calldb, const Selection &selection=Selection(), const ErrorStack &err=ErrorStack()) | 
| Encodes as many entries as possible of the given user-database. | |
|  Public Member Functions inherited from CallsignDB | |
| virtual | ~CallsignDB () | 
| 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-thimage of the file. | |
| Image & | image (int i) | 
| Returns a reference to the i-thimage 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-thimage 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 trueif 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 | |
|  Protected Member Functions inherited from CallsignDB | |
| CallsignDB (QObject *parent=nullptr) | |
| Hidden constructor. | |
|  Protected Attributes inherited from DFUFile | |
| QVector< Image > | _images | 
| The list of images. | |
Represents and encodes the binary format for the call-sign database within the radio.
The memory layout of the call-sign DB is relatively simple. The DB starts at address 0x00030000 with a maximum size of 0x00040000. The first 12bytes form the DB header (see OpenGD77CallsignDB::userdb_t) followed by the DB entries (see OpenGD77CallsignDB::userdb_entry_t).
The entries can be of variable size. The size of each entry is encoded in the header. QDMR uses a fixed size of 19bytes per entry. The entries must be sorted in ascending order to allow for an efficient binary search. No index table is used here.