LibDMRConf
0.6.0
A library to program DMR radios.
|
This class represents a GPS signalling system within the codeplug. More...
#include <gpssystem.hh>
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. | |
DigitalContact * | contact () 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... | |
DigitalChannel * | revertChannel () 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... | |
This class represents a GPS signalling system within the codeplug.
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.
name | Specifies the name of the GPS system. |
contact | Specifies the contact, the GPS position is send to. |
revertChannel | Specifies the channel on which the GPS is send on. If nullptr , the GPS data is send on the current channel. |
period | Specifies the update period in seconds. |
parent | Specifies the QObject parent object. |
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.