libdrmconf
0.12.0
A library to program DMR radios.
|
Provides some information about a radio model. More...
#include <radioinfo.hh>
Public Types | |
enum | Radio { OpenGD77 , OpenRTX , RD5R , GD73 , GD77 , MD390 , MD380 = MD390 , RT8 = MD390 , UV390 , UV380 = UV390 , RT3S = UV390 , MD2017 , RT82 = MD2017 , D868UVE , D868UV = D868UVE , DMR6X2UV , D878UV , D878UVII , D578UV , DM1701 , RT84 = DM1701 , DR1801UV } |
Known radios. | |
Public Member Functions | |
RadioInfo (Radio radio, const QString &name, const QString manufacturer, const USBDeviceInfo &interface, const QList< RadioInfo > &alias=QList< RadioInfo >()) | |
Use static methods the access radio info or call Radio::defaultRadioInfo . | |
RadioInfo (Radio radio, const QString &key, const QString &name, const QString manufacturer, const USBDeviceInfo &interface, const QList< RadioInfo > &alias=QList< RadioInfo >()) | |
Use static methods the access radio info or call Radio::defaultRadioInfo . | |
RadioInfo () | |
Empty constructor. | |
bool | isValid () const |
Returns true if the info is valid. | |
const QString & | key () const |
Returns the radio key (used to identify radios in the command line). | |
const QString & | name () const |
Returns the radio name. | |
const QString & | manufacturer () const |
Returns the manufacturer name. | |
const USBDeviceInfo & | interface () const |
Returns some information about the interface to the radio. | |
bool | hasAlias () const |
Returns true if the radio has aliases. More... | |
const QList< RadioInfo > & | alias () const |
Returns the list of alias radios. | |
Radio | id () const |
Returns the unique device ID (alias radios share ID). | |
Static Public Member Functions | |
static bool | hasRadioKey (const QString &key) |
Returns true if the given key is known. | |
static RadioInfo | byKey (const QString &key) |
Returns the radio info by key. | |
static RadioInfo | byID (Radio radio) |
Returns the radio info by id. | |
static QList< RadioInfo > | allRadios (bool flat=true) |
Returns the list of all known radios. | |
static QList< RadioInfo > | allRadios (const USBDeviceInfo &interface, bool flat=true) |
Returns a list of all known radios for the specified interface. | |
Protected Attributes | |
Radio | _radio |
Holds the radio id. | |
QString | _key |
Holds the key of the radio. | |
QString | _name |
Holds the name of the radio. | |
QString | _manufacturer |
Holds the name of the manufacturer. | |
QList< RadioInfo > | _alias |
Holds possible identical radios from other manufacturers. | |
USBDeviceInfo | _interface |
Holds some information about the interface to the radio. | |
Static Protected Attributes | |
static QHash< QString, Radio > | _radiosByName |
Key->ID map. More... | |
static QHash< unsigned, RadioInfo > | _radiosById |
ID->Info map. More... | |
Provides some information about a radio model.
This class is used to unify radio enumeration and detection.
bool RadioInfo::hasAlias | ( | ) | const |
Returns true
if the radio has aliases.
That is other radios that are identical.
|
staticprotected |
ID->Info map.
|
staticprotected |
Key->ID map.