libdrmconf
0.15.1
A library to program DMR radios.
Toggle main menu visibility
Loading...
Searching...
No Matches
anytone_filereader.hh
1
#ifndef ANYTONEFILEREADER_HH
2
#define ANYTONEFILEREADER_HH
3
4
#include <QFile>
5
#include "config.hh"
6
7
11
class
AnytoneFileReader
12
{
13
public
:
15
class
Element
16
{
17
protected
:
19
Element
(
const
uint8_t *ptr);
20
21
public
:
23
virtual
~Element
();
25
virtual
size_t
size
()
const
= 0;
26
27
protected
:
29
const
uint8_t *
_data
;
30
};
31
32
protected
:
34
AnytoneFileReader
(
Config
*config,
const
uint8_t *data,
size_t
size, QString &message);
35
36
public
:
38
virtual
~AnytoneFileReader
();
39
40
protected
:
42
virtual
bool
read
();
43
45
virtual
bool
readHeader
() = 0;
47
virtual
bool
linkHeader
() = 0;
49
virtual
bool
readChannels
() = 0;
51
virtual
bool
linkChannels
() = 0;
53
virtual
bool
readRadioIDs
() = 0;
55
virtual
bool
linkRadioIDs
() = 0;
57
virtual
bool
readZones
() = 0;
59
virtual
bool
linkZones
() = 0;
61
virtual
bool
readScanLists
() = 0;
63
virtual
bool
linkScanLists
() = 0;
65
virtual
bool
readAnalogContacts
() = 0;
67
virtual
bool
linkAnalogContacts
() = 0;
68
69
public
:
71
static
bool
read
(
const
QString &filename,
Config
*config, QString &message);
72
73
protected
:
75
const
uint8_t *
const
_start
;
77
const
uint8_t *
_data
;
79
size_t
_size
;
81
QString &
_message
;
82
};
83
84
#endif
// ANYTONEFILEREADER_HH
AnytoneFileReader::Element::size
virtual size_t size() const =0
Returns the storage size of the element.
AnytoneFileReader::Element::~Element
virtual ~Element()
Destructor.
Definition
anytone_filereader.cc:28
AnytoneFileReader::Element::_data
const uint8_t * _data
Pointer to the actual element.
Definition
anytone_filereader.hh:29
AnytoneFileReader::Element::Element
Element(const uint8_t *ptr)
Hidden constructor.
Definition
anytone_filereader.cc:22
AnytoneFileReader::~AnytoneFileReader
virtual ~AnytoneFileReader()
Destructor.
Definition
anytone_filereader.cc:42
AnytoneFileReader::_message
QString & _message
Error message.
Definition
anytone_filereader.hh:81
AnytoneFileReader::readHeader
virtual bool readHeader()=0
Read header of file.
AnytoneFileReader::readAnalogContacts
virtual bool readAnalogContacts()=0
Read all DTMF contacts.
AnytoneFileReader::_data
const uint8_t * _data
Pointer to the entire data.
Definition
anytone_filereader.hh:77
AnytoneFileReader::readRadioIDs
virtual bool readRadioIDs()=0
Read all radio IDs.
AnytoneFileReader::linkAnalogContacts
virtual bool linkAnalogContacts()=0
Link elements.
AnytoneFileReader::linkScanLists
virtual bool linkScanLists()=0
Link elements.
AnytoneFileReader::read
virtual bool read()
Read all elements.
Definition
anytone_filereader.cc:47
AnytoneFileReader::readChannels
virtual bool readChannels()=0
Read all channels.
AnytoneFileReader::readZones
virtual bool readZones()=0
Read all zones.
AnytoneFileReader::linkChannels
virtual bool linkChannels()=0
Link elements.
AnytoneFileReader::_size
size_t _size
Size of the entire blob.
Definition
anytone_filereader.hh:79
AnytoneFileReader::linkRadioIDs
virtual bool linkRadioIDs()=0
Link elements.
AnytoneFileReader::AnytoneFileReader
AnytoneFileReader(Config *config, const uint8_t *data, size_t size, QString &message)
Constructs a configuration from the given codeplug file in memory (data, size).
Definition
anytone_filereader.cc:36
AnytoneFileReader::_start
const uint8_t *const _start
Pointer to the start.
Definition
anytone_filereader.hh:75
AnytoneFileReader::linkHeader
virtual bool linkHeader()=0
Link elements.
AnytoneFileReader::linkZones
virtual bool linkZones()=0
Link elements.
AnytoneFileReader::readScanLists
virtual bool readScanLists()=0
Read all scal lists.
Config
The config class, representing the codeplug configuration.
Definition
config.hh:70
lib
anytone_filereader.hh
Generated by
1.17.0