##// END OF EJS Templates
remove unused old parameter for worker
perrinel -
r1385:c105882e93b6
parent child
Show More
@@ -28,8 +28,6 struct AcquisitionRequest {
28 QUuid m_AcqIdentifier;
28 QUuid m_AcqIdentifier;
29 QUuid m_vIdentifier;
29 QUuid m_vIdentifier;
30 DataProviderParameters m_DataProviderParameters;
30 DataProviderParameters m_DataProviderParameters;
31 SqpRange m_RangeRequested;
32 SqpRange m_CacheRangeRequested;
33 int m_Size;
31 int m_Size;
34 int m_Progression;
32 int m_Progression;
35 std::shared_ptr<IDataProvider> m_Provider;
33 std::shared_ptr<IDataProvider> m_Provider;
@@ -28,8 +28,8 public:
28 explicit VariableAcquisitionWorker(QObject *parent = 0);
28 explicit VariableAcquisitionWorker(QObject *parent = 0);
29 virtual ~VariableAcquisitionWorker();
29 virtual ~VariableAcquisitionWorker();
30
30
31 QUuid pushVariableRequest(QUuid varRequestId, QUuid vIdentifier, SqpRange rangeRequested,
31 QUuid pushVariableRequest(QUuid varRequestId, QUuid vIdentifier,
32 SqpRange cacheRangeRequested, DataProviderParameters parameters,
32 DataProviderParameters parameters,
33 std::shared_ptr<IDataProvider> provider);
33 std::shared_ptr<IDataProvider> provider);
34
34
35 void abortProgressRequested(QUuid vIdentifier);
35 void abortProgressRequested(QUuid vIdentifier);
@@ -37,9 +37,7 public:
37 void initialize();
37 void initialize();
38 void finalize();
38 void finalize();
39 signals:
39 signals:
40 void dataProvided(QUuid vIdentifier, const SqpRange &rangeRequested,
40 void dataProvided(QUuid vIdentifier, QVector<AcquisitionDataPacket> dataAcquired);
41 const SqpRange &cacheRangeRequested,
42 QVector<AcquisitionDataPacket> dataAcquired);
43
41
44 void variableRequestInProgress(QUuid vIdentifier, double progress);
42 void variableRequestInProgress(QUuid vIdentifier, double progress);
45
43
@@ -112,9 +112,7 public slots:
112 void onUpdateDateTime(std::shared_ptr<Variable> variable, const SqpRange &dateTime);
112 void onUpdateDateTime(std::shared_ptr<Variable> variable, const SqpRange &dateTime);
113
113
114
114
115 void onDataProvided(QUuid vIdentifier, const SqpRange &rangeRequested,
115 void onDataProvided(QUuid vIdentifier, QVector<AcquisitionDataPacket> dataAcquired);
116 const SqpRange &cacheRangeRequested,
117 QVector<AcquisitionDataPacket> dataAcquired);
118
116
119 void onVariableRetrieveDataInProgress(QUuid identifier, double progress);
117 void onVariableRetrieveDataInProgress(QUuid identifier, double progress);
120
118
@@ -60,13 +60,12 VariableAcquisitionWorker::~VariableAcquisitionWorker()
60
60
61
61
62 QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid vIdentifier,
62 QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid vIdentifier,
63 SqpRange rangeRequested,
64 SqpRange cacheRangeRequested,
65 DataProviderParameters parameters,
63 DataProviderParameters parameters,
66 std::shared_ptr<IDataProvider> provider)
64 std::shared_ptr<IDataProvider> provider)
67 {
65 {
68 qCDebug(LOG_VariableAcquisitionWorker())
66 qCDebug(LOG_VariableAcquisitionWorker())
69 << tr("TORM VariableAcquisitionWorker::pushVariableRequest ") << cacheRangeRequested;
67 << tr("TORM VariableAcquisitionWorker::pushVariableRequest varRequestId: ") << varRequestId
68 << "vId: " << vIdentifier;
70 auto varRequestIdCanceled = QUuid();
69 auto varRequestIdCanceled = QUuid();
71
70
72 // Request creation
71 // Request creation
@@ -75,8 +74,6 QUuid VariableAcquisitionWorker::pushVariableRequest(QUuid varRequestId, QUuid v
75 acqRequest.m_VarRequestId = varRequestId;
74 acqRequest.m_VarRequestId = varRequestId;
76 acqRequest.m_vIdentifier = vIdentifier;
75 acqRequest.m_vIdentifier = vIdentifier;
77 acqRequest.m_DataProviderParameters = parameters;
76 acqRequest.m_DataProviderParameters = parameters;
78 acqRequest.m_RangeRequested = rangeRequested;
79 acqRequest.m_CacheRangeRequested = cacheRangeRequested;
80 acqRequest.m_Size = parameters.m_Times.size();
77 acqRequest.m_Size = parameters.m_Times.size();
81 acqRequest.m_Provider = provider;
78 acqRequest.m_Provider = provider;
82
79
@@ -230,12 +227,10 void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier,
230 // removed the finished request
227 // removed the finished request
231 if (acqRequest.m_Size == acqRequest.m_Progression) {
228 if (acqRequest.m_Size == acqRequest.m_Progression) {
232 auto varId = acqRequest.m_vIdentifier;
229 auto varId = acqRequest.m_vIdentifier;
233 auto rangeRequested = acqRequest.m_RangeRequested;
234 auto cacheRangeRequested = acqRequest.m_CacheRangeRequested;
235 // Return the data
230 // Return the data
236 aIdToADPVit = impl->m_AcqIdentifierToAcqDataPacketVectorMap.find(acqIdentifier);
231 aIdToADPVit = impl->m_AcqIdentifierToAcqDataPacketVectorMap.find(acqIdentifier);
237 if (aIdToADPVit != impl->m_AcqIdentifierToAcqDataPacketVectorMap.cend()) {
232 if (aIdToADPVit != impl->m_AcqIdentifierToAcqDataPacketVectorMap.cend()) {
238 emit dataProvided(varId, rangeRequested, cacheRangeRequested, aIdToADPVit->second);
233 emit dataProvided(varId, aIdToADPVit->second);
239 }
234 }
240 impl->unlock();
235 impl->unlock();
241
236
@@ -368,11 +368,6 VariableController::createVariable(const QString &name, const QVariantHash &meta
368
368
369 this->onRequestDataLoading(QVector<std::shared_ptr<Variable> >{newVariable}, range, false);
369 this->onRequestDataLoading(QVector<std::shared_ptr<Variable> >{newVariable}, range, false);
370
370
371 // auto varRequestId = QUuid::createUuid();
372 // qCInfo(LOG_VariableController()) << "createVariable: " << varId << varRequestId;
373 // impl->processRequest(newVariable, range, varRequestId);
374 // impl->updateVariableRequest(varRequestId);
375
376 emit variableAdded(newVariable);
371 emit variableAdded(newVariable);
377
372
378 return newVariable;
373 return newVariable;
@@ -441,8 +436,7 void VariableController::onUpdateDateTime(std::shared_ptr<Variable> variable,
441 this->onRequestDataLoading(QVector<std::shared_ptr<Variable> >{variable}, dateTime, synchro);
436 this->onRequestDataLoading(QVector<std::shared_ptr<Variable> >{variable}, dateTime, synchro);
442 }
437 }
443
438
444 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &rangeRequested,
439 void VariableController::onDataProvided(QUuid vIdentifier,
445 const SqpRange &cacheRangeRequested,
446 QVector<AcquisitionDataPacket> dataAcquired)
440 QVector<AcquisitionDataPacket> dataAcquired)
447 {
441 {
448 qCDebug(LOG_VariableController()) << tr("onDataProvided") << QThread::currentThread();
442 qCDebug(LOG_VariableController()) << tr("onDataProvided") << QThread::currentThread();
@@ -455,10 +449,11 void VariableController::onDataProvided(QUuid vIdentifier, const SqpRange &range
455
449
456 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress)
450 void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress)
457 {
451 {
458 qCDebug(LOG_VariableController())
452 qCDebug(LOG_VariableController()) << "TORM: variableController::onVariableRetrieveDataInProgress"
459 << "TORM: variableController::onVariableRetrieveDataInProgress"
453 << QThread::currentThread()->objectName() << progress;
460 << QThread::currentThread()->objectName() << progress;
461 if (auto var = impl->findVariable(identifier)) {
454 if (auto var = impl->findVariable(identifier)) {
455 qCDebug(LOG_VariableController())
456 << "TORM: variableController::onVariableRetrieveDataInProgress FOUND";
462 impl->m_VariableModel->setDataProgress(var, progress);
457 impl->m_VariableModel->setDataProgress(var, progress);
463 }
458 }
464 else {
459 else {
@@ -1059,8 +1054,7 void VariableController::VariableControllerPrivate::executeVarRequest(std::share
1059 qCDebug(LOG_VariableController()) << "executeVarRequest " << varRequest.m_RangeRequested
1054 qCDebug(LOG_VariableController()) << "executeVarRequest " << varRequest.m_RangeRequested
1060 << varRequest.m_CacheRangeRequested;
1055 << varRequest.m_CacheRangeRequested;
1061 m_VariableAcquisitionWorker->pushVariableRequest(
1056 m_VariableAcquisitionWorker->pushVariableRequest(
1062 varRequest.m_VariableGroupId, varId, varRequest.m_RangeRequested,
1057 varRequest.m_VariableGroupId, varId,
1063 varRequest.m_CacheRangeRequested,
1064 DataProviderParameters{std::move(notInCacheRangeList), var->metadata()},
1058 DataProviderParameters{std::move(notInCacheRangeList), var->metadata()},
1065 varProvider);
1059 varProvider);
1066 }
1060 }
General Comments 0
You need to be logged in to leave comments. Login now