LibDMRConf
0.6.0
A library to program DMR radios.
|
Extension to the Channel
class to implement an analog channel.
More...
#include <channel.hh>
Public Types | |
enum | Admit { AdmitNone, AdmitFree, AdmitTone } |
Admit criteria of analog channel. More... | |
enum | Bandwidth { BWNarrow, BWWide } |
Possible bandwidth of an analog channel. More... | |
Public Types inherited from Channel | |
enum | Power { MaxPower, HighPower, MidPower, LowPower, MinPower } |
Possible power settings. More... | |
Public Member Functions | |
AnalogChannel (const QString &name, double rxFreq, double txFreq, Power power, uint txTimeout, bool rxOnly, Admit admit, uint squelch, Signaling::Code rxTone, Signaling::Code txTone, Bandwidth bw, ScanList *list, APRSSystem *aprsSys=nullptr, QObject *parent=nullptr) | |
Constructs a new analog channel. More... | |
Admit | admit () const |
Returns the admit criterion for the analog channel. | |
void | setAdmit (Admit admit) |
(Re-)Sets the admit criterion for the analog channel. | |
uint | squelch () const |
Returns the squelch level [0,10]. | |
bool | setSquelch (uint squelch) |
(Re-)Sets the squelch level [0,10]. More... | |
Signaling::Code | rxTone () const |
Returns the CTCSS/DCS RX tone, SIGNALING_NONE means disabled. | |
bool | setRXTone (Signaling::Code code) |
(Re-)Sets the CTCSS/DCS RX tone, SIGNALING_NONE disables the RX tone. | |
Signaling::Code | txTone () const |
Returns the CTCSS/DCS TX tone, SIGNALING_NONE means disabled. | |
bool | setTXTone (Signaling::Code code) |
(Re-)Sets the CTCSS/DCS TX tone, SIGNALING_NONE disables the TX tone. | |
Bandwidth | bandwidth () const |
Returns the bandwidth of the analog channel. | |
bool | setBandwidth (Bandwidth bw) |
(Re-)Sets the bandwidth of the analog channel. | |
APRSSystem * | aprsSystem () const |
Returns the APRS system used for this channel or nullptr if disabled. | |
void | setAPRSSystem (APRSSystem *sys) |
Sets the APRS system. | |
Public Member Functions inherited from Channel | |
template<class T > | |
bool | is () const |
Returns true if the channel is of type T . More... | |
template<class T > | |
T * | as () |
Dynamic cast of channels. More... | |
template<class T > | |
const T * | as () const |
Dynamic cast of channels. More... | |
const QString & | name () const |
Returns the name of the channel. | |
bool | setName (const QString &name) |
(Re-)Sets the name of the channel. | |
double | rxFrequency () const |
Returns the RX frequency of the channel in MHz. | |
bool | setRXFrequency (double freq) |
(Re-)Sets the RX frequency of the channel in MHz. | |
double | txFrequency () const |
Returns the TX frequency of the channel in MHz. | |
bool | setTXFrequency (double freq) |
(Re-)Sets the TX frequency of the channel in MHz. | |
Power | power () const |
Returns the power setting of the channel. | |
void | setPower (Power power) |
(Re-)Sets the power setting of the channel. | |
uint | txTimeout () const |
Returns the TX timeout (TOT) in seconds. | |
bool | setTimeout (uint dur) |
(Re-)Sets the TX timeout (TOT) in seconds. | |
bool | rxOnly () const |
Returns true , if the channel is RX only. | |
bool | setRXOnly (bool enable) |
Set, whether the channel is RX only. | |
ScanList * | scanList () const |
Returns the default scan list for the channel. | |
bool | setScanList (ScanList *list) |
(Re-) Sets the default scan list for the channel. | |
Protected Slots | |
void | onAPRSSystemDeleted () |
Internal call-back that gets called if the associated APRS gets deleted. | |
Protected Slots inherited from Channel | |
void | onScanListDeleted (QObject *obj) |
Internal hander for deleted scan lists. | |
Protected Attributes | |
Admit | _admit |
Holds the admit criterion. | |
uint | _squelch |
Holds the squelch level [0,10]. | |
Signaling::Code | _rxTone |
The RX CTCSS tone. | |
Signaling::Code | _txTone |
The TX CTCSS tone. | |
Bandwidth | _bw |
The channel bandwidth. | |
APRSSystem * | _aprsSystem |
A reference to the APRS system used on the channel or nullptr if disabled. | |
Protected Attributes inherited from Channel | |
QString | _name |
The channel name. | |
double | _rxFreq |
The RX frequency in MHz. | |
double | _txFreq |
The TX frequency in MHz. | |
Power | _power |
The transmit power setting. | |
uint | _txTimeOut |
Transmit timeout in seconds. | |
bool | _rxOnly |
RX only flag. | |
ScanList * | _scanlist |
Default scan list of the channel. | |
Additional Inherited Members | |
Signals inherited from Channel | |
void | modified () |
Is emitted if the channel gets modified. | |
Protected Member Functions inherited from Channel | |
Channel (const QString &name, double rx, double tx, Power power, uint txTimeout, bool rxOnly, ScanList *scanlist, QObject *parent=nullptr) | |
Hidden constructor. More... | |
Extension to the Channel
class to implement an analog channel.
This class implements all the properties specific to an analog channel. That is, the admit criterion, squelch, RX and TX tones and bandwidth settings.
enum AnalogChannel::Admit |
AnalogChannel::AnalogChannel | ( | const QString & | name, |
double | rxFreq, | ||
double | txFreq, | ||
Power | power, | ||
uint | txTimeout, | ||
bool | rxOnly, | ||
Admit | admit, | ||
uint | squelch, | ||
Signaling::Code | rxTone, | ||
Signaling::Code | txTone, | ||
Bandwidth | bw, | ||
ScanList * | list, | ||
APRSSystem * | aprsSys = nullptr , |
||
QObject * | parent = nullptr |
||
) |
Constructs a new analog channel.
name | Specifies the name of the channel. |
rxFreq | Sepcifies the RX freqeuncy in MHz. |
txFreq | Specifies the TX frequency in MHz. |
power | Specifies the power setting for the channel. |
txTimeout | Specifies the transmit timeout in seconds (TOT). |
rxOnly | Specifies whether the channel is RX only. |
admit | Specifies the admit criterion. |
squelch | Specifies the squelch level [0,10]. |
rxTone | Specifies CTCSS/DCS RX tone/code. |
txTone | Specifies CTCSS/DCS TX tone/code. |
bw | Specifies the bandwidth. |
list | Specifies the default scanlist for the channel. |
aprsSys | Specifies the APRS system for the channel. |
parent | Specified the QObject parent object. |
bool AnalogChannel::setSquelch | ( | uint | squelch | ) |
(Re-)Sets the squelch level [0,10].
0 Disables squelch (on some radios).