libdrmconf  0.11.3
A library to program DMR radios.
Classes | Public Types | Public Member Functions | List of all members
D878UV2CallsignDB Class Reference

Represents and encodes the binary format for the call-sign database within the radio. More...

#include <d878uv2_callsigndb.hh>

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

Classes

struct  Limit
 Some limits of the call-sign DB. More...
 
struct  Offset
 Some internal offsets within the call-sign DB. More...
 

Public Types

typedef D868UVCodeplug::ContactMapElement IndexEntryElement
 Same index entry used by the codeplug to map normal digital contacts to an contact index. More...
 
- Public Types inherited from D868UVCallsignDB
typedef D868UVCodeplug::ContactMapElement IndexEntryElement
 Same index entry used by the codeplug to map normal digital contacts to an contact index. More...
 

Public Member Functions

 D878UV2CallsignDB (QObject *parent=nullptr)
 Constructor, does not allocate any memory yet.
 
bool encode (UserDatabase *db, const Selection &selection=Selection(), const ErrorStack &err=ErrorStack())
 Tries to encode as many entries of the given user-database.
 
- Public Member Functions inherited from D868UVCallsignDB
 D868UVCallsignDB (QObject *parent=nullptr)
 Constructor, does not allocate any memory yet.
 
- 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 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.
 

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.
 

Detailed Description

Represents and encodes the binary format for the call-sign database within the radio.

Callsign database
Start Size Content
04000000 variable Index of callsign entries. Follows the same weird format as D868UVCodeplug::contact_map_t. Sorted by ID. Empty entries set to 0xffffffffffffffff.
04840000 000010 Database limits, see limits_t.
05500000 variable The actual DB entries, each entry is of variable size but shares the same header, see entry_t. Order arbitrary. Filled with 0x00.

Member Typedef Documentation

◆ IndexEntryElement

Same index entry used by the codeplug to map normal digital contacts to an contact index.

Here it maps to the byte offset within the database entries.


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