4 #include "configreference.hh"
5 #include <QAbstractTableModel>
6 #include "anytone_extension.hh"
19 Q_CLASSINFO(
"IdPrefix",
"aprs")
74 Q_INVOKABLE
explicit GPSSystem(QObject *parent=
nullptr);
87 QObject *parent =
nullptr);
152 PoliceStation = (
PRIMARY_TABLE | 0), None, Digipeater, Phone, DXCluster, HFGateway, SmallPlane,
153 MobileSatelliteStation, WheelChair, Snowmobile, RedCross, BoyScout, Home, X, RedDot,
154 Circle0, Circle1, Circle2, Circle3, Circle4, Circle5, Circle6, Circle7, Circle8, Circle9,
155 Fire, Campground, Motorcycle, RailEngine, Car, FileServer, HCFuture, AidStation, BBS, Canoe,
157 Logon, MacOS, NTSStation, Balloon, PoliceCar, TBD, RV, Shuttle, SSTV, Bus, ATV, WXService, Helo,
158 Yacht, Windows, Jogger, Triangle, PBBS, LargePlane, WXStation, DishAntenna, Ambulance, Bike,
159 ICP, FireStation, Horse, FireTruck, Glider, Hospital, IOTA, Jeep, SmallTruck, Laptop, MicE,
160 Node, EOC, Rover, Grid, Antenna, PowerBoat, TruckStop, TruckLarge, Van, Water, XAPRS, Yagi,
167 Q_INVOKABLE
explicit APRSSystem(QObject *parent=
nullptr);
185 const QString &
message=
"",
unsigned period=300, QObject *parent=
nullptr);
209 const QString &
source()
const;
213 void setSource(
const QString &call,
unsigned ssid);
216 const QString &
path()
const;
226 const QString &
message()
const;
Parse context for config objects.
Definition: configobject.hh:48
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
List class for config objects.
Definition: configobject.hh:349
Base class of all labeled and named objects.
Definition: configobject.hh:199
QString name
The name of the object.
Definition: configobject.hh:203
The config class, representing the codeplug configuration.
Definition: config.hh:70
Implements a reference to a DMR channel.
Definition: configreference.hh:139
Extension to the DigitalChannel class to implement an DMR channel.
Definition: channel.hh:354
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Implements a reference to a FM channel.
Definition: configreference.hh:151
Extension to the AnalogChannel class to implement an analog FM channel.
Definition: channel.hh:210
This class represents a GPS signalling system within the codeplug.
Definition: gpssystem.hh:64
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition: gpssystem.cc:184
DMRChannel * revertChannel() const
Returns the revert channel for the GPS information or nullptr if not set.
Definition: gpssystem.cc:159
void setContact(DMRContactReference *contactObj)
Sets the reference to the destination contact for the GPS information.
Definition: gpssystem.cc:139
ConfigItem * clone() const
Clones this item.
Definition: gpssystem.cc:114
void setContactObj(DMRContact *contactObj)
Sets the destination contact for the GPS information.
Definition: gpssystem.cc:134
DMRContactReference _contact
Holds the destination contact for the GPS information.
Definition: gpssystem.hh:123
DMRChannelReference * revert()
Returns a reference to the revert channel.
void setRevert(DMRChannelReference *channel)
Sets the revert channel for the GPS information to be sent on.
Definition: gpssystem.cc:179
DMRContactReference * contact()
Returns the reference to the destination contact.
DMRContact * contactObj() const
Returns the destination contact for the GPS information or nullptr if not set.
Definition: gpssystem.cc:129
DMRChannelReference * revert
References the revert channel.
Definition: gpssystem.hh:70
void setRevertChannel(DMRChannel *channel)
Sets the revert channel for the GPS information to be sent on.
Definition: gpssystem.cc:164
bool hasContact() const
Returns true if a contact is set for the GPS system.
Definition: gpssystem.cc:124
DMRContactReference * contact
References the destination contact.
Definition: gpssystem.hh:68
DMRChannelReference _revertChannel
Holds the revert channel on which the GPS information is sent on.
Definition: gpssystem.hh:125
Q_INVOKABLE GPSSystem(QObject *parent=nullptr)
Default constructor.
Definition: gpssystem.cc:79
bool hasRevertChannel() const
Returns true if the GPS system has a revert channel set.
Definition: gpssystem.cc:154
Base class of the positioning systems, that is APRS and DMR position reporting system.
Definition: gpssystem.hh:17
bool link(const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
Links the given object to the rest of the codeplug using the given context.
Definition: gpssystem.cc:66
unsigned _period
Holds the update period in seconds.
Definition: gpssystem.hh:57
bool populate(YAML::Node &node, const ConfigItem::Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition: gpssystem.cc:39
void onReferenceModified()
Gets called, whenever a reference is modified.
Definition: gpssystem.cc:71
void setPeriod(unsigned period)
Sets the update period in seconds.
Definition: gpssystem.cc:33
PositioningSystem(QObject *parent=nullptr)
Default constructor.
Definition: gpssystem.cc:11
virtual ~PositioningSystem()
Destructor.
Definition: gpssystem.cc:23
bool parse(const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack())
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition: gpssystem.cc:46
unsigned period
The update period in seconds.
Definition: gpssystem.hh:22
The list of positioning systems.
Definition: gpssystem.hh:267
PositioningSystems(QObject *parent=nullptr)
Constructs an empty list of GPS systems.
Definition: gpssystem.cc:434
APRSSystem * aprsSystem(int idx) const
Returns the APRS system at index idx.
Definition: gpssystem.cc:522
int aprsCount() const
Returns the number of defined APRS system.
Definition: gpssystem.cc:496
int indexOfGPSSys(const GPSSystem *gps) const
Returns the index of the GPS System.
Definition: gpssystem.cc:464
int indexOfAPRSSys(APRSSystem *gps) const
Returns the index of the specified APRS system.
Definition: gpssystem.cc:506
int add(ConfigObject *obj, int row=-1, bool unique=true)
Adds an element to the list.
Definition: gpssystem.cc:448
int gpsCount() const
Returns the number of defined GPS systems.
Definition: gpssystem.cc:455
GPSSystem * gpsSystem(int idx) const
Gets the GPS system at the specified index.
Definition: gpssystem.cc:480
PositioningSystem * system(int idx) const
Returns the positioning system at the specified index.
Definition: gpssystem.cc:441
ConfigItem * allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Allocates a member objects for the given YAML node.
Definition: gpssystem.cc:537