libdrmconf  0.10.4
A library to program DMR radios.
gd77.hh
1 
9 #ifndef GD77_HH
10 #define GD77_HH
11 
12 #include "radioddity_radio.hh"
13 #include "radioddity_interface.hh"
14 #include "gd77_codeplug.hh"
15 #include "gd77_callsigndb.hh"
16 
17 
21 class GD77 : public RadioddityRadio
22 {
23  Q_OBJECT
24 
25 public:
27  explicit GD77(RadioddityInterface *device=nullptr, QObject *parent=nullptr);
28 
29  const QString &name() const;
30  const RadioLimits &limits() const;
31  const Codeplug &codeplug() const;
32  Codeplug &codeplug();
33 
36  static RadioInfo defaultRadioInfo();
37 
38 public slots:
40  bool startUploadCallsignDB(UserDatabase *db, bool blocking=false,
42  const ErrorStack &err=ErrorStack());
43 
44 protected:
46  bool uploadCallsigns();
47 
48 protected:
50  QString _name;
55 
56 private:
58  static RadioLimits *_limits;
59 };
60 
61 #endif // GD77_HH
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition: callsigndb.hh:20
This class defines the interface all device-specific code-plugs must implement.
Definition: codeplug.hh:18
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Represents and encodes the binary format for the call-sign database within the radio.
Definition: gd77_callsigndb.hh:25
Represents, encodes and decodes the device specific codeplug for a Radioddity GD-77.
Definition: gd77_codeplug.hh:64
Implements an USB interface to the Radioddity GD-77(S) VHF/UHF 5W DMR (Tier I&II) radios.
Definition: gd77.hh:22
GD77Codeplug _codeplug
The codeplug.
Definition: gd77.hh:52
QString _name
The device identifier.
Definition: gd77.hh:50
const Codeplug & codeplug() const
Returns the codeplug instance.
Definition: gd77.cc:32
const RadioLimits & limits() const
Returns the limits for this radio.
Definition: gd77.cc:25
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: gd77.cc:49
bool uploadCallsigns()
Implements the actual callsign DB upload process.
Definition: gd77.cc:80
GD77(RadioddityInterface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly, rather use Radio::detect.
Definition: gd77.cc:13
static RadioInfo defaultRadioInfo()
Returns the default radio information.
Definition: gd77.cc:42
const QString & name() const
Returns the name of the radio (e.g., device identifier).
Definition: gd77.cc:20
GD77CallsignDB _callsigns
The actual binary callsign DB representation.
Definition: gd77.hh:54
Provides some information about a radio model.
Definition: radioinfo.hh:16
Represents the limits or the entire codeplug.
Definition: radiolimits.hh:678
Implements a radio interface for radios using the HID USB schema (i.e.
Definition: radioddity_interface.hh:18
Base class for all Radioddity radios.
Definition: radioddity_radio.hh:15
Auto-updating DMR user database.
Definition: userdatabase.hh:23