41 #include "gcstelemetrystats.h"
60 QPointer<class Telemetry>
telem;
87 QByteArray *
downloadFile(quint32 fileId, quint32 maxSize,
99 static const int REQ_TIMEOUT_MS = 2000;
100 static const int MAX_RETRIES = 5;
101 static const int MAX_UPDATE_PERIOD_MS = 1000;
102 static const int MIN_UPDATE_PERIOD_MS = 1;
103 static const int MAX_QUEUE_SIZE = 20;
113 EV_UPDATED_MANUAL = 0x04,
114 EV_UPDATED_PERIODIC = 0x8,
115 EV_UPDATE_REQ = 0x010
135 GCSTelemetryStats *gcsStatsObj;
136 QVector<ObjectTimeInfo> objList;
137 QQueue<ObjectQueueInfo> objQueue;
138 QQueue<ObjectQueueInfo> objPriorityQueue;
139 QMap<TransactionKey, ObjectTransactionInfo *> transMap;
142 qint32 timeToNextUpdateMs;
149 void setUpdatePeriod(
UAVObject *obj, qint32 periodMs);
150 void connectToObjectInstances(
UAVObject *obj, quint32 eventMask);
151 void updateObject(
UAVObject *obj, quint32 eventMask);
152 void processObjectUpdates(
UAVObject *obj, EventMask event,
bool allInstances,
bool priority);
154 void processObjectQueue();
155 bool updateTransactionMap(
UAVObject *obj,
bool request);
159 void objectUpdatedManual(
UAVObject *obj);
160 void objectUpdatedPeriodic(
UAVObject *obj);
163 void updateAllInstancesRequested(
UAVObject *obj);
166 void processPeriodicUpdates();
169 void transactionRequestCompleted(
UAVObject *obj);
172 #endif // TELEMETRY_H
QPointer< class Telemetry > telem
QByteArray * downloadFile(quint32 fileId, quint32 maxSize, std::function< void(quint32)>progressCb=nullptr)
qint32 timeToNextUpdateMs
ObjectTransactionInfo(QObject *parent)
void transactionTimeout(ObjectTransactionInfo *info)
TelemetryStats getStats()
The TransactionKey class A key for the QMap to track transactions.
Telemetry(UAVTalk *utalk, UAVObjectManager *objMngr)