libdrmconf  0.12.0
A library to program DMR radios.
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
APRSSystem Class Reference

Represents an APRS system within the generic config. More...

#include <gpssystem.hh>

Inheritance diagram for APRSSystem:
Inheritance graph
[legend]
Collaboration diagram for APRSSystem:
Collaboration graph
[legend]

Public Types

enum class  Icon {
  PoliceStation = (PRIMARY_TABLE | 0) , None , Digipeater , Phone ,
  DXCluster , HFGateway , SmallPlane , MobileSatelliteStation ,
  WheelChair , Snowmobile , RedCross , BoyScout ,
  Home , X , RedDot , Circle0 ,
  Circle1 , Circle2 , Circle3 , Circle4 ,
  Circle5 , Circle6 , Circle7 , Circle8 ,
  Circle9 , Fire , Campground , Motorcycle ,
  RailEngine , Car , FileServer , HCFuture ,
  AidStation , BBS , Canoe , Eyeball = (PRIMARY_TABLE | 36) ,
  Tractor , GridSquare , Hotel , TCPIP ,
  School = (PRIMARY_TABLE | 42) , Logon , MacOS , NTSStation ,
  Balloon , PoliceCar , TBD , RV ,
  Shuttle , SSTV , Bus , ATV ,
  WXService , Helo , Yacht , Windows ,
  Jogger , Triangle , PBBS , LargePlane ,
  WXStation , DishAntenna , Ambulance , Bike ,
  ICP , FireStation , Horse , FireTruck ,
  Glider , Hospital , IOTA , Jeep ,
  SmallTruck , Laptop , MicE , Node ,
  EOC , Rover , Grid , Antenna ,
  PowerBoat , TruckStop , TruckLarge , Van ,
  Water , XAPRS , Yagi , Shelter
}
 All implemented APRS icons.
 

Public Member Functions

Q_INVOKABLE APRSSystem (QObject *parent=nullptr)
 Default constructor.
 
 APRSSystem (const QString &name, FMChannel *channel, const QString &dest, unsigned destSSID, const QString &src, unsigned srcSSID, const QString &path="", Icon icon=Icon::Jogger, const QString &message="", unsigned period=300, QObject *parent=nullptr)
 Constructor for a APRS system. More...
 
bool copy (const ConfigItem &other)
 Copies the given item into this one. More...
 
ConfigItemclone () const
 Clones this item.
 
FMChannelrevertChannel () const
 Returns the transmit channel of the APRS system.
 
void setRevertChannel (FMChannel *revertChannel)
 Sets the transmit channel of the APRS system.
 
const FMChannelReferencerevert () const
 Returns a reference to the revert channel.
 
FMChannelReferencerevert ()
 Returns a reference to the revert channel.
 
void setRevert (FMChannelReference *ref)
 Sets the revert channel reference.
 
const QString & destination () const
 Returns the destination call.
 
unsigned destSSID () const
 Returns the destination SSID.
 
void setDestination (const QString &call, unsigned ssid)
 Sets the destination call and SSID.
 
const QString & source () const
 Returns the source call.
 
unsigned srcSSID () const
 Returns the source SSID.
 
void setSource (const QString &call, unsigned ssid)
 Sets the source call and SSID.
 
const QString & path () const
 Returns the APRS path.
 
void setPath (const QString &path)
 Sets the APRS path.
 
Icon icon () const
 Returns the map icon.
 
void setIcon (Icon icon)
 Sets the map icon.
 
const QString & message () const
 Returns the optional message.
 
void setMessage (const QString &msg)
 Sets the optional APRS message text.
 
AnytoneFMAPRSSettingsExtensionanytoneExtension () const
 Returns the Anytone settings extension, if set.
 
void setAnytoneExtension (AnytoneFMAPRSSettingsExtension *ext)
 Sets the Anytone settings extension.
 
YAML::Node serialize (const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes. More...
 
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). More...
 
- Public Member Functions inherited from PositioningSystem
virtual ~PositioningSystem ()
 Destructor.
 
unsigned period () const
 Returns the update period in seconds.
 
void setPeriod (unsigned period)
 Sets the update period in seconds.
 
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.
 
- Public Member Functions inherited from ConfigObject
virtual const QString & name () const
 Returns the name of the object.
 
virtual void setName (const QString &name)
 Sets the name of the object.
 
QString idPrefix () const
 Returns the ID prefix for this object.
 
bool label (Context &context, const ErrorStack &err=ErrorStack())
 Recursively labels the config object. More...
 
- Public Member Functions inherited from ConfigItem
virtual int compare (const ConfigItem &other) const
 Compares the items. More...
 
virtual ConfigItemallocateChild (QMetaProperty &prop, const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack())
 Allocates an instance for the given property on the given YAML node. More...
 
virtual void clear ()
 Clears the config object.
 
virtual const Configconfig () const
 Returns the config, the item belongs to or nullptr if not part of a config.
 
virtual void findItemsOfTypes (const QStringList &typeNames, QSet< ConfigItem * > &items) const
 Searches the config tree to find all instances of the given type names.
 
template<class Object >
bool is () const
 Returns true if this object is of class Object.
 
template<class Object >
const Object * as () const
 Casts this object to the given type.
 
template<class Object >
Object * as ()
 Casts this object to the given type.
 
bool hasDescription () const
 Returns true if there is a class info "description" for this instance.
 
bool hasLongDescription () const
 Returns true if there is a class info "longDescription" for this instance.
 
bool hasDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]Description" for the given property.
 
bool hasLongDescription (const QMetaProperty &prop) const
 Returns true if there is a class info "[PropertyName]LongDescription" for the given property.
 
QString description () const
 Returns the description of this instance if set by a class info.
 
QString longDescription () const
 Returns the long description of this instance if set by a class info.
 
QString description (const QMetaProperty &prop) const
 Returns the description of property if set by a class info.
 
QString longDescription (const QMetaProperty &prop) const
 Returns the long description of property if set by a class info.
 

Static Public Attributes

static const unsigned PRIMARY_TABLE = (0<<8)
 Primary icon table flag.
 
static const unsigned SECONDARY_TABLE = (1<<8)
 Secondary icon table flag.
 
static const unsigned TABLE_MASK = (3<<8)
 Bitmask for icon table flags.
 
static const unsigned ICON_MASK = 0x7f
 Bitmask for the icon table entry.
 

Protected Member Functions

bool populate (YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
 Recursively serializes the configuration to YAML nodes. More...
 
- Protected Member Functions inherited from PositioningSystem
 PositioningSystem (QObject *parent=nullptr)
 Default constructor.
 
 PositioningSystem (const QString &name, unsigned period=300, QObject *parent=nullptr)
 Hidden constructor. More...
 
- Protected Member Functions inherited from ConfigObject
 ConfigObject (QObject *parent=nullptr)
 Specifies the prefix for every ID assigned to every object during serialization. More...
 
 ConfigObject (const QString &name, QObject *parent=nullptr)
 Hidden constructor. More...
 
- Protected Member Functions inherited from ConfigItem
 ConfigItem (QObject *parent=nullptr)
 Hidden constructor. More...
 

Protected Attributes

FMChannelReference _channel
 A weak reference to the transmit channel.
 
QString _destination
 Holds the destination call.
 
unsigned _destSSID
 Holds the destination SSID.
 
QString _source
 Holds the source call.
 
unsigned _srcSSID
 Holds the source SSID.
 
QString _path
 Holds the APRS path string.
 
Icon _icon
 Holds the map icon.
 
QString _message
 Holds the optional message.
 
AnytoneFMAPRSSettingsExtension_anytone
 Owns the Anytone settings extension.
 
- Protected Attributes inherited from PositioningSystem
unsigned _period
 Holds the update period in seconds.
 
- Protected Attributes inherited from ConfigObject
QString _name
 Holds the name of the object.
 

Properties

FMChannelReferencerevert
 The transmit channel.
 
Icon icon
 The APRS icon.
 
QString message
 An optional text message.
 
AnytoneFMAPRSSettingsExtensionanytone
 Anytone sepecific settings.
 
- Properties inherited from PositioningSystem
unsigned period
 The update period in seconds.
 
- Properties inherited from ConfigObject
QString name
 The name of the object.
 

Additional Inherited Members

- Signals inherited from ConfigItem
void modified (ConfigItem *obj)
 Gets emitted once the config object is modified. More...
 
void beginClear ()
 Gets emitted before clearing the item.
 
void endClear ()
 Gets emitted after clearing the item.
 
- Protected Slots inherited from PositioningSystem
void onReferenceModified ()
 Gets called, whenever a reference is modified.
 
- Static Protected Member Functions inherited from ConfigObject
static QString findIdPrefix (const QMetaObject *meta)
 Helper to find the IdPrefix class info in the class hierarchy.
 

Detailed Description

Represents an APRS system within the generic config.

Constructor & Destructor Documentation

◆ APRSSystem()

APRSSystem::APRSSystem ( const QString &  name,
FMChannel channel,
const QString &  dest,
unsigned  destSSID,
const QString &  src,
unsigned  srcSSID,
const QString &  path = "",
Icon  icon = Icon::Jogger,
const QString &  message = "",
unsigned  period = 300,
QObject *  parent = nullptr 
)

Constructor for a APRS system.

Parameters
nameSpecifies the name of the APRS system. This property is just a name, it does not affect the radio configuration.
channelSpecifies the transmit channel. This property is not optional. A transmit channel must be specified to obtain a working APRS system.
destSpecifies the destination call, APRS messages are sent to. Usually 'WIDE3' is a reasonable setting.
destSSIDSpecifies the destination SSID. Usually 3 is a reasonable choice.
srcSpecifies the source call, usually you call has to be entered here.
srcSSIDThe source SSID, usually 7 is a reasonable choice of handhelds.
pathSpecifies the APRS path string.
iconSpecifies the map icon to send.
messageAn optional message to send.
periodSpecifies the auto-update period in seconds.
parentSpecifies the QObject parent object.

Member Function Documentation

◆ copy()

bool APRSSystem::copy ( const ConfigItem other)
virtual

Copies the given item into this one.

Returns
true if copying was successful and false otherwise. The two items must be of the same type (obviously).

Reimplemented from ConfigItem.

◆ parse()

bool APRSSystem::parse ( const YAML::Node &  node,
Context ctx,
const ErrorStack err = ErrorStack() 
)
virtual

Parses the given YAML node, updates the given object and updates the given context (IDs).

Todo:
With Qt 5.15, we can use the REQUIRED flag to check for mandatory properties. However, Ubuntu 20.04 (Focal) comes with Qt 5.12.

Reimplemented from PositioningSystem.

◆ populate()

bool APRSSystem::populate ( YAML::Node &  node,
const Context context,
const ErrorStack err = ErrorStack() 
)
protectedvirtual

Recursively serializes the configuration to YAML nodes.

The complete configuration must be labeled first.

Reimplemented from PositioningSystem.

◆ serialize()

YAML::Node APRSSystem::serialize ( const Context context,
const ErrorStack err = ErrorStack() 
)
virtual

Recursively serializes the configuration to YAML nodes.

The complete configuration must be labeled first.

Reimplemented from ConfigItem.


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