QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
UdpIODevice.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QByteArray>
4#include <QtNetwork/QUdpSocket>
5
10class UdpIODevice: public QUdpSocket
11{
12 Q_OBJECT
13
14public:
15 explicit UdpIODevice(QObject *parent = nullptr);
17
18 bool canReadLine() const override;
19 qint64 readLineData(char* data, qint64 maxSize) override;
20 qint64 readData(char* data, qint64 maxSize) override;
21 bool isSequential() const override { return true; }
22
23private slots:
24 void _readAvailableData();
25
26private:
27 QByteArray _buffer;
28};
UdpIODevice provides a QIODevice interface over a QUdpSocket in server mode.
Definition UdpIODevice.h:11
qint64 readLineData(char *data, qint64 maxSize) override
bool isSequential() const override
Definition UdpIODevice.h:21
bool canReadLine() const override
qint64 readData(char *data, qint64 maxSize) override