Creating index.html ...

# EDM

## Extensible Display Manager

1-12

This document may be freely redistributed according to the terms of the GNU General Public License.

List of Figures

1.1. Example edm Widgets
3.1. Example edm Color Palette
3.2. Example edm Color Name Menu
3.3. Poor Quality Font
3.4. High Quality Font
3.5. Example Print Dialog Box
5.1. Display Schemes

## Introduction

With the introduction of tools like EPICS and VSystem, the task of building complex distributed control systems has been greatly simplified. Furthermore, extending both the content and functionality of these systems is a trivial task. This is generally not the case for applications that have been built on top of these core components and in most cases this is acceptable. There is one class of applications, namely interactive graphical display tools, where the lack of user extensibility is a severe liability. This deficiency arrests the growth of the suite of common display elements and prevents the development and customization of site specific elements for special requirements. Just as EPICS record and device support is easily extended without in-depth knowledge of the core software, so also should the elements of a display tool be extensible, again without in-depth knowledge of either the core behavior of the display tool or the more esoteric details of window-based graphical user interface systems.

Edm, one example of an EPICS display manager, is an attempt to fulfill this objective. A display manager is a tool that manages a collection of active displays. It provides the ability to create and edit display content (like graphics, text, meters, sliders, buttons, plots, etc.) and uses some facility (.e.g EPICS channel access) to execute the same content resulting in the dynamic presentation of live data.

## Other EPICS Display Managers

Additional examples of display managers for EPICS include the following:

• medm

• dm2k

• edd/dm

## Display Widgets

The following is a list of some of the more common edm widgets.

• Graphics

• Lines

• Rectangle

• Circle

• Arc

• Static Text

• GIF Image

• PNG Image

• HTML

• Dynamic Symbols (built from graphic elements)

• Monitors

• Meter

• Bar

• Message Box

• Text

• Byte

• X-Y Graph

• Symbols (built from graphic elements)

• Controls

• Text

• Slider

• Motif Slider (medm-like)

• Button

• Choice Button

• Message Button

• Up/Down Button

• Exit Button

• Related Display

• Shell Command

• Shell Command

• Multiplexor

Figure�1.1, “Example edm Widgets” is a screenshot showing several display elements provided by the base widject library.

## Editing Features

Editing functions include the following:

• Display grid/Snap to grid

• Orthogonal line draw/Orthogonal move

• Copy/Cut/Paste (across different displays)

• Raise/Lower

• Group/Ungroup

• Rotate 90/Flip

• Select group PV name edit

• Select group display info edit (colors/fonts)

• Align select group

• Center select group

• Uniformly size select group

• Distribute select group

## System Requirements

Motif is required to build edm. OpenMotif has been used on Linux platforms successfully. LessTif is not currently recommended.

Image widgets require the following external libraries:

• GIF Support: libgif

• PNG Support: libpng

Both libraries are publically available and can be readily found from most web search engines sites.

## Installation Procedure

The edm distribution is packaged in a tar file with a name like edm-1-12-8.tgz. In this case the name corresponds to major version 1, minor version 12, and release 8.

Place the tar file in the src directory under the EPICS extensions directory. Use gunzip to uncompress the file and then use tar to unpack the archive. Edm should then build like any other EPICS extension.

Unlike most other EPICS extensions, edm requires additional configuration after installation. See chapter 3 before attempting to execute edm.

Example:

1. If you have not done so, cd into ...extensions/configure, edit RELEASE to set the value of EPICS_BASE, and then execute make

2. cd into ...extensions/include/edm and recursively remove all .h files

for example:
cd yourEpicsTopDir/extensions/include/edm
find . -name "*.h" -exec rm {} \;
3. cd into ...extensions/src

4. gunzip edm-1-12-8.tgz

5. tar -xvf edm-1-12-8.tar

6. cd edm

7. make

## Chapter�3.�System Configuration

The following items need to be configured after installation.

• Contents and location of component files

• Content and location of color file

• Content and location of font file

• Contents of print definition file

## Location and contents of component files

### edmObjects

Edm uses a registry that maps widgets to a class name and shareable library path. The registry is contained in a file named edmObjects which resides in /etc/edm or the directory pointed to by the environment variable EDMOBJECTS.

When edm is installed, an example edmObjects file is included as part of the installation but this file should not be used in the production edm environment. Instead, a new file should be created by edm itself. This is accomplished as follows:

• Choose a location for the edmObjects file, make EDMOBJECTS point to this location, and make sure you have write access.

• Locate each edm component library. After the build, these reside in .../extensions/lib/(ARCH DEPENDENT)/.

Example names:

libEdmBase.so

lib57d79238-2924-420b-ba67-dfbecdf03fcd.so

lib7e1b4e6f-239d-4650-95e6-a040d41ba633.so

libcf322683-513e-4570-a44b-7cdd7cae0de5.so

libEdmDiamond.so

libEdmTriumf.so

libIndicator.so

libMultSegRamp.so

libPV.so

libTwoDProfileMonitor.so

You may verify that a library is an edm component file as the following example illustrates:

edm -show /usr/local/src/epics/supTop/R3.13.6/extensions/lib/Linux/libEdmBase.so

• For each component library file, execute edm with the -add option as follows:

edm -add (full absolute path to library)/(library name)

After populating edmObjects in this manner, you may wish to manually manage it with a text editor. If so, the number of objects at the top must match the number of registry entries. The directory location references may be replaced with the environment variable EDMLIBS. The following shows two equivalent entries (assuming, of course, that EDMLIBS has been set to /epics/extensions/lib/linux-x86).

• activeLineClass /epics/extensions/lib/linux-x86/libEdmBase.so Graphics Lines

$EDMTMPFILES/edmStdErr_??????).  For developer use. EDMXSYNC Puts X in sync mode  This is intended for use when testing or debugging edm. X I/O throughput is significantly degraded in this mode. EDMGENDOC Generates widget file format information on save  Setting this environment variable makes edm generate widget file format information when a display file is saved. The output is sent to stdout. This gives up-to-date information to those writing display generating scripts and such. Example output for rectangle widget: # (Rectangle) object activeRectangleClass beginObjectProperties major <int> minor <int> release <int> x <int> y <int> w <int> h <int> lineColor (index <int> | rgb <int> <int> <int>) [lineAlarm [(0|1)]] /* present with no value = 1, absent = 0 */ [fill [(0|1)]] /* present with no value = 1, absent = 0 */ fillColor (index <int> | rgb <int> <int> <int>) [fillAlarm [(0|1)]] /* present with no value = 1, absent = 0 */ [lineWidth <int>] /* default = 1 */ [lineStyle ("solid"|"dash")] /* default = "solid" */ [invisible [(0|1)]] /* present with no value = 1, absent = 0 */ [alarmPv <expandable string>] /* default = "" */ [visPv <expandable string>] /* default = "" */ [visInvert [(0|1)]] /* present with no value = 1, absent = 0 */ [visMin <string>] /* default = "" */ [visMax <string>] /* default = "" */ endObjectProperties  Conventions: \a translates to a \\ translates to \ So, for example, to specify a local pv, use LOC\\somepv [a] means a is optional (a | b) means either "a" or "b" Arrays are specified as follows: a { 0 1 1 100 } In this case, a is an array of 2 elements, element 0 = 1, element 1 = 100. Primitive types are enclosed by "<" and ">". The following means a takes an integer value. a <int> Primitive types include <int> <real> <string> <expandable string> (i.e. macros are allowed) Strings and expandable strings should be enclosed in double quotes  ## Site Specific Environment Variables The following environment variables are site related. EDMWEBBROWSER name of executable that invokes web browser  EDMRDDHS Used by TRIUMF for site-specific initialization in the related display widget  ## Chapter�5.�The Project Environment The environment for a given project is determined by a group of files and environment variables. The following considerations are addressed: • Definition of the project colors, fonts, calculations, and display schemes • Location of edm component and PV component files • Component management • Location of edm help files • Display file search path • Location of edm tmp files (.e.g for autosave) ## Colors, Fonts, and Display Schemes The environment variable EDMFILES determines the location of all related files. If EDMFILES is not set, /etc/edm is used. Color and font configuration and content specifics have been given elsewhere in this document so this section will only discuss display schemes in detail. ### Display Schemes Display schemes determine the default colors and fonts used when creating widgets in a given display. The display scheme consists of the cosmetic properties shown in the display property dialog box which may be obtained by middle-clicking on a edm display (while in edit mode) and selecting Display Properties from the menu. Figure�5.1, “Display Schemes” shows this property box and correlates the various color names with their respective uses in a slider widget. When a new edm display file is created, the display scheme information is populated from the file named default.scheme located in$EDMFILES. One task in configuring the project environment is therefore creating this file. This is done as follows:

• Execute edm and create a new display

• Middle-click on the display background and select Display Properties from the menu

• Set the various display scheme properties as desired (Text Fg, 1st Control Fg, 2nd Control Fg, 1st Control Bg, 2nd Control Bg, Top Shadow, Bottom Shadow, Default Text Font, Default Control Font, Default Button Font)

• Press the OK button to close the dialog box

• Middle-click on the display background and select Save Display Scheme... from the menu

• Save the file default.scheme in the appropriate directory (as given by $EDMFILES) • Exit edm now, don't save the display; when you next start edm the display scheme will be properly set. ### Display Scheme Sets A single display scheme is sometimes not adequate. It may be useful to have a separate scheme for each widget or multiple schemes, one per group of widgets per sub-system. This is possible but requires manual configuration. The file schemes.list in$EDMFILES associates a scheme set name with each edm widget over some number of scheme sets. For example, suppose you have three sub-systems named front, middle, and back. Furthermore, suppose you only care about rectangles, sliders, and text entry widgets. Configuration consists of two steps

#### Step 1

Manually create (tediously) one scheme file per widget per sub-system. These could be named front-rec.scheme, middle-rec.scheme, back-rec.scheme, front-sli.scheme, middle-sli.scheme, back-sli.scheme, front-te.scheme, middle-te.scheme, and back-te.scheme.

## Display file search path

The environment variable EDMDATAFILES is a colon separated list of directories. This list is searched in the given order whenever an edm display file is referenced in a related display widget and also whenever a symbol or graphical image file is refenced in some associated widget.

If the environment variable is not set, the current directory is used as the search path.

## Location of edm tmp files

• LOC\(!W)realPvWindowScope=d:1.234 #### Special Functions The following special functions are available. • RAND() - returns random value between [0.0,1.0) for a double type ( e.g. LOC\randPv=d:RAND() ) ## Chapter�7.�Creating and Editing Display Windows ## File Operations See edm online help topic File Operations for more information. ### Setting the Default Working Directory When edl files are opened or saved, the operation is usually performed in one of the directories listed in the EDMDATAFILES environment variable. Initially, the default file selection dialog directory is set to the first directory given in EDMDATAFILES. This default may be changed by making a selection from the Path menu (on the main window). The menu contains each directory in EDMDATAFILES. ### Creating a New Display File Creating a new edl file is simple. In the main window, select New from the File menu. A new window is created which may be resized as desired. ### Opening an Existing Display File In the main window, select Open... or Open by Path... from the File menu. A file selection dialog pops up from which an edl file may be selected. As mentioned previously, the default file selection directory may be set using the Path menu before the Open by Path operation is performed. Once selected, the display window is opened and positioned at the previously saved origin. ## Using the Mouse See edm online help topic Mouse Operations for more information. ### Some Definitions • Left B means left button, Right B means right button, etc. • Press means press and hold • Click means press and release • Drag means press and hold the button while moving the cursor • Shift middle B click means hold down the shift key and click the middle button ### Simple Select Operations Left B click • Select single object (deselect current) Shft Left B click • Toggle selection (add to current select group) Control Left B click • Cycle single object selection This is especially useful for finding one object among several stacked objects. Note that this only works when one and only one object is selected. ### Multiple Select Operations Middle B drag select box from Top-L to Bot-R • Select all enclosed Middle B drag select box from Bot-R to Top-L • Select by corners ### Create/Edit Operations Left B drag and release • Create new object Left click on selected object(s) • Edit object(s) Control Middle B drag over object • Drag-and-Drop PV name ### Move and Resize Operations Left B drag interior • Move object Left B drag control point • Resize object Control Left B drag interior or control point • Move object (prevent unintentional resize) This operation makes it possible to move very small objects. ### Execute Mode Operations Middle B drag over object • Drag-and-Drop PV name Shift-Control Middle B click over object • Display object properties Control Middle B click over object • Open PV action menu ## Display Window Attributes Various operations may be performed on edm displays and widgets from menus that are called up by middle-clicking on the display background. Three different menus are available depending on whether one, many, or no widgets are currently selected. To set display attributes, make sure no widgets are selected and then middle-click on an edm display background. Select the Display Properties menu item. Attributes include size and position, window title, the display scheme (colors and fonts), and several edit mode parameters (grip,snap...). Note that some edit mode parameters are listed with a pair of shortcut key labels in parentheses [e.g. Show Grid (G/g)]. The shortcut keys set (uppercase) and clear (lowercase) the corresponding attribute when the attributes dialog is not open. The ID, Activate Callback, and Deactivate Callback attributes are not currently used. ## Creating Objects (except lines) See edm online help topic Creating Objects for more information. Objects (rectangles, meters, buttons, etc.) are created by left-dragging a box on an edm display window background. The initial size of the object is determined by the size of the box and when the left button is released, a menu pops up listing available object types (graphics, monitors, controls). Selecting a type calls up a sub-menu enumerating all available objects for the selected type. Selecting an object closes the menu and calls up an object property dialog box. After the object attributes are specified and the OK button pressed, the dialog is closed and the object is created. ## Editing Objects (except lines) See edm online help topic Editing Objects for more information. Left-clicking on a selected object calls up the object property dialog box. New users often associate this operation with a double-click. Avoid this temptation. Although it is true that two successive left clicks will result in an edit operation, the clicks must be separated by some amount of delay. Object properties may be modified as desired. Pressing the Apply button applies all modifications without closing the dialog box. Pressing OK applies modifications and closes the dialog. Pressing Cancel closes the dialog without applying modifications. The functions performed by the OK, Apply, and Cancel buttons may also be achieved by double clicking the left, center, and right mouse buttons respectively. This may, at times, eliminate excessive mouse pointer movement. If multiple objects are selected, clicking on one of them opens the first property dialog box. When the OK button is pressed, the property box for the next item is opened, an so on, until each selected object has been processed. The edit operation is terminated when all objects have been visited or the Cancel button is pressed. ## Creating Line Objects See edm online help topic Line Objects for more information. Lines are created by left-dragging a box on an edm display window background and choosing Lines from the Graphics sub-menu. Doing this calls up the line object property dialog box. After the object attributes are specified and the OK button pressed, the dialog is closed and the cursor changes slightly. At this point, the following operations may be performed. • Left B click appends a new line segment end-point • Right B click inserts a line segment end-point after a reference end-point (mouse pointer must be on reference end-point) • Middle B drag moves segment end-points • Control Right B click deletes a line segment end-point (mouse pointer must be on the end-point to be deleted) • Control middle B click deletes the last line segment end-point • Shift Left B click or Left B double-click completes the create operation ## Editing Line Objects See edm online help topic Line Objects for more information. Clicking on a lone selected line object calls up a menu which provides the option to edit line properties or line segments. If the properties option is selected, editing proceeds in the same manner as that for any edm object. If the segments option is selected, the object property dialog is not called up, instead, the line is redrawn with control points around each segment end-point and all line create operations may be performed. The edit operation is terminated in a manner similar to the create operation, i.e. with a Shift Left B click or a Left B double-click. In addition, a Shift Right B click aborts all modifications and terminates the edit. ## Aligning Objects See edm online help topic Aligning Objects for more information. When two or more objects are selected, various object alignment operations may be performed by middle-clicking on the display window background and selecting the desired operation from a menu. The following operations are possible: Align Left, Right, Top, Bottom • Aligns the specified edge of all objects with the most extreme instance (leftmost, topmost, etc.) Center Vertical, Horizontal, Both • This operation uses the location of the first object selected as a reference location. The operation is then performed in the context of this reference. Center Vertical centers all objects on an imaginary vertical line passing through the center of the reference object. Center Horizontal centers all objects on an imaginary horizontal line passing through the center of the reference object. Center Both centers all objects on an imaginary point at the center of the reference object. Size Height, Width, Height & Width • This operation uses the dimensions of the first object selected as reference dimensions. The operation is then performed in the context of this reference. Size Height sets the height of all selected objects the same as the reference height. The remaining operations work in a similar manner. Distribute Vertical, Horizontal, Midpoint Vertical, Midpoint Horizontal, 2D • This operation uses the location of the first object selected as a reference location. The operation is then performed in the context of this reference. Distribute Vertical distributes all selected objects along an imaginary vertical line passing through the center of the reference object with equal space between the edges of successive objects. Distribute Midpoint Vertical distributes all selected objects along an imaginary vertical line passing through the center of the reference object with equal space between the midpoints of successive objects. Distribute Horizontal and Distribute Midpoint Horizontal work in a similar fashion. Distribute 2D does not use a reference location. Instead, all selected objects are distributed in a row/column format using the smallest imaginary box that would contain all selected objects. The objects are distributed with equal space between the edges of successive objects. ## Miscellaneous Operations Other operations that may be performed from the display window menus are listed below. Execute • Put display in execute mode. This is discussed at greater length in a later section of this document. Save • Save current display using existing file name. Save As... • Save current display using specified file name (file might not yet exist). Save To Current Path • Save current display to last directory specified by path menu item. This enables a read-only display to be saved into a directory in which write access is permitted. Select All • Select all objects on the display. Copy • Copy all selected objects to the clipboard. Cut • Cut all selected objects to the clipboard. Paste • Paste objects in the clipboard to the current display using the current mouse location. Objects may be copied from one display window and pasted into another that is managed by the same edm process. Paste in Place • Paste in the clipboard to the current display using the exact location of the original copied objects. This is usually used in conjunction with the Orthogonal Move mode to create arrays of objects that are being manually aligned. Close • Close the current display window. Open... • Open a new display file and create a new window. Load Display Scheme... • Load a new display scheme file (which changes the display attribute colors and fonts). Save Display Scheme... • Save current display colors and fonts as a display scheme file. Edit Outliers • Find widgets located outside the dimensions of the curreny display window and edit the first one found. Find Main Window • Find, deiconify if necessary, and raise the edm main window. Some window managers iconify the window if it is currently on the desktop so this operation may have to be performed twice. Refresh • Redraw entire contents of display window. Help • Launch online help. Raise • Raise stacking order of object(s) above all other objects. Lower • Lower stacking order of object(s) below all other objects. Group • Group all selected objects into a single composite object. Ungroup • Ungroup a composite object. Rotate Clockwise • ******* ************* * * * * * * ***** becomes * * * * * *  Not all objects may be rotated. Rotate Counterclockwise • ******* * * * ***** becomes * * * * * * * * * *************  Not all objects may be rotated. Flip Horizontally • ******* ******* * * * * ****** becomes ****** * * * * ******* *******  Not all objects may be flipped. Flip Vertically • * * ******* * * * * * * * * * * becomes * * * * * * * * * * ******* * *  Not all objects may be flipped. Edit Display Info • Calls up a dialog box in which color and font information may be modified for all selected objects. Edit PV Names • Calls up a dialog box in which PV names may be modified for all selected objects. Deselect • Deselects all selected objects. ## Creating and Using Displays as Templates For version 1-12-9 and above, any display file may be used as a template that can be inserted into another display being edited. During the insert operation, the user is prompted to enter the value of various template paramters if any have been defined. To create a template, create a display as you would normally. Widget attributes that allow macro substitution are candidates for becoming template parameters. Say, for example, that you create a template display with one analog control, one analog readback, one binary control, and one binary readback. These might be named(devicePv):Control, $(devicePv):Readback,$(devicePv):OnOffControl, and $(devicePv):OnOffReadback. Obviously, in this example, devicePv is a reasonable choice for a template parameter. To make it so, open the display properties dialog and click on the Template Params button at the bottom. This opens another dialog into which you may enter a number of template parameters. For this example, one parameter would be entered using the value devicePv. After entering the parameter values, the display may be saved in some appropriate template directory. To use the template during an edit session, choose "Insert File As Template..." from the context menu of the display window (no widgets may be selected). A file select dialog opens (using the current path value) from which the template display file may be selected. After selection, if template parameters have been defined, a dialog opens into which template parameter values are entered. When the dialog is closed by clicking OK, the template display file contents are inserted into the current display window with the corresponding substitution of parameter values. ## Chapter�8.�Display Execution To execute a newly created edm display window or one that has been opened in edit mode, make sure no widgets are selected and then middle-click on an edm display background. Select the Execute menu item. In execute mode, edm connects to all PVs, creates and renders display widgets, and presents a live update of all text and graphics content, changing displayed values, colors, and images as the values of associated PVs change. If edm is executed with the -x option, all display windows are opened in execute mode by default. Furthermore, if the -noedit option is specified, windows may not be deactivated and placed in edit mode and new display windows may not be created. ## Chapter�9.�Macro Symbols and Values When edm is executed, a list of symbol=value pairs may be entered from the command line as follows:  edm -m "sym1=val1,sym2=val2,sym3=val3..."  These symbols may be referenced in the specification of certain object properties by embedding a reference like $(symbol)


into the property value string. A simple example will illustrate this.

Suppose edm was started as

   edm -m "1=one"


This associates the value one with symbol 1. Now if an object property is specified as

   $(1)_two_three  then, in execute mode, the property value would be expanded to one_two_three. Multiplexor objects can also affect the value of symbols in execute mode and related display objects can pass new symbols to child display windows. Symbols are used to parameterize PV names and widget labels to build a single template display window, multiple instances of which may be used in systems containing arrays of similar subsystems. ## Chapter�10.�Internal Symbols A set of internal symbols may be used by the related display widget and the shell command widget. The related display widget may assign internal symbol values to child macro arguments. The shell command widget may likewise include internal symbols references in the shell command contents. For example, one internal symbol is <DSPNAME> which translates to the X Window display name. The related display widget might include the following in the contents of the macros field:  Dsp=<DSPNAME>  The shell command widget might include the following in the contents of the shell command field:  xterm -display <DSPNAME>  The list of internal symbols are given below. <WINID> The X Window ID - this is something you might use as shown below: xwd -id <WINID>  <TITLE> Title of the edm display <HELPDIR> edm help file directory <DSPNAME> X Window display name <DSPID> X Window display name with each "." translated to a "-" (host:0.1 becomes host:0-1) <env:environment-variable-name> The contents of the associated environment variable for example, <env:OSTYPE> might translate to Linux  ## Chapter�11.�EDM and CVS EDM will display an embedded CVS revision in the title bar after the file name. The CVS revision is contained in the file comment area and is specified as shown in the following example: #$Revision: 1.1.2 $ This may initially be given as #$Revision$ CVS will expand this form to the one above it after a commit operation is performed. An edm comment template file may be utilized to insert comments into an edl file when the file is saved by setting the environment variable EDMCOMMENTS to the path of the template file. This provides a method for automatically inserting the CVS Revision symbol into edl files when they are created. So that the template file comments are inserted only once, edm prepends the following line to the comment block: # <<<edm-generated-comments>>>  ## Chapter�12.�Remote File Access ## Introduction It is possible to run edm on a local cpu (e.g. from home) and access edl files and some configuration files remotely (e.g. at work) from a web server. If the associated EPICS PVs are accessible through a channel access gateway, edm may be employed to monitor/troubleshoot a live production system from a remote location. This has been implemented in rather simple-minded manner to accommodate a single user running edm from home in a technical support activity. If more than one user is using the same local cpu to run edm in this manner, each must set the environment variable EDMTMPFILES to a unique value. When edm access a file remotely, it merely writes a file with the same name in the current temporary-file directory. For version 1-12-26 and greater, these temporary files are used as remote access cache. Cache expiration defaults to 5 seconds and may be altered by setting the environment variable EDMEXPIRECACHE. For the bash shell:  export EDMEXPIRECACHE=1  sets the cache expiration to 1 second.  export EDMEXPIRECACHE=DISABLE  disables the cache which may be necessary if a screen references files with the same name from different directories. You may control the permissions of temporary files using the environment variable EDMTMPUMASK. ========================================================== BY DEFAULT EDM DOES NOT HAVE REMOTE FILE ACCESS CAPABILITY. ========================================================== To verify the capability of a particular build instance, set the environment variable EDMDEBUGMODE to 1 and run edm. If remote file access is turned on the following will be displayed on stdout Using curl for URL-based access  If not, you will see Using local access only  To turn on remote file access, you must edit Makefile.Host in$EPICS_EXTENSIONS/src/edm/lib. In addition, curl must be installed on the build host and libcurl.so must be accessible.

For a linux build, add "-DUSECURL" to the line starting with

USR_CXXFLAGS_Linux +=

and add "curl" to the line starting with

USR_LIBS_Linux =

for example, change

USR_CXXFLAGS_Linux += -Wall -D__linux__ -D_BSD_SOURCE \

USR_LIBS_Linux = Xm Xt Xp Xtst X11 pthread dl

to

USR_CXXFLAGS_Linux += -Wall -DUSECURL -D__linux__ -D_BSD_SOURCE \

USR_LIBS_Linux = Xm Xt Xp Xtst X11 pthread dl curl



After making this change, cd back to $EPICS_EXTENSIONS/src/edm and do make clean make  ## Example Configurations There are two ways to access remote files. The first is the most simple and makes it possible to add a remote location to the normal search paths. The second replaces the entire file access environment and facilitates the case where edm is being run from home, for example, to perform remote diagnostic activities. ### Example 1 - Simple Remote Access One way of accessing edl files on a remote http server is simply by adding a URL to the environment EDMDATAFILES. This works for EDMFILES too, but EDMFILES points to a single location. For example, setting EDMDATAFILES as show below export EDMDATAFILES=/top/one:/top/two:http://remoteNode/remoteTop/one results in the following locations being searched when a file open is attempted:  /top/one /top/two http://remoteNode/remoteTop/one  ### Example 2 - Remote File Access Only In this example, file access is exclusively remote and local access is possible only by including the "file://" prefix in some URL. Given: The files colors.list and fonts.list accessible via web server from http://www.webserver.com/files/ Several edl files accessible via web server from http://www.webserver.com/edlFiles/ Help files accessible via web server from http://www.webserver.com/helpFiles/ Local edm print definition file is /edm/edmPrintDef Local collection of .edl files in /edm/localEdlFiles  Define the following environment variables as shown below (bash syntax shown). export EDMHTTPDOCROOT="http://www.webserver.com|file:///" export EDMFILES=/files export EDMDATAFILES=/edlFiles:/edm/localEdlFiles export EDMHELPFILES=/helpFiles export EDMPRINTDEF=/edm/edmPrintDef  When edm is executed, locations are searched for .edl files in the following order: 1) http://www.webserver.com/edlFiles 2) /edlFiles 3) http://www.webserver.com/edm/localEdlFiles 4) /edm/localEdlFiles  If you have trouble, set the environment variable EDMDEBUGMODE to 1 and run edm once again. You may thus observe server, directory, and file names as edm searches for valid data sources. When edm is run in this manner, performing interactive file open operations will result in some directories being invalid. The file selection box does not support remote access. Note that local access also requires a URL-based name, hence the second document root specification  file:///  Many web servers may be employed in this scheme. The environment variable EDMHTTPDOCROOT is a list of locations separated by the "|" character. The following example is legal: export EDMHTTPDOCROOT="http://web1.com|http://web2.com|http://web3.com"  ## Chapter�13.�Input Filters ## Introduction In version 1-10-0p of edm, an input file filter mechanism was added which enables edm to read foreign display files. Configuration of this facility involves the following steps: • Create and populate the file named edmFilters • Define the environment variable EDMFILTERS to point to the directory in which edmFilters resides • Create or obtain an executable that performs the conversion from the foreign file to an edm compatible file ## File Format for edmFilters The edmFilters file may contain multiple entries, one per line for each file extension type. Comment and blank lines are not currently allowed. One entry in edmFilters contains the foreign file extension and the conversion command with its arguments. The input file name is given as the symbol %f which is replaced by the actual name at run-time. Example: .adl adl2edl -rgb %f .xml xml2edl %f  In the preceeding, both adl2edl and xml2edl are assumed to reside within the execution path. ## Executable Requirements The executable must accept the input file name on the command line and must send its output to stdout. Error messages should be written to stderr or to a file. ## Chapter�14.�PV Actions ## Introduction Actions are related processes that are executed from edm. Parameters such as the pv name and display name may be passed to the process as command line arguments. Moving the mouse over an edm widget and clicking the ctrl-middle button brings up an action menu. Selecting a menu item causes that action to be performed. To enable this facility, do the following: • Create and populate the file named edmActions • Define the environment variable EDMACTIONS to point to the directory in which edmActions resides ## pvActions File Format Actions are specified one per line in the form action-name action-command. White space is not allowed in action-name; action-command may contain any amount of whitespace. Example contents: Probe probe -display$(display) $(pv) StripTool /scripts/runStripTool$(pv) $(display)  ------------------------------------------------- runStripTool script: #!/bin/bash uuid="uuidgen" f="/tmp/$uuid"
echo "StripConfig 1.2" > $f echo "Strip.Time.Timespan 300" >>$f
echo "Strip.Time.NumSamples 7200" >> $f echo "Strip.Time.SampleInterval 1.000000" >>$f
echo "Strip.Time.RefreshInterval 1.000000" >> $f echo "Strip.Color.Background 65535 65535 65535 " >>$f
echo "Strip.Color.Foreground 0 0 0 " >> $f echo "Strip.Color.Grid 49087 49087 49087 " >>$f
echo "Strip.Color.Color1 0 0 65535 " >> $f echo "Strip.Color.Color2 27499 36494 8995 " >>$f
echo "Strip.Color.Color3 42405 10794 10794 " >> $f echo "Strip.Color.Color4 24415 40606 41120 " >>$f
echo "Strip.Color.Color5 65535 42405 0 " >> $f echo "Strip.Color.Color6 41120 8224 61680 " >>$f
echo "Strip.Color.Color7 65535 0 0 " >> $f echo "Strip.Color.Color8 65535 55255 0 " >>$f
echo "Strip.Color.Color9 48316 36751 36751 " >> $f echo "Strip.Color.Color10 39578 52685 12850 " >>$f
echo "Strip.Option.GridXon 1" >> $f echo "Strip.Option.GridYon 1" >>$f
echo "Strip.Option.AxisYcolorStat 1" >> $f echo "Strip.Option.GraphLineWidth 2" >>$f
echo "Strip.Curve.0.Name ${1}" >>$f
echo "Strip.Curve.0.Min caget -t ${1}.LOPR" >>$f
echo "Strip.Curve.0.Max caget -t ${1}.HOPR" >>$f
echo "Strip.Curve.0.Scale 0" >> $f echo "Strip.Curve.0.PlotStatus 1" >>$f

StripTool $f rm$f


## Introduction

The ability to log EPICS PV writes from edm widgets is avalaible in version 1-11-1o and above. Two procedures are given below to illustrate how logging may be enabled. When enabled, edm writes information to a pipe on each EPICS put. For a local connection, this produces something like

user="sinclair" host="edmhost" dsp=":0.0" name="sinclairHost:ao0"...
... old="0.000000" new="1.000000"


For a remote ssh connection (remote host 192.168.1.1, local host is 192.168.1.2)

user="sinclair" host="edmhost" ssh="::ffff:192.168.1.1 39719 ::ffff:192.168.1.2 22"...
... dsp=":10.0" name="sinclairHost:ao0" old="0.000000" new="1.000000"


You must write an application that reads stdin, parses the above information, and writes to your log (file, db, etc.). During development/debugging, you may use cat or tee.

## Logging all PVs by default

• Set environment variable EDMCLEAREPICSDEFAULT to 1 (this accommodates potentially incompatible content in old screen files)

• Set environment variable EDMPUTLOGGER to the location of your logger application (cat will write the raw information to stdout, tee will write to a file and stdout)

For example:
export EDMPUTLOGGER=cat
or
export EDMPUTLOGGER="tee log.out"

• Make the default pv type "LOG" in the file edmPvObjects

For example, for the following edmPvobjects file contents, change

3
EPICS /someLocation/libEpics.so EPICS PV
LOC /someLocation/libLoc.so Local PV
CALC /someLocation/libCalc.so Calculation PV
to
4
LOG /someLocation/libLog.so LOG PV
EPICS /someLocation/libEpics.so EPICS PV
LOC /someLocation/libLoc.so Local PV
CALC /someLocation/libCalc.so Calculation PV
• All EPICS PVs with names containing no explicit type will be logged with this configuration. EPICS PVs named EPICS\pvname will not be logged.

## Logging specified PVs

• Set environment variable EDMPUTLOGGER to the location of your logger application (cat will write the raw information to stdout, tee will write to a file and stdout)

For example:
export EDMPUTLOGGER=cat
or
export EDMPUTLOGGER="tee log.out"

• Add the "LOG" pv type to the file edmPvObjects but retain "EPICS" as the default type

For example, for the following edmPvobjects file contents, change

3
EPICS /someLocation/libEpics.so EPICS PV
LOC /someLocation/libLoc.so Local PV
CALC /someLocation/libCalc.so Calculation PV
to
4
EPICS /someLocation/libEpics.so EPICS PV
LOG /someLocation/libLog.so LOG PV
LOC /someLocation/libLoc.so Local PV
CALC /someLocation/libCalc.so Calculation PV
• EPICS PVs with names containing no explicit type will not be logged with this configuration. PVs named LOG\pvname will be logged.