LibDMRConf  0.6.0
A library to program DMR radios.
Public Types | Public Member Functions | Protected Slots | Protected Attributes | List of all members
AnalogChannel Class Reference

Extension to the Channel class to implement an analog channel. More...

#include <channel.hh>

Inheritance diagram for AnalogChannel:
Channel

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.
 
APRSSystemaprsSystem () 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.
 
ScanListscanList () 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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ Admit

Admit criteria of analog channel.

Enumerator
AdmitNone 

Allow always.

AdmitFree 

Allow when channel free.

AdmitTone 

Allow when admit tone is present.

◆ Bandwidth

Possible bandwidth of an analog channel.

Enumerator
BWNarrow 

Narrow bandwidth (12.5kHz).

BWWide 

Wide bandwidth (25kHz).

Constructor & Destructor Documentation

◆ AnalogChannel()

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.

Parameters
nameSpecifies the name of the channel.
rxFreqSepcifies the RX freqeuncy in MHz.
txFreqSpecifies the TX frequency in MHz.
powerSpecifies the power setting for the channel.
txTimeoutSpecifies the transmit timeout in seconds (TOT).
rxOnlySpecifies whether the channel is RX only.
admitSpecifies the admit criterion.
squelchSpecifies the squelch level [0,10].
rxToneSpecifies CTCSS/DCS RX tone/code.
txToneSpecifies CTCSS/DCS TX tone/code.
bwSpecifies the bandwidth.
listSpecifies the default scanlist for the channel.
aprsSysSpecifies the APRS system for the channel.
parentSpecified the QObject parent object.

Member Function Documentation

◆ setSquelch()

bool AnalogChannel::setSquelch ( uint  squelch)

(Re-)Sets the squelch level [0,10].

0 Disables squelch (on some radios).


The documentation for this class was generated from the following files: