Index: sources/storage/TreatmentLog.h =================================================================== diff -u -r928a1ed5d70358fc00c49df45725f989d16c370e -r5967e3c458599ea7af0f298e844eef89004acb03 --- sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 928a1ed5d70358fc00c49df45725f989d16c370e) +++ sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 5967e3c458599ea7af0f298e844eef89004acb03) @@ -40,6 +40,10 @@ { Q_OBJECT + const int _interval = 1000; // 1s + const int _pendingInterval= 60 ; // 1m + int _pendingCounter = 0 ; // + QString _treatmentLogPath; QString _treatmentLogPath_Pending; @@ -76,11 +80,12 @@ QString mPatientID = ""; QString mFileName = ""; } - _lastTxInfo; + _lastTxInfo; - QString _deviceID = ""; - QString _txCode = ""; // content of this value comes from CloudSync App. + QString _deviceID = ""; + QString _txCode = ""; // content of this value comes from CloudSync App. + QString _pendingTx = ""; enum Role { eValue, @@ -215,10 +220,17 @@ bool exportLog (); void exportLogConcurrent(); bool addTxCode(); + void sendPending(); + // Pending Tx Report + void testPendingTxReports (); // eMessageID_TxReport + NOTIFIER(isIdle) SINGLETON(TreatmentLog) +protected: + void timerEvent(QTimerEvent *) override; + public: void initModel(const AdjustTreatmentLogResponseData &vData, const QString &vPatientID); @@ -244,12 +256,10 @@ void doExport (); signals: - void didTreatmentLogSave( const QString &vDeviceID , - const QString &vPatientID , - const QString &vFileName ); - void didTxCodeReceive ( const QString &vTxCode ); + void didTxPending ( const QString &vFileName ); + void didTxCodeReceive ( const QString &vTxCode ); - void didNotification ( const QString &vNotification); + void didNotification ( const QString &vNotification ); }; }