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

Extension to the Channel class to implement an digital (DMR) channel. More...

#include <channel.hh>

Inheritance diagram for DigitalChannel:
Channel

Public Types

enum  Admit { AdmitNone, AdmitFree, AdmitColorCode }
 Possible admit criteria of digital channels. More...
 
enum  TimeSlot { TimeSlot1, TimeSlot2 }
 Possible timeslots for digital channels. More...
 
- Public Types inherited from Channel
enum  Power {
  MaxPower, HighPower, MidPower, LowPower,
  MinPower
}
 Possible power settings. More...
 

Public Member Functions

 DigitalChannel (const QString &name, double rxFreq, double txFreq, Power power, uint txTimeout, bool rxOnly, Admit admit, uint colorCode, TimeSlot timeslot, RXGroupList *rxGroup, DigitalContact *txContact, PositioningSystem *posSystem, ScanList *list, RoamingZone *roaming, QObject *parent=nullptr)
 Constructs a new digital (DMR) channel. More...
 
Admit admit () const
 Returns the admit criterion for the channel.
 
void setAdmit (Admit admit)
 (Re-)Sets the admit criterion for the channel.
 
uint colorCode () const
 Returns the color code for the channel.
 
bool setColorCode (uint cc)
 (Re-)Sets the color code for the channel.
 
TimeSlot timeslot () const
 Returns the time slot for the channel.
 
bool setTimeSlot (TimeSlot ts)
 (Re-)Sets the time slot for the channel.
 
RXGroupListrxGroupList () const
 Retruns the RX group list for the channel.
 
bool setRXGroupList (RXGroupList *rxg)
 (Re-)Sets the RX group list for the channel.
 
DigitalContacttxContact () const
 Returns the default TX contact to call on this channel.
 
bool setTXContact (DigitalContact *c)
 (Re-) Sets the default TX contact for this channel.
 
PositioningSystemposSystem () const
 Returns the GPS system associated with this channel or nullptr if not set.
 
bool setPosSystem (PositioningSystem *sys)
 Associates the GPS System with this channel.
 
RoamingZoneroaming () const
 Returns the roaming zone associated with this channel or nullptr if not set.
 
bool setRoaming (RoamingZone *zone)
 Associates the given roaming zone with this channel.
 
- 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 onRxGroupDeleted ()
 Internal callback if RX group list is deleted.
 
void onTxContactDeleted ()
 Internal callback if TX contact is deleted.
 
void onPosSystemDeleted ()
 Internal callback if GPS system is deleted.
 
void onRoamingZoneDeleted ()
 Internal callback if roaming zone is deleted.
 
- Protected Slots inherited from Channel
void onScanListDeleted (QObject *obj)
 Internal hander for deleted scan lists.
 

Protected Attributes

Admit _admit
 The admit criterion.
 
uint _colorCode
 The channel color code.
 
TimeSlot _timeSlot
 The time slot for the channel.
 
RXGroupList_rxGroup
 The RX group list for this channel.
 
DigitalContact_txContact
 The default TX contact.
 
PositioningSystem_posSystem
 The GPS system.
 
RoamingZone_roaming
 Roaming zone for the channel.
 
- 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 digital (DMR) channel.

That is, the admit criterion, color code, time slot, RX group list and TX contact.

Member Enumeration Documentation

◆ Admit

Possible admit criteria of digital channels.

Enumerator
AdmitNone 

No admit criteria, allows to transmit any time.

AdmitFree 

Transmit only if channel is free.

AdmitColorCode 

Transmit only if channel is free and matches given color code.

◆ TimeSlot

Possible timeslots for digital channels.

Enumerator
TimeSlot1 

Time/repeater slot 1.

TimeSlot2 

Time/repeater slot 2.

Constructor & Destructor Documentation

◆ DigitalChannel()

DigitalChannel::DigitalChannel ( const QString &  name,
double  rxFreq,
double  txFreq,
Power  power,
uint  txTimeout,
bool  rxOnly,
Admit  admit,
uint  colorCode,
TimeSlot  timeslot,
RXGroupList rxGroup,
DigitalContact txContact,
PositioningSystem posSystem,
ScanList list,
RoamingZone roaming,
QObject *  parent = nullptr 
)

Constructs a new digital (DMR) 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.
colorCodeSpecifies the colorcode [1,15].
timeslotSpecifies the time-slot.
rxGroupSpecifies the RX group list for the channel.
txContactSpecifies the default TX contact to call on this channel.
posSystemSpecifies the positioning system to use on this channel.
listSpecifies the default scanlist for the channel.
roamingSpecified the roaming zone for the channel.
parentSpecified the QObject parent object.

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