20 Q_MOC_INCLUDE(
"Vehicle.h")
21 Q_MOC_INCLUDE(
"QmlObjectListModel.h")
39 Q_INVOKABLE
void download(const QString &path = QString());
71 void _setActiveVehicle(
Vehicle *vehicle);
73 void _logEntry(uint32_t time_utc, uint32_t size, uint16_t
id, uint16_t num_logs, uint16_t last_log_num);
74 void _logData(uint32_t ofs, uint16_t
id, uint8_t count,
const uint8_t *data);
75 void _processDownload();
76 void _handleCompressionProgress(qreal progress);
77 void _handleCompressionFinished(
bool success);
81 bool _getRequestingList()
const {
return _requestingLogEntries; }
82 bool _getDownloadingLogs()
const {
return _downloadingLogs; }
84 bool _chunkComplete()
const;
85 bool _entriesComplete()
const;
86 bool _logComplete()
const;
87 bool _prepareLogDownload();
88 void _downloadToDirectory(
const QString &dir);
89 void _findMissingData();
90 void _findMissingEntries();
91 void _receivedAllData();
92 void _receivedAllEntries();
93 void _requestLogData(uint16_t
id, uint32_t offset, uint32_t count,
int retryCount = 0);
94 void _requestLogList(uint32_t start, uint32_t end);
95 void _requestLogEnd();
96 void _resetSelection(
bool canceled =
false);
97 void _setDownloading(
bool active);
98 void _setListing(
bool active);
99 void _updateDataRate();
101 void _sortEntriesByTimestamp();
105 QTimer *_timer =
nullptr;
108 bool _downloadingLogs =
false;
109 bool _requestingLogEntries =
false;
112 std::unique_ptr<OnboardLogDownloadData> _downloadData;
113 QString _downloadPath;
115 bool _compressLogs =
false;
116 bool _compressing =
false;
117 float _compressionProgress = 0.0F;
118 bool _sortAscending =
false;
120 static constexpr uint32_t kTimeOutMs = 500;
121 static constexpr uint32_t kGUIRateMs = 500;
122 static constexpr uint32_t kRequestLogListTimeoutMs = 5000;