Files
gitea-pages/software/CSDataQuick/docs/programs.html
T
2025-07-08 08:18:09 +02:00

191 lines
13 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" />
<!-- demos_programs.qdoc -->
<title>Viewer and Builder | 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>Viewer and Builder</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="programs.html#viewer">Viewer</a></li>
<li class="level2"><a href="programs.html#command-line">Command Line</a></li>
<li class="level1"><a href="programs.html#context-popup-menu">Context Popup Menu</a></li>
<li class="level3"><a href="programs.html#execute-menu">Execute Menu</a></li>
<li class="level2"><a href="programs.html#environment-variables">Environment Variables</a></li>
<li class="level2"><a href="programs.html#differences-to-medm">Differences to MEDM</a></li>
<li class="level2"><a href="programs.html#differences-to-edm">Differences to EDM</a></li>
<li class="level2"><a href="programs.html#differences-to-caqtdm">Differences to caQtDM</a></li>
<li class="level1"><a href="programs.html#builder">builder</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<div class="context">
<h1 class="title">Viewer and Builder</h1>
<span class="subtitle"></span>
<!-- $$$programs.html-description -->
<div class="descr"> <a name="details"></a>
<a name="viewer"></a>
<h2 id="viewer">Viewer</h2>
<p>Viewer parses an MEDM ASCII Display List(ADL) file, EDM (EDL) file or caQtDM (UI) file and creates an equivalent display using CSDataQuick. Of course it accepts QML file as well. It can be a drop-in replacement to MEDM, EDM and caQtDM in execute mode.</p>
<p>This document contains texts from <a href="http://www.aps.anl.gov/epics/EpicsDocumentation/ExtensionsManuals/MEDM/MEDM.html">MEDM Reference Manual</a> when applicable.</p>
<a name="command-line"></a>
<h3 >Command Line</h3>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Option</th><th >Meaning</th></tr></thead>
<tr valign="top" class="odd"><td >-h, --help</td><td >Displays usage.</td></tr>
<tr valign="top" class="even"><td >-v, --version</td><td >Displays version information.</td></tr>
<tr valign="top" class="odd"><td >-x, --execute</td><td >Open in execute mode. (This is the default.)</td></tr>
<tr valign="top" class="even"><td >-c, --convert</td><td >Open in conversion mode. The display list files are parsed and converted to QML files with the same base name in the current directory.</td></tr>
<tr valign="top" class="odd"><td >-e, --edit</td><td >Open in editor mode. (Not implemented.)</td></tr>
<tr valign="top" class="even"><td >-l, --local</td><td >Do not transfer operation to an existing viewer, and do not allow transfer of operation from any other viewer. (This is the default.)</td></tr>
<tr valign="top" class="odd"><td >-a, --attach</td><td >Transfer operation to an existing viewer if there is one which is accepting transfers, or have this one assume responsibility for accepting transfers if there is not one. This can lead to more efficient operation and is appropriate if many screens are running on one display, such as in a control room. You must give the first viewer time to establish itself before attempting to attach to it.</td></tr>
<tr valign="top" class="even"><td >-cleanup</td><td >Ignore any existing viewer and take over responsibility for accepting remote transfers.</td></tr>
<tr valign="top" class="odd"><td >--noMsg</td><td >Do not create the main window.</td></tr>
<tr valign="top" class="even"><td >-m, --macro <i>name=value</i></td><td >Apply macro substitution to replace occurences of $(<i>name</i>) with <i>value</i> in all command-line specified display list files.</td></tr>
<tr valign="top" class="odd"><td >--dg, --displayGeometry</td><td >Specify the geometry (location and size) of the display window. The geometry syntax is similar to the <a href="https://en.wikibooks.org/wiki/Guide_to_X11/Starting_Programs#Specifying_window_geometry">X Windows geometry option</a>.</td></tr>
</table></div>
<p>Start up two displays:</p>
<pre class="cpp">$ csdq_viewer adc<span class="operator">.</span>adl bded<span class="operator">.</span>qml <span class="operator">&amp;</span></pre>
<p>Start up in execute mode, performing macro substitution of all occurrences of $(a) and $(c) in the display file, xyz.adl:</p>
<pre class="cpp">$ csdq_viewer <span class="operator">-</span>x <span class="operator">-</span>macro <span class="string">&quot;a=b,c=d&quot;</span> xyz<span class="operator">.</span>adl <span class="operator">&amp;</span></pre>
<p>Start up in execute mode; resize the display window corresponding to abc.adl to 100 by 100 pixels and move it to the location, x = 100 and y = 100:</p>
<pre class="cpp">$ csdq_viewer <span class="operator">-</span>x <span class="operator">-</span>dg <span class="number">100x100</span><span class="operator">+</span><span class="number">100</span><span class="operator">+</span><span class="number">100</span> abc<span class="operator">.</span>adl <span class="operator">&amp;</span></pre>
<a name="context-popup-menu"></a>
<h2 id="context-popup-menu">Context Popup Menu</h2>
<p>Context popup menu is invoked by mouse right click anywhere on the background.</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Menu</th><th >Function</th></tr></thead>
<tr valign="top" class="odd"><td >Print</td><td >Prints the display.</td></tr>
<tr valign="top" class="even"><td >Reload</td><td >Reopen the display.</td></tr>
<tr valign="top" class="odd"><td >Close</td><td >Close the display.</td></tr>
<tr valign="top" class="even"><td >Main Window</td><td >Pops up the main windows. This is useful if you canno find it.</td></tr>
<tr valign="top" class="odd"><td >Dsiplay List</td><td >Brings up a dialog box with a list of the file names of all the displays currently open. The displays are grouped by file names. And the same file name with different macro substitution will be displayed under the same group. Click on the macro substitution will raise the display.</td></tr>
<tr valign="top" class="even"><td >Data Engines</td><td >Brings up a dialog box with a table of <a href="csdataquick-cpp.html#csdata">CSData</a> objects created by all displays.</td></tr>
<tr valign="top" class="odd"><td >Execute</td><td >Submenu configured by <i>MEDM_EXEC_LIST</i>.</td></tr>
</table></div>
<a name="execute-menu"></a>
<h4 >Execute Menu</h4>
<p>This menu is configured by <i>MEDM_EXEC_LIST</i> environment variable. This variable is of the form:</p>
<pre class="cpp">name1; program1<span class="operator">[</span><span class="operator">[</span>:name2; program2<span class="operator">]</span><span class="operator">.</span><span class="operator">.</span><span class="operator">.</span><span class="operator">]</span></pre>
<p>The items between colons represent each menu item. All of the characters up to the first semi-colon in each item are the text that appears on the menu. The remaining characters represent the system command that will be executed when the item is selected. Note that on UNIX, if the command is not run in the background (using &amp; at the end), it will hold up MEDM until it finishes. On WIN32, if a colon is followed by a backslash (\), then it will be assumed that it is part of a path name and it will not be counted as a menu-item delimiter.</p>
<p>The system command can include the following special characters:</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td >&amp;A</td><td >The full path name of the display file associated with the display.</td></tr>
<tr valign="top" class="even"><td >&amp;T</td><td >The short name of the file. (This should be the same as the title of the display.)</td></tr>
<tr valign="top" class="odd"><td >&amp;X</td><td >The X window id of the display screen. This can be used with commands like Xwd, for example.</td></tr>
<tr valign="top" class="even"><td >&amp;?</td><td >Truncate the command at this point and prompt the user to finish or otherwise edit the command.</td></tr>
</table></div>
<a name="environment-variables"></a>
<h3 >Environment Variables</h3>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Variable</th><th >Usage</th></tr></thead>
<tr valign="top" class="odd"><td ><ul>
<li>EPICS_DISPLAY_PATH</li>
<li>EDMDATAFILES</li>
<li>CAQTDM_DISPLAY_PATH</li>
<li>QML_DISPLAY_PATH</li>
</ul>
</td><td >A colon-separated (semi-colon-separated on WIN32) list of directories in which to look for display files that do not have absolute path names or names that begin with &quot;./&quot; or &quot;../&quot;. Only looks in the current working directory if not specified.</td></tr>
<tr valign="top" class="even"><td >MEDM_EXEC_LIST</td><td >A list of commands for the Execute-Mode Popup Menu. See the Execute Menu for the format.</td></tr>
</table></div>
<a name="differences-to-medm"></a>
<h3 >Differences to MEDM</h3>
<ul>
<li>Command line options<ul>
<li><i>-cmap</i>, <i>-displayFont</i> and <i>-bigMousePointer</i> are not applicable.</li>
<li><i>-dg</i> option can only appear once before display files. This makes it effectly only applicable to one display file.</li>
</ul>
</li>
<li>Resizing displays. The contents of the display are not scaled at all.</li>
<li>Execute Menu. The <i>&amp;P</i> special character is not handled.</li>
<li>Drag-And-Drop. It does not support drag-and-drop. But the <a href="csdataquick-cpp.html#csdata">CSData</a> source can be copied via context menu <i>Copy Source</i>.</li>
</ul>
<a name="differences-to-edm"></a>
<h3 >Differences to EDM</h3>
<ul>
<li>Command line options<ul>
<li><i>-x</i>, <i>-m</i> options are supported.</li>
<li>Use <i>-attach</i> in place of <i>-server</i>.</li>
<li>Any other options are not supported.</li>
</ul>
</li>
<li>Pv types <i>CALC</i> and <i>LOG</i> are not supported.</li>
<li>Dynamic colors are not supported.</li>
</ul>
<a name="differences-to-caqtdm"></a>
<h3 >Differences to caQtDM</h3>
<ul>
<li>Widgets not supported: caCalc, caClock, caDoubleTabWidget, caTable, caMimeDisplay, caWaterfallPlot</li>
<li>Widgets with equivalents but difficult to substitute automatically: caCamera -&gt; <a href="qml-csdataquick-components-csadimage.html">CSADImage</a>, caScan2D -&gt; <a href="qml-csdataquick-components-cs2dsscan.html">CS2DSscan</a></li>
<li>Connection (signal/slot) definition not supported. But this can easily achieved in QML.</li>
</ul>
<a name="builder"></a>
<h2 id="builder">builder</h2>
<p>builder is a program to build one-time displays. User enters the <a href="csdataquick-cpp.html#csdata">CSData</a> source and choose the visual item type.</p>
<p class="centerAlign"><img src="images/builder-edit.png" alt="" /></p><p>The created items will be organised into a grid.</p>
<p class="centerAlign"><img src="images/builder-display.png" alt="" /></p></div>
<p><b>See also </b><a href="programs.html#execute-menu">Execute Menu</a>.</p>
<!-- @@@programs.html -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">Copyright (C) 2012-2021 Xiaoqiang Wang, Paul Scherrer Institute.</div>
</body>
</html>