210 likes | 225 Views
Not Yet Another EPICS Display Manager!?. Kay Kasemir, Xihui Chen kasemirk@ornl.gov chenx1@ornl.gov Kobe EPICS Meeting October 2009. EDM …. serves us well at the SNS Stable Many deployed screens But: Somewhat dated, especially the ‘edit’ part:
E N D
Not Yet Another EPICS Display Manager!? Kay Kasemir, Xihui Chen kasemirk@ornl.govchenx1@ornl.gov Kobe EPICS Meeting October 2009
EDM … serves us well at the SNS • Stable • Many deployed screens But: • Somewhat dated, especially the ‘edit’ part: • Fixed-size configuration panels;pop up in unexpected places • Limited editing of shared properties for multiple widgets • Limited integration with other tools • Keep maintaining it? • Coded in C++ for Unix, X11, Motif • Fedora dropped OpenMotif
Use CSS Synoptic Display (SDS)? Good Ideas • Java, SWT (Windows, Linux GTK, Mac OS X) • Eclipse Graphical Editor Framework (GEF) • Generic Data Access Layer (DAL) for EPICS, Tine, Simulated PVs, … Every widget propertycan be ‘dynamic’ “Label” with static “Text”Label with“Text” linkedto PV
Are simple things simple? • EDM: Add Text Update 1) Create Text Update 2) Enter PV Name 3) Save & Run • EDM widgets with PV connectivity: • Show the PV’s value (with units) • Show PV name on middle-button click • Reflect PV’s severity via e.g. border color • Use PV’s display limits as default range for “meter” widget etc. • Indicate ‘disconnected’ state via e.g. white-out appearance • SDS: Same accomplished via dynamic properties • ‘Text’: Link to PV’s value • Border color: Link to PV’s severity and connection state • Tool Tip: Show PV’s name • Involved manual process • “Initializers” automate this, but we couldn’t reach EDM functionality
Re-think Dynamic Properties • EDM describes meaning • “Text Update” for PV, “Alarm Sensitive” • SDS’ dynamic properties implement representation • Text = value of PV • Border = red if value of PV’s severity is 2, yellow if …, white if severity is 3 or connection state is …
Concept for Best OPI, Yet (BOY) Prototype • Best of SDS • Java portability • CSS integration • Great GEF editing • Best of EDM • Simple things (Label, Text Update, …) are simple • Configure the meaning, leave representation to tool • Combined with • Production-tested PV layer • PV-triggered scripts can make everything dynamic
Basic “Editor” Perspective • Navigator, Outline, Palette, Properties can be rearranged
Adding Widgets • Select widget on Palette • Draw outline in display or drag/drop to display • Configure Properties • Label ‘Text’ also editable via double-click • Can configure common properties of all selected widgets
Editor Features (GEF) • Snap-to-Geometry • Context menu, keyboard shortcuts: • Copy/cut/paste/delete • Change front/back order • Full undo/redo • Snap to grid, geometry, align, distribute • Duplicate widgets via Alt-Drag • Select any types of widgets,edit common properties • Zoom, Outline view
PV Connectivity • Create“Text Update” • Enter “PV Name” EPICS CA, local, simulated, … • Save & Run Simple things are simple: By default, widgets use PV Metadata(units, precision, limits, …)and are sensitive to alarms (Note use of rulers to align widgets)
Macros • Macros can be defined • In CSS preferences • As ‘display’ properties • In actions that invoke related displays • Use: • $(macro_name) • ${macro_name} • Every property isavailable as a macro;Example: Tooltip
Screen Navigation • Idea: Minimize number of open screens. • Similar to Web Browser links: • Default: Related displays replace the current display. • Optional open in ‘tabs’ or new window • Allow previous/next navigation over display history Displays in ‘Tabs’
Scripts… • are written in JavaScript • can be attached to any Display or Widget • are executed whenever one of the input PVs change • can read/write widget properties, PVs,open dialogs, access any Java code Example: Dynamic Visibility
More Script Examples • React to operator input,possibly correct it
More Scripting Ideas • Arbitrary ‘color rules’ • Animation
Widgets … • So far 23 widgets • More to come • Eclipse plug-inmechanism;add site-specificwidgets • Arc, polygon, … • Rotation • Fill-level • Buttons • “Are you sure?” • Password
Grouping Container ‘Group’ in EDM: • Rectangle around widgets • Label on top of Rectangle for group name Looks OK, hard to edit/move Grouping Container Example: • Create from context ofselected widgets,or drop widgets into it • Configure name,move,(auto-)size,even remove. • When movingwidgets,highlight indicatesif they’re still‘inside’ container Optical feedback when moving widget in group
Linking Container • Like EDM ‘embedded display’ • Common EDM use: ‘Tabs’ • Invisible button writesto local PV • Rectangle etc. show/hidedepending on value of that PV • Embedded display showsdifferent file depending on PV Plan for OPI (not yet):Designated ‘Tab’ support
XY Graph Widget • Chart types: Line, Scatter, Bar, Steps, Area, ... • Five Zoom Types, Panning, Auto Scale • Add/Remove Annotations, Undo/Redo, Take snapshot. • Multiple axes: Linear, Log, Date/time • Configure properties during runtime • Generic SWT code, usable outside of CSS • Plan: Replace Data Browser’s plot
Transition from EDM • Translator for basics in the works • Rectangles, Label, Text Update, Text Entry, … • Includes handling of colors • Harder to translate: • “Tabs” simulated by invisible Message Buttonswriting to local PVs, … • Rectangles that are really meant to create a ‘Group’ • Invisible related display buttons that could now be ‘actions’ attached to visible widgets
Summary • Initial Demo available for download fromhttp://ics-web.sns.ornl.gov/css/products.html • Please try it out: • Online Help:CSS Menu Help/Help Content/CSS Applications/Display • Tutorial for first steps: See Online Help • Send comments on issues or suggestions!