edu.stanford.slac.aida.dp.dpKlys
Class DpKlysI_impl

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by edu.stanford.slac.aida.dp.dpKlys.DpKlysIPOA
          extended by edu.stanford.slac.aida.dp.dpKlys.DpKlysI_impl
All Implemented Interfaces:
DpKlysIOperations, org.omg.CORBA.portable.InvokeHandler

public class DpKlysI_impl
extends DpKlysIPOA

This class defines the AIDA Data Provider for EPICS Channel Access. DpKlysI_impl implements the AIDA Data Provider "DpKlysI" CORBA interface, by extending DpKlysIPOA The inderlying EPICS Data Source is accessed through the (new COSYLAB) JCA interface.


Method Summary
 org.omg.PortableServer.POA _default_POA()
           
protected  double[] caget_doublea(java.lang.String pvName)
          Wraps channel access for acquisition of doubles
protected  int caget_int(java.lang.String pvName)
          Wraps channel access for acquisition of ints
protected  void caset_any(java.lang.String pvName, org.omg.CORBA.AnyHolder value)
          Channel Access "put" a given single value to a given PV, where the single value is passed as a Corba ANY type.
protected  void caset_Double(java.lang.String pvName, java.lang.Double value)
          Channel Access "put" a single Double value to a given PV.
protected  void caset_int(java.lang.String pvName, java.lang.Integer value)
          Channel Access "put" a single int value to a given PV.
protected  void caset_String(java.lang.String pvName, java.lang.String value)
          Channel Access "put" a single String value to a given PV.
protected  java.lang.String deviceNameToKphrPv(java.lang.String deviceName)
           
protected  java.lang.String deviceNameToPdesPv(java.lang.String deviceName)
           
protected  java.lang.String deviceNameToPhasePv(java.lang.String deviceName)
           
 boolean get_boolean(java.lang.String query, java.lang.String[] args)
           
 boolean[] get_booleana(java.lang.String query, java.lang.String[] args)
           
 byte get_byte(java.lang.String query, java.lang.String[] args)
          Unimplemented Methods AIDA Data Provider (DaObject) methdos.
 byte[] get_bytea(java.lang.String query, java.lang.String[] args)
           
 char get_char(java.lang.String query, java.lang.String[] args)
           
 char[] get_chara(java.lang.String query, java.lang.String[] args)
           
 double get_double(java.lang.String query, java.lang.String[] args)
           
 double[] get_doublea(java.lang.String query, java.lang.String[] args)
           
 float get_float(java.lang.String query, java.lang.String[] args)
          Implements acquisition of Klys PDES, PHAS, KPHR as float value.
 float[] get_floata(java.lang.String query, java.lang.String[] args)
           
 int get_long(java.lang.String query, java.lang.String[] args)
          Gets the activation status of a given klystron/subbooster, as a long int.
 int[] get_longa(java.lang.String query, java.lang.String[] args)
           
 short get_short(java.lang.String query, java.lang.String[] args)
          Gets the activation status of a given klystron/subbooster, as an [unsigned] short int.
 short[] get_shorta(java.lang.String query, java.lang.String[] args)
           
 java.lang.String get_string(java.lang.String query, java.lang.String[] args)
          Gets the activation status bit of a given klystron/subbooster status bitfield, as a String.
 java.lang.String[] get_stringa(java.lang.String query, java.lang.String[] args)
           
 char get_wchar(java.lang.String query, java.lang.String[] args)
           
 char[] get_wchara(java.lang.String query, java.lang.String[] args)
           
 java.lang.String get_wstring(java.lang.String query, java.lang.String[] args)
           
 org.omg.CORBA.Any get(java.lang.String query, java.lang.String[] args)
           
 org.omg.CORBA.Any getAny(java.lang.String query, java.lang.String[] args)
          Returns CORBA Any representation of EPICS DBR_TIME_XXX NOT PRESENTLY USED!
protected  gov.aps.jca.Channel getChannel(java.lang.String query)
          Acquires access to a JCA Channel for a given EPICS Channel Name.
protected  short getKlysStatus(java.lang.String deviceName, java.lang.String beam, java.lang.String dgrp)
          Gets whether a given klystron/subbooster status shortword.
protected  double getKphr(java.lang.String deviceName)
           
protected  edu.stanford.slac.aida.dp.dpKlys.DpKlysI_impl.MetaChannel getMetaChannel(java.lang.String query)
          Acquires access to a JCA Channel for a given EPICS Channel Name.
protected  double getPdes(java.lang.String deviceName)
           
protected  double getPhase(java.lang.String deviceName)
           
 void init()
           
protected  java.lang.String queryToAttribute(java.lang.String query)
          Returns the AIDA attribute part of a given AIDA entity.
protected  java.lang.String queryToInstance(java.lang.String query)
          Returns the AIDA instance part of a given AIDA entity.
 void set(java.lang.String query, java.lang.String[] args, org.omg.CORBA.AnyHolder value)
           
protected  void setDeactOrReact(java.lang.String deviceName, int deactOrReactFlag, java.lang.String beam)
           
protected  void setKphr(java.lang.String deviceName, java.lang.Double value, boolean trim)
           
protected  void setPdes(java.lang.String deviceName, java.lang.Double value, boolean trim)
           
protected  java.lang.Double setTrimPhase(java.lang.String deviceName, java.lang.String attribute, java.lang.Double value, java.lang.String trim)
           
 void shutdown()
           
 void startMonitor(java.lang.String name)
           
 int status()
           
 void stopMonitor(java.lang.String name)
           
protected  void trimPdes(java.lang.String deviceName)
           
 
Methods inherited from class edu.stanford.slac.aida.dp.dpKlys.DpKlysIPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

_default_POA

public org.omg.PortableServer.POA _default_POA()
Overrides:
_default_POA in class org.omg.PortableServer.Servant

init

public void init()
          throws edu.stanford.slac.except.ServerInitialisationException
Throws:
edu.stanford.slac.except.ServerInitialisationException

get

public org.omg.CORBA.Any get(java.lang.String query,
                             java.lang.String[] args)
                      throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

getAny

public org.omg.CORBA.Any getAny(java.lang.String query,
                                java.lang.String[] args)
                         throws edu.stanford.slac.except.UnableToGetDataException
Returns CORBA Any representation of EPICS DBR_TIME_XXX NOT PRESENTLY USED!

Throws:
edu.stanford.slac.except.UnableToGetDataException

get_short

public short get_short(java.lang.String query,
                       java.lang.String[] args)
                throws edu.stanford.slac.except.UnableToGetDataException
Gets the activation status of a given klystron/subbooster, as an [unsigned] short int. This is the value given by klys/sbst device PV BEAMCODE<bc>_STAT, where bc is the Beamcode. The bitfield of the value is given by: 1 == Accelerate, 2 == Standby, 3 == Bad TMSK or HSTA.

Parameters:
query - The AIDA entity of a klystron or subbooster, of syntax "device-name//TACT".
args - Array of AIDA DaObject parameters, in particular the BEAM parameter is required.
Returns:
value of KLYS:area:unit:BEAMCODEbeamcode_STAT 16 bit word.
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_long

public int get_long(java.lang.String query,
                    java.lang.String[] args)
             throws edu.stanford.slac.except.UnableToGetDataException
Gets the activation status of a given klystron/subbooster, as a long int. However only the lower 16 bits are used. See get_short for their interpretation.

Parameters:
query - The AIDA entity of a klystron or subbooster, of syntax "device-name//TACT".
args - Array of AIDA DaObject parameters, in particular the BEAM parameter is required.
Returns:
The klystron status longword.
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_string

public java.lang.String get_string(java.lang.String query,
                                   java.lang.String[] args)
                            throws edu.stanford.slac.except.UnableToGetDataException
Gets the activation status bit of a given klystron/subbooster status bitfield, as a String. See get_short for more information.

Parameters:
query - The AIDA entity of a klystron or subbooster, of syntax "device-name//TACT".
args - Array of AIDA DaObject parameters, in particular the BEAM parameter is required.
Returns:
If the low order bit (ACCEL) of the klys/sbst status bitfield == 0, then get_string returns "deactivated"; otherwise return "activated".
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_wstring

public java.lang.String get_wstring(java.lang.String query,
                                    java.lang.String[] args)
                             throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_double

public double get_double(java.lang.String query,
                         java.lang.String[] args)
                  throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_float

public float get_float(java.lang.String query,
                       java.lang.String[] args)
                throws edu.stanford.slac.except.UnableToGetDataException
Implements acquisition of Klys PDES, PHAS, KPHR as float value.

Throws:
edu.stanford.slac.except.UnableToGetDataException

get_doublea

public double[] get_doublea(java.lang.String query,
                            java.lang.String[] args)
                     throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_floata

public float[] get_floata(java.lang.String query,
                          java.lang.String[] args)
                   throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

set

public void set(java.lang.String query,
                java.lang.String[] args,
                org.omg.CORBA.AnyHolder value)
         throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

startMonitor

public void startMonitor(java.lang.String name)
                  throws edu.stanford.slac.except.MonitorStartupException
Throws:
edu.stanford.slac.except.MonitorStartupException

stopMonitor

public void stopMonitor(java.lang.String name)
                 throws edu.stanford.slac.except.MonitorShutdownException
Throws:
edu.stanford.slac.except.MonitorShutdownException

status

public int status()

shutdown

public void shutdown()

queryToInstance

protected java.lang.String queryToInstance(java.lang.String query)
Returns the AIDA instance part of a given AIDA entity. The entity is that part before the "//".


queryToAttribute

protected java.lang.String queryToAttribute(java.lang.String query)
Returns the AIDA attribute part of a given AIDA entity. The attribute is that part before the "//".


getPhase

protected double getPhase(java.lang.String deviceName)
                   throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

getPdes

protected double getPdes(java.lang.String deviceName)
                  throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

getKphr

protected double getKphr(java.lang.String deviceName)
                  throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

setPdes

protected void setPdes(java.lang.String deviceName,
                       java.lang.Double value,
                       boolean trim)
                throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

setKphr

protected void setKphr(java.lang.String deviceName,
                       java.lang.Double value,
                       boolean trim)
                throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

trimPdes

protected void trimPdes(java.lang.String deviceName)
                 throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

deviceNameToPhasePv

protected java.lang.String deviceNameToPhasePv(java.lang.String deviceName)

deviceNameToPdesPv

protected java.lang.String deviceNameToPdesPv(java.lang.String deviceName)

deviceNameToKphrPv

protected java.lang.String deviceNameToKphrPv(java.lang.String deviceName)

getKlysStatus

protected short getKlysStatus(java.lang.String deviceName,
                              java.lang.String beam,
                              java.lang.String dgrp)
                       throws edu.stanford.slac.except.UnableToGetDataException
Gets whether a given klystron/subbooster status shortword. The status shortword is what on VMS would have been returned by linac_klys_stat for the given klys/sbst on the given beamcode.

Throws:
edu.stanford.slac.except.UnableToGetDataException

setDeactOrReact

protected void setDeactOrReact(java.lang.String deviceName,
                               int deactOrReactFlag,
                               java.lang.String beam)
                        throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

setTrimPhase

protected java.lang.Double setTrimPhase(java.lang.String deviceName,
                                        java.lang.String attribute,
                                        java.lang.Double value,
                                        java.lang.String trim)
                                 throws edu.stanford.slac.except.UnableToSetDataException
Throws:
edu.stanford.slac.except.UnableToSetDataException

caget_int

protected int caget_int(java.lang.String pvName)
                 throws edu.stanford.slac.except.UnableToGetDataException
Wraps channel access for acquisition of ints

Throws:
edu.stanford.slac.except.UnableToGetDataException

caget_doublea

protected double[] caget_doublea(java.lang.String pvName)
                          throws edu.stanford.slac.except.UnableToGetDataException
Wraps channel access for acquisition of doubles

Throws:
edu.stanford.slac.except.UnableToGetDataException

caset_int

protected void caset_int(java.lang.String pvName,
                         java.lang.Integer value)
                  throws edu.stanford.slac.except.UnableToSetDataException
Channel Access "put" a single int value to a given PV.

Throws:
edu.stanford.slac.except.UnableToSetDataException

caset_Double

protected void caset_Double(java.lang.String pvName,
                            java.lang.Double value)
                     throws edu.stanford.slac.except.UnableToSetDataException
Channel Access "put" a single Double value to a given PV.

Throws:
edu.stanford.slac.except.UnableToSetDataException

caset_String

protected void caset_String(java.lang.String pvName,
                            java.lang.String value)
                     throws edu.stanford.slac.except.UnableToSetDataException
Channel Access "put" a single String value to a given PV.

Throws:
edu.stanford.slac.except.UnableToSetDataException

caset_any

protected void caset_any(java.lang.String pvName,
                         org.omg.CORBA.AnyHolder value)
                  throws edu.stanford.slac.except.UnableToSetDataException
Channel Access "put" a given single value to a given PV, where the single value is passed as a Corba ANY type.

Throws:
edu.stanford.slac.except.UnableToSetDataException

getChannel

protected gov.aps.jca.Channel getChannel(java.lang.String query)
                                  throws java.lang.IllegalArgumentException,
                                         gov.aps.jca.CAException,
                                         gov.aps.jca.TimeoutException
Acquires access to a JCA Channel for a given EPICS Channel Name.

Throws:
java.lang.IllegalArgumentException - query is invalid, may be not an instance//attribute pair?
gov.aps.jca.CAException
gov.aps.jca.TimeoutException

getMetaChannel

protected edu.stanford.slac.aida.dp.dpKlys.DpKlysI_impl.MetaChannel getMetaChannel(java.lang.String query)
                                                                            throws java.lang.IllegalArgumentException,
                                                                                   gov.aps.jca.CAException,
                                                                                   gov.aps.jca.TimeoutException
Acquires access to a JCA Channel for a given EPICS Channel Name.

Throws:
java.lang.IllegalArgumentException - query is invalid, may be not an instance//attribute pair?
gov.aps.jca.CAException
gov.aps.jca.TimeoutException

get_byte

public byte get_byte(java.lang.String query,
                     java.lang.String[] args)
              throws edu.stanford.slac.except.UnableToGetDataException
Unimplemented Methods AIDA Data Provider (DaObject) methdos. These methods are not implemented for the Klystron service

Throws:
edu.stanford.slac.except.UnableToGetDataException

get_char

public char get_char(java.lang.String query,
                     java.lang.String[] args)
              throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_wchar

public char get_wchar(java.lang.String query,
                      java.lang.String[] args)
               throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_boolean

public boolean get_boolean(java.lang.String query,
                           java.lang.String[] args)
                    throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_booleana

public boolean[] get_booleana(java.lang.String query,
                              java.lang.String[] args)
                       throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_bytea

public byte[] get_bytea(java.lang.String query,
                        java.lang.String[] args)
                 throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_chara

public char[] get_chara(java.lang.String query,
                        java.lang.String[] args)
                 throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_wchara

public char[] get_wchara(java.lang.String query,
                         java.lang.String[] args)
                  throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_shorta

public short[] get_shorta(java.lang.String query,
                          java.lang.String[] args)
                   throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_longa

public int[] get_longa(java.lang.String query,
                       java.lang.String[] args)
                throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException

get_stringa

public java.lang.String[] get_stringa(java.lang.String query,
                                      java.lang.String[] args)
                               throws edu.stanford.slac.except.UnableToGetDataException
Throws:
edu.stanford.slac.except.UnableToGetDataException