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

This class represents a GPS signalling system within the codeplug. More...

#include <gpssystem.hh>

Inheritance diagram for GPSSystem:
PositioningSystem

Public Member Functions

 GPSSystem (const QString &name, DigitalContact *contact=nullptr, DigitalChannel *revertChannel=nullptr, uint period=300, QObject *parent=nullptr)
 Constructor. More...
 
bool hasContact () const
 Returns true if a contact is set for the GPS system.
 
DigitalContactcontact () const
 Returns the destination contact for the GPS information or nullptr if not set.
 
void setContact (DigitalContact *contact)
 Sets the destination contact for the GPS information.
 
bool hasRevertChannel () const
 Returns true if the GPS system has a revert channel set. More...
 
DigitalChannelrevertChannel () const
 Returns the revert channel for the GPS information or nullptr if not set.
 
void setRevertChannel (DigitalChannel *channel)
 Sets the revert channel for the GPS information to be send on.
 
- Public Member Functions inherited from PositioningSystem
virtual ~PositioningSystem ()
 Destructor.
 
template<class System >
bool is () const
 Returns true if this positioning system is an instance of the specified system.
 
template<class System >
System * as ()
 Casts this positioning system to an instance of the specified system.
 
template<class System >
const System * as () const
 Casts this positioning system to an instance of the specified system.
 
const QString & name () const
 Returns the name of the GPS system.
 
void setName (const QString &name)
 Sets the name of the GPS system.
 
uint period () const
 Returns the update period in seconds.
 
void setPeriod (uint period)
 Sets the update period in seconds.
 

Protected Slots

void onContactDeleted ()
 Internal used callback to get notified if the destination contact is deleted.
 
void onRevertChannelDeleted ()
 Internal used callback to get notified if the revert channel is deleted.
 

Protected Attributes

DigitalContact_contact
 Holds the destination contact for the GPS information.
 
DigitalChannel_revertChannel
 Holds the revert channel on which the GPS information is send on.
 
- Protected Attributes inherited from PositioningSystem
QString _name
 Holds the name of the GPS system.
 
uint _period
 Holds the update period in seconds.
 

Additional Inherited Members

- Signals inherited from PositioningSystem
void modified ()
 Gets emitted if the GPS system is modified.
 
- Protected Member Functions inherited from PositioningSystem
 PositioningSystem (const QString &name, uint period=300, QObject *parent=nullptr)
 Hidden constructor. More...
 

Detailed Description

This class represents a GPS signalling system within the codeplug.

Constructor & Destructor Documentation

◆ GPSSystem()

GPSSystem::GPSSystem ( const QString &  name,
DigitalContact contact = nullptr,
DigitalChannel revertChannel = nullptr,
uint  period = 300,
QObject *  parent = nullptr 
)

Constructor.

Please note, that a contact needs to be set in order for the GPS system to work properly.

Parameters
nameSpecifies the name of the GPS system.
contactSpecifies the contact, the GPS position is send to.
revertChannelSpecifies the channel on which the GPS is send on. If nullptr, the GPS data is send on the current channel.
periodSpecifies the update period in seconds.
parentSpecifies the QObject parent object.

Member Function Documentation

◆ hasRevertChannel()

bool GPSSystem::hasRevertChannel ( ) const

Returns true if the GPS system has a revert channel set.

If not, the GPS information will be send on the current channel.


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