|
Enroute Flight Navigation
A navigation app for VFR pilots
|
Connection to a traffic data receiver. More...
#include <ConnectionInfo.h>
Classes | |
| struct | OgnInfo |
| Constructor parameter for OGN connections. More... | |
Public Types | |
| enum | Type : quint8 { Invalid , BluetoothClassic , BluetoothLowEnergy , TCP , UDP , Serial , FLARMFile , OGN } |
| Connection Type. More... | |
Public Member Functions | |
| ConnectionInfo ()=default | |
| Default constructor. | |
| ConnectionInfo (const QBluetoothDeviceInfo &info, bool canonical=false) | |
| Constructor for Bluetooth Device Connections. | |
| ConnectionInfo (const QString &serialPortNameOrDescription, ConnectionInfo::BaudRate baudRate=ConnectionInfo::BaudRate::Baud9600, ConnectionInfo::StopBits stopBits=ConnectionInfo::StopBits::OneStop, ConnectionInfo::FlowControl flowControl=ConnectionInfo::FlowControl::NoFlowControl, bool canonical=false) | |
| Constructor for Bluetooth Device Connections. | |
| ConnectionInfo (quint16 port, bool canonical=false) | |
| Constructor for UDP Connections. | |
| ConnectionInfo (const QString &host, quint16 port, bool canonical=false) | |
| Constructor for TCP Connections. | |
| ConnectionInfo (const OgnInfo &info) | |
| Constructor for OGN Connections. | |
| BaudRate | baudRate () const |
| Baud Rate. | |
| QBluetoothDeviceInfo | bluetoothDeviceInfo () const |
| Bluetooth Device Info. | |
| FlowControl | flowControl () const |
| Flow Control. | |
| quint16 | port () const |
| Port. | |
| bool | sameConnectionAs (const Traffic::ConnectionInfo &other) const |
| Equality of connection. | |
| StopBits | stopBits () const |
| Stop Bits. | |
| bool | operator== (const Traffic::ConnectionInfo &other) const =default |
| Equality of ConnectionInfos. | |
| bool | operator< (const Traffic::ConnectionInfo &other) const |
| Comparison. | |
Properties | |
| bool | canConnect |
| Connectability. | |
| bool | canonical |
| Canonicity. | |
| QString | description |
| Description. | |
| QString | host |
| Host. | |
| QString | icon |
| Icon. | |
| QString | name |
| Name. | |
| Traffic::ConnectionInfo::Type | type |
| Type. | |
Friends | |
| QDataStream & | operator<< (QDataStream &stream, const Traffic::ConnectionInfo &connectionInfo) |
| Serialization. | |
| QDataStream & | operator>> (QDataStream &stream, Traffic::ConnectionInfo &connectionInfo) |
| Deserialization. | |
Connection to a traffic data receiver.
This class describes a connection to a traffic data receiver. It exposes connection properties in a format that is suitable for QML.
Definition at line 42 of file ConnectionInfo.h.
| enum Traffic::ConnectionInfo::Type : quint8 |
Connection Type.
Definition at line 51 of file ConnectionInfo.h.
|
default |
Default constructor.
This method constructs an invalid ConnectionInfo
|
explicit |
Constructor for Bluetooth Device Connections.
This method constructs a ConnectionInfo for a connection to a Bluetooth device. The type will either be BluetoothClassic or BluetoothLowEnergy.
| info | QBluetoothDeviceInfo that describes the Bluetooth device |
| canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for Bluetooth Device Connections.
This method constructs a ConnectionInfo for a connection to a serial port.
| serialPortNameOrDescription | Serial port name or description by which the port can be identified |
| baudRate | Baud Rate |
| stopBits | Number of Stop Bits |
| flowControl | Flow Control |
| canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for UDP Connections.
This method constructs a ConnectionInfo for a UDP connection.
| port | Port number |
| canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for TCP Connections.
This method constructs a ConnectionInfo for a TCP connection.
| host | Host name or IP Address |
| port | Port number |
| canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for OGN Connections.
This method constructs a ConnectionInfo for a OGN connection.
| info | Info about the connection |
|
inlinenodiscard |
Baud Rate.
Definition at line 247 of file ConnectionInfo.h.
|
inlinenodiscard |
Bluetooth Device Info.
Definition at line 257 of file ConnectionInfo.h.
|
inlinenodiscard |
Flow Control.
Definition at line 264 of file ConnectionInfo.h.
| bool Traffic::ConnectionInfo::operator< | ( | const Traffic::ConnectionInfo & | other | ) | const |
Comparison.
This operator can be used to sort ConnectionInfos in the GUI. Sorting is by connectability, type and name.
| other | Other ConnectionInfo to compare with. |
|
nodiscarddefault |
Equality of ConnectionInfos.
| other | Other ConnectionInfo to compare with. |
|
inlinenodiscard |
Port.
Definition at line 272 of file ConnectionInfo.h.
|
nodiscard |
Equality of connection.
This test for equality is not strict. It returns 'true' if the two connection infos describe the same connection. Still, they can differ in aspects such as the connection name or description. This is possible, e.g., for Bluetooth devices whose name was not know when one of the ConnectionInfos was constructed.
| other | Other ConnectionInfo to compare with. |
|
inlinenodiscard |
Stop Bits.
Definition at line 294 of file ConnectionInfo.h.
|
friend |
Serialization.
There are no checks for errors of any kind.
|
friend |
Deserialization.
There are no checks for errors of any kind.
|
read |
Connectability.
This property holds true if a connection is possible in principle. It does not guarantee that a connection attempt will be successful. Example: This property is 'false' for connections to Bluetooth Low Energy devices, which are currently unsupported.
Definition at line 182 of file ConnectionInfo.h.
|
read |
Canonicity.
This property holds true if the connection is canonical. Canonical connections are those that will always be in the connection library and cannot be edited or deleted in the GUI.
Definition at line 192 of file ConnectionInfo.h.
|
read |
Description.
This property holds a human-readable, translated, two-line description of the connection, in HTML format.
Definition at line 201 of file ConnectionInfo.h.
|
read |
Host.
For TCP connections, this property holds the host name.
Definition at line 209 of file ConnectionInfo.h.
|
read |
Icon.
This property holds the name of an icon file that can be used to represent the connection in the GUI.
Definition at line 218 of file ConnectionInfo.h.
|
read |
Name.
This property holds a human-readable, translated name of the connection.
Definition at line 226 of file ConnectionInfo.h.
|
read |
Type.
This property holds the type of the connection.
Definition at line 234 of file ConnectionInfo.h.