QCSData Class
This class represents control system data. More...
Public Types
enum | AccessFlag { NoAccess, ReadAccess, WriteAccess } |
flags | AccessFlags |
enum | FieldType { Invalid, String, Enum, Char, ..., Double } |
Properties
|
- 1 property inherited from QObject
Public Functions
QCSData(QObject *parent = Q_NULLPTR) | |
~QCSData() | |
int | accessRight() const |
QCSDataAlarm * | alarm() |
bool | connected() const |
qulonglong | count() const |
QVariantMap | extraProperties() const |
QVariant | extraProperty(const QString name) |
FieldType | fieldType() const |
QString | host() const |
int | precision() const |
QCSDataRange * | range() |
void | setExtraProperties(const QVariantMap properties) |
void | setSource(const QString source) |
QString | source() const |
QStringList | stateStrings() const |
QDateTime | timeStamp() const |
QString | units() const |
QVariant | value() const |
- 32 public functions inherited from QObject
Signals
void | accessRightChanged() |
void | alarmChanged() |
void | connectionChanged() |
void | countChanged() |
void | fieldTypeChanged() |
void | hostChanged() |
void | precisionChanged() |
void | rangeChanged() |
void | sourceChanged() |
void | stateStringsChanged() |
void | timeStampChanged() |
void | unitsChanged() |
void | valueChanged() |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
This class represents control system data.
The class is modeled after the EPICS process variable for control system data, which normally is a scalar or array value with describing meta data. In this class these are all represented as properties.
It is the source property that connects it to the control system, i.e. data engines. The data engine manages the conntions to the control system, populates the data properties.
See also QCSDataEngine.
Member Type Documentation
enum QCSData::AccessFlag
flags QCSData::AccessFlags
Constant | Value | Description |
---|---|---|
QCSData::NoAccess | 0x00 | No access to the data. |
QCSData::ReadAccess | 0x01 | Right to read. |
QCSData::WriteAccess | 0x02 | Right to write. |
The AccessFlags type is a typedef for QFlags<AccessFlag>. It stores an OR combination of AccessFlag values.
enum QCSData::FieldType
Constant | Value | Description |
---|---|---|
QCSData::Invalid | -1 | Invalid or disconnected data object |
QCSData::String | 0 | String of 8bit charactors. |
QCSData::Enum | 1 | An enumeration of choices |
QCSData::Char | 2 | 8 bit char |
QCSData::Short | 3 | 16 bit integer number |
QCSData::Integer | 4 | 32 bit integer number |
QCSData::Long | 5 | 64 bit integer number |
QCSData::Float | 6 | 32 bit float number |
QCSData::Double | 7 | 64 but float number |
Property Documentation
accessRight : const int
This property holds the access right of the data.
This is a bitwise or of QCSData::AccessFlag.
Access functions:
int | accessRight() const |
Notifier signal:
void | accessRightChanged() |
alarm : QCSDataAlarm * const
This property holds the alarm information.
Access functions:
QCSDataAlarm * | alarm() |
Notifier signal:
void | alarmChanged() |
connected : const bool
This property indicates wether the data is connected to a valid source.
Access functions:
bool | connected() const |
Notifier signal:
void | connectionChanged() |
count : const qulonglong
This property holds the number of elements of the data.
Access functions:
qulonglong | count() const |
Notifier signal:
void | countChanged() |
extraProperties : QVariantMap
This property holds any other properties specific to this instance.
Access functions:
QVariantMap | extraProperties() const |
void | setExtraProperties(const QVariantMap properties) |
fieldType : const FieldType
This property holds native type of the data.
Access functions:
FieldType | fieldType() const |
Notifier signal:
void | fieldTypeChanged() |
host : const QString
This property holds the host name where the data source exists.
Access functions:
QString | host() const |
Notifier signal:
void | hostChanged() |
precision : const int
Precision of the data in case of float or double type.
Access functions:
int | precision() const |
Notifier signal:
void | precisionChanged() |
range : QCSDataRange * const
This property holds the limits information.
Access functions:
QCSDataRange * | range() |
Notifier signal:
void | rangeChanged() |
See also QCSDataRange.
source : QString
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.
Access functions:
QString | source() const |
void | setSource(const QString source) |
Notifier signal:
void | sourceChanged() |
stateStrings : const QStringList
This property holds the string representation of data's enumerated states.
Access functions:
QStringList | stateStrings() const |
Notifier signal:
void | stateStringsChanged() |
timeStamp : const QDateTime
This property holds the timestamp of data's last change.
Access functions:
QDateTime | timeStamp() const |
Notifier signal:
void | timeStampChanged() |
units : const QString
This property holds the physical meaning of the data.
Access functions:
QString | units() const |
Notifier signal:
void | unitsChanged() |
value : const QVariant
This property holds the value of the data.
The value can of scalar, array type or anything that the underlying data engine provides.
Access functions:
QVariant | value() const |
Notifier signal:
void | valueChanged() |
Member Function Documentation
QCSData::QCSData(QObject *parent = Q_NULLPTR)
Construct a data object with the given parent.
QCSData::~QCSData()
Delete the data object and disconnect from data engine.
QVariant QCSData::extraProperty(const QString name)
Gets a specific extra property name.
See also QCSData::extraProperties.