##// END OF EJS Templates
Correction for MR
perrinel -
r517:c13ea1918c0c
parent child
Show More
@@ -263,8 +263,7 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range
263 const SqpRange &cacheRangeRequested,
263 const SqpRange &cacheRangeRequested,
264 QVector<AcquisitionDataPacket> dataAcquired)
264 QVector<AcquisitionDataPacket> dataAcquired)
265 {
265 {
266 auto var = impl->findVariable(vIdentifier);
266 if (auto var = impl->findVariable(vIdentifier)) {
267 if (var != nullptr) {
268 var->setRange(rangeRequested);
267 var->setRange(rangeRequested);
269 var->setCacheRange(cacheRangeRequested);
268 var->setCacheRange(cacheRangeRequested);
270 qCDebug(LOG_VariableController()) << tr("1: onDataProvided") << rangeRequested;
269 qCDebug(LOG_VariableController()) << tr("1: onDataProvided") << rangeRequested;
@@ -284,8 +283,7 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range
284
283
285 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress)
284 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress)
286 {
285 {
287 auto var = impl->findVariable(identifier);
286 if (auto var = impl->findVariable(identifier)) {
288 if (var != nullptr) {
289 impl->m_VariableModel->setDataProgress(var, progress);
287 impl->m_VariableModel->setDataProgress(var, progress);
290 }
288 }
291 else {
289 else {
@@ -331,14 +329,14 void VariableController::onAddSynchronized(std::shared_ptr<Variable> variable,
331 {
329 {
332 qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronized"
330 qCDebug(LOG_VariableController()) << "TORM: VariableController::onAddSynchronized"
333 << synchronizationGroupId;
331 << synchronizationGroupId;
334 auto vToVIdit = impl->m_VariableToIdentifierMap.find(variable);
332 auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(variable);
335 if (vToVIdit != impl->m_VariableToIdentifierMap.cend()) {
333 if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) {
336 auto itSynchroGroup
334 auto groupIdToVSGIt
337 = impl->m_GroupIdToVariableSynchronizationGroupMap.find(synchronizationGroupId);
335 = impl->m_GroupIdToVariableSynchronizationGroupMap.find(synchronizationGroupId);
338 if (itSynchroGroup != impl->m_GroupIdToVariableSynchronizationGroupMap.cend()) {
336 if (groupIdToVSGIt != impl->m_GroupIdToVariableSynchronizationGroupMap.cend()) {
339 impl->m_VariableIdGroupIdMap.insert(
337 impl->m_VariableIdGroupIdMap.insert(
340 std::make_pair(vToVIdit->second, synchronizationGroupId));
338 std::make_pair(varToVarIdIt->second, synchronizationGroupId));
341 itSynchroGroup->second->addVariableId(vToVIdit->second);
339 groupIdToVSGIt->second->addVariableId(varToVarIdIt->second);
342 }
340 }
343 else {
341 else {
344 qCCritical(LOG_VariableController())
342 qCCritical(LOG_VariableController())
@@ -359,13 +357,13 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
359 {
357 {
360 // NOTE: oldRange isn't really necessary since oldRange == variable->range().
358 // NOTE: oldRange isn't really necessary since oldRange == variable->range().
361
359
362 qCInfo(LOG_VariableController()) << "VariableController::onRequestDataLoading"
360 qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading"
363 << QThread::currentThread()->objectName();
361 << QThread::currentThread()->objectName();
364 // we want to load data of the variable for the dateTime.
362 // we want to load data of the variable for the dateTime.
365 // First we check if the cache contains some of them.
363 // First we check if the cache contains some of them.
366 // For the other, we ask the provider to give them.
364 // For the other, we ask the provider to give them.
367
365
368 foreach (auto var, variables) {
366 for (const auto &var : variables) {
369 qCDebug(LOG_VariableController()) << "processRequest for" << var->name();
367 qCDebug(LOG_VariableController()) << "processRequest for" << var->name();
370 impl->processRequest(var, range);
368 impl->processRequest(var, range);
371 }
369 }
@@ -373,9 +371,9 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
373 if (synchronise) {
371 if (synchronise) {
374 // Get the group ids
372 // Get the group ids
375 qCDebug(LOG_VariableController())
373 qCDebug(LOG_VariableController())
376 << "VariableController::onRequestDataLoading for synchro var ENABLE";
374 << "TORM VariableController::onRequestDataLoading for synchro var ENABLE";
377 auto groupIds = std::set<QUuid>();
375 auto groupIds = std::set<QUuid>();
378 foreach (auto var, variables) {
376 for (const auto &var : variables) {
379 auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(var);
377 auto varToVarIdIt = impl->m_VariableToIdentifierMap.find(var);
380 if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) {
378 if (varToVarIdIt != impl->m_VariableToIdentifierMap.cend()) {
381 auto vId = varToVarIdIt->second;
379 auto vId = varToVarIdIt->second;
@@ -391,7 +389,7 void VariableController::onRequestDataLoading(QVector<std::shared_ptr<Variable>
391 }
389 }
392
390
393 // We assume here all group ids exist
391 // We assume here all group ids exist
394 foreach (auto gId, groupIds) {
392 for (const auto &gId : groupIds) {
395 auto vSynchronizationGroup = impl->m_GroupIdToVariableSynchronizationGroupMap.at(gId);
393 auto vSynchronizationGroup = impl->m_GroupIdToVariableSynchronizationGroupMap.at(gId);
396 auto vSyncIds = vSynchronizationGroup->getIds();
394 auto vSyncIds = vSynchronizationGroup->getIds();
397 qCDebug(LOG_VariableController()) << "Var in synchro group ";
395 qCDebug(LOG_VariableController()) << "Var in synchro group ";
@@ -62,7 +62,9 void AmdaProvider::requestDataLoading(QUuid acqIdentifier, const DataProviderPar
62 const auto data = parameters.m_Data;
62 const auto data = parameters.m_Data;
63 for (const auto &dateTime : qAsConst(times)) {
63 for (const auto &dateTime : qAsConst(times)) {
64 this->retrieveData(acqIdentifier, dateTime, data);
64 this->retrieveData(acqIdentifier, dateTime, data);
65 QThread::msleep(200);
65
66 // TORM
67 // QThread::msleep(200);
66 }
68 }
67 }
69 }
68
70
@@ -92,7 +94,7 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa
92 auto endDate = dateFormat(dateTime.m_TEnd);
94 auto endDate = dateFormat(dateTime.m_TEnd);
93
95
94 auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)};
96 auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)};
95 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData url:") << url;
97 qCInfo(LOG_AmdaProvider()) << tr("TORM AmdaProvider::retrieveData url:") << url;
96 auto tempFile = std::make_shared<QTemporaryFile>();
98 auto tempFile = std::make_shared<QTemporaryFile>();
97
99
98 // LAMBDA
100 // LAMBDA
@@ -128,8 +130,8 void AmdaProvider::retrieveData(QUuid token, const SqpRange &dateTime, const QVa
128 auto downloadFileUrl = QUrl{QString{reply->readAll()}};
130 auto downloadFileUrl = QUrl{QString{reply->readAll()}};
129
131
130
132
131 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData downloadFileUrl:")
133 qCInfo(LOG_AmdaProvider())
132 << downloadFileUrl;
134 << tr("TORM AmdaProvider::retrieveData downloadFileUrl:") << downloadFileUrl;
133 // Executes request for downloading file //
135 // Executes request for downloading file //
134
136
135 // Creates destination file
137 // Creates destination file
General Comments 1
Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now