diff --git a/core/include/Data/AcquisitionRequest.h b/core/include/Data/AcquisitionRequest.h index 9e2b0de..2095b5e 100644 --- a/core/include/Data/AcquisitionRequest.h +++ b/core/include/Data/AcquisitionRequest.h @@ -28,8 +28,6 @@ struct AcquisitionRequest { QUuid m_AcqIdentifier; QUuid m_vIdentifier; DataProviderParameters m_DataProviderParameters; - SqpRange m_RangeRequested; - SqpRange m_CacheRangeRequested; int m_Size; int m_Progression; std::shared_ptr m_Provider; diff --git a/core/include/Variable/VariableAcquisitionWorker.h b/core/include/Variable/VariableAcquisitionWorker.h index f5badbc..9b5ee8c 100644 --- a/core/include/Variable/VariableAcquisitionWorker.h +++ b/core/include/Variable/VariableAcquisitionWorker.h @@ -28,8 +28,8 @@ public: explicit VariableAcquisitionWorker(QObject *parent = 0); virtual ~VariableAcquisitionWorker(); - QUuid pushVariableRequest(QUuid varRequestId, QUuid vIdentifier, SqpRange rangeRequested, - SqpRange cacheRangeRequested, DataProviderParameters parameters, + QUuid pushVariableRequest(QUuid varRequestId, QUuid vIdentifier, + DataProviderParameters parameters, std::shared_ptr provider); void abortProgressRequested(QUuid vIdentifier); @@ -37,9 +37,7 @@ public: void initialize(); void finalize(); signals: - void dataProvided(QUuid vIdentifier, const SqpRange &rangeRequested, - const SqpRange &cacheRangeRequested, - QVector dataAcquired); + void dataProvided(QUuid vIdentifier, QVector dataAcquired); void variableRequestInProgress(QUuid vIdentifier, double progress); diff --git a/core/include/Variable/VariableController.h b/core/include/Variable/VariableController.h index 9238f8a..969b071 100644 --- a/core/include/Variable/VariableController.h +++ b/core/include/Variable/VariableController.h @@ -112,9 +112,7 @@ public slots: void onUpdateDateTime(std::shared_ptr variable, const SqpRange &dateTime); - void onDataProvided(QUuid vIdentifier, const SqpRange &rangeRequested, - const SqpRange &cacheRangeRequested, - QVector dataAcquired); + void onDataProvided(QUuid vIdentifier, QVector dataAcquired); void onVariableRetrieveDataInProgress(QUuid identifier, double progress); diff --git a/core/src/Variable/VariableAcquisitionWorker.cpp b/core/src/Variable/VariableAcquisitionWorker.cpp index 39c88e3..d595e5f 100644 --- a/core/src/Variable/VariableAcquisitionWorker.cpp +++ b/core/src/Variable/VariableAcquisitionWorker.cpp @@ -60,13 +60,12 @@ VariableAcquisitionWorker::~VariableAcquisitionWorker() QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid vIdentifier, - SqpRange rangeRequested, - SqpRange cacheRangeRequested, DataProviderParameters parameters, std::shared_ptr provider) { qCDebug(LOG_VariableAcquisitionWorker()) - << tr("TORM VariableAcquisitionWorker::pushVariableRequest ") << cacheRangeRequested; + << tr("TORM VariableAcquisitionWorker::pushVariableRequest varRequestId: ") << varRequestId + << "vId: " << vIdentifier; auto varRequestIdCanceled = QUuid(); // Request creation @@ -75,8 +74,6 @@ QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid v acqRequest.m_VarRequestId = varRequestId; acqRequest.m_vIdentifier = vIdentifier; acqRequest.m_DataProviderParameters = parameters; - acqRequest.m_RangeRequested = rangeRequested; - acqRequest.m_CacheRangeRequested = cacheRangeRequested; acqRequest.m_Size = parameters.m_Times.size(); acqRequest.m_Provider = provider; @@ -230,12 +227,10 @@ void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier, // removed the finished request if (acqRequest.m_Size == acqRequest.m_Progression) { auto varId = acqRequest.m_vIdentifier; - auto rangeRequested = acqRequest.m_RangeRequested; - auto cacheRangeRequested = acqRequest.m_CacheRangeRequested; // Return the data aIdToADPVit = impl->m_AcqIdentifierToAcqDataPacketVectorMap.find(acqIdentifier); if (aIdToADPVit != impl->m_AcqIdentifierToAcqDataPacketVectorMap.cend()) { - emit dataProvided(varId, rangeRequested, cacheRangeRequested, aIdToADPVit->second); + emit dataProvided(varId, aIdToADPVit->second); } impl->unlock(); diff --git a/core/src/Variable/VariableController.cpp b/core/src/Variable/VariableController.cpp index 916d0cb..0c38419 100644 --- a/core/src/Variable/VariableController.cpp +++ b/core/src/Variable/VariableController.cpp @@ -368,11 +368,6 @@ VariableController::createVariable(const QString &name, const QVariantHash &meta this->onRequestDataLoading(QVector >{newVariable}, range, false); - // auto varRequestId = QUuid::createUuid(); - // qCInfo(LOG_VariableController()) << "createVariable: " << varId << varRequestId; - // impl->processRequest(newVariable, range, varRequestId); - // impl->updateVariableRequest(varRequestId); - emit variableAdded(newVariable); return newVariable; @@ -441,8 +436,7 @@ void VariableController::onUpdateDateTime(std::shared_ptr variable, this->onRequestDataLoading(QVector >{variable}, dateTime, synchro); } -void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &rangeRequested, - const SqpRange &cacheRangeRequested, +void VariableController::onDataProvided(QUuid vIdentifier, QVector dataAcquired) { qCDebug(LOG_VariableController()) << tr("onDataProvided") << QThread::currentThread(); @@ -455,10 +449,11 @@ void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress) { - qCDebug(LOG_VariableController()) - << "TORM: variableController::onVariableRetrieveDataInProgress" - << QThread::currentThread()->objectName() << progress; + qCDebug(LOG_VariableController()) << "TORM: variableController::onVariableRetrieveDataInProgress" + << QThread::currentThread()->objectName() << progress; if (auto var = impl->findVariable(identifier)) { + qCDebug(LOG_VariableController()) + << "TORM: variableController::onVariableRetrieveDataInProgress FOUND"; impl->m_VariableModel->setDataProgress(var, progress); } else { @@ -1059,8 +1054,7 @@ void VariableController::VariableControllerPrivate::executeVarRequest(std::share qCDebug(LOG_VariableController()) << "executeVarRequest " << varRequest.m_RangeRequested << varRequest.m_CacheRangeRequested; m_VariableAcquisitionWorker->pushVariableRequest( - varRequest.m_VariableGroupId, varId, varRequest.m_RangeRequested, - varRequest.m_CacheRangeRequested, + varRequest.m_VariableGroupId, varId, DataProviderParameters{std::move(notInCacheRangeList), var->metadata()}, varProvider); }