libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
opengd77base.hh
1
5#ifndef OPENGD77BASE_HH
6#define OPENGD77BASE_HH
7
8#include "radio.hh"
9#include "opengd77_interface.hh"
10
11
15class OpenGD77Base : public Radio
16{
17 Q_OBJECT
18
19public:
21 explicit OpenGD77Base(OpenGD77Interface *device=nullptr, QObject *parent=nullptr);
22 virtual ~OpenGD77Base();
23
24 const RadioLimits &limits() const;
25
29
30public slots:
32 bool startDownload(bool blocking=false, const ErrorStack &err=ErrorStack());
35 bool startUpload(Config *config, bool blocking=false,
36 const Codeplug::Flags &flags = Codeplug::Flags(), const ErrorStack &err=ErrorStack());
38 bool startUploadCallsignDB(UserDatabase *db, bool blocking=false,
39 const CallsignDB::Selection &selection=CallsignDB::Selection(), const ErrorStack &err=ErrorStack());
40
41protected:
43 void run();
44
46 bool download();
48 bool upload();
50 bool uploadCallsigns();
51
52protected:
57
58private:
60 static RadioLimits *_limits;
61};
62
63#endif // OPENGD77BASE_HH
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition callsigndb.hh:20
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:26
The config class, representing the codeplug configuration.
Definition config.hh:70
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:41
Implements an common USB interface to Open GD-77(S) type devices.
Definition opengd77base.hh:16
bool startUpload(Config *config, bool blocking=false, const Codeplug::Flags &flags=Codeplug::Flags(), const ErrorStack &err=ErrorStack())
Derives the device-specific codeplug from the generic configuration and uploads that codeplug to the ...
Definition opengd77base.cc:65
Config * _config
The generic configuration.
Definition opengd77base.hh:56
const RadioLimits & limits() const
Returns the limits for this radio.
Definition opengd77base.cc:33
OpenGD77Base(OpenGD77Interface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly, rather use Radio::detect.
Definition opengd77base.cc:12
void run()
Thread main routine, performs all blocking IO operations for codeplug up- and download.
Definition opengd77base.cc:132
bool download()
Implements the actual download process.
Definition opengd77base.cc:199
bool startUploadCallsignDB(UserDatabase *db, bool blocking=false, const CallsignDB::Selection &selection=CallsignDB::Selection(), const ErrorStack &err=ErrorStack())
Encodes the given user-database and uploades it to the device.
Definition opengd77base.cc:102
bool startDownload(bool blocking=false, const ErrorStack &err=ErrorStack())
Starts the download of the codeplug and derives the generic configuration from it.
Definition opengd77base.cc:41
bool upload()
Implements the actual codeplug upload process.
Definition opengd77base.cc:249
OpenGD77Interface * _dev
The interface to the radio.
Definition opengd77base.hh:54
bool uploadCallsigns()
Implements the actual callsign DB upload process.
Definition opengd77base.cc:326
static RadioInfo defaultRadioInfo()
Returns the default radio information.
Implements the interfact to a radio running the Open GD77 firmware.
Definition opengd77_interface.hh:155
Provides some information about a radio model.
Definition radioinfo.hh:16
Represents the limits or the entire codeplug.
Definition radiolimits.hh:684
Base class for all Radio objects.
Definition radio.hh:32
Auto-updating DMR user database.
Definition userdatabase.hh:23