263 lines
14 KiB
HTML
263 lines
14 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<!-- csdata.cpp -->
|
|
<title>CSData QML Type | CSDataQuick Documentation 1.2</title>
|
|
<link rel="stylesheet" type="text/css" href="style/online.css" />
|
|
<script type="text/javascript">
|
|
(function (i, s, o, g, r, a, m) {
|
|
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
|
(i[r].q = i[r].q || []).push(arguments)
|
|
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
|
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
|
|
|
ga('create', 'UA-24645639-4', 'qt.io');
|
|
ga('set', 'forceSSL', true);
|
|
ga('send', 'pageview');
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="header" id="header">
|
|
<header id="navbar" class="">
|
|
</header>
|
|
</div>
|
|
<div class="main">
|
|
<div class="main-rounded">
|
|
<div class="navigationbar">
|
|
<ul class="sub-navigation">
|
|
<li><a href="../../CSDataQuick.html">Home</a></li>
|
|
<li><a href="../docs.html" class="active">Documentation</a></li>
|
|
<li><a href="http://github.com/xiaoqiangwang/CSDataQuick/">Code</a></li>
|
|
<li><a href="https://github.com/xiaoqiangwang/CSDataQuick/issues/">Bug Reports</a></li>
|
|
</ul>
|
|
<div id="main_title_bar">
|
|
<h1>CSDataQuick Documentation</h1>
|
|
<div class="search_bar">
|
|
<script>
|
|
(function() {
|
|
var cx = '001693341472456439948:u9v0snkru3q';
|
|
var gcse = document.createElement('script');
|
|
gcse.type = 'text/javascript';
|
|
gcse.async = true;
|
|
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(gcse, s);
|
|
})();
|
|
</script>
|
|
<gcse:searchbox-only resultsUrl="search-results.html"></gcse:searchbox-only>
|
|
</div></div>
|
|
<ul>
|
|
<li><a href="index.html">CSDataQuick Documentation</a></li>
|
|
<li><a href="csdataquick-qmlmodules.html">QML Types</a></li>
|
|
<li>CSData QML Type</li>
|
|
</ul>
|
|
</div>
|
|
<div class="content">
|
|
<div class="line">
|
|
<div class="content mainContent">
|
|
<div class="sidebar">
|
|
<div class="toc">
|
|
<h3><a name="toc">Contents</a></h3>
|
|
<ul>
|
|
<li class="level1"><a href="qml-csdataquick-data-csdata.html#properties">Properties</a></li>
|
|
<li class="level1"><a href="qml-csdataquick-data-csdata.html#details">Detailed Description</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
|
<div class="context">
|
|
<h1 class="title">CSData QML Type</h1>
|
|
<span class="subtitle"></span>
|
|
<!-- $$$CSData-brief -->
|
|
<p>Object that represents control system data. <a href="qml-csdataquick-data-csdata.html#details">More...</a></p>
|
|
<!-- @@@CSData -->
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import CSDataQuick.Data 1.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-csdataquick-data-csdata.html"><a href="qcsdata.html">QCSData</a></td></tr></table></div><ul>
|
|
<li><a href="qml-csdataquick-data-csdata-members.html">List of all members, including inherited members</a></li>
|
|
</ul>
|
|
<a name="properties"></a>
|
|
<h2 id="properties">Properties</h2>
|
|
<ul>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#accessRight-prop">accessRight</a></b></b> : int</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#alarm-prop">alarm</a></b></b> : CSDataAlarm</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#connected-prop">connected</a></b></b> : bool</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#count-prop">count</a></b></b> : int</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#extraProperties-prop">extraProperties</a></b></b> : map</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#fieldType-prop">fieldType</a></b></b> : enumeration</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#host-prop">host</a></b></b> : string</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#precision-prop">precision</a></b></b> : int</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#range-prop">range</a></b></b> : CSDataRange</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#source-prop">source</a></b></b> : string</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#stateStrings-prop">stateStrings</a></b></b> : list</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#timeStamp-prop">timeStamp</a></b></b> : Date</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#units-prop">units</a></b></b> : string</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-data-csdata.html#value-prop">value</a></b></b> : var</li>
|
|
</ul>
|
|
<!-- $$$CSData-description -->
|
|
<a name="details"></a>
|
|
<h2 id="details">Detailed Description</h2>
|
|
<p>Example:</p>
|
|
<pre class="qml"><span class="type"><a href="qml-csdataquick-data-csdata.html">CSData</a></span> {
|
|
<span class="name">id</span>: <span class="name">voltagePV</span>
|
|
<span class="name">source</span>: <span class="string">'MTEST:Voltage'</span>
|
|
<span class="name">onValueChanged</span>: <span class="name">console</span>.<span class="name">log</span>(<span class="name">timeStamp</span>, <span class="string">' voltage = '</span>, <span class="name">value</span>)
|
|
}</pre>
|
|
<!-- @@@CSData -->
|
|
<h2>Property Documentation</h2>
|
|
<!-- $$$accessRight -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="accessRight-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="accessRight-prop"></a><span class="name">accessRight</span> : <span class="type">int</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the access right of the data.</p>
|
|
<p>This is a bitwise or of <a href="qcsdata.html#AccessFlag-enum">QCSData::AccessFlag</a>.</p>
|
|
</div></div><!-- @@@accessRight -->
|
|
<br/>
|
|
<!-- $$$alarm -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="alarm-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="alarm-prop"></a><span class="name">alarm</span> : <span class="type"><a href="qml-csdataquick-data-csdataalarm.html">CSDataAlarm</a></span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the alarm information.</p>
|
|
</div></div><!-- @@@alarm -->
|
|
<br/>
|
|
<!-- $$$connected -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="connected-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="connected-prop"></a><span class="name">connected</span> : <span class="type">bool</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property indicates wether the data is connected to a valid source.</p>
|
|
</div></div><!-- @@@connected -->
|
|
<br/>
|
|
<!-- $$$count -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="count-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="count-prop"></a><span class="name">count</span> : <span class="type">int</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the number of elements of the data.</p>
|
|
</div></div><!-- @@@count -->
|
|
<br/>
|
|
<!-- $$$extraProperties -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="extraProperties-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="extraProperties-prop"></a><span class="name">extraProperties</span> : <span class="type">map</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds any other properties specific to this instance.</p>
|
|
</div></div><!-- @@@extraProperties -->
|
|
<br/>
|
|
<!-- $$$fieldType -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="fieldType-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="fieldType-prop"></a><span class="name">fieldType</span> : <span class="type">enumeration</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds native type of the data.</p>
|
|
<p><b>See also </b><a href="qcsdata.html#FieldType-enum">QCSData::FieldType</a>.</p>
|
|
</div></div><!-- @@@fieldType -->
|
|
<br/>
|
|
<!-- $$$host -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="host-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="host-prop"></a><span class="name">host</span> : <span class="type">string</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the host name where the data source exists.</p>
|
|
</div></div><!-- @@@host -->
|
|
<br/>
|
|
<!-- $$$precision -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="precision-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="precision-prop"></a><span class="name">precision</span> : <span class="type">int</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>Precision of the data in case of float or double type.</p>
|
|
</div></div><!-- @@@precision -->
|
|
<br/>
|
|
<!-- $$$range -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="range-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="range-prop"></a><span class="name">range</span> : <span class="type"><a href="qml-csdataquick-data-csdatarange.html">CSDataRange</a></span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the limits information.</p>
|
|
</div></div><!-- @@@range -->
|
|
<br/>
|
|
<!-- $$$source -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="source-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="source-prop"></a><span class="name">source</span> : <span class="type">string</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the data's source name.</p>
|
|
<p>The source name is of form "[engine://]data_id". <i>engine://</i> selects the data engine where this data comes. If it is omitted, the default data engine is selected, which is EPICS channel access engine. <i>data_id</i> is the unique id to the data inside the selected data engine.</p>
|
|
<p>"ca://my_pv" or simply "my_pv" both specify the data comes from process variable <i>my_pv</i>.</p>
|
|
<p><b>Note: </b>If empty source name is assigned, the data will be be disconnected from the data engine if connected, and reset to its initial state.</p></div></div><!-- @@@source -->
|
|
<br/>
|
|
<!-- $$$stateStrings -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="stateStrings-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="stateStrings-prop"></a><span class="name">stateStrings</span> : <span class="type">list</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the string representation of data's enumerated states.</p>
|
|
</div></div><!-- @@@stateStrings -->
|
|
<br/>
|
|
<!-- $$$timeStamp -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="timeStamp-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="timeStamp-prop"></a><span class="name">timeStamp</span> : <span class="type"><a href="http://doc.qt.io/qt-5/qml-qtqml-date.html">Date</a></span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the timestamp of data's last change.</p>
|
|
</div></div><!-- @@@timeStamp -->
|
|
<br/>
|
|
<!-- $$$units -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="units-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="units-prop"></a><span class="name">units</span> : <span class="type">string</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the physical meaning of the data.</p>
|
|
</div></div><!-- @@@units -->
|
|
<br/>
|
|
<!-- $$$value -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="value-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="value-prop"></a><span class="name">value</span> : <span class="type"><a href="http://doc.qt.io/qt-5/qml-var.html">var</a></span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property holds the value of the data.</p>
|
|
<p>The value can be of scalar, array type or anything that the underlying data engine provides. However it might be upcasted to <a href="http://doc.qt.io/qt-5/qtqml-typesystem-basictypes.html">QML Basic Types</a>. In case of array type, the Javascript environment can only understand <a href="http://doc.qt.io/qt-5/qvector.html">QVector</a><int>, <a href="http://doc.qt.io/qt-5/qvector.html">QVector</a><double>.</p>
|
|
<p><b>Note: </b>Qt 5.6 and below does not understand <a href="http://doc.qt.io/qt-5/qvector.html">QVector</a> type at all. It requires helper functions for element-wise operation.</p><p><b>See also </b><a href="qml-csdataquick-components-utils.html#vectorGet-method">Utils::vectorGet</a> and <a href="qml-csdataquick-components-utils.html#vectorSet-method">Utils::vectorSet</a>.</p>
|
|
</div></div><!-- @@@value -->
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">Copyright (C) 2012-2021 Xiaoqiang Wang, Paul Scherrer Institute.</div>
|
|
</body>
|
|
</html>
|