Viewer and Builder
Viewer
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.
This document contains texts from MEDM Reference Manual when applicable.
Command Line
Option | Meaning |
---|---|
-h, --help | Displays usage. |
-v, --version | Displays version information. |
-x, --execute | Open in execute mode. (This is the default.) |
-c, --convert | Open in conversion mode. The display list files are parsed and converted to QML files with the same base name in the current directory. |
-e, --edit | Open in editor mode. (Not implemented.) |
-l, --local | Do not transfer operation to an existing viewer, and do not allow transfer of operation from any other viewer. (This is the default.) |
-a, --attach | 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. |
-cleanup | Ignore any existing viewer and take over responsibility for accepting remote transfers. |
--noMsg | Do not create the main window. |
-m, --macro name=value | Apply macro substitution to replace occurences of $(name) with value in all command-line specified display list files. |
--dg, --displayGeometry | Specify the geometry (location and size) of the display window. The geometry syntax is similar to the X Windows geometry option. |
Start up two displays:
$ csdq_viewer adc.adl bded.qml &
Start up in execute mode, performing macro substitution of all occurrences of $(a) and $(c) in the display file, xyz.adl:
$ csdq_viewer -x -macro "a=b,c=d" xyz.adl &
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:
$ csdq_viewer -x -dg 100x100+100+100 abc.adl &
Context Popup Menu
Context popup menu is invoked by mouse right click anywhere on the background.
Menu | Function |
---|---|
Prints the display. | |
Reload | Reopen the display. |
Close | Close the display. |
Main Window | Pops up the main windows. This is useful if you canno find it. |
Dsiplay List | 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. |
Data Engines | Brings up a dialog box with a table of CSData objects created by all displays. |
Execute | Submenu configured by MEDM_EXEC_LIST. |
Execute Menu
This menu is configured by MEDM_EXEC_LIST environment variable. This variable is of the form:
name1; program1[[:name2; program2]...]
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 & 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.
The system command can include the following special characters:
&A | The full path name of the display file associated with the display. |
&T | The short name of the file. (This should be the same as the title of the display.) |
&X | The X window id of the display screen. This can be used with commands like Xwd, for example. |
&? | Truncate the command at this point and prompt the user to finish or otherwise edit the command. |
Environment Variables
Variable | Usage |
---|---|
| 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 "./" or "../". Only looks in the current working directory if not specified. |
MEDM_EXEC_LIST | A list of commands for the Execute-Mode Popup Menu. See the Execute Menu for the format. |
Differences to MEDM
- Command line options
- -cmap, -displayFont and -bigMousePointer are not applicable.
- -dg option can only appear once before display files. This makes it effectly only applicable to one display file.
- Resizing displays. The contents of the display are not scaled at all.
- Execute Menu. The &P special character is not handled.
- Drag-And-Drop. It does not support drag-and-drop. But the CSData source can be copied via context menu Copy Source.
Differences to EDM
- Command line options
- -x, -m options are supported.
- Use -attach in place of -server.
- Any other options are not supported.
- Pv types CALC and LOG are not supported.
- Dynamic colors are not supported.
Differences to caQtDM
- Widgets not supported: caCalc, caClock, caDoubleTabWidget, caTable, caMimeDisplay, caWaterfallPlot
- Widgets with equivalents but difficult to substitute automatically: caCamera -> CSADImage, caScan2D -> CS2DSscan
- Connection (signal/slot) definition not supported. But this can easily achieved in QML.
builder
builder is a program to build one-time displays. User enters the CSData source and choose the visual item type.
The created items will be organised into a grid.
See also Execute Menu.