CSData QML Type

Object that represents control system data. More...

Import Statement: import CSDataQuick.Data 1.0
Instantiates: QCSData

Properties

Detailed Description

Example:

CSData {
    id: voltagePV
    source: 'MTEST:Voltage'
    onValueChanged: console.log(timeStamp, ' voltage = ', value)
}

Property Documentation

accessRight : int

This property holds the access right of the data.

This is a bitwise or of QCSData::AccessFlag.


alarm : CSDataAlarm

This property holds the alarm information.


connected : bool

This property indicates wether the data is connected to a valid source.


count : int

This property holds the number of elements of the data.


extraProperties : map

This property holds any other properties specific to this instance.


fieldType : enumeration

This property holds native type of the data.

See also QCSData::FieldType.


host : string

This property holds the host name where the data source exists.


precision : int

Precision of the data in case of float or double type.


range : CSDataRange

This property holds the limits information.


source : string

This property holds the data's source name.

The source name is of form "[engine://]data_id". engine:// selects the data engine where this data comes. If it is omitted, the default data engine is selected, which is EPICS channel access engine. data_id is the unique id to the data inside the selected data engine.

"ca://my_pv" or simply "my_pv" both specify the data comes from process variable my_pv.

Note: If empty source name is assigned, the data will be be disconnected from the data engine if connected, and reset to its initial state.


stateStrings : list

This property holds the string representation of data's enumerated states.


timeStamp : Date

This property holds the timestamp of data's last change.


units : string

This property holds the physical meaning of the data.


value : var

This property holds the value of the data.

The value can be of scalar, array type or anything that the underlying data engine provides. However it might be upcasted to QML Basic Types. In case of array type, the Javascript environment can only understand QVector<int>, QVector<double>.

Note: Qt 5.6 and below does not understand QVector type at all. It requires helper functions for element-wise operation.

See also Utils::vectorGet and Utils::vectorSet.