Package gda.epics.connection
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 ClassesModifier and TypeClassDescriptionstatic enumAn enumerated type for DBR from EPICS. -
Method Summary
Modifier and TypeMethodDescriptiongov.aps.jca.MonitoraddAlarmMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml) Adds a ALARM monitor to the specified channel.gov.aps.jca.MonitoraddAlarmMonitor(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.MonitoraddMonitor(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.String[]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.DBRcaget(gov.aps.jca.Channel ch, EpicsController.MonitorType type) Gets the specified CA compound type DBR from this channel.bytecagetByte(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.doublecagetDouble(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.shortcagetEnum(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) floatcagetFloat(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) intcagetInt(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.String[]cagetLabels(gov.aps.jca.Channel ch) gets labels in String for enumerated positions from the specified channel.String[]cagetLabels(gov.aps.jca.Channel ch, double timeout) shortcagetShort(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.String[]cagetStringArray(gov.aps.jca.Channel ch) gets a String array from the specified channel.String[]cagetStringArray(gov.aps.jca.Channel ch, int count) voidcaput(gov.aps.jca.Channel ch, byte[] value) writes a byte array to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, byte[] value, double timeout) voidcaput(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.voidcaput(gov.aps.jca.Channel ch, double value) writes a value to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, double[] value) writes a value array to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, double[] value, double timeout) Writes a double array to the channel with user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, double value, double timeout) Writes a double value to the channel with the user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, float value) writes a value to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, float[] value) writes a value array to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, float[] value, double timeout) Writes a float array to the channel with user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, float value, double timeout) Writes a float value to the channel with the user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, int value) writes a value to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, int[] value) writes a value array to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, int[] value, double timeout) Writes a int array to the channel with user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, int value, double timeout) Writes a int value to the channel with the user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, short value) writes a value to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, short[] value) writes a value array to this channel without waiting for completion.voidcaput(gov.aps.jca.Channel ch, short[] value, double timeout) Writes a short array to the channel with user specified timeout in seconds.voidcaput(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.voidcaput(gov.aps.jca.Channel ch, short value, double timeout) Writes a short value to the channel with the user specified timeout in seconds.voidcaput(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.voidwrites a value to this channel without waiting for completion.voidwrites a value array to this channel without waiting for completion.voidWrites a String array to the channel with user specified timeout in seconds.voidAsynchronously writes a String array to this channel with user provided put listener which handles the put-callback.voidWrites a String value to the channel with the user specified timeout in seconds.voidAsynchronously writes a String value to this channel with user provided put listener which handles the put-callback.voidcaputAsWaveform(gov.aps.jca.Channel ch, String value) converts a string to an int array, then writes to this channel without waiting for completion.voidcaputAsWaveform(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.voidcaputWait(gov.aps.jca.Channel ch, byte[] value) voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(gov.aps.jca.Channel ch, int value, double timeout) voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidcaputWait(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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidvoidSynchronously puts a value to this channel and wait for return before timeout This timeout in GDA is set bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidSynchronously puts a value array to this channel and wait for return before timeout This timeout in GDA is set bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).voidvoidcaputWaitAsWaveform(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.voidclearMonitor(gov.aps.jca.Monitor mntr) This method removes the monitor of a channel.voidcontextException(gov.aps.jca.event.ContextExceptionEvent cee) voidcontextMessage(gov.aps.jca.event.ContextMessageEvent cme) A handler for non-exception asynchronous message from the Context.voidcontextVirtualCircuitException(gov.aps.jca.event.ContextVirtualCircuitExceptionEvent e) gov.aps.jca.ChannelcreateChannel(String pvname) creates a CA channel using default timeout.gov.aps.jca.ChannelcreateChannel(String pvname, double timeoutInS) Create CA channel synchronously,users must specify the time to wait in seconds.gov.aps.jca.ChannelcreateChannel(String pvname, gov.aps.jca.event.ConnectionListener cl) Create channel asynchronously, user need to provide connection listener.voiddestroy(gov.aps.jca.Channel ch) Clear the resources used by the specified channel.gov.aps.jca.dbr.DBRgetCTRL(gov.aps.jca.Channel ch) returns a CTRL typed DBR value of the channel.gov.aps.jca.dbr.DBRgetDBR(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.DBRgetDBR(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.DBRgetGR(gov.aps.jca.Channel ch) returns a GR typed DBR value of the channel.static EpicsControllerSingleton pattern to get instance of EpicsController.static EpicsControllergetInstance(boolean contextRequired) Singleton pattern to get instance of EpicsController.intreturns monitor count from EPICS controllergov.aps.jca.dbr.DBRgetSTS(gov.aps.jca.Channel ch) returns a STS typed DBR value of the channel.gov.aps.jca.dbr.DBRgetTIME(gov.aps.jca.Channel ch) returns a TIME typed DBR value of the channel.intgetValue(gov.aps.jca.Channel channel) returns value from a givenChannelwhich has single value.gov.aps.jca.MonitorsetMonitor(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.MonitorsetMonitor(gov.aps.jca.Channel ch, gov.aps.jca.dbr.DBRType type, int mask, gov.aps.jca.event.MonitorListener ml, int count) gov.aps.jca.MonitorsetMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml) Sets a VALUE monitor to the specified channel.gov.aps.jca.MonitorsetMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, int count) gov.aps.jca.MonitorsetMonitor(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.MonitorsetMonitor(gov.aps.jca.Channel ch, gov.aps.jca.event.MonitorListener ml, EpicsController.MonitorType type, int count)
-
Method Details
-
getInstance
Singleton pattern to get instance of EpicsController.- Returns:
EpicsControllerinstance.
-
getInstance
Singleton pattern to get instance of EpicsController.- Parameters:
contextRequired- is normally True, but False for testing, to avoid leaving a orphan process.- Returns:
EpicsControllerinstance.- Throws:
IllegalStateException- If creating an instance throwsException
-
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 namecl- 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 nametimeoutInS-- Returns:
- the CA channel
- Throws:
gov.aps.jca.CAExceptiongov.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.CAExceptiongov.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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
cagetLabels
public String[] cagetLabels(gov.aps.jca.Channel ch, double timeout) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException - Throws:
gov.aps.jca.TimeoutExceptiongov.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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getValue
public Object getValue(gov.aps.jca.Channel channel) throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException returns value from a givenChannelwhich 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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 channeltype- The DBR type- Returns:
- DBR the channel's value in the specified DBR type.
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 inEpicsGlobalsor in properties file .i.egda.epics.request.timeout.- Parameters:
ch- - the CA channeltype- - DBRTypecount- - int- Returns:
- DBR the channel's value in specified DBR type.
- Throws:
gov.aps.jca.CAExceptionIllegalStateExceptionInterruptedExceptiongov.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 inSTSHandler.- Parameters:
ch- - the CA channel- Returns:
- DBR - the DBR_STS value
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException- 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 inGRHandler.- Parameters:
ch- - the CA channel- Returns:
- DBR - the DBR_GR value
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException- 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 inCTRLHandler.- Parameters:
ch- - the CA channel- Returns:
- DBR - the DBR_CTRL value
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException- 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 inTIMEHandler.- Parameters:
ch- - the CA channel- Returns:
- DBR - the DBR_TIME value
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException- 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 monitoredtype- - specify the return DBR type in the Monitor Eventmask- - what to monitor, possible values are VALUE, ALARM, or LOGml- - 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 monitoredml- - the Monitor Listenertype- - the Return Type required- Returns:
- the monitor
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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.CAExceptionInterruptedException
-
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.CAExceptionInterruptedException
-
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.CAExceptionInterruptedException
-
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 monitoredml- - the Monitor Listenertype- - 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 channelvalue- double the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- float the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- short the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- int the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- string - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- array - the value to be set to this channel- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch- - the EPICS channelvalue- - double the value to be set to this channel- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch- - the EPICS channelvalue- - float the value to be set to this channel- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch- - the EPICS channelvalue- - short the value to be set to this channel- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch- - the EPICS channelvalue- - int the value to be set to this channel- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 bygda.epics.request.timeoutproperty in java.properties file, or the default value set inEpicsGlobals(30 seconds).- Parameters:
ch-value-- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channeltimeout- - timeout in seconds, if0waits until completed (can be forever).- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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 channelvalue- - the value to be set to this channelpl- - the listener of this put action - callback- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
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.CAExceptionInterruptedException
-
contextVirtualCircuitException
public void contextVirtualCircuitException(gov.aps.jca.event.ContextVirtualCircuitExceptionEvent e) - Specified by:
contextVirtualCircuitExceptionin interfacegov.aps.jca.event.ContextExceptionListener
-
contextException
public void contextException(gov.aps.jca.event.ContextExceptionEvent cee) - Specified by:
contextExceptionin interfacegov.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:
contextMessagein interfacegov.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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
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.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-