Package xal.plugin.epics7
Class Epics7Channel
java.lang.Object
xal.ca.Channel
xal.plugin.epics7.Epics7Channel
- All Implemented Interfaces:
org.epics.pvaccess.client.ChannelRequester,org.epics.pvdata.pv.Requester
- Direct Known Subclasses:
Epics7ServerChannel
This
Channel implementation can connect to ChannelAccess or PV Access. If the PV signal starts with
'ca://', it will only connect to CA; if it starts with 'pva://', it will only connect to PVA; otherwise it tries to
connect to both and uses the protocol that replies first.- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final doublestatic final doublestatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class xal.ca.Channel
channelSystem, connectionFlag, connectionProxy, dblTmEvt, dblTmIO, messageCenter, strId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMonitorValStatus(IEventSinkValStatus listener, int intMaskFire) Setup a value-status monitor on this channeladdMonitorValTime(IEventSinkValTime listener, int intMaskFire) Setup a value-status-timestamp monitor on this channeladdMonitorValue(IEventSinkValue listener, int intMaskFire) Setup a value monitor on this channelvoidchannelCreated(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.Channel chnl) voidchannelStateChange(org.epics.pvaccess.client.Channel chnl, org.epics.pvaccess.client.Channel.ConnectionState cs) booleanconnectAndWait(double timeout) Request a new connection and wait for it no longer than the timeout.voidTerminate the network channel connection and clear all events associated with process variableintReturn size of value array associated with process variableClass<?>get the Java class associated with the native type of this channelorg.epics.pvdata.pv.PVStructureorg.epics.pvdata.pv.PVStructureString[]Get the lower and upper alarm limit PVsvoidgetCallback(String request, EventListener listener) voidgetCallback(String request, EventListener listener, boolean attemptConnection) protected org.epics.pvdata.pv.PVStructureprotected org.epics.pvdata.pv.PVStructureString[]Get the lower and upper drive limit PVsprotected org.epics.pvaccess.client.ChannelString[]Get the lower and upper operation limit PVsReturn a rawChannelStatusRecordrepresenting the fetched record for the native type of this channel.protected ChannelStatusRecordGet aChannelStatusRecordrepresenting the fetched record for the specified type.protected ChannelTimeRecordGet aChannelTimeRecordrepresenting the fetched record for the specified type.protected ChannelRecordGet aChannelRecordrepresenting the fetched record for the specified type.Return a rawChannelTimeRecordrepresenting the fetched record for the native type of this channel.protected voidgetRawValueCallback(IEventSinkValue listener) Handle a callback for getting the raw value for the channel.protected voidgetRawValueCallback(IEventSinkValue listener, boolean attemptConnection) Handle a callback for getting the raw value for the channel.Return a rawChannelRecordrepresenting the fetched record for the native type of this channel.voidgetRawValueTimeCallback(IEventSinkValTime listener, boolean attemptConnection) Submit a non-blocking Get request with callbackgetUnits()Convenience method which returns the units for this channel.protected org.epics.pvdata.pv.PVStructureString[]Get the lower and upper warning limit PVsvoidvoidputRawValCallback(byte[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(byte newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(double[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(double newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(float[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(float newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(int[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(int newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(long[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(long newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(short[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(short newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(String[] newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(String newVal, PutListener listener) Asynchronously put a raw value to the channel process variable.voidputRawValCallback(PutListener listener, EventListener putListener) Convenience method which returns the lower alarm limit.Convenience method which returns the lower control limit.Convenience method which returns the lower display limit.Convenience method which returns the lower warning limit.Convenience method which returns the upper alarm limit.Convenience method which returns the upper control limit.Convenience method which returns the upper display limit.Convenience method which returns the upper warning limit.booleanDetermine if channel has read access to process variablevoidRequest that the channel be connected.booleanDetermine if channel has write access to process variableMethods inherited from class xal.ca.Channel
addConnectionListener, channelName, checkConnection, checkConnection, checkConnection, connectAndWait, flushIO, getArrayValue, getArrByte, getArrByteCallback, getArrDbl, getArrDblCallback, getArrFlt, getArrFltCallback, getArrInt, getArrIntCallback, getArrLong, getArrShort, getArrString, getEventTimeout, getId, getInstance, getInstance, getIoTimeout, getStatusRecord, getStringStatusRecord, getStringTimeRecord, getStringValueRecord, getTimeRecord, getValByte, getValByteCallback, getValDbl, getValDblCallback, getValEnum, getValFlt, getValFltCallback, getValInt, getValIntCallback, getValLong, getValShort, getValString, getValueCallback, getValueCallback, getValueRecord, getValueTimeCallback, getValueTransform, isConnected, isValid, lowerAlarmLimit, lowerControlLimit, lowerDisplayLimit, lowerWarningLimit, pendEvent, pendIO, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putVal, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, putValCallback, removeConnectionListener, setChannelName, setDebugMode, setEventTimeout, setIoTimeout, setValid, upperAlarmLimit, upperControlLimit, upperDisplayLimit, upperWarningLimit
-
Field Details
-
C_DBL_DEF_TIME_IO
public static final double C_DBL_DEF_TIME_IO- See Also:
-
C_DBL_DEF_TIME_EVENT
public static final double C_DBL_DEF_TIME_EVENT- See Also:
-
C_S_DEF_PROTOCOL
- See Also:
-
VALUE_FIELD
- See Also:
-
ALARM_FIELD
- See Also:
-
DISPLAY_FIELD
- See Also:
-
VALUE_ALARM_FIELD
- See Also:
-
CONTROL_FIELD
- See Also:
-
TIMESTAMP_FIELD
- See Also:
-
VALUE_REQUEST
- See Also:
-
STATUS_REQUEST
- See Also:
-
TIME_REQUEST
- See Also:
-
CONNECTION_EXC
- See Also:
-
-
Constructor Details
-
Epics7Channel
-
-
Method Details
-
getNativeChannel
protected org.epics.pvaccess.client.Channel getNativeChannel() -
connectAndWait
public boolean connectAndWait(double timeout) Description copied from class:ChannelRequest a new connection and wait for it no longer than the timeout.- Specified by:
connectAndWaitin classChannel- Parameters:
timeout- seconds to wait for a connection before giving up- Returns:
- true if the connection was made within the timeout and false if not
-
requestConnection
public void requestConnection()Description copied from class:ChannelRequest that the channel be connected. Connections are made in the background so this method returns immediately upon making the request. The connection will be made in the future as soon as possible. A connection event will be sent to registered connection listeners when the connection has been established.- Specified by:
requestConnectionin classChannel
-
disconnect
public void disconnect()Description copied from class:ChannelTerminate the network channel connection and clear all events associated with process variable- Specified by:
disconnectin classChannel
-
channelStateChange
public void channelStateChange(org.epics.pvaccess.client.Channel chnl, org.epics.pvaccess.client.Channel.ConnectionState cs) - Specified by:
channelStateChangein interfaceorg.epics.pvaccess.client.ChannelRequester
-
channelCreated
public void channelCreated(org.epics.pvdata.pv.Status status, org.epics.pvaccess.client.Channel chnl) - Specified by:
channelCreatedin interfaceorg.epics.pvaccess.client.ChannelRequester
-
getRequesterName
- Specified by:
getRequesterNamein interfaceorg.epics.pvdata.pv.Requester
-
message
- Specified by:
messagein interfaceorg.epics.pvdata.pv.Requester
-
elementType
Description copied from class:Channelget the Java class associated with the native type of this channel- Specified by:
elementTypein classChannel- Returns:
- the native element type
-
elementCount
Description copied from class:ChannelReturn size of value array associated with process variable- Specified by:
elementCountin classChannel- Returns:
- number of values in process variable
- Throws:
ConnectionException- accordingly
-
readAccess
Description copied from class:ChannelDetermine if channel has read access to process variable- Specified by:
readAccessin classChannel- Returns:
- true if channel has read access
- Throws:
ConnectionException- channel not connected
-
writeAccess
Description copied from class:ChannelDetermine if channel has write access to process variable- Specified by:
writeAccessin classChannel- Returns:
- true if channel has write access
- Throws:
ConnectionException- channel not connected
-
getControl
- Throws:
GetException
-
getDisplay
- Throws:
GetException
-
getVAlueAlarm
- Throws:
GetException
-
getUnits
Description copied from class:ChannelConvenience method which returns the units for this channel.- Specified by:
getUnitsin classChannel- Returns:
- the units
- Throws:
GetException- accordingly
-
rawUpperDisplayLimit
Description copied from class:ChannelConvenience method which returns the upper display limit.- Specified by:
rawUpperDisplayLimitin classChannel- Returns:
- the raw upper display limit
- Throws:
GetException- accordingly
-
rawLowerDisplayLimit
Description copied from class:ChannelConvenience method which returns the lower display limit.- Specified by:
rawLowerDisplayLimitin classChannel- Returns:
- the raw lower display limit
- Throws:
GetException- accordingly
-
rawUpperAlarmLimit
Description copied from class:ChannelConvenience method which returns the upper alarm limit.- Specified by:
rawUpperAlarmLimitin classChannel- Returns:
- the raw upper alarm limit
- Throws:
GetException- accordingly
-
rawLowerAlarmLimit
Description copied from class:ChannelConvenience method which returns the lower alarm limit.- Specified by:
rawLowerAlarmLimitin classChannel- Returns:
- the raw lower alarm limit
- Throws:
GetException- accordingly
-
rawUpperWarningLimit
Description copied from class:ChannelConvenience method which returns the upper warning limit.- Specified by:
rawUpperWarningLimitin classChannel- Returns:
- the raw upper warning limit
- Throws:
GetException- accordingly
-
rawLowerWarningLimit
Description copied from class:ChannelConvenience method which returns the lower warning limit.- Specified by:
rawLowerWarningLimitin classChannel- Returns:
- the raw lower warning limit
- Throws:
GetException- accordingly
-
rawUpperControlLimit
Description copied from class:ChannelConvenience method which returns the upper control limit.- Specified by:
rawUpperControlLimitin classChannel- Returns:
- the raw upper control limit
- Throws:
GetException- accordingly
-
rawLowerControlLimit
Description copied from class:ChannelConvenience method which returns the lower control limit.- Specified by:
rawLowerControlLimitin classChannel- Returns:
- the raw lower control limit
- Throws:
GetException- accordingly
-
get
public org.epics.pvdata.pv.PVStructure get(String request, boolean attemptConnection) throws GetException - Throws:
GetException
-
get
- Throws:
GetException
-
getCallback
public void getCallback(String request, EventListener listener, boolean attemptConnection) throws GetException - Throws:
GetException
-
getCallback
- Throws:
GetException
-
getRawValueRecord
Description copied from class:ChannelReturn a rawChannelRecordrepresenting the fetched record for the native type of this channel. This is a convenient way to get the value of the PV.- Specified by:
getRawValueRecordin classChannel- Returns:
- raw channel record
- Throws:
GetException- accordingly
-
getRawValueCallback
Description copied from class:ChannelHandle a callback for getting the raw value for the channel.- Specified by:
getRawValueCallbackin classChannel- Parameters:
listener- The receiver of the callback.- Throws:
GetException- accordingly
-
getRawValueCallback
protected void getRawValueCallback(IEventSinkValue listener, boolean attemptConnection) throws GetException Description copied from class:ChannelHandle a callback for getting the raw value for the channel.- Specified by:
getRawValueCallbackin classChannel- Parameters:
listener- The receiver of the callback.attemptConnection- indicates whether or not to attempt a blocking connection if this channel is not connected- Throws:
GetException- accordingly
-
getRawStringValueRecord
Description copied from class:ChannelGet aChannelRecordrepresenting the fetched record for the specified type.- Specified by:
getRawStringValueRecordin classChannel- Returns:
- the channel record
- Throws:
GetException- accordingly
-
getRawStatusRecord
Description copied from class:ChannelReturn a rawChannelStatusRecordrepresenting the fetched record for the native type of this channel. This is a convenient way to get the value of the PV along with status.- Specified by:
getRawStatusRecordin classChannel- Returns:
- raw channel record
- Throws:
GetException- accordingly
-
getRawStringStatusRecord
Description copied from class:ChannelGet aChannelStatusRecordrepresenting the fetched record for the specified type.- Specified by:
getRawStringStatusRecordin classChannel- Returns:
- the channel record
- Throws:
GetException- accordingly
-
getRawTimeRecord
Description copied from class:ChannelReturn a rawChannelTimeRecordrepresenting the fetched record for the native type of this channel. This is a convenient way to get the value of the PV along with status and timestamp.- Specified by:
getRawTimeRecordin classChannel- Returns:
- raw channel record
- Throws:
GetException- accordingly
-
getRawStringTimeRecord
Description copied from class:ChannelGet aChannelTimeRecordrepresenting the fetched record for the specified type.- Specified by:
getRawStringTimeRecordin classChannel- Returns:
- the channel record
- Throws:
GetException- accordingly
-
getRawValueTimeCallback
public void getRawValueTimeCallback(IEventSinkValTime listener, boolean attemptConnection) throws GetException Description copied from class:ChannelSubmit a non-blocking Get request with callback- Specified by:
getRawValueTimeCallbackin classChannel- Parameters:
listener- to receive callback upon completionattemptConnection- true to attempt connection and false not to attempt connection- Throws:
GetException- accordingly
-
addMonitorValTime
public Monitor addMonitorValTime(IEventSinkValTime listener, int intMaskFire) throws MonitorException Description copied from class:ChannelSetup a value-status-timestamp monitor on this channel- Specified by:
addMonitorValTimein classChannel- Parameters:
listener- interface to data sinkintMaskFire- code specifying when the monitor is fired or'ed combination of {Monitor.VALUE, Monitor.LOG, Monitor.ALARM}- Returns:
- A new monitor
- Throws:
MonitorException- general monitor failure
-
addMonitorValStatus
public Monitor addMonitorValStatus(IEventSinkValStatus listener, int intMaskFire) throws MonitorException Description copied from class:ChannelSetup a value-status monitor on this channel- Specified by:
addMonitorValStatusin classChannel- Parameters:
listener- interface to data sinkintMaskFire- code specifying when the monitor is fired or'ed combination of {Monitor.VALUE, Monitor.LOG, Monitor.ALARM}- Returns:
- A new monitor
- Throws:
MonitorException- general monitor failure
-
addMonitorValue
Description copied from class:ChannelSetup a value monitor on this channel- Specified by:
addMonitorValuein classChannel- Parameters:
listener- interface to data sinkintMaskFire- code specifying when the monitor is fired or'ed combination of {Monitor.VALUE, Monitor.LOG, Monitor.ALARM}- Returns:
- A new monitor
- Throws:
MonitorException- general monitor failure
-
putRawValCallback
- Throws:
PutException
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Specified by:
putRawValCallbackin classChannel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
getOperationLimitPVs
Description copied from class:ChannelGet the lower and upper operation limit PVs- Specified by:
getOperationLimitPVsin classChannel- Returns:
- two element array of PVs with the lower and upper limit PVs
-
getWarningLimitPVs
Description copied from class:ChannelGet the lower and upper warning limit PVs- Specified by:
getWarningLimitPVsin classChannel- Returns:
- two element array of PVs with the lower and upper limit PVs
-
getAlarmLimitPVs
Description copied from class:ChannelGet the lower and upper alarm limit PVs- Specified by:
getAlarmLimitPVsin classChannel- Returns:
- two element array of PVs with the lower and upper limit PVs
-
getDriveLimitPVs
Description copied from class:ChannelGet the lower and upper drive limit PVs- Specified by:
getDriveLimitPVsin classChannel- Returns:
- two element array of PVs with the lower and upper limit PVs
-