Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

The CERN PSSL Controls Java API by msz78385

VIEWS: 0 PAGES: 14

									    The CERN PS/SL
    Controls Java API
P. Charrue, K. Kostro, M. Vanden Eynden
              (CERN-SL)       SPS & LEP

   J. Cuperus , I. Deloose, F. Di Maio
              (CERN-PS)       Linacs (p+, Pb),
                              Booster, PS,
               W.Watson       LPI & AD

                (TJNAF)
        Motivations
    An initiative of the PS/SL Controls groups
    towards a common controls architecture

* Define a device model and the capabilities
  seen by the applications via the API
* Produce a stable interface for Java
  application developers
í   Enter into the exciting Java world
          PS/SL Java API Project
          (April 98 - Dec. 99)
T u Specify a Java API
O
D u Deliver a first implementation on top of the
O   mature PS & SL equipment access.

N u The Java API is CDEV (new Java version)
E    TJNAF’s OO Controls API (C++, EPICS)
W
S u TJNAF & CERN use the same Java version
  u   Some applications in operation (June 99)
       Selected Milestones
May 1998:
  Device model discussed in SOSH context
July 1998:
  Why not using Jlab’s work instead of
  doing a similar work @ CERN?
October 1998: Vs “beta1” available
December 1998: Vs “1.0” ready (all PS
 devices)
        PS/SL Java API
        Highlights
u   Device-oriented & Device/Property Model
u   Asynchronous, event-based I/O
u   Connectivity to different communication
    infrastructures
u   Directory Service (Next talk by J. Cuperus)
           Device/Property Model
  u   Named Devices          Device I/O Methods:
  u   Have Properties        u get or set a property
  u   Organised in Classes       get(...), set(…)
                             u   monitor a property
“BTP.DVT10”                      monitorOn(…)
                             u   execute a command
           Magnet                u take parameters
  is a
                                 u return results

           status: int           send(…)
           command: int
           current: double
           ...
       Ex. - Get Property
// Create a Device
Device dev = new Device(“BTP.DVT10”);

// Get a Property
Data data = new Data();
DeviceError err = dev.get(“Current”,data);

if (err != null) throw err;
float current = data.getFloatValue();
          Ex. - Magnet Bean
          (“wide” interface)
Class Magnet extends Device {
      void Magnet (String name) {
             super(name);
      }
      float getCurrent() throws DeviceError {
             Data data = new Data();
             DeviceError err = this.get (“Current”, data);
             if (err != null) throw err;
             return data.getFloatValue();
      }
           Synchronous /
           Asynchronous Methods
u   “Synchronous” Method
    u   User thread waits for I/O completion
    u   Exchange data and return errors

u   “Asynchronous” Method
    u   Separate thread activated as a result of the method
        invocation
    u   Generate events
         Ex. - MonitorOn
     // Activate property monitoring
     dev.monitorOn (“Status”, listener);
                                     implements

                      <<interface>> DeviceListener
                      deviceChanged (event: DeviceEvent )
DeviceEvent
getDevice (): Device
getProperty(): String                Java Event Model
getOpCode(): int
getError(): DeviceError
getValue(): DataEntry
getCycleStamp(): long
          Java CDEV Architecture
                     Application
Device                                       (interfaces)
Data                                       DeviceData
DeviceError               CDEV             DeviceClass
DeviceEvent                                DeviceProperty
...                                        ...

            I/O Service            Directory Service
          Implementation           Implementation


              Equipment             Configuration
                Server                  Data
       I/O Services                        I/O S
                                         Java
   CLIP       Java     I/O S           Client lib
   I/O S                JNI
CLIP                  C/C++
                     Client lib
   CDEV                           SUN RPC
    C++       CERN RPC
   Server
            LynxOS
                       RPC                  RPC
 CA                   Server               Server

   EPICS
                                  2-tier
   3-tier Architecture
I/O Service    User’s Java Virtual Machine

       RMI, CORBA
Middle-tier   Separate Process
 Server
                          Execute I/O
       RPC, CORBA         Implement virtual devices

Equipment
               Real-Time Environment
  Server
        Conclusion
4 A Java API has been specified and delivered
* Next: new communication services
                             Java API
                                         Config.
    Another PS/SL project   Middleware
                                         Services
                            Equipment
4 Applications and components can be
  developed
                 Another collaboration domain
P A very productive collaboration

								
To top