Enroute Flight Navigation
A navigation app for VFR pilots
Traffic::TrafficDataSource_SerialPort Class Reference

Traffic receiver: Serial Port Connection to a FLARM/NMEA Source. More...

#include <TrafficDataSource_SerialPort.h>

Inheritance diagram for Traffic::TrafficDataSource_SerialPort:
Traffic::TrafficDataSource_Abstract

Public Slots

void connectToTrafficReceiver () override
 Start attempt to connect to traffic receiver.
void disconnectFromTrafficReceiver () override
 Disconnect from traffic receiver.
Public Slots inherited from Traffic::TrafficDataSource_Abstract
virtual void connectToTrafficReceiver ()=0
 Start attempt to connect to traffic receiver.
virtual void disconnectFromTrafficReceiver ()=0
 Disconnect from traffic receiver.
virtual void setPassword (const QString &SSID, const QString &password)
 Set password.

Public Member Functions

 TrafficDataSource_SerialPort (bool isCanonical, const QString &portNameOrDescription, ConnectionInfo::BaudRate baudRate, ConnectionInfo::StopBits stopBits, ConnectionInfo::FlowControl flowControl, QObject *parent)
 Default constructor.
QString dataFormat () const override
 Getter function for the property with the same name.
QString icon () const override
 Getter function for the property with the same name.
QString sourceName () const override
 Getter function for the property with the same name.
Public Member Functions inherited from Traffic::TrafficDataSource_Abstract
 TrafficDataSource_Abstract (bool isCanonical, QObject *parent)
 Default constructor.
bool canonical () const
 Getter function for the property with the same name.
Traffic::ConnectionInfo connectionInfo () const
 Getter function for the property with the same name.
QBindable< Traffic::ConnectionInfobindableConnectionInfo () const
 Getter function for the property with the same name.
QString connectivityStatus () const
 Getter function for the property with the same name.
QString errorString () const
 Getter function for the property with the same name.
Positioning::PositionInfo positionInfo () const
 Getter method for property with the same name.
QBindable< Positioning::PositionInfobindablePositionInfo () const
 Getter method for property with the same name.
Units::Distance pressureAltitude () const
 Getter method for property with the same name.
QBindable< Units::DistancebindablePressureAltitude () const
 Getter method for property with the same name.
bool receivingHeartbeat () const
 Getter function for the property with the same name.
QBindable< bool > bindableReceivingHeartbeat () const
 Getter function for the property with the same name.
QString trafficReceiverRuntimeError () const
 Getter function for the property with the same name.
QBindable< QString > bindableTrafficReceiverRuntimeError ()
 Getter function for the property with the same name.
QString trafficReceiverSelfTestError () const
 Getter function for the property with the same name.
QBindable< QString > bindableTrafficReceiverSelfTestError ()
 Getter function for the property with the same name.

Properties

QString portNameOrDescription
 Port Name or Description.
ConnectionInfo::BaudRate baudRate
 Baud Rate of the Serial Port Connection.
ConnectionInfo::StopBits stopBits
 Stop Bits of the Serial Port Connection.
ConnectionInfo::FlowControl flowControl
 Flow Control.
Properties inherited from Traffic::TrafficDataSource_Abstract
bool canonical
 Canonicity.
QString connectivityStatus
 Connectivity status.
Traffic::ConnectionInfo connectionInfo
 Connection Info.
QString dataFormat
 Data format.
QString errorString
 String describing the last socket error.
QString icon
 Icon that can be used to represent the connection in a GUI.
Positioning::PositionInfo positionInfo
 Position information.
Units::Distance pressureAltitude
 Pressure altitude.
bool receivingHeartbeat
 Heartbeat indicator.
QString sourceName
 Source name.
QString trafficReceiverRuntimeError
 String describing the last traffic data receiver runtime error.
QString trafficReceiverSelfTestError
 String describing the last traffic data receiver self-test error.

Additional Inherited Members

Signals inherited from Traffic::TrafficDataSource_Abstract
void connectivityStatusChanged (QString newStatus)
 Notifier signal.
void dataReceived (QString data)
 Indicates new data has arrived, can be used in the GUI for monitoring purposes.
void errorStringChanged (QString newError)
 Notifier signal.
void factorWithoutPosition (const Traffic::TrafficFactor_DistanceOnly &factor)
 Traffic factor without position.
void factorWithPosition (const Traffic::TrafficFactor_WithPosition &factor)
 Traffic factor with position.
void receivingHeartbeatChanged (bool)
 Notifier signal.
void trafficReceiverHwVersion (QString result)
 Traffic receiver hardware version.
void trafficReceiverObVersion (QString result)
 Traffic receiver obstacle database version.
void trafficReceiverSwVersion (QString result)
 Traffic receiver software version.
void warning (const Traffic::Warning &warning)
 Traffic warning.
Protected Member Functions inherited from Traffic::TrafficDataSource_Abstract
void processAPRS (const QString &data)
 Process APRS-IS data.
void processFLARMData (const QString &data)
 Process FLARM/NMEA data.
void processGDLMessage (const QByteArray &message)
 Process one GDL90 message.
void processXGPSString (const QByteArray &data)
 Process one XGPS string.
void resetReceivingHeartbeat ()
 Resetter method for the property with the same name.
void setConnectivityStatus (const QString &newConnectivityStatus)
 Setter function for the property with the same name.
void setErrorString (const QString &newErrorString=QString())
 Setter function for the property with the same name.
void setPositionInfo (const Positioning::PositionInfo &info)
 Setter function for the property with the same name.
void setPressureAltitude (Units::Distance newPressureAltitude)
 Setter function for the property with the same name.
void setReceivingHeartbeat (bool newReceivingHeartbeat)
 Setter method for the property with the same name.

Detailed Description

Traffic receiver: Serial Port Connection to a FLARM/NMEA Source.

This class connects to a traffic receiver via a serial port.

Definition at line 42 of file TrafficDataSource_SerialPort.h.

Constructor & Destructor Documentation

◆ TrafficDataSource_SerialPort()

Traffic::TrafficDataSource_SerialPort::TrafficDataSource_SerialPort ( bool isCanonical,
const QString & portNameOrDescription,
ConnectionInfo::BaudRate baudRate,
ConnectionInfo::StopBits stopBits,
ConnectionInfo::FlowControl flowControl,
QObject * parent )

Default constructor.

This class provides a FLARM/NMEA data connection via a serial port. The constructor takes a name, which is either a proper port name (such as "ttyS0") or a description string (such as "ublox 7 - GPS GNSS Receiver") provided by QSerialPortInfo. This class will then connect to the first serial port whose port name or description matches the given string.

Parameters
isCanonicalIntializer for property canonical
portNameOrDescriptionName or description of the port, as provided by QSerialPortInfo.portName() or QSerialPortInfo.description()
baudRateBaud Rate
stopBitsStop Bits
flowControlFlow Control
parentThe standard QObject parent pointer

Member Function Documentation

◆ connectToTrafficReceiver

void Traffic::TrafficDataSource_SerialPort::connectToTrafficReceiver ( )
overrideslot

Start attempt to connect to traffic receiver.

This method implements the pure virtual method declared by its superclass.

◆ dataFormat()

QString Traffic::TrafficDataSource_SerialPort::dataFormat ( ) const
inlinenodiscardoverridevirtual

Getter function for the property with the same name.

Returns
Property dataFormat

Implements Traffic::TrafficDataSource_Abstract.

Definition at line 111 of file TrafficDataSource_SerialPort.h.

◆ disconnectFromTrafficReceiver

void Traffic::TrafficDataSource_SerialPort::disconnectFromTrafficReceiver ( )
overrideslot

Disconnect from traffic receiver.

This method implements the pure virtual method declared by its superclass.

◆ icon()

QString Traffic::TrafficDataSource_SerialPort::icon ( ) const
inlinenodiscardoverridevirtual

Getter function for the property with the same name.

This method implements the pure virtual method declared by its superclass.

Returns
Property icon

Implements Traffic::TrafficDataSource_Abstract.

Definition at line 120 of file TrafficDataSource_SerialPort.h.

◆ sourceName()

QString Traffic::TrafficDataSource_SerialPort::sourceName ( ) const
nodiscardoverridevirtual

Getter function for the property with the same name.

This method implements the pure virtual method declared by its superclass.

Returns
Property sourceName

Implements Traffic::TrafficDataSource_Abstract.

Property Documentation

◆ portNameOrDescription

QString Traffic::TrafficDataSource_SerialPort::portNameOrDescription
read

Port Name or Description.

This property contains the port name or description, as set in the constructor.

Definition at line 81 of file TrafficDataSource_SerialPort.h.


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