Class EpicsMotorDecorator

All Implemented Interfaces:
Device, Motor, Configurable, Findable, gda.observable.IObservable, gda.observable.IObserver, Serializable, org.springframework.beans.factory.InitializingBean

public class EpicsMotorDecorator extends MotorIocDecorator implements gda.observable.IObserver
Decorator for EPICS Motor which checks IOC status before connecting and accessing EPICS motor PVs. This class doesn't decorate all the methods in an EpicsMotor, but only those methods that access to EPICS PVs in the specified IOC. If IOC is up and running, access is delegated to the decorated motor instance; If IOC is down, any access to PVs in the specified IOC will throw MotorException except for configure() which throws FactoryException if DeviceBase.isConfigureAtStartup() is set to true, otherwise it just delays the configure later.

Spring XML configuration example:

 
 <bean id="d6x_mtr" class="gda.device.motor.EpicsMotorDecorator">
 	<property name="iocPv" value="BL11I-MO-IOC-03:STATUS"/>
 	<constructor-arg>
 		<bean class="gda.device.motor.EpicsMotor">
 			<property name="deviceName" value="D6.X"/>
 		</bean>
 	</constructor-arg>
 	<property name="configureAtStartup" value="true">
 </bean>
 
 

See Also: