Class EpicsController

java.lang.Object
gda.epics.connection.EpicsController
All Implemented Interfaces:
gov.aps.jca.event.ContextExceptionListener, gov.aps.jca.event.ContextMessageListener, EventListener

public class EpicsController extends Object implements gov.aps.jca.event.ContextExceptionListener, gov.aps.jca.event.ContextMessageListener
The EPICSConnection class initialises JCA context, setting up network configuration for EPICS IOCs. It provides a single Channel Access Context for managing all IO operations between GDA and EPICS servers and provides methods to access process variables provided by EPICS database through a Channel object. It also handle the CA exceptions from Channel Access.

Type specific caget, for example cagetDouble and caput methods are provided here to encapsulate the type conversion or mapping between EPICS and Java, so the rest of GDA codes could be developed more cleanly. These methods prevent automatic type conversion, for example from double to int taking place on the Channel Access servers, and ensure no unpredicted precesion loss during the operation. The automatic type conversions are considered undesirable.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    An enumerated type for DBR from EPICS.
  • Method Summary

    Modifier and Type
    Method
    Description
    gov.aps.jca.Monitor
    addAlarmMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml)
    Adds a ALARM monitor to the specified channel.
    gov.aps.jca.Monitor
    addAlarmMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type)
    adds a ALARM monitor to the specified channel using the specified MonitorType.
    gov.aps.jca.Monitor
    addMonitor(gov.aps.jca.Channel dataChannel)
    return a PV value monitor to the specified channel.
    caget(gov.aps.jca.Channel ch)
    a handy method to return everything in String type for console display, to emulate terminal command 'caget' gets the current value of the specified channel, returns it as String without implicit type conversion.
    caget(gov.aps.jca.Channel ch, int elementCount)
    gets a string value array from this channel without implicit CA data type conversion, return the results as a String array.
    gov.aps.jca.dbr.DBR
    caget(gov.aps.jca.Channel ch, EpicsController.MonitorType type)
    Gets the specified CA compound type DBR from this channel.
    byte
    cagetByte(gov.aps.jca.Channel ch)
    gets current value in byte from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not byte.
    byte[]
    cagetByteArray(gov.aps.jca.Channel ch)
    gets a byte array from the specified channel.
    byte[]
    cagetByteArray(gov.aps.jca.Channel theChannel, int numberOfElements)
    gets a fixed length byte array from the specified channel.
    cagetByteArrayAsString(gov.aps.jca.Channel ch)
    return a String value from a byte array of the specified channel.
    double
    cagetDouble(gov.aps.jca.Channel ch)
    gets current value in double from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not double.
    double[]
    cagetDoubleArray(gov.aps.jca.Channel ch)
    gets a double array from the specified channel.
    double[]
    cagetDoubleArray(gov.aps.jca.Channel theChannel, int numberOfElements)
    gets a fixed length double array from the specified channel.
    short
    cagetEnum(gov.aps.jca.Channel ch)
    gets current enum position value in short from the specified channel.
    short[]
    cagetEnumArray(gov.aps.jca.Channel ch)
    Gets an array of short (enumerated positions) from enumerated field of this channel.
    short[]
    cagetEnumArray(gov.aps.jca.Channel ch, int count)
     
    float
    cagetFloat(gov.aps.jca.Channel ch)
    gets current value in float from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not float.
    float[]
    cagetFloatArray(gov.aps.jca.Channel ch)
    gets a float array from the specified channel.
    float[]
    cagetFloatArray(gov.aps.jca.Channel ch, int count)
     
    int
    cagetInt(gov.aps.jca.Channel ch)
    gets current value in int from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not int.
    int[]
    cagetIntArray(gov.aps.jca.Channel ch)
    gets a integer array from the specified channel.
    int[]
    cagetIntArray(gov.aps.jca.Channel ch, int elementCount)
    gets a integer array from the specified channel.
    cagetLabel(gov.aps.jca.Channel ch)
    gets current enum position label in String from the specified channel.
    cagetLabels(gov.aps.jca.Channel ch)
    gets labels in String for enumerated positions from the specified channel.
    cagetLabels(gov.aps.jca.Channel ch, double timeout)
     
    short
    cagetShort(gov.aps.jca.Channel ch)
    gets current value in short from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not short.
    short[]
    cagetShortArray(gov.aps.jca.Channel ch)
    gets a short array from the specified channel.
    short[]
    cagetShortArray(gov.aps.jca.Channel ch, int count)
     
    cagetString(gov.aps.jca.Channel ch)
    gets current value in String from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not String.
    cagetStringArray(gov.aps.jca.Channel ch)
    gets a String array from the specified channel.
    cagetStringArray(gov.aps.jca.Channel ch, int count)
     
    void
    caput(gov.aps.jca.Channel ch, byte[] value)
    writes a byte array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, byte[] value, double timeout)
     
    void
    caput(gov.aps.jca.Channel ch, byte[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a String array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, double value)
    writes a value to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, double[] value)
    writes a value array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, double[] value, double timeout)
    Writes a double array to the channel with user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, double[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a double array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, double value, double timeout)
    Writes a double value to the channel with the user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, double value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a double value to this channel with user provided put listener for callback.
    void
    caput(gov.aps.jca.Channel ch, float value)
    writes a value to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, float[] value)
    writes a value array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, float[] value, double timeout)
    Writes a float array to the channel with user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, float[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a float array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, float value, double timeout)
    Writes a float value to the channel with the user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, float value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a float value to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, int value)
    writes a value to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, int[] value)
    writes a value array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, int[] value, double timeout)
    Writes a int array to the channel with user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, int[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a int array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, int value, double timeout)
    Writes a int value to the channel with the user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, int value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a int value to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, short value)
    writes a value to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, short[] value)
    writes a value array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, short[] value, double timeout)
    Writes a short array to the channel with user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, short[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a short array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, short value, double timeout)
    Writes a short value to the channel with the user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, short value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a short value to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, String value)
    writes a value to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, String[] value)
    writes a value array to this channel without waiting for completion.
    void
    caput(gov.aps.jca.Channel ch, String[] value, double timeout)
    Writes a String array to the channel with user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, String[] value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a String array to this channel with user provided put listener which handles the put-callback.
    void
    caput(gov.aps.jca.Channel ch, String value, double timeout)
    Writes a String value to the channel with the user specified timeout in seconds.
    void
    caput(gov.aps.jca.Channel ch, String value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a String value to this channel with user provided put listener which handles the put-callback.
    void
    caputAsWaveform(gov.aps.jca.Channel ch, String value)
    converts a string to an int array, then writes to this channel without waiting for completion.
    void
    caputAsWaveform(gov.aps.jca.Channel ch, String value, gov.aps.jca.event.PutListener pl)
    Asynchronously writes a string to this channel after converting to an int array.
    void
    caputWait(gov.aps.jca.Channel ch, byte[] value)
     
    void
    caputWait(gov.aps.jca.Channel ch, double value)
    Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, double[] value)
    Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, float value)
    Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, float[] value)
    Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, int value)
    Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, int[] value)
    Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, int value, double timeout)
     
    void
    caputWait(gov.aps.jca.Channel ch, short value)
    Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, short[] value)
    Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel channel, Double value, double timeout)
     
    void
    caputWait(gov.aps.jca.Channel ch, String value)
    Synchronously puts a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel ch, String[] value)
    Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
    void
    caputWait(gov.aps.jca.Channel channel, String value, double timeout)
     
    void
    caputWaitAsWaveform(gov.aps.jca.Channel ch, String value)
    Synchronously takes a string, converts it into an int[], then puts this array to the channel and wait for return before timeout.
    void
    clearMonitor(gov.aps.jca.Monitor mntr)
    This method removes the monitor of a channel.
    void
    contextException(gov.aps.jca.event.ContextExceptionEvent cee)
     
    void
    contextMessage(gov.aps.jca.event.ContextMessageEvent cme)
    A handler for non-exception asynchronous message from the Context.
    void
    contextVirtualCircuitException(gov.aps.jca.event.ContextVirtualCircuitExceptionEvent e)
     
    gov.aps.jca.Channel
    creates a CA channel using default timeout.
    gov.aps.jca.Channel
    createChannel(String pvname, double timeoutInS)
    Create CA channel synchronously,users must specify the time to wait in seconds.
    gov.aps.jca.Channel
    createChannel(String pvname, gov.aps.jca.event.ConnectionListener cl)
    Create channel asynchronously, user need to provide connection listener.
    void
    destroy(gov.aps.jca.Channel ch)
    Clear the resources used by the specified channel.
    gov.aps.jca.dbr.DBR
    getCTRL(gov.aps.jca.Channel ch)
    returns a CTRL typed DBR value of the channel.
    gov.aps.jca.dbr.DBR
    getDBR(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type)
    Synchronously reads this Channel's value using the specified DBR type and native element count.
    gov.aps.jca.dbr.DBR
    getDBR(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int count)
    Synchronously reads this Channel's value using the specified DBR type and element count.
    gov.aps.jca.dbr.DBR
    getGR(gov.aps.jca.Channel ch)
    returns a GR typed DBR value of the channel.
    Singleton pattern to get instance of EpicsController.
    getInstance(boolean contextRequired)
    Singleton pattern to get instance of EpicsController.
    int
    returns monitor count from EPICS controller
    gov.aps.jca.dbr.DBR
    getSTS(gov.aps.jca.Channel ch)
    returns a STS typed DBR value of the channel.
    gov.aps.jca.dbr.DBR
    getTIME(gov.aps.jca.Channel ch)
    returns a TIME typed DBR value of the channel.
    int
     
    getValue(gov.aps.jca.Channel channel)
    returns value from a given Channel which has single value.
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int mask, gov.aps.jca.event.MonitorListener ml)
    adds a monitor listener to the specified channel using the channel's native count.
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int mask, gov.aps.jca.event.MonitorListener ml, int count)
     
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml)
    Sets a VALUE monitor to the specified channel.
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, int count)
     
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type)
    adds a VALUE monitor to the specified channel using the specified MonitorType.
    gov.aps.jca.Monitor
    setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type, int count)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static EpicsController getInstance()
      Singleton pattern to get instance of EpicsController.
      Returns:
      EpicsController instance.
    • getInstance

      public static EpicsController getInstance(boolean contextRequired)
      Singleton pattern to get instance of EpicsController.
      Parameters:
      contextRequired - is normally True, but False for testing, to avoid leaving a orphan process.
      Returns:
      EpicsController instance.
      Throws:
      IllegalStateException - If creating an instance throws Exception
    • createChannel

      public gov.aps.jca.Channel createChannel(String pvname, gov.aps.jca.event.ConnectionListener cl) throws gov.aps.jca.CAException
      Create channel asynchronously, user need to provide connection listener.
      Parameters:
      pvname - the process variable name
      cl - the connection listener
      Returns:
      the created CA channel
      Throws:
      gov.aps.jca.CAException
    • createChannel

      public gov.aps.jca.Channel createChannel(String pvname, double timeoutInS) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException
      Create CA channel synchronously,users must specify the time to wait in seconds.
      Parameters:
      pvname - the process variable name
      timeoutInS -
      Returns:
      the CA channel
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
    • createChannel

      public gov.aps.jca.Channel createChannel(String pvname) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException
      creates a CA channel using default timeout.
      Parameters:
      pvname -
      Returns:
      channel
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
    • destroy

      public void destroy(gov.aps.jca.Channel ch)
      Clear the resources used by the specified channel. It wraps the CA channel destroy method to handle CA exceptions.
      Parameters:
      ch -
    • getTotalNumberOfChannels

      public int getTotalNumberOfChannels()
      Returns:
      return the total number of channels in the default CA context.
    • cagetDouble

      public double cagetDouble(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in double from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not double.
      Parameters:
      ch - the CA Channel.
      Returns:
      double - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetFloat

      public float cagetFloat(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in float from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not float.
      Parameters:
      ch - the CA Channel.
      Returns:
      float - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetShort

      public short cagetShort(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in short from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not short.
      Parameters:
      ch - the CA Channel.
      Returns:
      short - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetEnum

      public short cagetEnum(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current enum position value in short from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      short - the channel's enumerated position value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetLabel

      public String cagetLabel(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current enum position label in String from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      short - the channel's enumerated position value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetLabels

      public String[] cagetLabels(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets labels in String for enumerated positions from the specified channel.
      Parameters:
      ch - the specified channel
      Returns:
      String[] - the labels
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetLabels

      public String[] cagetLabels(gov.aps.jca.Channel ch, double timeout) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
    • cagetInt

      public int cagetInt(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in int from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not int.
      Parameters:
      ch - the CA Channel.
      Returns:
      int - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetByte

      public byte cagetByte(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in byte from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not byte.
      Parameters:
      ch - the CA Channel.
      Returns:
      byte - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetString

      public String cagetString(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets current value in String from the specified channel, Note type conversion may be performed by EPICS server if the underlying native type is not String. Precision will affect the result.
      Parameters:
      ch - the CA Channel.
      Returns:
      String - the channel's value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caget

      public String caget(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      a handy method to return everything in String type for console display, to emulate terminal command 'caget' gets the current value of the specified channel, returns it as String without implicit type conversion.
      Parameters:
      ch - the specified channel
      Returns:
      String - the value of the channel
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caget

      public String[] caget(gov.aps.jca.Channel ch, int elementCount) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a string value array from this channel without implicit CA data type conversion, return the results as a String array.
      Parameters:
      ch -
      elementCount -
      Returns:
      String[]
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caget

      public gov.aps.jca.dbr.DBR caget(gov.aps.jca.Channel ch, EpicsController.MonitorType type) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Gets the specified CA compound type DBR from this channel.
      Parameters:
      ch -
      type -
      Returns:
      specified CA compound type DBR from this channel
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • cagetEnumArray

      public short[] cagetEnumArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Gets an array of short (enumerated positions) from enumerated field of this channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      short[] - the channel's value, enumeration returned as an array of short
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetEnumArray

      public short[] cagetEnumArray(gov.aps.jca.Channel ch, int count) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetDoubleArray

      public double[] cagetDoubleArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a double array from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      double[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetDoubleArray

      public double[] cagetDoubleArray(gov.aps.jca.Channel theChannel, int numberOfElements) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a fixed length double array from the specified channel.
      Parameters:
      theChannel - the CA Channel.
      numberOfElements - the number of elements to get.
      Returns:
      double[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetFloatArray

      public float[] cagetFloatArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a float array from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      float[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetFloatArray

      public float[] cagetFloatArray(gov.aps.jca.Channel ch, int count) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetShortArray

      public short[] cagetShortArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a short array from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      short[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetShortArray

      public short[] cagetShortArray(gov.aps.jca.Channel ch, int count) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetIntArray

      public int[] cagetIntArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a integer array from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      int[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetIntArray

      public int[] cagetIntArray(gov.aps.jca.Channel ch, int elementCount) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a integer array from the specified channel.
      Parameters:
      ch - the CA Channel.
      elementCount -
      Returns:
      int[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetByteArray

      public byte[] cagetByteArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a byte array from the specified channel.
      Parameters:
      ch - the CA Channel.
      Returns:
      byte[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetByteArrayAsString

      public String cagetByteArrayAsString(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      return a String value from a byte array of the specified channel. In EPICS a PV of type DBF_CHAR (i.e. byte array) has fixed length of 256 characters. The real useful characters always starts from array index 0, and at some index n, after n, the byte array are normally padded with byte code 0 (zero) all the way to index 255. All the padded bytes must be removed after convert to String
      Parameters:
      ch -
      Returns:
      the string converted from the byte array
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetByteArray

      public byte[] cagetByteArray(gov.aps.jca.Channel theChannel, int numberOfElements) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a fixed length byte array from the specified channel.
      Parameters:
      theChannel - the CA Channel.
      numberOfElements - the number of elements to get.
      Returns:
      byte[] - the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetStringArray

      public String[] cagetStringArray(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets a String array from the specified channel.
      Parameters:
      ch - the CA Channel. Created by
      Returns:
      the channel's values
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • cagetStringArray

      public String[] cagetStringArray(gov.aps.jca.Channel ch, int count) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getValue

      public Object getValue(gov.aps.jca.Channel channel) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      returns value from a given Channel which has single value. This method is particularly convenient for getting data from PV to create a dataset in GDA.
      Parameters:
      channel -
      Returns:
      an object represent the value of the given channel
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getDBR

      public gov.aps.jca.dbr.DBR getDBR(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously reads this Channel's value using the specified DBR type and native element count.
      Parameters:
      ch - the CA channel
      type - The DBR type
      Returns:
      DBR the channel's value in the specified DBR type.
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getDBR

      public gov.aps.jca.dbr.DBR getDBR(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int count) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously reads this Channel's value using the specified DBR type and element count. Wait time is set in EpicsGlobals or in properties file .i.e gda.epics.request.timeout.
      Parameters:
      ch - - the CA channel
      type - - DBRType
      count - - int
      Returns:
      DBR the channel's value in specified DBR type.
      Throws:
      gov.aps.jca.CAException
      IllegalStateException
      InterruptedException
      gov.aps.jca.TimeoutException
    • getSTS

      public gov.aps.jca.dbr.DBR getSTS(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      returns a STS typed DBR value of the channel. This STS type contains the channel's value, alarm status, and alarm severity. These individual properties can then be accessed using static methods in STSHandler.
      Parameters:
      ch - - the CA channel
      Returns:
      DBR - the DBR_STS value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
      See Also:
    • getGR

      public gov.aps.jca.dbr.DBR getGR(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      returns a GR typed DBR value of the channel. This GR type contains the channel's value, alarm status, alarm severity, units, display precision, and graphic limits. Units, display precision, and graphic limits properties can then be accessed using static methods in GRHandler.
      Parameters:
      ch - - the CA channel
      Returns:
      DBR - the DBR_GR value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
      See Also:
    • getCTRL

      public gov.aps.jca.dbr.DBR getCTRL(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      returns a CTRL typed DBR value of the channel. This CTRL type contains the channel's value, alarm status, alarm severity, units, display precision, graphic limits, and control limits. Control limits properties can then be accessed using static methods in CTRLHandler.
      Parameters:
      ch - - the CA channel
      Returns:
      DBR - the DBR_CTRL value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
      See Also:
    • getTIME

      public gov.aps.jca.dbr.DBR getTIME(gov.aps.jca.Channel ch) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      returns a TIME typed DBR value of the channel. This TIME type contains the channel's value, alarm status, alarm severity, and timestamp. The timestamp properties can then be accessed using static methods in TIMEHandler.
      Parameters:
      ch - - the CA channel
      Returns:
      DBR - the DBR_TIME value
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
      See Also:
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int mask, gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException
      adds a monitor listener to the specified channel using the channel's native count. The method is designed to return a monitor object.
      Parameters:
      ch - - the channel to be monitored
      type - - specify the return DBR type in the Monitor Event
      mask - - what to monitor, possible values are VALUE, ALARM, or LOG
      ml - - the Monitor Listener to be added to the channel
      Returns:
      the monitor
      Throws:
      gov.aps.jca.CAException
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int mask, gov.aps.jca.event.MonitorListener ml, int count) throws gov.aps.jca.CAException
      Throws:
      gov.aps.jca.CAException
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type) throws gov.aps.jca.CAException, InterruptedException
      adds a VALUE monitor to the specified channel using the specified MonitorType.

      Valid MonitorType includes:

    • NATIVE - the native DBR type, value only
    • STS - contains value, alarm status, and alarm severity
    • TIME - contains value, alarm status, alarm severity, and time stamp
    • GR - contains value, alarm status, alarm severity,units, display precision, and graphic limits
    • CTRL - contains value, alarm status, alarm severity,units, display precision, graphic limits, and control limits
    • Parameters:
      ch - - the channel to be monitored
      ml - - the Monitor Listener
      type - - the Return Type required
      Returns:
      the monitor
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type, int count) throws gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException, InterruptedException
      Sets a VALUE monitor to the specified channel. The monitor event returns the default/native DBR type and element count.
      Parameters:
      ch -
      ml -
      Returns:
      monitor
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • setMonitor

      public gov.aps.jca.Monitor setMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, int count) throws gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • addAlarmMonitor

      public gov.aps.jca.Monitor addAlarmMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type) throws gov.aps.jca.CAException
      adds a ALARM monitor to the specified channel using the specified MonitorType. Valid MonitorType includes:
    • NATIVE - the native DBR type, value only
    • STS - contains value, alarm status, and alarm severity
    • TIME - contains value, alarm status, alarm severity, and time stamp
    • GR - contains value, alarm status, alarm severity,units, display precision, and graphic limits
    • CTRL - contains value, alarm status, alarm severity,units, display precision, graphic limits, and control limits
    • Parameters:
      ch - - the channel to be monitored
      ml - - the Monitor Listener
      type - - the Return Type required
      Returns:
      the monitor
      Throws:
      gov.aps.jca.CAException
    • addAlarmMonitor

      public gov.aps.jca.Monitor addAlarmMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException
      Adds a ALARM monitor to the specified channel. The monitor event returns the default/native DBR type and element count.
      Parameters:
      ch -
      ml -
      Returns:
      monitor
      Throws:
      gov.aps.jca.CAException
    • clearMonitor

      public void clearMonitor(gov.aps.jca.Monitor mntr)
      This method removes the monitor of a channel.
      Parameters:
      mntr -
    • caput

      public void caput(gov.aps.jca.Channel ch, double value) throws gov.aps.jca.CAException, InterruptedException
      writes a value to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - double the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float value) throws gov.aps.jca.CAException, InterruptedException
      writes a value to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - float the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short value) throws gov.aps.jca.CAException, InterruptedException
      writes a value to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - short the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int value) throws gov.aps.jca.CAException, InterruptedException
      writes a value to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - int the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String value) throws gov.aps.jca.CAException, InterruptedException
      writes a value to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - string - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, double[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a value array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a value array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a value array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a value array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a value array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, byte[] value) throws gov.aps.jca.CAException, InterruptedException
      writes a byte array to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caputAsWaveform

      public void caputAsWaveform(gov.aps.jca.Channel ch, String value) throws gov.aps.jca.CAException, InterruptedException
      converts a string to an int array, then writes to this channel without waiting for completion.
      Parameters:
      ch - the EPICS channel
      value - array - the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, double value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch - - the EPICS channel
      value - - double the value to be set to this channel
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, float value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch - - the EPICS channel
      value - - float the value to be set to this channel
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, short value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch - - the EPICS channel
      value - - short the value to be set to this channel
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, int value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously writes a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch - - the EPICS channel
      value - - int the value to be set to this channel
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, int value, double timeout) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, String value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, double[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, byte[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, int[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, float[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, short[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel ch, String[] value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caputWaitAsWaveform

      public void caputWaitAsWaveform(gov.aps.jca.Channel ch, String value) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Synchronously takes a string, converts it into an int[], then puts this array to the channel and wait for return before timeout. This timeout in GDA is set by gda.epics.request.timeout property in java.properties file, or the default value set in EpicsGlobals (30 seconds).
      Parameters:
      ch -
      value -
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, double value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a double value to the channel with the user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a float value to the channel with the user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a short value to the channel with the user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a int value to the channel with the user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a String value to the channel with the user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, double[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a double array to the channel with user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a int array to the channel with user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a short array to the channel with user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a float array to the channel with user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Writes a String array to the channel with user specified timeout in seconds.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      timeout - - timeout in seconds, if 0 waits until completed (can be forever).
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, double value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a double value to this channel with user provided put listener for callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a float value to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a short value to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a int value to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a String value to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, double[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a double array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, int[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a int array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, float[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a float array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, short[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a short array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, String[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a String array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, byte[] value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(gov.aps.jca.Channel ch, byte[] value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a String array to this channel with user provided put listener which handles the put-callback.
      Parameters:
      ch - - the CA channel
      value - - the value to be set to this channel
      pl - - the listener of this put action - callback
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caputAsWaveform

      public void caputAsWaveform(gov.aps.jca.Channel ch, String value, gov.aps.jca.event.PutListener pl) throws gov.aps.jca.CAException, InterruptedException
      Asynchronously writes a string to this channel after converting to an int array. With user provided put listener which handles the put-callback.
      Parameters:
      ch -
      value -
      pl -
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • contextVirtualCircuitException

      public void contextVirtualCircuitException(gov.aps.jca.event.ContextVirtualCircuitExceptionEvent e)
      Specified by:
      contextVirtualCircuitException in interface gov.aps.jca.event.ContextExceptionListener
    • contextException

      public void contextException(gov.aps.jca.event.ContextExceptionEvent cee)
      Specified by:
      contextException in interface gov.aps.jca.event.ContextExceptionListener
    • contextMessage

      public void contextMessage(gov.aps.jca.event.ContextMessageEvent cme)
      A handler for non-exception asynchronous message from the Context. It prints to the log.
      Specified by:
      contextMessage in interface gov.aps.jca.event.ContextMessageListener
      Parameters:
      cme - - context message event
    • getMonitorCount

      public int getMonitorCount()
      returns monitor count from EPICS controller
      Returns:
      monitor count
    • addMonitor

      public gov.aps.jca.Monitor addMonitor(gov.aps.jca.Channel dataChannel) throws gov.aps.jca.CAException
      return a PV value monitor to the specified channel.
      Parameters:
      dataChannel -
      Returns:
      the monitor
      Throws:
      IllegalStateException - If the channel is not in a state to perform this operation (i.e. destroyed, etc...)
      gov.aps.jca.CAException
    • caputWait

      public void caputWait(gov.aps.jca.Channel channel, String value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caputWait

      public void caputWait(gov.aps.jca.Channel channel, Double value, double timeout) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException