A Framework for Java CERN PS Control System

utopianthreeSoftware and s/w Development

Jul 14, 2012 (5 years and 10 days ago)

301 views

Icalepcs 2001A Java Framework1
A Framework for Java
A Framework for Java
Application Programs in the
Application Programs in the
CERN PS Control System
CERN PS Control System
Michel Arruat, Jan Cuperus, Marine
Michel Arruat, Jan Cuperus, Marine
Gourber
Gourber
-
-
Pace, Roger Hoh, Eric Roux
Pace, Roger Hoh, Eric Roux
CERN, 1211 Geneve 23, Switzerland
CERN, 1211 Geneve 23, Switzerland
Icalepcs 2001 A Java Framework2
Objectives of the
Objectives of the
Framework
Framework
￿
￿
Control 5 interconnected accelerators with an
Control 5 interconnected accelerators with an
application layer in Java
application layer in Java
.
.
￿
￿
Generic
Generic
system, driven by data in a relational
system, driven by data in a relational
database.
database.
￿
￿
Assembled with proven and
Assembled with proven and
reusable components
reusable components
.
.
￿
￿
Easy design
Easy design
, with and without a graphical design
, with and without a graphical design
tool.
tool.
￿
￿
Application life cycle controlled by an
Application life cycle controlled by an
application
application
manager
manager
.
.
￿
￿
Design and operation both in
Design and operation both in
MS Windows and
MS Windows and
Linux
Linux
.
.
Icalepcs 2001 A Java Framework3
Applics and Frames
Applics and Frames
Applic+Frame
Applic+Frame
Applic+Frame
Applic+Frame
Applic
Manager
Dependent Applic
Console Manager
Application
Top Manager
Icalepcs 2001 A Java Framework4
Class Diagram for an
Class Diagram for an
Applic Frame
Applic Frame
JFrame
JInternalFrame
Interface
Abstract
Frame
ExtFrame
IntFrame
Internal
or
External
Frame
BottomZone
TopZone
Applic
AbstractApplic
Icalepcs 2001 A Java Framework5
The Default Empty Frame
The Default Empty Frame
￿
￿
The components of the default toolbar are:
The components of the default toolbar are:
￿
Freeze/Unfreeze action
￿
One-shot action
￿
Show/Select dependent frames action
￿
Date+Time of latest action or update
￿
Present beam and cycle
￿
Beam and cycle trigger selector
￿
Print the frame action
￿
Popup html browser with applic help text action
Icalepcs 2001 A Java Framework6
Error Reporting
Error Reporting
￿
￿
A class
A class
Display
Display
has static methods for reporting:
has static methods for reporting:
￿
showMessage(message, source)
￿
showWarning(message, source)
￿
showFault(message, source)
￿
￿
According to
According to
source
source
this is displayed in priority in:
this is displayed in priority in:
￿
1. the bottom zone associated in any way with source
￿
2. the bottom zone of the top manager
￿
3. as a message pane or
￿
4. if there is no graphical interface (yet) on the output stream
￿
￿
In addition, faults are
In addition, faults are
logged
logged
on a database withJDBC
on a database withJDBC
Icalepcs 2001 A Java Framework7
Application Environment
Application Environment
Directory
service for
accelerator
devices and
parameters
Relational
database with
JDBC
Reference
Parameters for
accelerator
devices
Accelerators and accelerator devices
Accelerator
device
interface
Timing and
beam
sequence
interface
Subscription and access service in middleware
applics
and
component library
Error
reporting
Frame
services
Icalepcs 2001 A Java Framework8
Design Tools
Design Tools
￿
￿
A text editor is suficient but a powerful design
A text editor is suficient but a powerful design
tool is more effective.
tool is more effective.
JBuilder
JBuilder
was choosen
was choosen
because:
because:
￿
It has powerful text editing capabilities
￿
It works on Linux and MS Windows
￿
Graphical editing produces clear code
￿
It has good debugging facilities
￿
It can maintain many projects and switch between them
￿
It does not lock you in
Icalepcs 2001 A Java Framework9
Deferred Initialization
Deferred Initialization
￿
￿
Beans may come to life in JBuilder if
Beans may come to life in JBuilder if
completely initialized
completely initialized
￿
￿
They call static method
They call static method
deferredInit()
deferredInit()
￿
￿
In operational environment all these calls
In operational environment all these calls
are
are
put on a stack
put on a stack
with initialization thread
with initialization thread
as key
as key
￿
￿
At end of initialization, the AbstractApplic
At end of initialization, the AbstractApplic
class knows all these beans and can call
class knows all these beans and can call
them with any parameters required by their
them with any parameters required by their
class and may even automatically
class and may even automatically
interconnect pairs of beans.
interconnect pairs of beans.
Icalepcs 2001 A Java Framework10
Templates
Templates
￿
￿
For
For
myproject
myproject
, skeleton files for main applic can
, skeleton files for main applic can
be generated from templates:
be generated from templates:
￿
Myproject.java: main applic
￿
MyprojectFrame.java: for graphical design in tool
￿
MyprojectHelp.html: shows when help button is pushed
￿
Myproject.jpx: defines project for JBuilder
￿
￿
Any time later, skeletons for dependent applics
Any time later, skeletons for dependent applics
can be added:
can be added:
￿
Mydep.java
￿
MydepFrame.java
￿
MydepHelp.html
Icalepcs 2001 A Java Framework11
PM Select Project Page
PM Select Project Page
Icalepcs 2001 A Java Framework12
PM Design Page
PM Design Page
Icalepcs 2001 A Java Framework13
PM CVS Page
PM CVS Page
Icalepcs 2001 A Java Framework14
PM Install Page
PM Install Page
Icalepcs 2001 A Java Framework15
PM Message Log
PM Message Log
Icalepcs 2001 A Java Framework16
Status and Conclusions
Status and Conclusions
￿
￿
Early version in use
Early version in use
for over a year as stand
for over a year as stand
-
-
alone
alone
java programs under C++ console manager.
java programs under C++ console manager.
￿
￿
Gradual move to applications in a
Gradual move to applications in a
single Java
single Java
Virtual machine
Virtual machine
under Java console manager.
under Java console manager.
￿
￿
JVM must
JVM must
run for days
run for days
without rebooting.
without rebooting.
￿
￿
JVM must update
JVM must update
hundreds of parameters/second
hundreds of parameters/second
.
.
￿
￿
We are confident this will be possible with our
We are confident this will be possible with our
new
new
framework, components, and middleware
framework, components, and middleware
.
.
￿
￿
Java console manager can call C/C++ programs
Java console manager can call C/C++ programs
but ultimately we want a
but ultimately we want a
homogeneous Java
homogeneous Java
application layer
application layer
.
.