|
Enroute Flight Navigation
A navigation app for VFR pilots
|
Traffic receiver. More...
#include <TrafficDataProvider.h>
Public Slots | |
| void | connectToTrafficReceiver () |
| Start attempt to connect to traffic receiver. | |
| void | disconnectFromTrafficReceiver () |
| Disconnect from traffic receiver. | |
| void | setPassword (const QString &SSID, const QString &password) |
| Send password to the traffic data sources. | |
Signals | |
| void | connectionInfosChanged () |
| Notifier signal. | |
| void | dataSourcesChanged () |
| Notifier signal. | |
| void | passwordRequest (const QString &SSID) |
| Password request. | |
| void | passwordStorageRequest (const QString &SSID, const QString &password) |
| Password storage request. | |
| void | receivingHeartbeatChanged () |
| Notifier signal. | |
| void | trafficReceiverRuntimeErrorChanged () |
| Notifier signal. | |
| void | trafficReceiverSelfTestErrorChanged () |
| Notifier signal. | |
| void | warningChanged (const Traffic::Warning &) |
| Notifier signal. | |
Public Member Functions | |
| TrafficDataProvider (QObject *parent=nullptr) | |
| Default constructor. | |
| QList< Traffic::ConnectionInfo > | connectionInfos () const |
| Getter method for property with the same name. | |
| QBindable< QList< Traffic::ConnectionInfo > > | bindableConnectionInfos () |
| Getter method for property with the same name. | |
| bool | currentSourceIsInternetService () const |
| Getter method for property with the same name. | |
| QBindable< bool > | bindableCurrentSourceIsInternetService () |
| Getter method for property with the same name. | |
| QList< Traffic::TrafficDataSource_Abstract * > | dataSources () const |
| Getter method for property with the same name. | |
| Positioning::PositionInfo | positionInfo () const |
| Getter method for property with the same name. | |
| QBindable< Positioning::PositionInfo > | bindablePositionInfo () |
| Getter method for property with the same name. | |
| Units::Distance | pressureAltitude () const |
| Getter method for property with the same name. | |
| QBindable< Units::Distance > | bindablePressureAltitude () |
| Getter method for property with the same name. | |
| bool | receivingHeartbeat () const |
| Getter method for property with the same name. | |
| QBindable< bool > | bindableReceivingHeartbeat () |
| Getter method for property with the same name. | |
| QString | statusString () const |
| Getter method for property with the same name. | |
| QBindable< QString > | bindableStatusString () |
| Getter method for property with the same name. | |
| QList< Traffic::TrafficFactor_WithPosition * > | trafficObjects () const |
| Getter method for property with the same name. | |
| Traffic::TrafficFactor_DistanceOnly * | trafficObjectWithoutPosition () const |
| Getter method for property with the same name. | |
| QString | trafficReceiverRuntimeError () const |
| Getter function for the property with the same name. | |
| QString | trafficReceiverSelfTestError () const |
| Getter function for the property with the same name. | |
| Traffic::Warning | warning () const |
| Getter method for property with the same name. | |
| void | addDataSource (Traffic::TrafficDataSource_Abstract *source) |
| Add an additional data source. | |
| Q_INVOKABLE QString | addDataSource (const Traffic::ConnectionInfo &connectionInfo) |
| Add an additional data source. | |
| Q_INVOKABLE QString | addDataSource_UDP (quint16 port) |
| Add an additional data source. | |
| Q_INVOKABLE QString | addDataSource_SerialPort (const QString &portNameOrDescription, ConnectionInfo::BaudRate baudRate, ConnectionInfo::StopBits stopBits, ConnectionInfo::FlowControl flowControl) |
| Add an additional data source. | |
| Q_INVOKABLE QString | addDataSource_TCP (const QString &host, quint16 port) |
| Add an additional data source. | |
| Q_INVOKABLE QString | addDataSource_OGN () |
| Add an additional data source. | |
| Q_INVOKABLE bool | hasDataSource_SerialPort (const QString &portNameOrDescription) |
| Check if serial port connection already exists. | |
| Q_INVOKABLE void | removeDataSource (Traffic::TrafficDataSource_Abstract *source) |
| Remove data sources. | |
Properties | |
| QList< Traffic::ConnectionInfo > | connectionInfos |
| Connection Infos. | |
| bool | currentSourceIsInternetService |
| Internet service flag. | |
| QList< Traffic::TrafficDataSource_Abstract * > | dataSources |
| Traffic data sources. | |
| Positioning::PositionInfo | positionInfo |
| Position information. | |
| Units::Distance | pressureAltitude |
| Pressure altitude. | |
| bool | receivingHeartbeat |
| Heartbeat indicator. | |
| QString | statusString |
| Source status. | |
| QList< Traffic::TrafficFactor_WithPosition * > | trafficObjects |
| Traffic objects whose position is known. | |
| Traffic::TrafficFactor_DistanceOnly * | trafficObjectWithoutPosition |
| Most relevant traffic object whose position is not known. | |
| QString | trafficReceiverRuntimeError |
| String describing the current traffic data receiver errors. | |
| QString | trafficReceiverSelfTestError |
| String describing the traffic data receiver errors found in self-test. | |
| Traffic::Warning | warning |
| Current traffic warning. | |
Traffic receiver.
This class manages multiple TrafficDataSources. It combines the data streams, and passes data from the most relevant (if any) traffic data source on to the consumers of this class.
By default, it watches the following data channels:
This class also acts as a PositionInfoSource, and passes position data (that some traffic receivers provide) on to the the consumers of this class.
Following the standards established by the app ForeFlight, this classEnroute broadcasts a UDP message on port 63093 every 5 seconds while the app is running in the foreground. This message allows devices to discover Enroute’s IP address, which can be used as the target of UDP unicast messages.
Definition at line 52 of file TrafficDataProvider.h.
|
explicit |
Default constructor.
| parent | The standard QObject parent pointer |
| Q_INVOKABLE QString Traffic::TrafficDataProvider::addDataSource | ( | const Traffic::ConnectionInfo & | connectionInfo | ) |
Add an additional data source.
This method adds an additional data source to this TrafficDataProvider, typically a Bluetooth device.
| connectionInfo | Description of the new connection. |
| void Traffic::TrafficDataProvider::addDataSource | ( | Traffic::TrafficDataSource_Abstract * | source | ) |
Add an additional data source.
This method adds an additional data source to this TrafficDataProvider, typically a simulator source used for debugging purposes. The TrafficDataProvider takes ownership of the source.
| source | New TrafficDataSource that is to be added. |
| Q_INVOKABLE QString Traffic::TrafficDataProvider::addDataSource_OGN | ( | ) |
Add an additional data source.
This method adds an additional OGN data source to this TrafficDataProvider.
| Q_INVOKABLE QString Traffic::TrafficDataProvider::addDataSource_SerialPort | ( | const QString & | portNameOrDescription, |
| ConnectionInfo::BaudRate | baudRate, | ||
| ConnectionInfo::StopBits | stopBits, | ||
| ConnectionInfo::FlowControl | flowControl ) |
Add an additional data source.
This method adds an additional serial port data source to this TrafficDataProvider.
| portNameOrDescription | Name of the serial port or a description string by which the port can be identified. |
| baudRate | Baud Rate |
| stopBits | Stop Bits |
| flowControl | Flow Control |
| Q_INVOKABLE QString Traffic::TrafficDataProvider::addDataSource_TCP | ( | const QString & | host, |
| quint16 | port ) |
Add an additional data source.
This method adds an additional TCP data source to this TrafficDataProvider.
| host | Internet address |
| port | TCP Port. |
| Q_INVOKABLE QString Traffic::TrafficDataProvider::addDataSource_UDP | ( | quint16 | port | ) |
Add an additional data source.
This method adds an additional UDP data source to this TrafficDataProvider.
| port | UDP Port. |
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 192 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 204 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 225 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 237 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 252 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 267 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 186 of file TrafficDataProvider.h.
|
slot |
Start attempt to connect to traffic receiver.
If this class is connected to a traffic receiver, this method does nothing. Otherwise, it stops any ongoing connection attempt and starts a new attempt to connect to a potential receiver, via all available channels simultaneously.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 198 of file TrafficDataProvider.h.
|
nodiscard |
Getter method for property with the same name.
|
slot |
Disconnect from traffic receiver.
This method stops any ongoing connection or connection attempt.
| Q_INVOKABLE bool Traffic::TrafficDataProvider::hasDataSource_SerialPort | ( | const QString & | portNameOrDescription | ) |
Check if serial port connection already exists.
| portNameOrDescription | Port name or description string by which the port can be identified. |
|
signal |
Password request.
This signal is emitted whenever one of the traffic data sources requires asks for a password. Note that this is not the WiFi-Password.
| SSID | Name of the WiFi network that is currently in use. |
|
signal |
Password storage request.
This signal is emitted whenever one of the traffic data sources has verified a password that was not yet in the database. The GUI should connect to this signal and open a "Store Password …?" dialogn.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 216 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 231 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 243 of file TrafficDataProvider.h.
| Q_INVOKABLE void Traffic::TrafficDataProvider::removeDataSource | ( | Traffic::TrafficDataSource_Abstract * | source | ) |
Remove data sources.
This method removes a data source from this TrafficDataProvider. Canonical data sources cannot be removed
| source | New TrafficDataSource that is to be removed. |
|
slot |
Send password to the traffic data sources.
This method will send a password/ssid combination to all traffic data source. If a source is waiting for a password with the given SSID, then it will send the password to the traffic data receiver.
| SSID | Network where the receiver should be connected |
| password | Password that is sent to the receiver |
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 258 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 273 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 282 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 291 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 300 of file TrafficDataProvider.h.
|
inlinenodiscard |
Getter method for property with the same name.
Definition at line 309 of file TrafficDataProvider.h.
|
read |
Connection Infos.
This property holds connection infos for all non-canonical connections currently in use.
Definition at line 84 of file TrafficDataProvider.h.
|
read |
Internet service flag.
This property is true if the data source currently in use is an internet service rather than a proper traffic receiver. This can be used by the GUI to warn the user that data might not be reliable.
Definition at line 91 of file TrafficDataProvider.h.
|
read |
Traffic data sources.
This property holds a list of all traffic data sources currently in use. The items are owned by this class.
Definition at line 98 of file TrafficDataProvider.h.
|
read |
Position information.
This property holds information about the device position. To ensure that the data is up-to-date, the position information will be set to an invalid positionInfo when no data has arrived for more than the time specified in PositionInfo::lifetime.
Definition at line 107 of file TrafficDataProvider.h.
|
read |
Pressure altitude.
This property holds information about the pressure altitude reported by the traffic data receiver.
Definition at line 114 of file TrafficDataProvider.h.
|
read |
Heartbeat indicator.
When active, traffic receivers send regular heartbeat messages. These can be used to verify that the connection to the receiver works, even in times when no traffic is reported. This property indicates if the class receives heartbeat messages from at least one of the known receivers.
Definition at line 123 of file TrafficDataProvider.h.
|
read |
Source status.
This property holds a translated, human-readable string that describes the status of the positionInfo source. This could typically be a string of the form "OK" or "Insufficient permission to access position info"
Definition at line 131 of file TrafficDataProvider.h.
|
read |
Traffic objects whose position is known.
This property holds a list of the most relevant traffic objects, as a QQmlListProperty for better cooperation with QML. Note that only the valid items in this list pertain to actual traffic. Invalid items should be ignored. The list is not sorted in any way. The items themselves are owned by this class.
Definition at line 141 of file TrafficDataProvider.h.
|
read |
Most relevant traffic object whose position is not known.
This property holds a pointer to the most relevant traffic object whose position is not known. This item should be ignored if invalid. The item is owned by this class.
Definition at line 149 of file TrafficDataProvider.h.
|
read |
String describing the current traffic data receiver errors.
This property holds a translated, human-readable string that describes the current errors reported by the traffic receiver, or an empty string when there is no error. The string is cleared when a new connection attempt is started.
Definition at line 158 of file TrafficDataProvider.h.
|
read |
String describing the traffic data receiver errors found in self-test.
This property holds a translated, human-readable string that describes the errors reported by the traffic receiver during self-test, or an empty string when there is no error. The string is cleared when a new connection attempt is started.
Definition at line 167 of file TrafficDataProvider.h.
|
read |
Current traffic warning.
This property holds the current traffic warning. The traffic warning is updated regularly and set to an invalid warning (i.e. one with alarmLevel == -1) after a certain period.
Definition at line 175 of file TrafficDataProvider.h.