|
| OpenRTXCodeplug (QObject *parent=nullptr) |
| Hidden constructor, use a device specific class to instantiate.
|
|
virtual | ~OpenRTXCodeplug () |
| 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 unsigned int | numContacts () |
| Returns the number of stored contacts.
|
|
virtual unsigned int | offsetContact (unsigned int n) |
| Returns the offset to the n-th contact element.
|
|
virtual bool | encodeContacts (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Encodes all digital contacts in the configuration into the codeplug. More...
|
|
virtual bool | createContacts (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Adds a digital contact to the configuration for each one in the codeplug.
|
|
virtual unsigned int | numChannels () |
| Returns the number of stored channels.
|
|
virtual unsigned int | offsetChannel (unsigned int n) |
| Returns the offset to the n-th channel element.
|
|
virtual bool | encodeChannels (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Encode all channels. More...
|
|
virtual bool | createChannels (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Adds all defined channels to the configuration.
|
|
virtual bool | linkChannels (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Links all channels.
|
|
virtual unsigned int | numZones () |
| Returns the number of stored zones.
|
|
virtual unsigned int | offsetZoneOffsets () |
| Returns the offset to the zone offset array.
|
|
virtual unsigned int | offsetZone (unsigned int n) |
| Returns the offset to the n-th zone element.
|
|
virtual bool | encodeZones (Config *config, const Flags &flags, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Encodes zones.
|
|
virtual bool | createZones (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Adds zones to the configuration.
|
|
virtual bool | linkZones (Config *config, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Links all zones within the configuration.
|
|
virtual | ~Codeplug () |
| Destructor.
|
|
virtual bool | postprocess (Config *config, const ErrorStack &err=ErrorStack()) const |
| Retruns a post-processed configuration of the decoded config. More...
|
|
virtual Config * | preprocess (Config *config, const ErrorStack &err=ErrorStack()) const |
| Retruns a prepared configuration for this particular radio. More...
|
|
| 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. 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.
|
|
Implements the binary encoding and decoding of the OpenRTX codeplug.
Codeplug structure within radio
The binary codeplug does not use fixed offsets. It is just a concatenation arrays of codeplug elements. This codeplug implements the revision 0.1.
Content |
Header see HeaderElement . |
Max. 65536 contacts as specified in the header. See ContactElement . |
Max. 65536 channels as specified in the header. See ChannelElement . |
Max. 65536 bank (zone) offsets as specified in the header. Each offset is stored as a ??? and specifies the offset to the bank w.r.t. ??? in ???. |
Max. 65536 banks (zones). See ZoneElement . |