Class DummyTfg

All Implemented Interfaces:
Device, Timer, Configurable, Findable, gda.observable.IObservable

public class DummyTfg extends DeviceBase implements Timer
A timer class for the VME time frame generator card implemented using DA.Server
  • Constructor Details

    • DummyTfg

      public DummyTfg()
  • Method Details

    • configure

      public void configure()
      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
    • reconfigure

      public void reconfigure()
      Description copied from interface: Configurable
      Re-initialisation of values and states.

      Moved from Reconfigurable which has been deleted

      Specified by:
      reconfigure in interface Configurable
      Overrides:
      reconfigure in class ConfigurableBase
    • close

      public void close()
      Description copied from interface: Device
      Close and unconfigure the device.
      Specified by:
      close in interface Device
      Overrides:
      close in class DeviceBase
    • getStatus

      public int getStatus()
      Description copied from interface: Timer
      Returns the current state of the timer All timers must fully implement this.
      Specified by:
      getStatus in interface Timer
      Returns:
      ACTIVE if the timer has not finished the requested operation(s), IDLE if in an completely idle state and PAUSED if temporarily suspended.
    • stop

      public void stop()
      Description copied from interface: Timer
      Aborts any current timing and returns it to an idle state.
      Specified by:
      stop in interface Timer
    • getMaximumFrames

      public int getMaximumFrames()
      Description copied from interface: Timer
      Returns the total number of frame pairs supported (each specifying a live and a dead period)
      Specified by:
      getMaximumFrames in interface Timer
      Returns:
      maximum number of time frames available
    • getTotalFrames

      public int getTotalFrames()
      Returns:
      the total number of frames
    • getCurrentFrame

      public int getCurrentFrame()
      Description copied from interface: Timer
      Returns the current frame number.
      Specified by:
      getCurrentFrame in interface Timer
      Returns:
      the current frame counter number (1st=0)
    • getCurrentCycle

      public int getCurrentCycle()
      Description copied from interface: Timer
      Returns the current cycle number. If not implemented this should return a default of 1.
      Specified by:
      getCurrentCycle in interface Timer
      Returns:
      the current cycle number
    • setCycles

      public void setCycles(int cycles)
      Description copied from interface: Timer
      sets the number of times the timer cycles through the framesets. Default is 1 if h/w does not allow the implementation
      Specified by:
      setCycles in interface Timer
      Parameters:
      cycles - sets the cycle count to the specified number
    • setTotalCyclesToZero

      public void setTotalCyclesToZero()
      Zero the total cycle count
    • start

      public void start()
      Description copied from interface: Timer
      For a time framing counter-timer, this initiates framing, starting from the current frame number (specified by setFrameNumber())
      Specified by:
      start in interface Timer
    • cont

      public void cont()
    • restart

      public void restart()
      Description copied from interface: Timer
      Restarts framing from the paused state
      Specified by:
      restart in interface Timer
    • addFrameSet

      public void addFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime)
      Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount. Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount.
      Specified by:
      addFrameSet in interface Timer
      Parameters:
      frameCount - the requested number of frames required of this type
      requestedDeadTime - the requested frame dead time in milliseconds
      requestedLiveTime - the requested frame live time in milliseconds
      See Also:
    • addFrameSet

      public void addFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime, int deadPort, int livePort, int deadPause, int livePause)
      Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount. Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount.
      Specified by:
      addFrameSet in interface Timer
      Parameters:
      frameCount - the requested number of frames required of this type
      requestedDeadTime - the requested frame dead time in milliseconds
      requestedLiveTime - the requested frame live time in milliseconds
      deadPort - the wait period output level 0 or 1
      livePort - the run period output level 0 or 1
      deadPause - the pause before wait period 0 or 1
      livePause - the pause before run period 0 or 1
      See Also:
    • clearFrameSets

      public void clearFrameSets()
      Description copied from interface: Timer
      Clear all current frameSets
      Specified by:
      clearFrameSets in interface Timer
    • loadFrameSets

      public void loadFrameSets()
      Description copied from interface: Timer
      Load an array of frameSets obtained from calls to makeFrameSet() are loaded into the timer.
      Specified by:
      loadFrameSets in interface Timer
    • countAsync

      public void countAsync(double time)
      Initiates a single specified timing period and allows the timer to proceed asynchronously. The end of period can be determined by calls to getStatus() returning IDLE.
      Specified by:
      countAsync in interface Timer
      Parameters:
      time - the requested counting time in milliseconds
    • output

      public void output(String file)
      Description copied from interface: Timer
      Output data from timer directly to file
      Specified by:
      output in interface Timer
      Parameters:
      file - is the fully qualified file name
    • setAttribute

      public void setAttribute(String attributeName, Object value)
      Set any attribute the implementing classes may provide Set attribute values for "Ext-Start", "Ext-Inhibit", "VME-Start".
      Specified by:
      setAttribute in interface Device
      Overrides:
      setAttribute in class DeviceBase
      Parameters:
      attributeName - the attribute name to set.
      value - the attribute value to set.
      See Also:
    • getAttribute

      public Object getAttribute(String attributeName)
      Get the value of the specified attribute Get attribute values for "Ext-Start", "Ext-Inhibit".
      Specified by:
      getAttribute in interface Device
      Overrides:
      getAttribute in class DeviceBase
      Parameters:
      attributeName - the attribute name to get.
      Returns:
      the attribute
      See Also:
    • shutdown

      public void shutdown()
      Stop the runner thread