libdrmconf 0.14.1
A library to program DMR radios.
Loading...
Searching...
No Matches
gd73.hh
1
8
9#ifndef GD73_HH
10#define GD73_HH
11
12#include "radio.hh"
13#include "gd73_interface.hh"
14#include "gd73_codeplug.hh"
15
16
17
21class GD73 : public Radio
22{
23 Q_OBJECT
24
25public:
27 explicit GD73(GD73Interface *device=nullptr, QObject *parent=nullptr);
28
29 const QString &name() const;
30 const RadioLimits &limits() const;
31 const Codeplug &codeplug() const;
33
37
38public slots:
40 bool startDownload(const TransferFlags &flags, const ErrorStack &err=ErrorStack());
41
44 bool startUpload(Config *config, const Codeplug::Flags &flags = Codeplug::Flags(),
45 const ErrorStack &err=ErrorStack());
46
49 const ErrorStack &err=ErrorStack());
50
51 bool startUploadSatelliteConfig(SatelliteDatabase *db, const TransferFlags &flags, const ErrorStack &err);
52
53protected:
55 void run();
56
57private:
58 virtual bool download();
59 virtual bool upload();
60 virtual bool uploadCallsigns();
61
62protected:
64 QString _name;
65
72
75
76private:
78 static RadioLimits *_limits;
79};
80
81#endif // GD77_HH
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition callsigndb.hh:22
Certain flags passed to CodePlug::encode to control the transfer and encoding of the codeplug.
Definition codeplug.hh:24
This class defines the interface all device-specific code-plugs must implement.
Definition codeplug.hh:18
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:43
Represents, encodes and decodes the device specific codeplug for a Radioddity GD-73.
Definition gd73_codeplug.hh:53
Implements the communication interface to the GD-73.
Definition gd73_interface.hh:10
GD73Codeplug _codeplug
The codeplug.
Definition gd73.hh:74
void run()
Thread main routine, performs all blocking IO operations for codeplug up- and download.
Definition gd73.cc:107
static RadioInfo defaultRadioInfo()
Returns the default radio information.
Definition gd73.cc:44
bool startUploadCallsignDB(UserDatabase *db, const CallsignDB::Flags &selection=CallsignDB::Flags(), const ErrorStack &err=ErrorStack())
Encodes the given user-database and uploads it to the device.
Definition gd73.cc:87
Config * _config
The generic configuration.
Definition gd73.hh:71
const RadioLimits & limits() const
Returns the limits for this radio.
Definition gd73.cc:27
GD73(GD73Interface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly, rather use Radio::detect.
Definition gd73.cc:13
const QString & name() const
Returns the name of the radio (e.g., device identifier).
Definition gd73.cc:22
QString _name
The device identifier.
Definition gd73.hh:64
bool startDownload(const TransferFlags &flags, const ErrorStack &err=ErrorStack())
Starts the download of the codeplug and derives the generic configuration from it.
Definition gd73.cc:50
bool startUpload(Config *config, 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 gd73.cc:67
const Codeplug & codeplug() const
Returns the codeplug instance.
Definition gd73.cc:34
GD73Interface * _dev
The interface to the radio.
Definition gd73.hh:67
Codeplug::Flags _codeplugFlags
Holds the flags to control assembly and upload of code-plugs.
Definition gd73.hh:69
Provides some information about a radio model.
Definition radioinfo.hh:16
Represents the limits or the entire codeplug.
Definition radiolimits.hh:755
Radio(QObject *parent=nullptr)
Default constructor.
Definition radio.cc:35
A table holding all known satellites.
Definition satellitedatabase.hh:108
Controls the transfer of codeplugs, callsign DBs etc to the device.
Definition transferflags.hh:7
Auto-updating DMR user database.
Definition userdatabase.hh:24