Package gda.device

Class 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

public abstract class DeviceBase extends FindableConfigurableBase implements Device
A base implementation for all devices
  • Field Details

  • Constructor Details

    • DeviceBase

      public DeviceBase()
  • Method Details

    • getName

      public String getName()
      Get the name of the device
      Specified by:
      getName in interface Findable
      Overrides:
      getName in class FindableConfigurableBase
      Returns:
      Returns the name.
    • setName

      public void setName(String name)
      Set the name of the device
      Specified by:
      setName in interface Findable
      Overrides:
      setName in class FindableConfigurableBase
      Parameters:
      name - The name to set.
    • getProtectionLevel

      public int getProtectionLevel()
      Specified by:
      getProtectionLevel in interface Device
      Returns:
      int - the permission level for this object.
    • setProtectionLevel

      public void setProtectionLevel(int permissionLevel)
      Description copied from interface: Device
      Sets the permission level for this object. If this is not set then a default value will be applied.
      Specified by:
      setProtectionLevel in interface Device
      Parameters:
      permissionLevel -
    • isConfigureAtStartup

      public boolean isConfigureAtStartup()
      Description copied from interface: Configurable
      Indicates whether this object should be configured at startup.

      Moved from ConditionallyConfigurable which has been deleted

      Specified by:
      isConfigureAtStartup in interface Configurable
      Overrides:
      isConfigureAtStartup in class ConfigurableBase
    • 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

      public void close() throws DeviceException
      Description copied from interface: Device
      Close and unconfigure the device.
      Specified by:
      close in interface Device
      Throws:
      DeviceException
    • setAttribute

      public void setAttribute(String attributeName, Object value) throws DeviceException
      Description copied from interface: Device
      Set any attribute the implementing classes may provide
      Specified by:
      setAttribute in interface Device
      Parameters:
      attributeName - is the name of the attribute
      value - is the value of the attribute
      Throws:
      DeviceException - if an attribute cannot be set
    • getAttribute

      public Object getAttribute(String attributeName) throws DeviceException
      Description copied from interface: Device
      Get the value of the specified attribute
      Specified by:
      getAttribute in interface Device
      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:
      addIObserver in interface gda.observable.IObservable
    • deleteIObserver

      public void deleteIObserver(gda.observable.IObserver observer)
      Specified by:
      deleteIObserver in interface gda.observable.IObservable
    • deleteIObservers

      public void deleteIObservers()
      Specified by:
      deleteIObservers in interface gda.observable.IObservable
    • isBeingObserved

      protected boolean isBeingObserved()
    • notifyIObservers

      public void notifyIObservers(Object source, Object arg)
      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 component
      arg - the data to be sent to the observer.