Auto status change to "Under Review"
@@ -183,7 +183,7 void VariableAcquisitionWorker::onVariableAcquisitionFailed(QUuid acqIdentifier) | |||
|
183 | 183 | if (it != impl->m_AcqIdentifierToAcqRequestMap.cend()) { |
|
184 | 184 | auto request = it->second; |
|
185 | 185 | impl->unlock(); |
|
186 |
qC |
|
|
186 | qCDebug(LOG_VariableAcquisitionWorker()) << tr("onVariableAcquisitionFailed") | |
|
187 | 187 | << acqIdentifier << request.m_vIdentifier |
|
188 | 188 | << QThread::currentThread(); |
|
189 | 189 | emit variableCanceledRequested(request.m_vIdentifier); |
@@ -343,7 +343,7 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range | |||
|
343 | 343 | const SqpRange &cacheRangeRequested, |
|
344 | 344 | QVector<AcquisitionDataPacket> dataAcquired) |
|
345 | 345 | { |
|
346 |
qC |
|
|
346 | qCDebug(LOG_VariableController()) << tr("onDataProvided") << QThread::currentThread(); | |
|
347 | 347 | auto retrievedDataSeries = impl->retrieveDataSeries(dataAcquired); |
|
348 | 348 | auto varRequestId = impl->acceptVariableRequest(vIdentifier, retrievedDataSeries); |
|
349 | 349 | if (!varRequestId.isNull()) { |
@@ -367,6 +367,8 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, doub | |||
|
367 | 367 | |
|
368 | 368 | void VariableController::onAbortProgressRequested(std::shared_ptr<Variable> variable) |
|
369 | 369 | { |
|
370 | qCDebug(LOG_VariableController()) << "TORM: variableController::onAbortProgressRequested" | |
|
371 | << QThread::currentThread()->objectName() << variable->name(); | |
|
370 | 372 | |
|
371 | 373 | auto itVar = impl->m_VariableToIdentifierMap.find(variable); |
|
372 | 374 | if (itVar == impl->m_VariableToIdentifierMap.cend()) { |
@@ -490,7 +492,7 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||
|
490 | 492 | } |
|
491 | 493 | |
|
492 | 494 | auto varRequestId = QUuid::createUuid(); |
|
493 |
qC |
|
|
495 | qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading" | |
|
494 | 496 |
|
|
495 | 497 |
|
|
496 | 498 | |
@@ -509,7 +511,6 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||
|
509 | 511 | } |
|
510 | 512 | else { |
|
511 | 513 | auto vId = impl->m_VariableToIdentifierMap.at(variables.first()); |
|
512 | qCInfo(LOG_VariableController()) << "Var in synchro group 0" << vId; | |
|
513 | 514 | auto varIdToGroupIdIt = impl->m_VariableIdGroupIdMap.find(vId); |
|
514 | 515 | if (varIdToGroupIdIt != impl->m_VariableIdGroupIdMap.cend()) { |
|
515 | 516 | auto groupId = varIdToGroupIdIt->second; |
@@ -518,8 +519,6 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||
|
518 | 519 | = impl->m_GroupIdToVariableSynchronizationGroupMap.at(groupId); |
|
519 | 520 | auto vSyncIds = vSynchronizationGroup->getIds(); |
|
520 | 521 | |
|
521 | qCInfo(LOG_VariableController()) << "Var in synchro group 1" << groupId; | |
|
522 | ||
|
523 | 522 | auto varIds = std::list<QUuid>{}; |
|
524 | 523 | for (auto vId : vSyncIds) { |
|
525 | 524 | varIds.push_back(vId); |
@@ -531,7 +530,7 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable> | |||
|
531 | 530 | |
|
532 | 531 | // Don't process already processed var |
|
533 | 532 | if (var != nullptr) { |
|
534 |
qC |
|
|
533 | qCDebug(LOG_VariableController()) << "processRequest synchro for" << var->name() | |
|
535 | 534 | << varRequestId; |
|
536 | 535 | auto vSyncRangeRequested |
|
537 | 536 | = variables.contains(var) |
@@ -634,7 +633,7 void VariableController::VariableControllerPrivate::processRequest(std::shared_p | |||
|
634 | 633 | |
|
635 | 634 | switch (varHandler->m_State) { |
|
636 | 635 | case VariableRequestHandlerState::OFF: { |
|
637 |
qC |
|
|
636 | qCDebug(LOG_VariableController()) << tr("Process Request OFF") | |
|
638 | 637 |
|
|
639 | 638 |
|
|
640 | 639 | varHandler->m_RunningVarRequest = varRequest; |
@@ -643,7 +642,7 void VariableController::VariableControllerPrivate::processRequest(std::shared_p | |||
|
643 | 642 | break; |
|
644 | 643 | } |
|
645 | 644 | case VariableRequestHandlerState::RUNNING: { |
|
646 |
qC |
|
|
645 | qCDebug(LOG_VariableController()) << tr("Process Request RUNNING") | |
|
647 | 646 |
|
|
648 | 647 |
|
|
649 | 648 | varHandler->m_State = VariableRequestHandlerState::PENDING; |
@@ -651,7 +650,7 void VariableController::VariableControllerPrivate::processRequest(std::shared_p | |||
|
651 | 650 | break; |
|
652 | 651 | } |
|
653 | 652 | case VariableRequestHandlerState::PENDING: { |
|
654 |
qC |
|
|
653 | qCDebug(LOG_VariableController()) << tr("Process Request PENDING") | |
|
655 | 654 |
|
|
656 | 655 |
|
|
657 | 656 | auto variableGroupIdToCancel = varHandler->m_PendingVarRequest.m_VariableGroupId; |
@@ -741,7 +740,7 QUuid VariableController::VariableControllerPrivate::acceptVariableRequest( | |||
|
741 | 740 | |
|
742 | 741 | // Element traité, on a déjà toutes les données necessaires |
|
743 | 742 | auto varGroupId = varHandler->m_RunningVarRequest.m_VariableGroupId; |
|
744 |
qC |
|
|
743 | qCDebug(LOG_VariableController()) << "Variable::acceptVariableRequest" << varGroupId | |
|
745 | 744 | << m_VarGroupIdToVarIds.size(); |
|
746 | 745 | |
|
747 | 746 | return varHandler->m_RunningVarRequest.m_VariableGroupId; |
@@ -749,22 +748,19 QUuid VariableController::VariableControllerPrivate::acceptVariableRequest( | |||
|
749 | 748 | |
|
750 | 749 | void VariableController::VariableControllerPrivate::updateVariables(QUuid varRequestId) |
|
751 | 750 | { |
|
752 |
qC |
|
|
751 | qCDebug(LOG_VariableController()) << "VariableControllerPrivate::updateVariables" | |
|
753 | 752 | << QThread::currentThread()->objectName() << varRequestId; |
|
754 | 753 | |
|
755 | 754 | auto varGroupIdToVarIdsIt = m_VarGroupIdToVarIds.find(varRequestId); |
|
756 | 755 | if (varGroupIdToVarIdsIt == m_VarGroupIdToVarIds.end()) { |
|
757 | // TODO LOG cannot update since varGroupdId isn't here anymore | |
|
758 |
|
|
|
759 | << varRequestId; | |
|
756 | qCWarning(LOG_VariableController()) | |
|
757 | << tr("Impossible to updateVariables of unknown variables") << varRequestId; | |
|
760 | 758 | return; |
|
761 | 759 | } |
|
762 | 760 | |
|
763 | 761 | auto &varIds = varGroupIdToVarIdsIt->second; |
|
764 | 762 | auto varIdsEnd = varIds.end(); |
|
765 | 763 | bool processVariableUpdate = true; |
|
766 | qCInfo(LOG_VariableController()) | |
|
767 | << "VariableControllerPrivate::compute procss for group of size" << varIds.size(); | |
|
768 | 764 | for (auto varIdsIt = varIds.begin(); (varIdsIt != varIdsEnd) && processVariableUpdate; |
|
769 | 765 | ++varIdsIt) { |
|
770 | 766 | auto itVarHandler = m_VarIdToVarRequestHandler.find(*varIdsIt); |
@@ -774,7 +770,7 void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq | |||
|
774 | 770 | } |
|
775 | 771 | |
|
776 | 772 | if (processVariableUpdate) { |
|
777 |
qC |
|
|
773 | qCDebug(LOG_VariableController()) << "Final update OK for the var request" << varIds.size(); | |
|
778 | 774 | for (auto varIdsIt = varIds.begin(); varIdsIt != varIdsEnd; ++varIdsIt) { |
|
779 | 775 | auto itVarHandler = m_VarIdToVarRequestHandler.find(*varIdsIt); |
|
780 | 776 | if (itVarHandler != m_VarIdToVarRequestHandler.cend()) { |
@@ -782,18 +778,18 void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq | |||
|
782 | 778 | auto &varRequest = itVarHandler->second->m_RunningVarRequest; |
|
783 | 779 | var->setRange(varRequest.m_RangeRequested); |
|
784 | 780 | var->setCacheRange(varRequest.m_CacheRangeRequested); |
|
785 |
qC |
|
|
781 | qCDebug(LOG_VariableController()) << tr("1: onDataProvided") | |
|
786 | 782 | << varRequest.m_RangeRequested |
|
787 | 783 | << varRequest.m_CacheRangeRequested; |
|
788 |
qC |
|
|
784 | qCDebug(LOG_VariableController()) << tr("2: onDataProvided var points before") | |
|
789 | 785 | << var->nbPoints() |
|
790 | 786 | << varRequest.m_DataSeries->nbPoints(); |
|
791 | 787 | var->mergeDataSeries(varRequest.m_DataSeries); |
|
792 |
qC |
|
|
788 | qCDebug(LOG_VariableController()) << tr("3: onDataProvided var points after") | |
|
793 | 789 | << var->nbPoints(); |
|
794 | 790 | |
|
795 | 791 | emit var->updated(); |
|
796 |
qC |
|
|
792 | qCDebug(LOG_VariableController()) << tr("Update OK"); | |
|
797 | 793 | } |
|
798 | 794 | else { |
|
799 | 795 | qCCritical(LOG_VariableController()) |
@@ -804,7 +800,7 void VariableController::VariableControllerPrivate::updateVariables(QUuid varReq | |||
|
804 | 800 | updateVariableRequest(varRequestId); |
|
805 | 801 | |
|
806 | 802 | // cleaning varRequestId |
|
807 |
qC |
|
|
803 | qCDebug(LOG_VariableController()) << tr("m_VarGroupIdToVarIds erase") << varRequestId; | |
|
808 | 804 | m_VarGroupIdToVarIds.erase(varRequestId); |
|
809 | 805 | } |
|
810 | 806 | } |
@@ -857,6 +853,8 void VariableController::VariableControllerPrivate::updateVariableRequest(QUuid | |||
|
857 | 853 | |
|
858 | 854 | void VariableController::VariableControllerPrivate::cancelVariableRequest(QUuid varRequestId) |
|
859 | 855 | { |
|
856 | qCDebug(LOG_VariableController()) << tr("cancelVariableRequest") << varRequestId; | |
|
857 | ||
|
860 | 858 | auto varGroupIdToVarIdsIt = m_VarGroupIdToVarIds.find(varRequestId); |
|
861 | 859 | if (varGroupIdToVarIdsIt == m_VarGroupIdToVarIds.end()) { |
|
862 | 860 | qCCritical(LOG_VariableController()) |
@@ -927,13 +925,14 void VariableController::VariableControllerPrivate::cancelVariableRequest(QUuid | |||
|
927 | 925 | } |
|
928 | 926 | } |
|
929 | 927 | } |
|
928 | qCDebug(LOG_VariableController()) << tr("cancelVariableRequest: erase") << varRequestId; | |
|
930 | 929 | m_VarGroupIdToVarIds.erase(varRequestId); |
|
931 | 930 | } |
|
932 | 931 | |
|
933 | 932 | void VariableController::VariableControllerPrivate::executeVarRequest(std::shared_ptr<Variable> var, |
|
934 | 933 | VariableRequest &varRequest) |
|
935 | 934 | { |
|
936 |
qC |
|
|
935 | qCDebug(LOG_VariableController()) << tr("TORM: executeVarRequest"); | |
|
937 | 936 | |
|
938 | 937 | auto varId = m_VariableToIdentifierMap.at(var); |
|
939 | 938 | |
@@ -948,8 +947,7 void VariableController::VariableControllerPrivate::executeVarRequest(std::share | |||
|
948 | 947 | |
|
949 | 948 | auto varProvider = m_VariableToProviderMap.at(var); |
|
950 | 949 | if (varProvider != nullptr) { |
|
951 |
qC |
|
|
952 | << varRequest.m_RangeRequested | |
|
950 | qCDebug(LOG_VariableController()) << "executeVarRequest " << varRequest.m_RangeRequested | |
|
953 | 951 |
|
|
954 | 952 | m_VariableAcquisitionWorker->pushVariableRequest( |
|
955 | 953 | varRequest.m_VariableGroupId, varId, varRequest.m_RangeRequested, |
@@ -203,8 +203,6 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa | |||
|
203 | 203 | emit dataProvidedFailed(dataId); |
|
204 | 204 | } |
|
205 | 205 | } |
|
206 | qCDebug(LOG_AmdaProvider()) << tr("acquisition requests erase because of finishing") | |
|
207 | << dataId; | |
|
208 | 206 | m_AcqIdToRequestProgressMap.erase(dataId); |
|
209 | 207 | } |
|
210 | 208 | else { |
@@ -237,8 +235,6 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa | |||
|
237 | 235 | } |
|
238 | 236 | } |
|
239 | 237 | else { |
|
240 | qCDebug(LOG_AmdaProvider()) | |
|
241 | << tr("acquisition requests erase because of aborting") << dataId; | |
|
242 | 238 | qCCritical(LOG_AmdaProvider()) << tr("httpFinishedLambda ERROR"); |
|
243 | 239 | m_AcqIdToRequestProgressMap.erase(dataId); |
|
244 | 240 | emit dataProvidedFailed(dataId); |
@@ -259,6 +255,7 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa | |||
|
259 | 255 | void AmdaProvider::updateRequestProgress(QUuid acqIdentifier, |
|
260 | 256 | std::shared_ptr<QNetworkRequest> request, double progress) |
|
261 | 257 | { |
|
258 | qCDebug(LOG_AmdaProvider()) << tr("updateRequestProgress request") << request.get(); | |
|
262 | 259 | auto acqIdToRequestProgressMapIt = m_AcqIdToRequestProgressMap.find(acqIdentifier); |
|
263 | 260 | if (acqIdToRequestProgressMapIt != m_AcqIdToRequestProgressMap.end()) { |
|
264 | 261 | auto &requestProgressMap = acqIdToRequestProgressMapIt->second; |
@@ -211,6 +211,9 std::shared_ptr<IDataSeries> AmdaResultParser::readTxt(const QString &filePath, | |||
|
211 | 211 | // Reads x-axis unit |
|
212 | 212 | stream.seek(0); // returns to the beginning of the file |
|
213 | 213 | auto xAxisUnit = readXAxisUnit(stream); |
|
214 | if (xAxisUnit.m_Name.isEmpty()) { | |
|
215 | return nullptr; | |
|
216 | } | |
|
214 | 217 | |
|
215 | 218 | // Reads results |
|
216 | 219 | // AMDA V2: remove line |
General Comments 3
Merge lasted acquisition developpement on main Sciqlop branch
You need to be logged in to leave comments.
Login now