Class CounterTimerBase

All Implemented Interfaces:
CounterTimer, Detector, Device, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable
Direct Known Subclasses:
TFGCounterTimer

public abstract class CounterTimerBase extends DetectorBase implements CounterTimer
See Also:
  • Field Details

    • slave

      protected boolean slave
    • timer

      protected Timer timer
  • Constructor Details

    • CounterTimerBase

      public CounterTimerBase()
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • isSlave

      public boolean isSlave()
      Description copied from interface: CounterTimer
      If there are multiple detectors in the same scan operated by the same Timer then only one CounterTimer object should drive the Timer class. In that case the other CounterTimers should have their slave flag set to true.
      Specified by:
      isSlave in interface CounterTimer
      Returns:
      true if the underlying
    • setSlave

      public void setSlave(boolean slave)
      Specified by:
      setSlave in interface CounterTimer
      Parameters:
      slave -
    • getMaximumFrames

      public int getMaximumFrames() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer, this returns the total number of frame pairs supported (each specifying a live and a dead period).
      Specified by:
      getMaximumFrames in interface CounterTimer
      Returns:
      maximum number of time frames available
      Throws:
      DeviceException
    • getCurrentFrame

      public int getCurrentFrame() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer, this returns the current frame number pointer. During counting this can give an idea of progress.
      Specified by:
      getCurrentFrame in interface CounterTimer
      Returns:
      the current frame counter number (1st=0)
      Throws:
      DeviceException
    • getCurrentCycle

      public int getCurrentCycle() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer, this returns the current cycle number. During counting this can give an idea of progress. If not implemented this should return a default of 1.
      Specified by:
      getCurrentCycle in interface CounterTimer
      Returns:
      the current cycle number
      Throws:
      DeviceException
    • setCycles

      public void setCycles(int cycles) throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer this sets the number of times the counter-timer cycles through the framesets. Default is 1 if h/w does not allow the implementation.
      Specified by:
      setCycles in interface CounterTimer
      Parameters:
      cycles - sets the cycle count to the specified number
      Throws:
      DeviceException
    • addFrameSet

      public void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime) throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer a single frameSet object is created for a specified live and dead time. A count for identical frames is specified by the frameCount.
      Specified by:
      addFrameSet in interface CounterTimer
      Parameters:
      frameCount - number of frames required of this type
      requestedLiveTime - frame live time in milliseconds
      requestedDeadTime - frame dead time in milliseconds
      Throws:
      DeviceException
    • addFrameSet

      public void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime, int deadPort, int livePort, int deadPause, int livePause) throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer a single frameSet object is created for a specified live and dead time. A count for identical frames is specified by the frameCount.
      Specified by:
      addFrameSet in interface CounterTimer
      Parameters:
      frameCount - requested number of frames required of this type
      requestedLiveTime - requested frame live time in milliseconds
      requestedDeadTime - requested frame dead time in milliseconds
      deadPort - wait period output level 0 or 1
      livePort - run period output level 0 or 1
      deadPause - pause before wait period 0 or 1
      livePause - pause before run period 0 or 1
      Throws:
      DeviceException
    • clearFrameSets

      public void clearFrameSets() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer all current frameSets are cleared.
      Specified by:
      clearFrameSets in interface CounterTimer
      Throws:
      DeviceException
    • loadFrameSets

      public void loadFrameSets() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer an array of frameSets obtained from calls to makeFrameSet() is loaded into the counter-timer. The current mode specified in setMode() is used to create the real frames before actual loading to the timer.
      Specified by:
      loadFrameSets in interface CounterTimer
      Throws:
      DeviceException
    • restart

      public void restart() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer this restarts framing, from the paused state.
      Specified by:
      restart in interface CounterTimer
      Throws:
      DeviceException
    • start

      public void start() throws DeviceException
      Description copied from interface: CounterTimer
      For a time framing counter-timer this initiates framing.
      Specified by:
      start in interface CounterTimer
      Throws:
      DeviceException
    • stop

      public void stop() throws DeviceException
      Description copied from class: ScannableBase
      Stop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      stop in interface Scannable
      Overrides:
      stop in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • getStatus

      public int getStatus() throws DeviceException
      Description copied from interface: Detector
      Returns the current collecting state of the device.
      Specified by:
      getStatus in interface Detector
      Returns:
      BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
      Throws:
      DeviceException
      See Also:
    • setTimerName

      public void setTimerName(String tfgName)
    • getTimerName

      public String getTimerName()
    • getTimer

      public Timer getTimer()
    • setTimer

      public void setTimer(Timer tfg)