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)

A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

Embed Size (px)

Citation preview

Page 1: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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)

Page 2: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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 Challenge WEA T002 ( Robert Sass)

Page 3: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit3

Java Operator Interface and

Management Integration Tool

Page 4: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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)

Page 5: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 6: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 7: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 8: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 9: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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_temp Name Object MethodJoiTextField-1 instance of JoiTextField setValue ...

SendCommand

„JoiTextField-1“ „setWidth“ „200“

SendValue

„ EPICS|WLST1D32_temp“ „actual value“

actual value

Graphic Text Object

Page 10: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 11: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 12: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit12

Configuring and Running the DataSource

Alias Object Method IP-Address Port #

Default www-kryo.desy.de 8081

EPICS www-kryo.desy.de 8081

ARCHIVE www-kryo.desy.de 8081

Data Source Connector

ScanEngine

Timer

The Core Registry

http client

http server

scanqueues

Alias Object Method IP-Address Port #

Default www-kryo.desy.de 8081

EPICS www-kryo.desy.de 8081

ARCHIVE www-kryo.desy.de 8081

LOCAL numberCruncher processData

Alias Object Method IP-Address Port #

Default www-kryo.desy.de 8081

EPICS www-kryo.desy.de 8081

ARCHIVE www-kryo.desy.de 8081

LOCAL numberCruncher processData

EPICS channelAccess caGet

alternative

Page 13: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 14: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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)

Page 15: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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 JoiMint and the object class is referenced –by name-!

Page 16: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit16

Graphic ObjectsControls and Shapes

Page 17: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit17

Graphic ObjectsComplex Types:

Archive Plot Strip Chart

Page 18: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 19: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 20: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 21: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit21

The Development Team

+Albert

ZoltanKarol Alexei

Matthias

Page 22: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

An XML Driven Graphical User Interface and Application Management Toolkit22

Short Demo

Page 23: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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

Page 24: A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei

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