Package gda.device
Class DeviceBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable
- Direct Known Subclasses:
_PlateEventProvider,AbstractScanHook,Apple2IDBase,AreaDetectorLiveViewImpl,BioSAXSSampleChanger,BPMBase,CaenelsBimorph,CameraBase,Canberra35,ClientFileAnnouncer,CryoController,CurrentSamplePosition,DAServer,DetectorBase,DoorLatchState,DummyAdc,DummyBimorphMirrorController,DummyCamera,DummyExternalRobot,DummyFormulatrix,DummyGonio,DummyGonioProtection,DummyInternalRobot,DummyLakeshore340Controller,DummyMXTrigger,DummyNewportVMCController,DummySyringePumpController,DummyTfg,DummyTrajectoryMoveController,DummyXmapControllerBase,EnergyMonitor,EpicsADC,EpicsCVScan,EpicsCVScanController,EpicsDevice,EpicsDlsMcsSis3820Controller,EpicsETLController,EpicsEurotherm2kController,EpicsExternalRobot,EpicsFormulatrix,EpicsGonio,EpicsGonioProtection,EpicsInternalRobot,EpicsLakeshore340Controller,EpicsMcaController,EpicsSyringePumpController,EpicsTca,EpicsXmapController,FilterArrayBase,FindableEpicsDevice,GdaServiceBase,Gdhist,GpibBase,IDPhaseController,JActorSampleChanger,MetadataBlaster,MotorBase,MultiFilterAttenuator,MXCamera,MXOmegaMaxVelocity,MXShutter,MXTrigger,NcdSubDetector,NewportVMCController,NextSamplePosition,ObservablePathConstructor,OdinDetectorControllerEpics,OdinDetectorDecorator,PlateSampleChangerBase,PlotServerBase,RobotNX100Controller,RobotSampleState,SampleChangerBase,SampleChangerStateMonitor,SampleMoveable,ScannableBase,SerialBase,SerialController,ShutteredScannableMotor,SimpleObservablePathProvider,SweepUpdater,SweepUpdater,SyringePump,Tfg,TFG2CVmoveController,TimedRunnableInvoker,UDPListener
A base implementation for all devices
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver observer) voidclose()Close and unconfigure the device.voiddeleteIObserver(gda.observable.IObserver observer) voidgetAttribute(String attributeName) Get the value of the specified attributegetName()Get the name of the deviceintprotected booleanbooleanIndicates whether this object should be configured at startup.voidnotifyIObservers(Object source, Object arg) Notify all observers on the list of the requested change.voidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetConfigureAtStartup(boolean configureAtStartup) Set a flag to inform the server whether the configure method should be called at startup.voidSet the name of the devicevoidsetProtectionLevel(int permissionLevel) Sets the permission level for this object.Methods 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
-
Field Details
-
DEFAULT_PROTECTION_LEVEL_PROPERTY
- See Also:
-
-
Constructor Details
-
DeviceBase
public DeviceBase()
-
-
Method Details
-
getName
Get the name of the device- Specified by:
getNamein interfaceFindable- Overrides:
getNamein classFindableConfigurableBase- Returns:
- Returns the name.
-
setName
Set the name of the device- Specified by:
setNamein interfaceFindable- Overrides:
setNamein classFindableConfigurableBase- Parameters:
name- The name to set.
-
getProtectionLevel
public int getProtectionLevel()- Specified by:
getProtectionLevelin interfaceDevice- Returns:
- int - the permission level for this object.
-
setProtectionLevel
public void setProtectionLevel(int permissionLevel) Description copied from interface:DeviceSets the permission level for this object. If this is not set then a default value will be applied.- Specified by:
setProtectionLevelin interfaceDevice- Parameters:
permissionLevel-
-
isConfigureAtStartup
public boolean isConfigureAtStartup()Description copied from interface:ConfigurableIndicates whether this object should be configured at startup.Moved from ConditionallyConfigurable which has been deleted
- Specified by:
isConfigureAtStartupin interfaceConfigurable- Overrides:
isConfigureAtStartupin classConfigurableBase
-
setConfigureAtStartup
public void setConfigureAtStartup(boolean configureAtStartup) Set a flag to inform the server whether the configure method should be called at startup.- Parameters:
configureAtStartup- true to configure at startup.
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Throws:
DeviceException
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- 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
-
addIObserver
public void addIObserver(gda.observable.IObserver observer) - Specified by:
addIObserverin interfacegda.observable.IObservable
-
deleteIObserver
public void deleteIObserver(gda.observable.IObserver observer) - Specified by:
deleteIObserverin interfacegda.observable.IObservable
-
deleteIObservers
public void deleteIObservers()- Specified by:
deleteIObserversin interfacegda.observable.IObservable
-
isBeingObserved
protected boolean isBeingObserved() -
notifyIObservers
Notify 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.
- Parameters:
source- the observed componentarg- the data to be sent to the observer.
-