Package xal.plugin.epics7.server
Class Epics7ServerChannel
java.lang.Object
xal.ca.Channel
xal.plugin.epics7.Epics7Channel
xal.plugin.epics7.server.Epics7ServerChannel
- All Implemented Interfaces:
org.epics.pvaccess.client.ChannelRequester,org.epics.pvdata.pv.Requester,IServerChannel
Server channel implementation. It creates PVAccess and CA channels, independently of the signal prefix. This is done
to ensure backwards compatibility.
Gets are done on the PVRecord, while sets are done to both PVRecord and CA PV, so that they are always in sync.
- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Field Summary
Fields inherited from class xal.plugin.epics7.Epics7Channel
ALARM_FIELD, C_DBL_DEF_TIME_EVENT, C_DBL_DEF_TIME_IO, C_S_DEF_PROTOCOL, CONNECTION_EXC, CONTROL_FIELD, DISPLAY_FIELD, STATUS_REQUEST, TIME_REQUEST, TIMESTAMP_FIELD, VALUE_ALARM_FIELD, VALUE_FIELD, VALUE_REQUESTFields inherited from class xal.ca.Channel
channelSystem, connectionFlag, connectionProxy, dblTmEvt, dblTmIO, messageCenter, strId -
Constructor Summary
ConstructorsConstructorDescriptionEpics7ServerChannel(String signalName, Epics7ServerChannelSystem channelSystem) -
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 channelbooleanconnectAndWait(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 variableprotected org.epics.pvdata.pv.PVStructureprotected org.epics.pvdata.pv.PVStructureReturn a rawChannelStatusRecordrepresenting the fetched record for the native type of this channel.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.PVStructurevoidputRawValCallback(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) Long is not supported in EPICS3, so they are cast to int for CA.voidputRawValCallback(long newVal, PutListener listener) Long is not supported in EPICS3, so they are cast to int for CA.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.final voidRequest that the channel be connected.voidsetLowerAlarmLimit(Number lowerLimit) Set the lower alarm limitvoidsetLowerCtrlLimit(Number lowerLimit) Set the lower control limitvoidsetLowerDispLimit(Number lowerLimit) Set the lower display limitvoidsetLowerWarningLimit(Number lowerLimit) Set the lower warning limitvoidsetSettable(boolean settable) Set whether the value of this channel can be changed by the clients.voidSet the unitsvoidsetUpperAlarmLimit(Number upperLimit) Set the upper alarm limitvoidsetUpperCtrlLimit(Number upperLimit) Set the upper control limitvoidsetUpperDispLimit(Number upperLimit) Set the upper display limitvoidsetUpperWarningLimit(Number upperLimit) Set the upper warning limitMethods inherited from class xal.plugin.epics7.Epics7Channel
channelCreated, channelStateChange, elementType, get, get, getAlarmLimitPVs, getCallback, getCallback, getDriveLimitPVs, getNativeChannel, getOperationLimitPVs, getRawStringStatusRecord, getRawStringTimeRecord, getRawStringValueRecord, getRequesterName, getWarningLimitPVs, message, putRawValCallback, rawLowerAlarmLimit, rawLowerControlLimit, rawLowerDisplayLimit, rawLowerWarningLimit, rawUpperAlarmLimit, rawUpperControlLimit, rawUpperDisplayLimit, rawUpperWarningLimit, readAccess, writeAccessMethods 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
-
Constructor Details
-
Epics7ServerChannel
-
-
Method Details
-
connectAndWait
public boolean connectAndWait(double timeout) Description copied from class:ChannelRequest a new connection and wait for it no longer than the timeout.- Overrides:
connectAndWaitin classEpics7Channel- 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 final 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.- Overrides:
requestConnectionin classEpics7Channel
-
disconnect
public void disconnect()Description copied from class:ChannelTerminate the network channel connection and clear all events associated with process variable- Overrides:
disconnectin classEpics7Channel
-
getCaLock
-
getPvaLock
-
elementCount
Description copied from class:ChannelReturn size of value array associated with process variable- Overrides:
elementCountin classEpics7Channel- Returns:
- number of values in process variable
- Throws:
ConnectionException- accordingly
-
getDisplay
protected org.epics.pvdata.pv.PVStructure getDisplay()- Overrides:
getDisplayin classEpics7Channel
-
getVAlueAlarm
protected org.epics.pvdata.pv.PVStructure getVAlueAlarm()- Overrides:
getVAlueAlarmin classEpics7Channel
-
getControl
protected org.epics.pvdata.pv.PVStructure getControl()- Overrides:
getControlin classEpics7Channel
-
getUnits
Description copied from class:ChannelConvenience method which returns the units for this channel.- Specified by:
getUnitsin interfaceIServerChannel- Overrides:
getUnitsin classEpics7Channel- Returns:
- the units
-
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.- Overrides:
getRawValueRecordin classEpics7Channel- Returns:
- raw 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.- Overrides:
getRawStatusRecordin classEpics7Channel- Returns:
- raw 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.- Overrides:
getRawTimeRecordin classEpics7Channel- Returns:
- raw channel record
- Throws:
GetException- accordingly
-
getRawValueCallback
Description copied from class:ChannelHandle a callback for getting the raw value for the channel.- Overrides:
getRawValueCallbackin classEpics7Channel- 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.- Overrides:
getRawValueCallbackin classEpics7Channel- 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
-
getRawValueTimeCallback
public void getRawValueTimeCallback(IEventSinkValTime listener, boolean attemptConnection) throws GetException Description copied from class:ChannelSubmit a non-blocking Get request with callback- Overrides:
getRawValueTimeCallbackin classEpics7Channel- 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- Overrides:
addMonitorValTimein classEpics7Channel- 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- Overrides:
addMonitorValStatusin classEpics7Channel- 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- Overrides:
addMonitorValuein classEpics7Channel- 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
Description copied from class:ChannelAsynchronously put a raw value to the channel process variable. Fire the specified callback when put is complete.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Long is not supported in EPICS3, so they are cast to int for CA.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
putRawValCallback
Long is not supported in EPICS3, so they are cast to int for CA.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- 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.- Overrides:
putRawValCallbackin classEpics7Channel- Parameters:
newVal- value sent to process variablelistener- The receiver of the callback event- Throws:
PutException- general put failure
-
setUnits
Description copied from interface:IServerChannelSet the units- Specified by:
setUnitsin interfaceIServerChannel- Parameters:
units- to apply
-
setLowerDispLimit
Description copied from interface:IServerChannelSet the lower display limit- Specified by:
setLowerDispLimitin interfaceIServerChannel- Parameters:
lowerLimit- to apply
-
setUpperDispLimit
Description copied from interface:IServerChannelSet the upper display limit- Specified by:
setUpperDispLimitin interfaceIServerChannel- Parameters:
upperLimit- to apply
-
setLowerAlarmLimit
Description copied from interface:IServerChannelSet the lower alarm limit- Specified by:
setLowerAlarmLimitin interfaceIServerChannel- Parameters:
lowerLimit- to apply
-
setUpperAlarmLimit
Description copied from interface:IServerChannelSet the upper alarm limit- Specified by:
setUpperAlarmLimitin interfaceIServerChannel- Parameters:
upperLimit- to apply
-
setLowerWarningLimit
Description copied from interface:IServerChannelSet the lower warning limit- Specified by:
setLowerWarningLimitin interfaceIServerChannel- Parameters:
lowerLimit- to apply
-
setUpperWarningLimit
Description copied from interface:IServerChannelSet the upper warning limit- Specified by:
setUpperWarningLimitin interfaceIServerChannel- Parameters:
upperLimit- to apply
-
setLowerCtrlLimit
Description copied from interface:IServerChannelSet the lower control limit- Specified by:
setLowerCtrlLimitin interfaceIServerChannel- Parameters:
lowerLimit- to apply
-
setUpperCtrlLimit
Description copied from interface:IServerChannelSet the upper control limit- Specified by:
setUpperCtrlLimitin interfaceIServerChannel- Parameters:
upperLimit- to apply
-
setSettable
public void setSettable(boolean settable) Description copied from interface:IServerChannelSet whether the value of this channel can be changed by the clients.- Specified by:
setSettablein interfaceIServerChannel- Parameters:
settable- true if it can be changed
-