libdrmconf
0.12.0
A library to program DMR radios.
|
Represents an APRS system within the generic config. More...
#include <gpssystem.hh>
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... | |
ConfigItem * | clone () const |
Clones this item. | |
FMChannel * | revertChannel () const |
Returns the transmit channel of the APRS system. | |
void | setRevertChannel (FMChannel *revertChannel) |
Sets the transmit channel of the APRS system. | |
const FMChannelReference * | revert () const |
Returns a reference to the revert channel. | |
FMChannelReference * | revert () |
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. | |
AnytoneFMAPRSSettingsExtension * | anytoneExtension () 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 ConfigItem * | allocateChild (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 Config * | config () 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 | |
FMChannelReference * | revert |
The transmit channel. | |
Icon | icon |
The APRS icon. | |
QString | message |
An optional text message. | |
AnytoneFMAPRSSettingsExtension * | anytone |
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. | |
Represents an APRS system within the generic config.
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.
name | Specifies the name of the APRS system. This property is just a name, it does not affect the radio configuration. |
channel | Specifies the transmit channel. This property is not optional. A transmit channel must be specified to obtain a working APRS system. |
dest | Specifies the destination call, APRS messages are sent to. Usually 'WIDE3' is a reasonable setting. |
destSSID | Specifies the destination SSID. Usually 3 is a reasonable choice. |
src | Specifies the source call, usually you call has to be entered here. |
srcSSID | The source SSID, usually 7 is a reasonable choice of handhelds. |
path | Specifies the APRS path string. |
icon | Specifies the map icon to send. |
message | An optional message to send. |
period | Specifies the auto-update period in seconds. |
parent | Specifies the QObject parent object. |
|
virtual |
Copies the given item into this one.
true
if copying was successful and false otherwise. The two items must be of the same type (obviously). Reimplemented from ConfigItem.
|
virtual |
Parses the given YAML node, updates the given object and updates the given context (IDs).
Reimplemented from PositioningSystem.
|
protectedvirtual |
Recursively serializes the configuration to YAML nodes.
The complete configuration must be labeled first.
Reimplemented from PositioningSystem.
|
virtual |
Recursively serializes the configuration to YAML nodes.
The complete configuration must be labeled first.
Reimplemented from ConfigItem.