Package gda.device.attenuator
Class EpicsAttenuatorBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.attenuator.EpicsAttenuatorBase
- All Implemented Interfaces:
Attenuator,InitializationListener,Configurable,Findable,gov.aps.jca.event.MonitorListener,EventListener
- Direct Known Subclasses:
BinaryFilterSetAttenuators
public abstract class EpicsAttenuatorBase
extends FindableConfigurableBase
implements Attenuator, gov.aps.jca.event.MonitorListener, InitializationListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected gov.aps.jca.Channelprotected gov.aps.jca.Channelprotected gov.aps.jca.Channelprotected EpicsChannelManagerprotected EpicsControllerprotected gov.aps.jca.Channelprotected gov.aps.jca.Channelprotected gov.aps.jca.Channel -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedEpicsAttenuatorBase(EpicsController controller) -
Method Summary
Modifier and TypeMethodDescriptiondoubledoublegetClosestMatchTransmission(double transmission) Using the current beam energy, calculates the closest achievable transmission value to the given value with the set of filtersgetClosestMatchTransmission(double transmission, double energyInKev) Uses the given energy in the calculationdoubledoubleReturns the stored desired transmission value.doubleThe current transmission, assuming the energy has not changed since the last filter adjustment.voidCalled when all critical channels are connected.booleanisReady()Determines if correct filters are in place (as attenuator makes a change of transmission): Compares the results ofAttenuator.getFilterPositions()withAttenuator.getDesiredFilterPositions().voidmonitorChanged(gov.aps.jca.event.MonitorEvent arg0) doublesetTransmission(double transmission) Changes the attenuation level to the closest achievable transmission to the given value.Methods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigureAtStartup, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.device.Attenuator
getDesiredFilterPositions, getFilterNames, getFilterPositions, getNumberFiltersMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigure
-
Field Details
-
controller
-
channelManager
-
desiredEnergy
protected gov.aps.jca.Channel desiredEnergy -
desiredTransmission
protected gov.aps.jca.Channel desiredTransmission -
actualTransmission
protected gov.aps.jca.Channel actualTransmission -
change
protected gov.aps.jca.Channel change -
actualEnergy
protected gov.aps.jca.Channel actualEnergy -
useCurrentEnergy
protected gov.aps.jca.Channel useCurrentEnergy
-
-
Constructor Details
-
EpicsAttenuatorBase
-
EpicsAttenuatorBase
protected EpicsAttenuatorBase()
-
-
Method Details
-
getClosestMatchTransmission
Description copied from interface:AttenuatorUsing the current beam energy, calculates the closest achievable transmission value to the given value with the set of filters- Specified by:
getClosestMatchTransmissionin interfaceAttenuator- Parameters:
transmission-- Returns:
- double the closest transmission value that could be achieved
- Throws:
DeviceException
-
getClosestMatchTransmission
public ClosestMatchTransmission getClosestMatchTransmission(double transmission, double energyInKev) throws DeviceException Description copied from interface:AttenuatorUses the given energy in the calculation- Specified by:
getClosestMatchTransmissionin interfaceAttenuator- Parameters:
transmission- transmission (0 to 1)energyInKev- x-ray energy in the stated units- Throws:
DeviceException
-
setTransmission
Description copied from interface:AttenuatorChanges the attenuation level to the closest achievable transmission to the given value. This uses the current beam energy in its calculations.- Specified by:
setTransmissionin interfaceAttenuator- Parameters:
transmission- the desired transmission- Returns:
- the actual transmission value achieved
- Throws:
DeviceException
-
getTransmission
Description copied from interface:AttenuatorThe current transmission, assuming the energy has not changed since the last filter adjustment.- Specified by:
getTransmissionin interfaceAttenuator- Returns:
- the current actual transmission
- Throws:
DeviceException
-
monitorChanged
public void monitorChanged(gov.aps.jca.event.MonitorEvent arg0) - Specified by:
monitorChangedin interfacegov.aps.jca.event.MonitorListener
-
initializationCompleted
public void initializationCompleted()Description copied from interface:InitializationListenerCalled when all critical channels are connected.- Specified by:
initializationCompletedin interfaceInitializationListener
-
getClosestMatchEnergy
- Specified by:
getClosestMatchEnergyin interfaceAttenuator- Returns:
- double - the actual energy used in calculations to determine the filter set to achieve the desired transmission
- Throws:
DeviceException
-
getDesiredEnergy
- Specified by:
getDesiredEnergyin interfaceAttenuator- Returns:
- double - the desired energy to use in calculations to determine the filter set to achieve the desired transmission
- Throws:
DeviceException
-
getDesiredTransmission
Description copied from interface:AttenuatorReturns the stored desired transmission value.- Specified by:
getDesiredTransmissionin interfaceAttenuator- Returns:
- the stored desired transmission value
- Throws:
DeviceException
-
isReady
Description copied from interface:AttenuatorDetermines if correct filters are in place (as attenuator makes a change of transmission): Compares the results ofAttenuator.getFilterPositions()withAttenuator.getDesiredFilterPositions().- Specified by:
isReadyin interfaceAttenuator- Throws:
DeviceException
-