libdrmconf
0.10.4
A library to program DMR radios.
|
Represents a single element within a Image
.
More...
#include <dfufile.hh>
Public Member Functions | |
Element () | |
Empty constructor. | |
Element (uint32_t addr, uint32_t size) | |
Constructs an element for the given address and of the given size. | |
Element (const Element &other) | |
Copy constructor. | |
Element & | operator= (const Element &other) |
Copying assignment. | |
uint32_t | address () const |
Returns the address of the element. | |
void | setAddress (uint32_t addr) |
Sets the address of the element. | |
uint32_t | size () const |
Returns the size of the element (including headers). | |
uint32_t | memSize () const |
Returns the memory size of the element. | |
bool | isAligned (unsigned blocksize) const |
Checks if the element address and size is aligned with the given block size. | |
const QByteArray & | data () const |
Returns a reference to the data. | |
QByteArray & | data () |
Returns a reference to the data. | |
bool | read (QFile &file, CRC32 &crc, QString &errorMessage) |
Reads an element from the given file and updates the CRC. | |
bool | write (QFile &file, CRC32 &crc, QString &errorMessage) const |
Writes an element to the given file and updates the CRC. | |
void | dump (QTextStream &stream) const |
Dumps a textual representation of the element. | |
Protected Attributes | |
uint32_t | _address |
The address of the element. | |
QByteArray | _data |
The data of the element. | |
Represents a single element within a Image
.