Package gda.device.epicsdevice
Class EpicsDevice
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.epicsdevice.EpicsDevice
- All Implemented Interfaces:
Device,IEpicsDevice,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
Control devices using the Epics Valve/Shutter template.
This class operates two Epics records: a record which controls the device and a record which holds the status. The positions are: "Open", "Close" and "Reset". There are 5 values for the status: "Open", "Opening", "Closed", "Closing" and "Fault".
The stop method in this class does nothing as the valves operate too fast for such a method to be meaningful.
-
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.epicsdevice.IEpicsDevice
defPutTimeOutInSec -
Constructor Summary
ConstructorsConstructorDescriptionEpicsDevice(String name, Map<String, String> recordPVs, boolean inDummyMode) Constructor.EpicsDevice(Map<String, String> recordPVs, boolean inDummyMode) -
Method Summary
Modifier and TypeMethodDescription__getattr__(String name) The Python interpreter calls this to find an attribute before it looks for a real attribute on an object.__getattr__(org.python.core.PyString name) See __findattr__(String name)voidcreateDetector(String record, String field) createDetector(String name, String record, String field) createEpicsChannel(ReturnType returnType, String record, String field) createEpicsChannel(ReturnType returnType, String record, String field, double putTimeOutInSec) createEpicsChannel(String name, ReturnType returnType, String record, String field) createEpicsChannel(String name, ReturnType returnType, String record, String field, double putTimeOutInSec) voiddispose()getAttribute(String _attributeName) Get the value of the specified attributeintgetElementCount(String record, String field) getValue(ReturnType returnType, String record, String field) static DoublegetValueAsString(String record, String field) booleanvoidnotifyIObservers(Object theObserved, Object theArgument) Notify all observers on the list of the requested change.voidsetAttribute(String _attributeName, Object value) Set any attribute the implementing classes may providevoidsetDocString(String docString) voidvoidsetValue(String record, String field, Object value, double connection_timeout, gov.aps.jca.event.PutListener listener) voidMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigured, reconfigure
-
Constructor Details
-
EpicsDevice
public EpicsDevice(String name, Map<String, String> recordPVs, boolean inDummyMode) throws DeviceExceptionConstructor.- Parameters:
name-recordPVs-inDummyMode-- Throws:
DeviceException
-
EpicsDevice
- Parameters:
recordPVs-inDummyMode-- Throws:
DeviceException
-
-
Method Details
-
getDocString
- Returns:
- docString
-
setDocString
- Parameters:
docString-
-
dispose
- Specified by:
disposein interfaceIEpicsDevice- Throws:
DeviceException- See Also:
-
setValue
public void setValue(String record, String field, Object value, double timeout) throws DeviceException - Throws:
DeviceException
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classDeviceBase- Parameters:
_attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved- See Also:
-
notifyIObservers
Description copied from class:DeviceBaseNotify all observers on the list of the requested change.This function should ideally be protected, but is left as public for the time being because inner classes of subclasses cannot access protected members if they are in different bundles.
- Overrides:
notifyIObserversin classDeviceBase- Parameters:
theObserved- the observed componenttheArgument- the data to be sent to the observer.- See Also:
-
closeUnUsedChannels
- Specified by:
closeUnUsedChannelsin interfaceIEpicsDevice- Throws:
DeviceException
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
_attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set- See Also:
-
update
- Specified by:
updatein interfacegda.observable.IObserver- See Also:
-
getValue
- Throws:
DeviceException
-
getValueAsString
- Parameters:
record-field-- Returns:
- String
- Throws:
DeviceException
-
getElementCount
- Parameters:
record-field-- Returns:
- Element Count
- Throws:
DeviceException
-
createEpicsChannel
public IEpicsChannel createEpicsChannel(ReturnType returnType, String record, String field, double putTimeOutInSec) - Specified by:
createEpicsChannelin interfaceIEpicsDevice- Parameters:
returnType-record-field-putTimeOutInSec-- Returns:
- IEpicsChannel
-
createEpicsChannel
public IEpicsChannel createEpicsChannel(String name, ReturnType returnType, String record, String field, double putTimeOutInSec) - Parameters:
name-returnType-record-field-putTimeOutInSec-- Returns:
- IEpicsChannel
-
createDetector
- Parameters:
record-field-- Returns:
- Detector
-
createDetector
- Parameters:
name-record-field-- Returns:
- Detector
-
createEpicsChannel
- Specified by:
createEpicsChannelin interfaceIEpicsDevice- Parameters:
returnType-record-field-- Returns:
- IEpicsChannel
-
createEpicsChannel
public IEpicsChannel createEpicsChannel(String name, ReturnType returnType, String record, String field) - Parameters:
name-returnType-record-field-- Returns:
- IEpicsChannel
-
getValue
public static Double getValue(String deviceName, String record, String field) throws DeviceException - Parameters:
deviceName-record-field-- Returns:
- double value
- Throws:
DeviceException
-
__getattr__
See __findattr__(String name)- Parameters:
name-- Returns:
- the
-
__getattr__
The Python interpreter calls this to find an attribute before it looks for a real attribute on an object. Here it returns the an EpicsDevice field (or docstring).- Parameters:
name-- Returns:
- EpicsDevice field (or docstring).
-
isInDummyMode
public boolean isInDummyMode()- Returns:
- Returns the inDummyMode.
-
setValue
public void setValue(String record, String field, Object value, double connection_timeout, gov.aps.jca.event.PutListener listener) throws DeviceException - Throws:
DeviceException
-