|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <TCPGPSTransport.h>
Inheritance diagram for TCPGPSTransport:
Collaboration diagram for TCPGPSTransport:Public Member Functions | |
| TCPGPSTransport (QString host, quint16 port, GPSCancelToken cancelToken) | |
| ~TCPGPSTransport () override | |
| GPSOpenResult | open () override |
| bool | fatalError () const override |
| unsigned | fixedBaudrate () const override |
| Nonzero when the link cannot follow baud-rate changes (for example, a serial bridge). | |
| std::chrono::milliseconds | configurationWriteTimeout () const override |
Public Member Functions inherited from GPSDeviceTransport | |
| GPSReadResult | read (std::span< uint8_t > buffer, std::chrono::milliseconds timeout) override |
| GPSTransport (GPSCancelToken cancelToken) | |
Public Member Functions inherited from GPSTransport | |
| GPSTransport (GPSCancelToken cancelToken) | |
| virtual | ~GPSTransport () |
| bool | isCancelled () const |
| const GPSCancelToken & | cancelToken () const |
| GPSWriteResult | write (QByteArrayView bytes, QDeadlineTimer deadline) |
| virtual bool | setBaudrate (unsigned baudrate) |
Protected Member Functions | |
| QIODevice * | device () const override |
| The open device, or null before open(). | |
| void | retire () override |
| Retires the connection after a failed write that accepted bytes; by default closes the device. | |
Protected Member Functions inherited from GPSDeviceTransport | |
| virtual bool | readUnavailable () const |
| Whether read() fails without waiting; by default, when there is no device. | |
| virtual bool | waitReadable (QDeadlineTimer deadline) |
| Waits until input is buffered. Input reported buffered is delivered even after the link fails. | |
| virtual qint64 | take (std::span< uint8_t > buffer) |
| Takes buffered input. | |
| virtual GPSReadResult | readFailure () const |
| Describes a failed link; by default, a closed connection with the device's error. | |
| GPSWriteResult | writeData (QByteArrayView bytes, QDeadlineTimer deadline) override |
| Receives non-empty bytes and an unexpired, capped deadline that implementations must honor. | |
| virtual void | waitWritten (QDeadlineTimer &deadline) |
| Waits for queued bytes to drain. May expire deadline to end the write. | |
| virtual qint64 | confirmedWritten (int accepted, qint64 drained) |
| bool | waitUntil (const std::function< bool()> &done, QDeadlineTimer deadline) |
| bool | waitForDevice (const std::function< bool()> &ready, QDeadlineTimer deadline) |
Additional Inherited Members | |
Static Public Attributes inherited from GPSTransport | |
| static constexpr unsigned | BRIDGE_BAUDRATE = 115200 |
| static constexpr qint64 | READ_BUFFER_BYTES = 64 * 1024 |
| static constexpr qint64 | WRITE_BUFFER_BYTES = 4 * 1024 |
| Bytes a link queues for writing at once. | |
Owns a TCP socket on the receiver worker. A stop request wakes every wait at once. Serial-to-TCP bridges and their receivers must already run the link at BRIDGE_BAUDRATE.
Definition at line 15 of file TCPGPSTransport.h.
| TCPGPSTransport::TCPGPSTransport | ( | QString | host, |
| quint16 | port, | ||
| GPSCancelToken | cancelToken | ||
| ) |
Definition at line 26 of file TCPGPSTransport.cc.
|
overridedefault |
|
overridevirtual |
Reimplemented from GPSTransport.
Definition at line 63 of file TCPGPSTransport.cc.
|
overrideprotectedvirtual |
The open device, or null before open().
Implements GPSDeviceTransport.
Definition at line 58 of file TCPGPSTransport.cc.
|
overridevirtual |
Implements GPSTransport.
Definition at line 53 of file TCPGPSTransport.cc.
|
inlineoverridevirtual |
Nonzero when the link cannot follow baud-rate changes (for example, a serial bridge).
Reimplemented from GPSTransport.
Definition at line 24 of file TCPGPSTransport.h.
References GPSTransport::BRIDGE_BAUDRATE.
|
overridevirtual |
Implements GPSTransport.
Definition at line 34 of file TCPGPSTransport.cc.
References Cancelled, GPSTransport::isCancelled(), Opened, GPSTransport::READ_BUFFER_BYTES, and GPSDeviceTransport::waitForDevice().
|
overrideprotectedvirtual |
Retires the connection after a failed write that accepted bytes; by default closes the device.
Reimplemented from GPSDeviceTransport.
Definition at line 68 of file TCPGPSTransport.cc.