@@ -343,7 +343,7 void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::updateToNextRe | |||||
343 | void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::cancelVarRequest( |
|
343 | void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::cancelVarRequest( | |
344 | QUuid varRequestId) |
|
344 | QUuid varRequestId) | |
345 | { |
|
345 | { | |
346 |
qC |
|
346 | qCDebug(LOG_VariableAcquisitionWorker()) | |
347 | << "VariableAcquisitionWorkerPrivate::cancelVarRequest 0"; |
|
347 | << "VariableAcquisitionWorkerPrivate::cancelVarRequest 0"; | |
348 | lockRead(); |
|
348 | lockRead(); | |
349 | // get all AcqIdentifier in link with varRequestId |
|
349 | // get all AcqIdentifier in link with varRequestId | |
@@ -360,7 +360,7 void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::cancelVarReque | |||||
360 | for (auto acqId : acqIdsToRm) { |
|
360 | for (auto acqId : acqIdsToRm) { | |
361 | removeAcqRequest(acqId); |
|
361 | removeAcqRequest(acqId); | |
362 | } |
|
362 | } | |
363 |
qC |
|
363 | qCDebug(LOG_VariableAcquisitionWorker()) | |
364 | << "VariableAcquisitionWorkerPrivate::cancelVarRequest end"; |
|
364 | << "VariableAcquisitionWorkerPrivate::cancelVarRequest end"; | |
365 | } |
|
365 | } | |
366 |
|
366 | |||
@@ -368,27 +368,19 void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::removeAcqReque | |||||
368 | QUuid acqRequestId) |
|
368 | QUuid acqRequestId) | |
369 | { |
|
369 | { | |
370 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
370 | qCDebug(LOG_VariableAcquisitionWorker()) | |
371 |
<< "VariableAcquisitionWorkerPrivate::removeAcqRequest |
|
371 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest"; | |
372 | QUuid vIdentifier; |
|
372 | QUuid vIdentifier; | |
373 | std::shared_ptr<IDataProvider> provider; |
|
373 | std::shared_ptr<IDataProvider> provider; | |
374 | lockRead(); |
|
374 | lockRead(); | |
375 | auto acqIt = m_AcqIdentifierToAcqRequestMap.find(acqRequestId); |
|
375 | auto acqIt = m_AcqIdentifierToAcqRequestMap.find(acqRequestId); | |
376 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
377 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 1"; |
|
|||
378 | if (acqIt != m_AcqIdentifierToAcqRequestMap.cend()) { |
|
376 | if (acqIt != m_AcqIdentifierToAcqRequestMap.cend()) { | |
379 | vIdentifier = acqIt->second.m_vIdentifier; |
|
377 | vIdentifier = acqIt->second.m_vIdentifier; | |
380 | provider = acqIt->second.m_Provider; |
|
378 | provider = acqIt->second.m_Provider; | |
381 |
|
379 | |||
382 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
383 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 2"; |
|
|||
384 | auto it = m_VIdentifierToCurrrentAcqIdNextIdPairMap.find(vIdentifier); |
|
380 | auto it = m_VIdentifierToCurrrentAcqIdNextIdPairMap.find(vIdentifier); | |
385 | if (it != m_VIdentifierToCurrrentAcqIdNextIdPairMap.cend()) { |
|
381 | if (it != m_VIdentifierToCurrrentAcqIdNextIdPairMap.cend()) { | |
386 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
387 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 3"; |
|
|||
388 | if (it->second.first == acqRequestId) { |
|
382 | if (it->second.first == acqRequestId) { | |
389 | // acqRequest is currently running -> let's aborting it |
|
383 | // acqRequest is currently running -> let's aborting it | |
390 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
391 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 4"; |
|
|||
392 | unlock(); |
|
384 | unlock(); | |
393 |
|
385 | |||
394 | // Remove the current request from the worker |
|
386 | // Remove the current request from the worker | |
@@ -396,35 +388,23 void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::removeAcqReque | |||||
396 |
|
388 | |||
397 | // notify the request aborting to the provider |
|
389 | // notify the request aborting to the provider | |
398 | provider->requestDataAborting(acqRequestId); |
|
390 | provider->requestDataAborting(acqRequestId); | |
399 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
400 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 5"; |
|
|||
401 | } |
|
391 | } | |
402 | else if (it->second.second == acqRequestId) { |
|
392 | else if (it->second.second == acqRequestId) { | |
403 | it->second.second = QUuid(); |
|
393 | it->second.second = QUuid(); | |
404 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
405 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 6"; |
|
|||
406 | unlock(); |
|
394 | unlock(); | |
407 | } |
|
395 | } | |
408 | else { |
|
396 | else { | |
409 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
410 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 7"; |
|
|||
411 | unlock(); |
|
397 | unlock(); | |
412 | } |
|
398 | } | |
413 | } |
|
399 | } | |
414 | else { |
|
400 | else { | |
415 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
416 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 8"; |
|
|||
417 | unlock(); |
|
401 | unlock(); | |
418 | } |
|
402 | } | |
419 | } |
|
403 | } | |
420 | else { |
|
404 | else { | |
421 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
422 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 9"; |
|
|||
423 | unlock(); |
|
405 | unlock(); | |
424 | } |
|
406 | } | |
425 |
|
407 | |||
426 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
|||
427 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest 10"; |
|
|||
428 | lockWrite(); |
|
408 | lockWrite(); | |
429 |
|
409 | |||
430 | m_AcqIdentifierToAcqDataPacketVectorMap.erase(acqRequestId); |
|
410 | m_AcqIdentifierToAcqDataPacketVectorMap.erase(acqRequestId); | |
@@ -432,5 +412,5 void VariableAcquisitionWorker::VariableAcquisitionWorkerPrivate::removeAcqReque | |||||
432 |
|
412 | |||
433 | unlock(); |
|
413 | unlock(); | |
434 | qCDebug(LOG_VariableAcquisitionWorker()) |
|
414 | qCDebug(LOG_VariableAcquisitionWorker()) | |
435 |
<< "VariableAcquisitionWorkerPrivate::removeAcqRequest |
|
415 | << "VariableAcquisitionWorkerPrivate::removeAcqRequest END"; | |
436 | } |
|
416 | } |
General Comments 0
You need to be logged in to leave comments.
Login now