libdrmconf 0.13.3
A library to program DMR radios.
Loading...
Searching...
No Matches
radioddity_radio.hh
1
5#ifndef RADIODDITY_RADIO_HH
6#define RADIODDITY_RADIO_HH
7
8#include "radio.hh"
9#include "radioddity_interface.hh"
10
15{
16 Q_OBJECT
17
18public:
20 explicit RadioddityRadio(RadioddityInterface *device=nullptr, QObject *parent=nullptr);
21
22 virtual ~RadioddityRadio();
23
24public slots:
26 bool startDownload(const TransferFlags &flags, const ErrorStack &err=ErrorStack());
29 bool startUpload(Config *config, const Codeplug::Flags &flags = Codeplug::Flags(), const ErrorStack &err=ErrorStack());
32
33 bool startUploadSatelliteConfig(SatelliteDatabase *db, const TransferFlags &flags, const ErrorStack &err);
34
35protected:
37 void run();
38
39private:
40 virtual bool download();
41 virtual bool upload();
42 virtual bool uploadCallsigns();
43
44protected:
53};
54
55#endif // RADIODDITY_RADIO_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
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
Radio(QObject *parent=nullptr)
Default constructor.
Definition radio.cc:33
Implements a radio interface for radios using the HID USB schema (i.e.
Definition radioddity_interface.hh:18
Codeplug::Flags _codeplugFlags
Holds the flags to control assembly and upload of code-plugs.
Definition radioddity_radio.hh:48
Config * _config
The generic configuration.
Definition radioddity_radio.hh:50
RadioddityRadio(RadioddityInterface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly, rather use Radio::detect.
Definition radioddity_radio.cc:9
void run()
Thread main routine, performs all blocking IO operations for codeplug up- and download.
Definition radioddity_radio.cc:90
UserDatabase * _userDB
A weak reference to the user-database.
Definition radioddity_radio.hh:52
RadioddityInterface * _dev
The interface to the radio.
Definition radioddity_radio.hh:46
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 radioddity_radio.cc:45
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 radioddity_radio.cc:69
bool startDownload(const TransferFlags &flags, const ErrorStack &err=ErrorStack())
Starts the download of the codeplug and derives the generic configuration from it.
Definition radioddity_radio.cc:28
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