##// END OF EJS Templates
Some refactoring on PB11 wrappers...
Some refactoring on PB11 wrappers Most sciqlop core wrappers are moved into a dedicated python module. We needs to get rid off sqpapp! All current sciqlop modules should either be stateless or act as real singletons they must not need any app to be used. This will ease testing, wrapping and usage. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r761:ff170594501a
r1341:f18e017310bc
Show More
VariableAcquisitionWorker.h
66 lines | 1.9 KiB | text/x-c | CLexer
/ core / include / Variable / VariableAcquisitionWorker.h
#ifndef SCIQLOP_VARIABLEACQUISITIONWORKER_H
#define SCIQLOP_VARIABLEACQUISITIONWORKER_H
#include "CoreGlobal.h"
#include <Data/DataProviderParameters.h>
#include <QLoggingCategory>
#include <QObject>
#include <QUuid>
#include <Data/AcquisitionDataPacket.h>
#include <Data/IDataSeries.h>
#include <Data/SqpRange.h>
#include <QLoggingCategory>
#include <Common/spimpl.h>
Q_DECLARE_LOGGING_CATEGORY(LOG_VariableAcquisitionWorker)
class Variable;
class IDataProvider;
/// This class aims to handle all acquisition request
class SCIQLOP_CORE_EXPORT VariableAcquisitionWorker : public QObject {
Q_OBJECT
public:
explicit VariableAcquisitionWorker(QObject *parent = 0);
virtual ~VariableAcquisitionWorker();
QUuid pushVariableRequest(QUuid varRequestId, QUuid vIdentifier, SqpRange rangeRequested,
SqpRange cacheRangeRequested, DataProviderParameters parameters,
std::shared_ptr<IDataProvider> provider);
void abortProgressRequested(QUuid vIdentifier);
void initialize();
void finalize();
signals:
void dataProvided(QUuid vIdentifier, const SqpRange &rangeRequested,
const SqpRange &cacheRangeRequested,
QVector<AcquisitionDataPacket> dataAcquired);
void variableRequestInProgress(QUuid vIdentifier, double progress);
void variableCanceledRequested(QUuid vIdentifier);
public slots:
void onVariableDataAcquired(QUuid acqIdentifier, std::shared_ptr<IDataSeries> dataSeries,
SqpRange dataRangeAcquired);
void onVariableRetrieveDataInProgress(QUuid acqIdentifier, double progress);
void onVariableAcquisitionFailed(QUuid acqIdentifier);
private:
void waitForFinish();
class VariableAcquisitionWorkerPrivate;
spimpl::unique_impl_ptr<VariableAcquisitionWorkerPrivate> impl;
private slots:
void onExecuteRequest(QUuid acqIdentifier);
};
#endif // SCIQLOP_VARIABLEACQUISITIONWORKER_H