An XML Driven Graphical User Interface and Application - SLAC

24
A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei Dmitrovski, Albert Kagarmanov (DESY & IHEP) Zoltan Kakucs (DESY), Greg White, Hamid Shoaee (SLAC)

Transcript of An XML Driven Graphical User Interface and Application - SLAC

A XML1

An XML Driven Graphical User Interface and Application

Management Toolkit

Matthias Clausen (DESY & SLAC)

Piotr Bartkiewicz (DESY & FPNT/AGH)Alexei Dmitrovski, Albert Kagarmanov (DESY & IHEP)

Zoltan Kakucs (DESY), Greg White, Hamid Shoaee (SLAC)

An XML Driven Graphical User Interface and Application Management Toolkit2

The Initiative for a new Display Tool

Started as a Feasibility Study for the COSMIC* Project at SLAC

� Synoptic (CUD) display (live updates) � ‘Emulate’ SCP 8*8 Button Panels

(previously Touch Screens)� Sending commands to applications � Receive configurations and commands from

applications •Control System Migration ChallengeWEA T002 ( Robert Sass)

An XML Driven Graphical User Interface and Application Management Toolkit3

Java Operator Interface and

Management Integration Tool

An XML Driven Graphical User Interface and Application Management Toolkit4

Main Objectives

� Develop a toolbox which accepts configurations and commands from other applications

� Save and reload configuration files ( in XML)� Easy integration of graphic objects and/or

complete applications� Connection to multiple data sources easy

integration of new data sources� Run local and over the net (as an Applet)� Management of applications (registration,

inspection)

An XML Driven Graphical User Interface and Application Management Toolkit5

First Implementation (June-’01 @ SLAC)

� Use Java as core technology� ->Run Application on NT and Linux� ->Run Applet over LAN and WAN

� Visual Cafe as development environment� Simple graphic objects� Multiple data sources ( EPICS channel

access and COSMIC / AIDA)� Support for asynchronous data exchange

An XML Driven Graphical User Interface and Application Management Toolkit6

Development continues at DESY (Sept-Nov)

� Joint effort of five members from three different groups

� New design for graphic objects� Implementation of save/ restore� New layer for multiple data sources� Http client/ server

An XML Driven Graphical User Interface and Application Management Toolkit7

Basic Structure

Data Source Connector

Databases / Control Systems Applications

Graphic ObjectsAny Java Object

Configuration &Commands

?

ScanEngine

The Core Registry

Timer

Cfgfiles

Data

localthread

http client(monitor)

http server

An XML Driven Graphical User Interface and Application Management Toolkit8

Registry

� The Registry is a central hash table storing name/ object duplets

� Register Objects as� ObjectName/ ‚Instance of ObjectClass‘� DeviceName/ hash table of Graphic Objects

� The hash table of Graphic Objects contains objects which are registered with one of their properties for a deviceName

DeviceName: EPICS|WLST1D32_temp

An XML Driven Graphical User Interface and Application Management Toolkit9

Class: JoiTextFieldObject: JoiTextField-1

Registration Register a Graphic text Object

Class: JoiTextFieldObject: JoiTextField-1Property: ValueProperty.deviceName EPICS|WLST1D32_temp

Registry

register object

Name ObjectJoiTextField-1 instance of JoiTextField

register devicename /object

EPICS|WLST1D32_tempName Object Method

JoiTextField-1 instance of JoiTextField setValue...

SendCommand

„JoiTextField-1“ „setWidth“ „200“

SendValue

„ EPICS|WLST1D32_temp“ „actual value“

actual value

Graphic Text Object

An XML Driven Graphical User Interface and Application Management Toolkit10

Message:Graphic Objects

Registration using:� (String) Name� (Object) Object Instance� (Method) property Method

Activation using:� (String) Object Name + Method Invocation� (String) Device Name + Method Invocation

An XML Driven Graphical User Interface and Application Management Toolkit11

Basic Structure

Data Source Connector

Databases / Control Systems Applications

Graphic ObjectsAny Java Object

Configuration &Commands

?

ScanEngine

The Core Registry

Timer

Cfgfiles

Data

localthread

http client(monitor)

http server

An XML Driven Graphical User Interface and Application Management Toolkit12

Configuring and Running the DataSource

8081www-kryo.desy.deARCHIVE

8081www-kryo.desy.deEPICS

8081www-kryo.desy.deDefault

Port #IP-AddressMethodObjectAlias

Data Source Connector

ScanEngine

Timer

The Core Registry

http client

http server

scanqueues

8081www-kryo.desy.deARCHIVE

processDatanumberCruncherLOCAL

8081www-kryo.desy.deEPICS

8081www-kryo.desy.deDefault

Port #IP-AddressMethodObjectAlias

caGetchannelAccessEPICS

8081www-kryo.desy.deARCHIVE

processDatanumberCruncherLOCAL

8081www-kryo.desy.deEPICS

8081www-kryo.desy.deDefault

Port #IP-AddressMethodObjectAlias

alternative

An XML Driven Graphical User Interface and Application Management Toolkit13

LMILocal Method Invocation

A very effective way to decouple the Graphics Objects and the data source implementation from the main code.� Objects register themselves.

(no object dependant code in any other class)� Base class supports save and restore of XML

config. files. (once for all)� Dynamic access to all properties

-> property window

An XML Driven Graphical User Interface and Application Management Toolkit14

Property Window

� Access to all Properties� All Properties can be:

� Static ( number)� Dynamic ( deviceName)

� Some objects have Properties ( like the text field), which can also be:� Active ( deviceName)

An XML Driven Graphical User Interface and Application Management Toolkit15

Object Tab

Definition of available objects in XML config file:

<section><caption>Controls</caption><element>JoiButton</element><element>JoiSlider</element><element>JoiTextField</element><element>JoiScrollTime</element></section>

• Connection between JoiMintand the object class is referenced –by name-!

An XML Driven Graphical User Interface and Application Management Toolkit16

Graphic ObjectsControls and Shapes

An XML Driven Graphical User Interface and Application Management Toolkit17

Graphic ObjectsComplex Types:

Archive Plot Strip Chart

An XML Driven Graphical User Interface and Application Management Toolkit18

XMLIs used for:

� Configuration Data:� Graphic Object Tab� (Http) Data source definition� Synoptic Displays (i.e. translated dm2k screens)

� Data/ Commands� Value Updates� Archived Data� Commands to/ from Applications

An XML Driven Graphical User Interface and Application Management Toolkit19

JoiMintWhere to use it?

� Remote access to control system’s data� Diagnostic data from ‚smart devices‘

� PLC‘s or power supplies� Get graphic config file from default http port� Get dynamic data from control system� One special smarty is JoiMint itself

� .. With a built in http server

� Quick diagnostic using a PDA version (planned)� An example of a ‘light weight’ application for

Global Accelerator Networks

An XML Driven Graphical User Interface and Application Management Toolkit20

Future Plans

� Add properties� Scantime� Alarm-State / -Severity� Display limits (High-/ Low-Display)

� Add more graphic objects� Support more data sources (TINE, DOOCS)� Save data from objects to file (I.e. complete

display and/or strip chart)� Record and playback

An XML Driven Graphical User Interface and Application Management Toolkit21

The Development Team

+Albert

ZoltanKarol Alexei

Matthias

An XML Driven Graphical User Interface and Application Management Toolkit22

Short Demo

An XML Driven Graphical User Interface and Application Management Toolkit23

Command Record and Playback

� Record all operator commands� Allow command editing

� Implementation of sequencing features:� Loops� If – then – else structures

(based on live data from the underlying control system)

� Store commands as XML file� Load command-set from XML file� Replay commands

An XML Driven Graphical User Interface and Application Management Toolkit24

Data Sources:HTTP Communication

� Server:� Simple ‚C‘ program accepting http requests� Designed for XML communication

� Data and commands are transferred as XML streams of data� Client:

� Simple Java html client� Parsing XML for further processing in JoiMint

� Advantage:� Easy to manage (html passes firewalls)� Clients can connect from anywhere (default for Applets)

� Disadvantage:� Only ASCII data/ slow i.e. for archived data