Package gda.epics

Class ChannalAccessCommands

All Implemented Interfaces:
Epics, Configurable, Findable, gov.aps.jca.event.ConnectionListener, gov.aps.jca.event.MonitorListener, EventListener

public class ChannalAccessCommands extends EpicsBase implements gov.aps.jca.event.MonitorListener, gov.aps.jca.event.ConnectionListener
The scripting interface between Jython and EPICS. CAClient provides client-side implementation of caget(), caput(), and camonitor() for accessing EPICS PVs directly from Jython scripts or Jython Terminal.
  • Constructor Details

    • ChannalAccessCommands

      public ChannalAccessCommands()
  • Method Details

    • getController

      public EpicsController getController()
      Gets the EpicsController of this client
      Returns:
      the Epics controller
    • getChannel

      public gov.aps.jca.Channel getChannel()
      Gets the channel of this client
      Returns:
      the Epics channel
    • getChannels

      public gov.aps.jca.Channel[] getChannels()
      Gets the channels of this client
      Returns:
      the Epics channels
    • caget

      public String caget(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Gets the value of the specified PV.
      Parameters:
      pv - the EPICS PV name
      Returns:
      the value of the PV in String format
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • cagetArray

      public String[] cagetArray(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Parameters:
      pv -
      Returns:
      String[]
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • camonitor

      public gov.aps.jca.Monitor camonitor(String pv) throws gov.aps.jca.CAException, InterruptedException
      start the default CA monitor Listener to this PV, the default behaviour is the monitor prints PV name and value to Jython Terminal.
      Returns:
      Monitor
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • caput

      public void caput(String pv, int value, boolean wait) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, int value, boolean wait, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, double value, boolean wait) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, double value, boolean wait, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, String value, boolean wait) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, String value, boolean wait, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
      InterruptedException
    • caput

      public void caput(String pv, String value, boolean wait, boolean charString) throws gov.aps.jca.CAException, InterruptedException, gov.aps.jca.TimeoutException
      Throws:
      gov.aps.jca.CAException
      InterruptedException
      gov.aps.jca.TimeoutException
    • caput

      public void caput(String pv, int[] value, boolean wait) throws gov.aps.jca.CAException, InterruptedException, gov.aps.jca.TimeoutException
      Throws:
      gov.aps.jca.CAException
      InterruptedException
      gov.aps.jca.TimeoutException
    • caputStringAsWaveform

      public void caputStringAsWaveform(String pv, String value) throws gov.aps.jca.CAException, InterruptedException
      caput a string value as waveform to the corresponding PVs in EPICS server.
      Parameters:
      value -
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • monitorChanged

      public void monitorChanged(gov.aps.jca.event.MonitorEvent arg0)
      This is the default Monitor handler that simply print the PV name and value on the JythonTerminal.
      Specified by:
      monitorChanged in interface gov.aps.jca.event.MonitorListener
      See Also:
      • MonitorListener.monitorChanged(gov.aps.jca.event.MonitorEvent)
    • connectionChanged

      public void connectionChanged(gov.aps.jca.event.ConnectionEvent arg0)
      Specified by:
      connectionChanged in interface gov.aps.jca.event.ConnectionListener