35 #ifndef TELEMETRYMONITOR_H
36 #define TELEMETRYMONITOR_H
44 #include "gcstelemetrystats.h"
45 #include "flighttelemetrystats.h"
46 #include "systemstats.h"
75 void objectRetrieveTimeoutCB();
79 static const int STATS_UPDATE_PERIOD_MS = 1600;
80 static const int STATS_CONNECT_PERIOD_MS = 350;
81 static const int CONNECTION_TIMEOUT_MS = 8000;
82 static const int MAX_REQUESTS_IN_FLIGHT = 3;
83 enum connectionStatusEnum {
86 CON_RETRIEVING_OBJECTS,
92 connectionStatusEnum connectionStatus;
95 std::priority_queue<UAVObject *, std::vector<UAVObject *>, queueCompareFunc> queue;
96 GCSTelemetryStats *gcsStatsObj;
97 FlightTelemetryStats *flightStatsObj;
99 QTime *connectionTimer;
100 QTimer *objectRetrieveTimeout;
101 int requestsInFlight;
103 void startRetrievingObjects();
104 void retrieveNextObject();
107 #endif // TELEMETRYMONITOR_H
void transactionCompleted(UAVObject *obj, bool success, bool nacked)
TelemetryMonitor(UAVObjectManager *objMngr, Telemetry *tel)
void flightStatsUpdated(UAVObject *obj)
void processStatsUpdates()
void telemetryUpdated(double txRate, double rxRate)