QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ADSBTCPLink Class Reference

The ADSBTCPLink class handles the TCP connection to an ADS-B server and processes incoming ADS-B data. More...

#include <ADSBTCPLink.h>

+ Inheritance diagram for ADSBTCPLink:
+ Collaboration diagram for ADSBTCPLink:

Signals

void adsbVehicleUpdate (const ADSB::VehicleInfo_t &vehicleInfo)
 
void errorOccurred (const QString &errorMsg, bool stopped=false)
 

Public Member Functions

 ADSBTCPLink (const QString &hostAddress, quint16 port=30003, QObject *parent=nullptr)
 
 ~ADSBTCPLink ()
 Destroys the ADSBTCPLink object.
 
bool init ()
 Attempts connection to a host.
 

Detailed Description

The ADSBTCPLink class handles the TCP connection to an ADS-B server and processes incoming ADS-B data.

The link is designed to be moved to a worker thread so that socket reads and SBS-1 parsing stay off the ui thread. init() must be invoked on the link's thread (e.g. via QThread::started).

Definition at line 18 of file ADSBTCPLink.h.

Constructor & Destructor Documentation

◆ ADSBTCPLink()

ADSBTCPLink::ADSBTCPLink ( const QString &  hostAddress,
quint16  port = 30003,
QObject *  parent = nullptr 
)
explicit

Constructs an ADSBTCPLink object.

Parameters
hostAddressThe IP address or hostname of the host to connect to.
portThe port to connect to on the host.
parentThe parent object.

Definition at line 9 of file ADSBTCPLink.cc.

References error.

◆ ~ADSBTCPLink()

ADSBTCPLink::~ADSBTCPLink ( )

Destroys the ADSBTCPLink object.

Definition at line 47 of file ADSBTCPLink.cc.

Member Function Documentation

◆ adsbVehicleUpdate

void ADSBTCPLink::adsbVehicleUpdate ( const ADSB::VehicleInfo_t vehicleInfo)
signal

Emitted when an ADS-B vehicle update is received.

Parameters
vehicleInfoThe updated vehicle information.

◆ errorOccurred

void ADSBTCPLink::errorOccurred ( const QString &  errorMsg,
bool  stopped = false 
)
signal

Emitted when an error occurs.

Parameters
errorMsgThe error message.

◆ init()

bool ADSBTCPLink::init ( )

Attempts connection to a host.

Definition at line 52 of file ADSBTCPLink.cc.


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