Package gda.epics
Class CAClient
java.lang.Object
gda.factory.ConfigurableBase
gda.epics.EpicsBase
gda.epics.CAClient
- All Implemented Interfaces:
Epics,Configurable,Findable,gov.aps.jca.event.ConnectionListener,gov.aps.jca.event.MonitorListener,EventListener
public class CAClient
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.
-
Field Summary
Fields inherited from class gda.epics.EpicsBase
connectionCountRegister, epicsRecordName, epicsRecordNames, name, pvName, pvNames -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdding this object as the default monitor Listener to the specified PV.voidaddMonitorListener(String pv, gov.aps.jca.event.MonitorListener ml) adding a specified CA monitor listener to the PV specified, users need to specify a proper monitor handler that implement MonitorChanged(MonitorEvent ev) method.caget()Gets the value from EPICS Server.gov.aps.jca.dbr.DBRcaget(EpicsController.MonitorType rtype) Gets the value of the specified PV.String[]Gets values of a list of PVs from EPICS servers.String[]Gets the values from EPICS servers.String[]String[]cagetArray(String pv) byte[]byte[]cagetArrayByte(int numberOfElements) double[]double[]cagetArrayDouble(int numberOfElements) float[]cagetArrayFloat(int numberOfElements) int[]int[]cagetArrayInt(int numberOfElements) int[]int[]cagetArrayUnsigned(int numberOfElements) String[]Returns available positions from an Enum typed PV as String arraydoublecagetMax()intString[]String[]gov.aps.jca.Monitorstart the default CA monitor to this Channel, the default behaviour is the monitor prints PV name and value to Jython Terminal.gov.aps.jca.Monitorcamonitor(gov.aps.jca.event.MonitorListener ml) adding a specified CA monitor to this Channel, users need to specify a proper monitor handler that implement MonitorChanged(MonitorEvent ev) method.gov.aps.jca.Monitorcamonitor(gov.aps.jca.event.MonitorListener ml, int count) gov.aps.jca.MonitorDeprecated.gov.aps.jca.MonitorDeprecated.This is not a realisable way to add aMonitorListenerto a channel as it does not wait for channel connection callback before added monitor listener.voidcaput(byte value) Sets the value to the PV on EPICS server.voidcaput(byte[] values) Sets the values to the corresponding PVs in EPICS server.voidcaput(byte[] values, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(byte value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(double value) Sets the value to the PV on EPICS server.voidcaput(double[] values) Sets the values to the corresponding PVs in EPICS server.voidcaput(double[] values, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(double timeoutinsecond, byte value) Sets the value to the PV on EPICS server and wait for callback.voidcaput(double timeoutinsecond, byte[] values) Sets the values to the corresponding PVs in EPICS server and wait for callback.voidcaput(double timeoutinsecond, double value) Sets the value to the PV on EPICS server and wait for callback.voidcaput(double timeoutinsecond, double[] values) Sets the values to the corresponding PVs in EPICS server and wait for callback.voidcaput(double timeoutinsecond, float value) Sets the value to the PV on EPICS server and wait for callback.voidcaput(double timeoutinsecond, float[] values) Sets the values to the corresponding PVs in EPICS server and wait for callback.voidcaput(double timeoutinsecond, int value) Sets the value to the PV on EPICS server and wait for callback.voidcaput(double timeoutinsecond, int[] values) Sets the values to the corresponding PVs in EPICS server and wait for callback.voidcaput(double timeoutinsecond, short value) Sets the value to the PV on EPICS server and wait for callback.voidcaput(double timeoutinsecond, short[] values) Sets the values to the corresponding PVs in EPICS server and wait for callback.voidcaput(double value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidSets the value to the PV in EPICS server and wait for callback.voidSets the values to the corresponding PVs in EPICS server.voidcaput(float value) Sets the value to the PV on EPICS server.voidcaput(float[] values) Sets the values to the corresponding PVs in EPICS server.voidcaput(float[] values, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(float value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(int value) Sets the value to the PV on EPICS server.voidcaput(int[] values) Sets the values to the corresponding PVs in EPICS server.voidcaput(int[] values, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(int value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(short value) Sets the value to the PV on EPICS server.voidcaput(short[] values) Sets the values to the corresponding PVs in EPICS server.voidcaput(short[] values, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaput(short value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidSets the value to the PV in EPICS server.voidSets the values to the corresponding PVs in EPICS server.voidSets a list of values to the specified list of PVs, respectively.voidSets a list of values to the specified list of PVs, respectively.voidSets a list of values to the specified list of PVs, respectively and wait for callback.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidAsynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidSets a list of values to the specified list of PVs, respectively.voidSets a list of values to the specified list of PVs, respectively and wait for callback.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidSets the value of the PV.voidSets the value of the PV.voidSets the value of the specified PV.voidSets the value of the PV.voidSets the value of the PV.voidvoidvoidSets the value of the specified PV.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidSets the value of the specified PV.voidSets the value of the PV.voidSets the value of the PV.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidSets the value of the specified PV.voidSets the value of the PV.voidSets the value of the PV.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidSets the value of the specified PV.voidSets the value of the PV.voidSets the value of the PV.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidAsynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidSets the value of the PV.voidSets the value of the PV and wait for callback.voidAsynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.voidcaputStringAsWaveform(String value) caput a string value as waveform to the corresponding PVs in EPICS server.voidcaputStringAsWaveform(String value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets a string as waveform to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaputStringAsWaveform(String pv, String value) caput a string value as waveform to the corresponding PVs in EPICS server.voidcaputStringAsWaveform(String pv, String value, gov.aps.jca.event.PutListener lstnr) Asynchronously sets a string as waveform to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.voidcaputWait(byte[] values) Sets the values to the corresponding PVs in EPICS server, and wait for return or timeout.voidcaputWait(double value) voidcaputWait(int value) voidclearup()Clear the CA channels and reclaim the resources.voidconfigure the channel access for EPICS PV or PVs.voidconnectionChanged(gov.aps.jca.event.ConnectionEvent arg0) static Stringgov.aps.jca.ChannelGets the channel of this clientgov.aps.jca.Channel[]Gets the channels of this clientGets the EpicsController of this clientstatic gov.aps.jca.dbr.DBRintintvoidmonitorChanged(gov.aps.jca.event.MonitorEvent arg0) This is the default Monitor handler that simply print the PV name and value on the JythonTerminal.static voidstatic voidstatic voidstatic voidputStringAsWaveform(String pv, String value) voidremoveMonitor(gov.aps.jca.Monitor m) Remove a monitor from this channelstatic Stringvalue2String(gov.aps.jca.dbr.DBR dbr) Converts a DBR object from a MonitorEvent to a stringMethods inherited from class gda.epics.EpicsBase
getEpicsRecordName, getEpicsRecordNames, getName, getPvName, getPvNames, setEpicsRecordName, setEpicsRecordNames, setName, setPvName, setPvNamesMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigure
-
Constructor Details
-
CAClient
public CAClient()Constructor -
CAClient
Constructor that initialises a PV name.- Parameters:
pv-
-
CAClient
Constructor that initialises a list of PV names.- Parameters:
pvs-
-
-
Method Details
-
value2String
Converts a DBR object from a MonitorEvent to a string- Parameters:
dbr-- Returns:
- string
-
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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
getElementCount
- Parameters:
pv- the EPICS PV name- Returns:
- Element Count
- Throws:
gov.aps.jca.CAException
-
cagetWithTimeStamp
public String[] cagetWithTimeStamp(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
pv-- Returns:
- String[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
get
public static String get(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
getDBR
public static gov.aps.jca.dbr.DBR getDBR(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
put
public static void put(String pv, String value) throws gov.aps.jca.CAException, InterruptedException, FactoryException - Throws:
gov.aps.jca.CAExceptionInterruptedExceptionFactoryException
-
putStringAsWaveform
public static void putStringAsWaveform(String pv, String value) throws gov.aps.jca.CAException, InterruptedException, FactoryException - Throws:
gov.aps.jca.CAExceptionInterruptedExceptionFactoryException
-
put
public static void put(String pv, Double value) throws gov.aps.jca.CAException, InterruptedException, FactoryException - Throws:
gov.aps.jca.CAExceptionInterruptedExceptionFactoryException
-
put
public static void put(String pv, Integer value) throws gov.aps.jca.CAException, InterruptedException, FactoryException - Throws:
gov.aps.jca.CAExceptionInterruptedExceptionFactoryException
-
caget
public String[] caget(String... pvs) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Gets values of a list of PVs from EPICS servers.- Parameters:
pvs- the list of PVs- Returns:
- the values of these PVs
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArray
public String[] cagetArray(String pv) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
pv-- Returns:
- String[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
camonitor
@Deprecated(since="GDA 9.6") public gov.aps.jca.Monitor camonitor(String pv, gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException, InterruptedException Deprecated.This is not a realisable way to add aMonitorListenerto a channel as it does not wait for channel connection callback before added monitor listener. UseaddMonitorListener(String, MonitorListener)instead. NoteMonitoris not the same asMonitorListener.Monitoris just a client side object storing monitored info and give access to instances ofMonitorListenerattached to a channel.adding a specified CA monitor listener to the PV specified, users need to specify a proper monitor handler that implement MonitorChanged(MonitorEvent ev) method. This only works when a channel is already created in GDA, i.e. in channel cache.- Parameters:
ml-- Returns:
- Monitor
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
camonitor
@Deprecated(since="GDA 9.6") public gov.aps.jca.Monitor camonitor(String pv) throws gov.aps.jca.CAException, InterruptedException Deprecated.This is not a realisable way to add aMonitorListenerto a channel as it does not wait for channel connection callback before added monitor listener. UseaddMonitorListener(String)instead.start the default CA monitor Listener to this PV, the default behaviour is the monitor prints PV name and value to Jython Terminal. This only works when a channel is already created in GDA, i.e. in channel cache.- Returns:
- Monitor
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
addMonitorListener
public void addMonitorListener(String pv, gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException adding a specified CA monitor listener to the PV specified, users need to specify a proper monitor handler that implement MonitorChanged(MonitorEvent ev) method. MonitorListener is added on channel connection callback.- Parameters:
ml-- Throws:
gov.aps.jca.CAException
-
addMonitorListener
Adding this object as the default monitor Listener to the specified PV. The default behaviour is the monitor prints PV name and value to Jython Terminal. This MonitorListener is added on channel connection callback.- Throws:
gov.aps.jca.CAException
-
caput
Sets the value of the specified PV.- Parameters:
pv- the PV namevalue- the value of this PV- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the specified PV.- Parameters:
pv- the PV namevalue- the value of this PV- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the specified PV.- Parameters:
pv- the PV namevalue- the value of this PV- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the specified PV.- Parameters:
pv- the PV namevalue- the value of this PV- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, byte[] value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, int[] value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, short[] value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, float[] value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, double[] value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value of the PV.- Parameters:
pv- the PV namevalue- the value- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String[] pvs, double[] values) throws gov.aps.jca.CAException, InterruptedException Sets a list of values to the specified list of PVs, respectively.- Parameters:
pvs- this list of PVsvalues- the list of values- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets a list of values to the specified list of PVs, respectively.- Parameters:
pvs- this list of PVsvalues- the list of values- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String[] pvs, String[] values) throws gov.aps.jca.CAException, InterruptedException Sets a list of values to the specified list of PVs, respectively.- Parameters:
pvs- this list of PVsvalues- the list of values- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, double value, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value of the specified PV.- Parameters:
pv- the PV namevalue- the value of this PVtimeoutinsecond-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String pv, int value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pv- the PV namevalue- the value of this PVlstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, float value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pv- the PV namevalue- the value of this PVlstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, short value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pv- the PV namevalue- the value of this PVlstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, double value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pv- the PV namevalue- the value of this PVlstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String pv, String value, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value of the PV and wait for callback.- Parameters:
pv- the PV namevalue- the valuetimeoutinsecond-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String pv, double value, boolean wait) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String pv, String value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pv- the PV namevalue- the value of this PVlstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String[] pvs, double[] values, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets a list of values to the specified list of PVs, respectively and wait for callback.- Parameters:
pvs- this list of PVsvalues- the list of valuestimeoutinsecond-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String[] pvs, double[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pvs- the PV name arrayvalues- the value array of these corresponding PVslstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(String[] pvs, String[] values, double timeoutinsecond) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets a list of values to the specified list of PVs, respectively and wait for callback.- Parameters:
pvs- this list of PVsvalues- the list of valuestimeoutinsecond-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String[] pvs, String[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value of the specified PV with put call back listener, this listener must implemenets putCompleted(PutEvent pe) method to handle the call-back.- Parameters:
pvs- the PV name arrayvalues- the value array of these corresponding PVslstnr- the put listener- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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.CAExceptionInterruptedException
-
caputStringAsWaveform
public void caputStringAsWaveform(String pv, String value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets a string as waveform to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value- the input string valuelstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
configure
configure the channel access for EPICS PV or PVs. This method must be called before caget() or caput().- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException
-
camonitor
public gov.aps.jca.Monitor camonitor(gov.aps.jca.event.MonitorListener ml) throws gov.aps.jca.CAException, InterruptedException adding a specified CA monitor to this Channel, users need to specify a proper monitor handler that implement MonitorChanged(MonitorEvent ev) method.- Parameters:
ml-- Returns:
- Monitor
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
camonitor
public gov.aps.jca.Monitor camonitor(gov.aps.jca.event.MonitorListener ml, int count) throws gov.aps.jca.CAException, InterruptedException - Throws:
gov.aps.jca.CAExceptionInterruptedException
-
camonitor
start the default CA monitor to this Channel, the default behaviour is the monitor prints PV name and value to Jython Terminal.- Returns:
- Monitor
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
removeMonitor
public void removeMonitor(gov.aps.jca.Monitor m) Remove a monitor from this channel- Parameters:
m-
-
caget
public String caget() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedExceptionGets the value from EPICS Server.- Returns:
- the value
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caget
public gov.aps.jca.dbr.DBR caget(EpicsController.MonitorType rtype) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
rtype-- Returns:
- DBR
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetWithTimeStamp
public String[] cagetWithTimeStamp() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- String[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArray
public String[] cagetArray() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- String[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayDouble
public double[] cagetArrayDouble() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- double[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayUnsigned
public int[] cagetArrayUnsigned(int numberOfElements) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
numberOfElements-- Returns:
- int[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayUnsigned
public int[] cagetArrayUnsigned() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- int[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayByte
public byte[] cagetArrayByte(int numberOfElements) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
numberOfElements-- Returns:
- byte[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayByte
public byte[] cagetArrayByte() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- byte[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayInt
public int[] cagetArrayInt(int numberOfElements) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
numberOfElements-- Returns:
- int[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayInt
public int[] cagetArrayInt() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- int[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayDouble
public double[] cagetArrayDouble(int numberOfElements) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
numberOfElements-- Returns:
- double[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetArrayFloat
public float[] cagetArrayFloat(int numberOfElements) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Parameters:
numberOfElements-- Returns:
- double[]
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetMax
public double cagetMax() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- double
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetPeakPosition
public int cagetPeakPosition() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- int
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetAllChannels
public String[] cagetAllChannels() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedExceptionGets the values from EPICS servers.- Returns:
- the value array
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
cagetLabels
public String[] cagetLabels() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionReturns available positions from an Enum typed PV as String array- Returns:
- all available positions
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value to the PV on EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value to the PV on EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caputWait
public void caputWait(int value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
Sets the value to the PV on EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value to the PV on EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caputWait
public void caputWait(double value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException - Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
Sets the value to the PV on EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the value to the PV in EPICS server.- Parameters:
value-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caputWait
public void caputWait(byte[] values) throws gov.aps.jca.CAException, InterruptedException, gov.aps.jca.TimeoutException Sets the values to the corresponding PVs in EPICS server, and wait for return or timeout.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedExceptiongov.aps.jca.TimeoutException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
Sets the values to the corresponding PVs in EPICS server.- Parameters:
values-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, double value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV on EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(double value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, int value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV on EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(int value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, short value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV on EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(short value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, byte value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV on EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(byte value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, float value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV on EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(float value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, String value) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the value to the PV in EPICS server and wait for callback.- Parameters:
timeoutinsecond-value-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value-lstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, double[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server and wait for callback.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(double[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, int[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server and wait for callback.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(int[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, short[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server and wait for callback.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(short[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, float[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server and wait for callback.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(float[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, byte[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server and wait for callback.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(byte[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caput
public void caput(double timeoutinsecond, String[] values) throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException Sets the values to the corresponding PVs in EPICS server.- Parameters:
timeoutinsecond-values-- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
caput
public void caput(String[] values, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets the value to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
values- arraylstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
caputStringAsWaveform
public void caputStringAsWaveform(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.CAExceptionInterruptedException
-
caputStringAsWaveform
public void caputStringAsWaveform(String value, gov.aps.jca.event.PutListener lstnr) throws gov.aps.jca.CAException, InterruptedException Asynchronously sets a string as waveform to the PV on EPICS server with a put callback listener, which must implements the putCompleted(PutEvent pe) method to handle the callback.- Parameters:
value- the input string valuelstnr-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
clearup
public void clearup()Clear the CA channels and reclaim the resources. -
getElementCount
public int getElementCount()- Returns:
- Element Count
-
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:
monitorChangedin interfacegov.aps.jca.event.MonitorListener- See Also:
-
connectionChanged
public void connectionChanged(gov.aps.jca.event.ConnectionEvent arg0) - Specified by:
connectionChangedin interfacegov.aps.jca.event.ConnectionListener
-
MonitorListenerto a channel as it does not wait for channel connection callback before added monitor listener.