10#ifndef __ANYTONE_RADIO_HH__
11#define __ANYTONE_RADIO_HH__
14#include "anytone_interface.hh"
15#include "anytone_codeplug.hh"
16#include "anytone_satelliteconfig.hh"
46 const QString &
name()
const;
61 bool startUploadSatelliteConfig(
70 virtual bool download();
72 virtual bool upload();
75 virtual bool uploadCallsigns();
78 virtual bool uploadSatellites();
Base class interface for all Anytone radio codeplugs.
Definition anytone_codeplug.hh:22
Implements the interface to Anytone D868UV, D878UV, etc radios.
Definition anytone_interface.hh:15
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 anytone_radio.cc:105
Codeplug::Flags _codeplugFlags
If true, the codeplug on the radio gets updated upon upload.
Definition anytone_radio.hh:87
AnytoneSatelliteConfig * _satellites
The actual binary callsign database representation.
Definition anytone_radio.hh:97
AnytoneRadio(const QString &name, AnytoneInterface *device=nullptr, QObject *parent=nullptr)
Do not construct this class directly.
Definition anytone_radio.cc:12
void run()
Thread main routine, performs all blocking IO operations for codeplug up- and download.
Definition anytone_radio.cc:150
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 anytone_radio.cc:71
Config * _config
Owns the generic configuration.
Definition anytone_radio.hh:89
UserDatabase * _userDB
A weak reference to the user-database.
Definition anytone_radio.hh:91
AnytoneCodeplug * _codeplug
The actual binary codeplug representation.
Definition anytone_radio.hh:93
const QString & name() const
Returns the name of the radio (e.g., device identifier).
Definition anytone_radio.cc:35
CallsignDB * _callsigns
The actual binary callsign database representation.
Definition anytone_radio.hh:95
AnytoneInterface * _dev
The interface to the radio.
Definition anytone_radio.hh:84
const Codeplug & codeplug() const
Returns the codeplug instance.
Definition anytone_radio.cc:40
bool startDownload(const TransferFlags &flags, const ErrorStack &err=ErrorStack())
Starts the download of the codeplug and derives the generic configuration from it.
Definition anytone_radio.cc:50
virtual ~AnytoneRadio()
Destructor.
Definition anytone_radio.cc:23
QString _name
The device identifier.
Definition anytone_radio.hh:82
Implementation of satellite configuration for all AnyTone devices.
Definition anytone_satelliteconfig.hh:19
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition callsigndb.hh:22
Abstract base class of all callsign database implementations.
Definition callsigndb.hh:16
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
Radio(QObject *parent=nullptr)
Default constructor.
Definition radio.cc:33
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