libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
tyt_radio.hh
1
5#ifndef TYT_RADIO_HH
6#define TYT_RADIO_HH
7
8#include "radio.hh"
9#include "tyt_interface.hh"
10
14class TyTRadio: public Radio
15{
16 Q_OBJECT
17
18public:
20 explicit TyTRadio(TyTInterface *device=nullptr, QObject *parent=nullptr);
21
22 virtual ~TyTRadio();
23
24public slots:
26 bool startDownload(bool blocking=false, const ErrorStack &err=ErrorStack());
29 bool startUpload(Config *config, bool blocking=false,
30 const Codeplug::Flags &flags = Codeplug::Flags(),
31 const ErrorStack &err=ErrorStack());
33 bool startUploadCallsignDB(UserDatabase *db, bool blocking=false,
35 const ErrorStack &err=ErrorStack());
36
37protected:
39 void run();
40
41private:
42 virtual bool download();
43 virtual bool upload();
44 virtual bool uploadCallsigns();
45
46protected:
55};
56
57#endif // UV390_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
Base class for all Radio objects.
Definition radio.hh:32
Interface to TyT (and Retevis) devices.
Definition tyt_interface.hh:64
Implements an USB interface to TYT & Retevis radios.
Definition tyt_radio.hh:15
void run()
Thread main routine, performs all blocking IO operations for codeplug up- and download.
Definition tyt_radio.cc:95
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 tyt_radio.cc:47
TyTInterface * _dev
The interface to the radio.
Definition tyt_radio.hh:48
TyTRadio(TyTInterface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly, rather use Radio::detect.
Definition tyt_radio.cc:9
bool startDownload(bool blocking=false, const ErrorStack &err=ErrorStack())
Starts the download of the codeplug and derives the generic configuration from it.
Definition tyt_radio.cc:30
Config * _config
The generic configuration.
Definition tyt_radio.hh:52
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 tyt_radio.cc:71
UserDatabase * _userDB
A weak reference to the user-database.
Definition tyt_radio.hh:54
Codeplug::Flags _codeplugFlags
Holds the flags to control assembly and upload of code-plugs.
Definition tyt_radio.hh:50
Auto-updating DMR user database.
Definition userdatabase.hh:23