QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RTCMMavlink.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <atomic>
5
6#include "DataRateTracker.h"
7
8typedef struct __mavlink_gps_rtcm_data_t mavlink_gps_rtcm_data_t;
9
10class RTCMMavlink : public QObject
11{
12 Q_OBJECT
13 Q_PROPERTY(quint64 totalBytesSent READ totalBytesSent NOTIFY bandwidthChanged)
14 Q_PROPERTY(double bandwidthKBps READ bandwidthKBps NOTIFY bandwidthChanged)
15
16public:
17 RTCMMavlink(QObject* parent = nullptr);
19
20 quint64 totalBytesSent() const { return _rateTracker.totalBytes(); }
21
22 double bandwidthKBps() const { return _rateTracker.kBps(); }
23
24public slots:
25 void RTCMDataUpdate(QByteArrayView data);
26
27public:
30 void sendSimulatedData(const std::atomic_bool& requestStop);
31
32signals:
34
35private:
36 static void _sendMessageToVehicle(const mavlink_gps_rtcm_data_t& data);
37
38 uint8_t _sequenceId = 0;
39 DataRateTracker _rateTracker;
40};
double kBps() const
Current data rate in KB/s.
quint64 totalBytes() const
Total bytes recorded since construction or last reset.