Add reporting thread and download thread.

This commit is contained in:
Gerhard Hoffmann 2023-12-03 19:52:48 +01:00
parent fd58f41c87
commit 8e287e3163

View File

@ -75,7 +75,8 @@ V4.0 6.9.2023: activating DC-Bootloader in slve-lib (SM)
//for CAmaster:
class QSharedMemory;
class ReportingThread;
class DownloadThread;
class hwapi : public QObject,
public hwinf
{
@ -87,7 +88,8 @@ private:
void sub_storeSendingText(QByteArray *buf) const;
QTimer *hwapi_TimerPayment;
QSharedMemory *m_sharedMem;
//QTimer *hwapi_triggerBL;
ReportingThread *m_reportingThread;
DownloadThread *m_downloadThread;
public:
explicit hwapi(QWidget *parent = nullptr);
@ -1306,8 +1308,8 @@ public:
// download device controller
void dcDownloadInit(QString const &fileToDownload) override;
void dcDownloadStart() override;
void dcDownloadRequest(QString const &fileToDownload) override;
bool dcDownloadRequested() const override;
QString dcDownloadFileName() const override;
void dcDownloadResetRequest() override;
@ -1320,12 +1322,13 @@ public:
void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber) override;
uint16_t dcDownloadGetTotalBlockNumber() const override;
uint16_t dcDownloadGetCurrentBlockNumber() const override;
signals: // for download
void hwapi_reportDCDownloadStatus(QString const &status);
void hwapi_reportDCDownloadSuccess(QString const &msg);
void hwapi_reportDCDownloadFailure(QString const &errorMsg);
signals:
virtual hwapi *getAPI() override;
signals: // for download
void hwapi_reportDCDownloadStatus(QString const &) const;
void hwapi_reportDCDownloadSuccess(QString const &) const;
void hwapi_reportDCDownloadFailure(QString const &) const;
// already declared in interfaces.h
void hwapi_templatePrintFinished_OK(void) const;
void hwapi_templatePrintFinished_Err(void) const;