Package gda.device.adc
Class EpicsADC
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.adc.EpicsADC
- All Implemented Interfaces:
Adc,Device,InitializationListener,Configurable,Findable,gda.observable.IObservable
EpicsADC Class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumamod enumstatic enumcmod enumstatic enumgmod enumstatic enumpmod enumstatic enumtmod enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringdouble[]Gainsstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic StringFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.getAttribute(String attribute) Get the value of the specified attributedoublegetGain()doublegetLld()doubleintgetRange(int channel) Get the current voltage Range for the specified channel.int[]Get the supported ranges for a particular ADC.intdoublegetVoltage(int channel) Get the current voltage for the specified channel.double[]Get the current voltage from all open channels.voidCalled when all critical channels are connected.booleanGet the polarity capability of the ADC.voidsetAdcRecordName(String adcRecordName) voidsetAmod(EpicsADC.amodEnum amod) voidsetAttribute(String attribute, Object value) Set any attribute the implementing classes may providevoidsetCmod(EpicsADC.cmodEnum cmod) voidsetGain(double gain) voidsetGmod(EpicsADC.gmodEnum gmod) voidsetLld(double lld) voidsetOffset(double offset) voidsetPmod(EpicsADC.pmodEnum pmod) voidsetRange(int channel, int range) Set the voltage Range for the specified channel.voidsetSampleCount(int count) Set the sample count for the ADC monitoring.voidsetScanMode(int mode) voidsetScanMode(String mode) voidsetTmod(EpicsADC.tmodEnum tmod) voidsetUld(double uld) voidsetUniPolar(int channel, boolean polarity) Set the unipolar or bipolar mode for a specified channel.voidsetZero(double zero) Methods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getProtectionLevel, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
Gain
public double[] GainGains -
GAIN
-
OFFSET
-
LLD
-
ULD
-
ZERO
-
AMOD
-
CMOD
-
PMOD
-
GMOD
-
TMOD
-
GAIN_VALUES
-
-
Constructor Details
-
EpicsADC
public EpicsADC()Constructor.
-
-
Method Details
-
setAdcRecordName
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
getVoltage
Description copied from interface:AdcGet the current voltage for the specified channel.- Specified by:
getVoltagein interfaceAdc- Parameters:
channel- the ADC channel to read- Returns:
- the current voltage (units are implementation specific)
- Throws:
DeviceException
-
getVoltages
Description copied from interface:AdcGet the current voltage from all open channels.- Specified by:
getVoltagesin interfaceAdc- Returns:
- the current voltages (units are implementation specific)
- Throws:
DeviceException
-
setRange
Description copied from interface:AdcSet the voltage Range for the specified channel.- Specified by:
setRangein interfaceAdc- Parameters:
channel- the ADC channel to setrange- the range to set (units are implementation specific)- Throws:
DeviceException- See Also:
-
getRange
Description copied from interface:AdcGet the current voltage Range for the specified channel.- Specified by:
getRangein interfaceAdc- Parameters:
channel- the ADC channel to get- Returns:
- the range (units are implementation specific)
- Throws:
DeviceException- See Also:
-
setUniPolar
Description copied from interface:AdcSet the unipolar or bipolar mode for a specified channel.- Specified by:
setUniPolarin interfaceAdc- Parameters:
channel- the ADC channel to setpolarity- unipolar mode either true or false- Throws:
DeviceException- See Also:
-
getRanges
Description copied from interface:AdcGet the supported ranges for a particular ADC.- Specified by:
getRangesin interfaceAdc- Returns:
- the supported voltage ranges (units are implementation specific)
- Throws:
DeviceException
-
isUniPolarSettable
Description copied from interface:AdcGet the polarity capability of the ADC.- Specified by:
isUniPolarSettablein interfaceAdc- Returns:
- true if UNIPOLAR is supported else assume BIPOLAR
- Throws:
DeviceException
-
setSampleCount
Description copied from interface:AdcSet the sample count for the ADC monitoring.- Specified by:
setSampleCountin interfaceAdc- Parameters:
count- the number of samples to read- Throws:
DeviceException
-
getGain
public double getGain() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- Gain
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
setGain
- Parameters:
gain-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
getLld
public double getLld() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- Low Level Discriminator
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
setLld
- Parameters:
lld- Low Level Discriminator- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
getOffset
public double getOffset() throws gov.aps.jca.CAException, gov.aps.jca.TimeoutException, InterruptedException- Returns:
- Offset
- Throws:
gov.aps.jca.CAExceptiongov.aps.jca.TimeoutExceptionInterruptedException
-
setOffset
- Parameters:
offset-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classDeviceBase- Parameters:
attribute- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
attribute- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
setTmod
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setGmod
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setPmod
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setCmod
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setAmod
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setZero
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
setUld
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
initializationCompleted
public void initializationCompleted()Description copied from interface:InitializationListenerCalled when all critical channels are connected.- Specified by:
initializationCompletedin interfaceInitializationListener
-
setScanMode
- Parameters:
mode-- Throws:
DeviceException
-
setScanMode
- Parameters:
mode-- Throws:
DeviceException
-
getScanMode
- Returns:
- The ScanMode as a String
- Throws:
DeviceException
-
getScanModeInteger
- Returns:
- The ScanMode as an Integer
- Throws:
DeviceException
-