1 / 33

Display Builder Update

Display Builder Update. Kay Kasemir, Megan Grodowitz Amanda Carpenter May 2016, ESS EPICS Meeting. CS-Studio ‘ BOY ’. Issue: Too much on UI Thread. Load *.opi file Load embedded *.opi (Linking Container) Handle PV updates Execute scripts  CS-Studio “ freezes ”.

afagan
Download Presentation

Display Builder Update

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Display Builder Update Kay Kasemir, Megan Grodowitz Amanda Carpenter May 2016, ESS EPICS Meeting

  2. CS-Studio ‘BOY’

  3. Issue: Too much on UI Thread • Load *.opi file • Load embedded *.opi (Linking Container) • Handle PV updates • Execute scripts  CS-Studio “freezes”

  4. BOY code: Change step by step? Difficult: Based on GEditorF • SWT/Draw2d • UI Thread Risky: BOY is used in operation • Unintended side effects (Linking Container, macros, views) • Rewrite Editor Runtime PV Representation JavaFX Model

  5. Editor Runtime Display builder Update PV Representation JavaFX “Looks like BOY”, but better • Model: Widgets, Properties, file format • Representation: On-screen objects, JavaFX (or SWT) • Runtime: PVs, scripts Model BOY Update

  6. Load Displays: BOY vs. Display Builder UI thread (BOY) vs. Background threads (Display Builder) boy_delay1.mov vs. builder_delay1.mov (Both BOY and display.builder have 2 sec delay in file access to simulate slow file access)

  7. Editor Runtime Model PV Representation JavaFX Widgets • Arc, Rectangle, Label, LED, TextUpdate, .. • Group (contains other widgets) • Embedded Display Properties • Allow changes from any thread • Change notification • Controlled order Persistence • Loads existing *.opi files • Saves in defined order Macros • For ‘text’ as well as ‘x’, ‘visible’, .. Colors, Fonts Model TODO • Many more properties and widgets • Defaults based on ‘class’ property

  8. Editor Runtime Representation PV Representation JavaFX Java FX • For all widgets SWT • Very few widgets, just to show it’s possible Fixed the font size problem! • BOY “point size” vs. pixel Model TODO • Many more widgets • Many properties • Web Representation?

  9. Editor Runtime Runtime PV Representation JavaFX Common Widget Runtime • Loads model in background • Creates representation on UI thread • Handles PVs and scripts (rules) in background • One Jython interpreter & thread per window • Throttles UI updates EmbeddedDisplay Runtime • Keeps hosted display private ActionButton Runtime • Replaces current oropens new window Model TODO • ??

  10. Compare BOY and display.builder

  11. File Format • Similar • Concise • Useful order

  12. Widget Model: Consolidate, Refine • Rectangle, Rounded Rectangle • Rectangle w/ corner width, height • LED with different PV behavior • LED for binary PV or ‘bit’ • MultiStateLED for N states

  13. Properties: Arrays and Structures “trace_0_color”, .., “state_value_11” • Actual arrays and structures:“traces[0].color”, “states[11].value”Array size only limited by memory

  14. Keyboard Navigation in JavaFX • ‘Tab’ move in widget order • ‘Shift-Cursor’ move in on-screen order .. was impossible because of SWT/Draw2d mix

  15. Alarm-sensitive Border Space-efficient,distinguishable • Minor:Single-line • Major:Double-line • Invalid/Disconnected:Broken line.. now without widget body resize

  16. Plotting Basics of Image and XYPlot “work”

  17. Image Widget Default color map: Viridis “perceptually uniform” https://twitter.com/LeedeMora,SciPy2015 on YouTube

  18. Editor

  19. Editor Runtime Editor PV Representation JavaFX • Palette • Properties • In defined order • No more off-screen value column • Tracker to move/resize • Snap-to-Grid • Snap-to-Geometry (parallelized) • Toolbar • Un-do • Front/back • Align top/center/.., distribute • Selection • Rubberband, multi-widget, • In and out of ‘Group’ • Outline (Widget Tree) Model TODO • Rulers?

  20. Context-based Inline Editor • In editor, Double-click widget for • PV Name (Any widget with PV) • Text (Label Widget)

  21. Image Widget PropertyComparison

  22. Color Map Editor Comparison

  23. Poly Editor • ‘Append’ Mode • Add points • Delete last point • ‘Edit’ Mode • Move • Add • Delete points Toggle between modes

  24. Scripts • Execute in background Minimalscript compatibility: val = PVUtil.getDouble(pvs[0]) pos = 100 + 20*val widget.setPropertyValue(“x”, pos) Weren’t kidding when telling youto avoid scripts because compatibilityis not guaranteed. http://imgs.xkcd.com/comics/workflow.png

  25. Rule & Script Dialog Streamlining All rules of a widget in one dialog

  26. You should still avoid scripts .. but if you ignore this advice,you’ll find they work better than before (Long running script example)

  27. Status • Examined ~200 SNS Instrument screens • Many screens complete or nearly complete! • Missing widgets: • Menu Button • Byte Monitor • .. • Missing Properties • XYPlot • Image (Intensity Graph) • Some need manual work • Scripts, Rules

  28. Outlook • Implement most BOY-type Widgets & Properties • Priority based on SNS instrument needs • Plan to add vtype.pv.mqtt • IoT • Continue to allow Standalone Editor, Runtime • Use outside of CS-Studio • Eclipse Project?

  29. Boy, Only Better • Separate Model, Representation, Runtime • Background threads, less freezing • Minimal script compatibility Status • Reads existing files • Handles basic instrument displays • 1/3 of BOY widgets withessential features • First release end-2016

  30. Design Time Data Flow Add Widget, Set Property Editor Presentcurrent stateof Model Update File Save Representation Model JFX Notify of changes

  31. Runtime Data Flow Runtime PV Scripts, (Rules) UI Event Presentcurrent stateof Model Enter Text,Push Button File Update Load Representation Model JFX Notify of changes

More Related