forked from GerhardHoffmann/DCLibraries
Add reporting thread and download thread.
This commit is contained in:
parent
fd58f41c87
commit
8e287e3163
@ -75,7 +75,8 @@ V4.0 6.9.2023: activating DC-Bootloader in slve-lib (SM)
|
|||||||
//for CAmaster:
|
//for CAmaster:
|
||||||
|
|
||||||
class QSharedMemory;
|
class QSharedMemory;
|
||||||
|
class ReportingThread;
|
||||||
|
class DownloadThread;
|
||||||
class hwapi : public QObject,
|
class hwapi : public QObject,
|
||||||
public hwinf
|
public hwinf
|
||||||
{
|
{
|
||||||
@ -87,7 +88,8 @@ private:
|
|||||||
void sub_storeSendingText(QByteArray *buf) const;
|
void sub_storeSendingText(QByteArray *buf) const;
|
||||||
QTimer *hwapi_TimerPayment;
|
QTimer *hwapi_TimerPayment;
|
||||||
QSharedMemory *m_sharedMem;
|
QSharedMemory *m_sharedMem;
|
||||||
//QTimer *hwapi_triggerBL;
|
ReportingThread *m_reportingThread;
|
||||||
|
DownloadThread *m_downloadThread;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit hwapi(QWidget *parent = nullptr);
|
explicit hwapi(QWidget *parent = nullptr);
|
||||||
@ -1306,8 +1308,8 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// download device controller
|
// download device controller
|
||||||
void dcDownloadInit(QString const &fileToDownload) override;
|
|
||||||
void dcDownloadStart() override;
|
void dcDownloadStart() override;
|
||||||
|
void dcDownloadRequest(QString const &fileToDownload) override;
|
||||||
bool dcDownloadRequested() const override;
|
bool dcDownloadRequested() const override;
|
||||||
QString dcDownloadFileName() const override;
|
QString dcDownloadFileName() const override;
|
||||||
void dcDownloadResetRequest() override;
|
void dcDownloadResetRequest() override;
|
||||||
@ -1320,12 +1322,13 @@ public:
|
|||||||
void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber) override;
|
void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber) override;
|
||||||
uint16_t dcDownloadGetTotalBlockNumber() const override;
|
uint16_t dcDownloadGetTotalBlockNumber() const override;
|
||||||
uint16_t dcDownloadGetCurrentBlockNumber() 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
|
// already declared in interfaces.h
|
||||||
void hwapi_templatePrintFinished_OK(void) const;
|
void hwapi_templatePrintFinished_OK(void) const;
|
||||||
void hwapi_templatePrintFinished_Err(void) const;
|
void hwapi_templatePrintFinished_Err(void) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user