QCSDataEngineCA Class

Connect to EPICS process variables (PV) via Channel Access (CA). More...

Header: #include <QCSDataEngineCA>
Inherits: QCSDataEngine

Public Functions

QCSDataEngineCA(QObject *parent = Q_NULLPTR)
virtual ~QCSDataEngineCA()

Reimplemented Public Functions

virtual ObjectModel *allData()
virtual void close(QCSData *data)
virtual void create(QCSData *data)
virtual QString description()
virtual QString name()
virtual void setValue(QCSData *data, const QVariant value)

Additional Inherited Members

Detailed Description

Connect to EPICS process variables (PV) via Channel Access (CA).

This data engine source has a ca:// scheme, followed by the PV name. And since this is the default data engine, the ca:// scheme can be omitted.

If the PV value is of array type, the data type might be up casted to either int or double. This is because the qml engine transparent handles QVector<int> and QVector<double> Sequence Type to JavaScript Array. To always return the native data type, set the extraProperties:

QCSData data = new QCSData();
data->setExtraProperty("UseNativeType", true);
data->setSource("my_array_pv");

Note: it creates a preemptive channel access context, but anyway has a 100ms timer to flush the io to improve the IO efficiency.

Member Function Documentation

QCSDataEngineCA::QCSDataEngineCA(QObject *parent = Q_NULLPTR)

Default constructs an instance of QCSDataEngineCA.

[virtual] QCSDataEngineCA::~QCSDataEngineCA()

Destroys the instance of QCSDataEngineCA. The destructor is virtual.

[virtual] ObjectModel *QCSDataEngineCA::allData()

Reimplemented from QCSDataEngine::allData().

[virtual] void QCSDataEngineCA::close(QCSData *data)

Reimplemented from QCSDataEngine::close().

[virtual] void QCSDataEngineCA::create(QCSData *data)

Reimplemented from QCSDataEngine::create().

Creates the EPICS channel.

It calls ca_create_channel with a connection callback. In the callback, it calls ca_create_subscription to monitor value, alarm and property changes.

[virtual] QString QCSDataEngineCA::description()

Reimplemented from QCSDataEngine::description().

[virtual] QString QCSDataEngineCA::name()

Reimplemented from QCSDataEngine::name().

Returns the source scheme ca.

[virtual] void QCSDataEngineCA::setValue(QCSData *data, const QVariant value)

Reimplemented from QCSDataEngine::setValue().