240 likes | 386 Views
Visual DCT for IRMIS and pvData (Version 3). Janez Golob, Jernej Kamenik, Rok Šabjan , Matej Šekoranja rok.sabjan @cosylab.com EPICS Meeting, Aix-en-Provence, 2010-06-02. VDCT – a complete rewrite. Motivation and Goals Architecture Technology Choices Current Status. Motivation.
E N D
Visual DCT for IRMIS and pvData(Version 3) Janez Golob, Jernej Kamenik, Rok Šabjan, Matej Šekoranja rok.sabjan@cosylab.com EPICS Meeting, Aix-en-Provence, 2010-06-02
VDCT – a complete rewrite Motivation and Goals Architecture Technology Choices Current Status EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Motivation • Dramatic changes in EPICS • More options for persistence (IRMIS) • Different data model (pvData) EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Nobody wants to edit this! <structure structureName = "pulseScheduleType"> <scalar name = "ID" scalarType = "string"/> <scalar name = "formatVersion" scalarType = "string"/> <scalar name = "packageType" scalarType = "string"/> <structure name = "pulseFeature" extends = "pulseFeatureType"/> <structure name = "generalParameters" extends = "generalParametersType"/> <structure name = "plantSystemConfigurationParameters" extends = "plantSystemConfigurationParametersType"/> <!-- TODO structure name = "segmentsSequence" extends = "segmentsSequenceType"/--> </structure> <structure structureName = "pulseFeatureType"> <structure name = "scheduleStatus" extends = "pulseScheduleStatusType"/> <structure name = "authors" extends = "signatoryType"/> <!-- TODO not an array - authorsType --> <structure name = "approvers" extends = "signatoryType"/> <!-- TODO not an array - approversType --> <structure name = "executionRecords" extends = "executionRecordType"/> </structure> EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Why re-write? • 9-year old architecture does not allow big changes • Spaghetti code to be avoided • Future extensions or integrations possible • IRMIS • CSS? • SDD (ITER)? EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Goals of VDCT rewrite • Immediate (visible) • Visualdatabase configuration tool with full EPICS v4 compliance (pvData) • Allowfor/support other related IRMIS control system views (cabling, etc..) • Retainif not enhance the existing functionality of VDCT for EPICS v3. • CapFaststyles and symbols • Behind the stage • Clean architecture (model and GUI more separated) • Flexible graphics based on proven technologies
Modular Architecture • Engineer drawing style tool • Spreadsheet editing tool • Hierarchical Tree view • Model (EPICS v3, pvData) • defines editing, selection, structure rules, Actions • contains Nodes, Edges, Primitives, Properties • Persistence tool convertis the edited and created model designs into (and from) well defined formats (EPICS v3,4, IRMIS) and storing (reading) them into (from) local files or remote databases. • Finally, the Application framework is responsible for interfacing the various aspects around the possibly multiple model designs (or aspects of one) together into a coherent stand-alone application.
Technology choices • Programming language: Java 1.6. • Drawing tool framework: Netbeans Visual library • (decided after a thorough comparison with Eclipse Graphical Editing Framework)
Footnote: VL vs. GEF • If present, features are marked as • Outstanding support is marked with
Spreadsheet Editor for EPICS 3 EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Status of VDCT3: EPICS 4 Model EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
EPICS 4 Hierarchical View EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Status of VDCT3 (1/3) • Editing • Copy/Cut/Paste • Mutliple Undo/Redo • Drag & Drop moving of (multiple) nodes • Property inspector (grouping/editing by type) • naming convention specification & validation • Keyboard accelerator key shortcuts • General features • Drawing view • Spreadsheet view • Hieararchy view • Local configuration support • Rendering • Custom widgets per module, customize widget colors • drawing of graphic primitives • bird view magnification on cursor • zoom all, select all • auto de-cluttering of widgets on canvas • snap-to-grid • print canvas
Status of VDCT3 (2/3) • pvData support • I/O • open file • import file into existing model • save/save as file • Editing • static includes (edit, inspect) • new record (by type) • add/remove/set fields (scalar, structure) • add/remove links • view/edit substructures (hierarchy support) • edit/inspect includes
Status of VDCT3 (3/3) • EPICSv3 and IRMIS support • I/O • open file • import file into existing model • save/save as file • Rendering • integration of CapFast epics symbol library • Editing • handling of dbd includes • new record (by type) • set/unset fields • add/remove links • record morphing support • IRMIS integration • open single IOC from remote db location
VDCT3 future? • Complete VDCT 2.6 feature set • command-line capabilities • plugin support • DB template support still rudimentary • Complete IRMIS integration • browse available IOCs • write modifications to remote PVs • interface to other IRMIS layers (cabling, etc.) • Support for editing pvData structuredefinitions • Integration into CSS? • Interface to other configuration data
Conclusions • VisualDCT (3.0-beta) is available for download on sourceforge: • Be careful how to start VisualDCT with appropriate model (see examples) • Use it and send feedback! • Use cases and best practices are yet to be defined (pvData) • Thanks to Bob Dalesio and his NSLS2 team! https://sourceforge.net/projects/visualdct/
Page intentionally left blank EPICS Collaboration Meeting 2 - 4 June 2010, Aix-en-Provence, France
Model Design (1/2) • Model (EPICS v3, pvData) • defines editing, selection, structure rules, Actions • contains Nodes, Edges, Primitives, Properties • Node (Record, Structure) • contains Pins, Properties • Pin (Field) • source/sink of Edges • contains Properties • Edge (Link) • connects Pins • contains Properties Model Node Pin Pin Edge Node Pin Pin
Model Design (2/2) • Primitive (text (html), geom. object) • visual object with Properties • Property • container of meta information • linked by type to editing rules, visual editors
Visual Design • ModelScene • Synchronizes model and visualization (event-driven) • Pin/NodeWidget • specifies rendering rules of Node/Pin in Scene depending on state • Widget Factory • creates Widgets for Nodes/Pins/Edges • specifies global rendering rules for Scene
Application Design • Module • specifies Model; Widget Factory; Persistence layer; • determined by configuration • 3rd party Module implementations can be seamlessly interfaced and included into the application at startup • Model (Structure, Rules, Actions) • Rendering (Widgets, Connection routing) • Persistence (Filesystem, Remote, Database)
Application Design & Implementation Details • Swing GUI: support for applets, webstart, custom L&F • Java2D printing • java.awt.datatransfer: system-wideCopy/Paste • Properties: persistence of user configuration and settings • Action chains: unlimited Undo/Redo • java.util.concurrent: model/GUI concurrency