Package gda.device

Interface CounterTimer

All Superinterfaces:
Configurable, Detector, Device, Findable, gda.observable.IObservable, Scannable
All Known Implementing Classes:
AceApdDetector, BufferedScaler, CallableTfgScalerWithLogValues, CallableTfgXmap, CallableTfgXspress2, CounterTimerBase, DummyCounterTimer, PositionStreamingTfgScaler, TFGCounterTimer, TfgEncoderCounter, TfgEpicsMCACounterTimer, TfgScaler, TfgScalerWithDarkCurrent, TfgScalerWithFrames, TfgScalerWithLogValues, TFGScalerWithRatio, TFGStruck, TFGTriggeredScaler, TfgXmap, TfgXspress2, TfgXspress2NoCorrection, TfgXspress2Raw

public interface CounterTimer extends Detector
Interface for Detector classes which read their data from scalers (channels) driven by an external Timer object (mainly the TFG card). The Timer interface has collections of timing periods known as FrameSets.

The methods in this interface are to allow those Detector objects to have the same FrameSets functionality provided in the Timer interface.

See Also:
  • Method Details

    • getMaximumFrames

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

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

      int getCurrentCycle() throws DeviceException
      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.
      Returns:
      the current cycle number
      Throws:
      DeviceException
    • setCycles

      void setCycles(int cycles) throws DeviceException
      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.
      Parameters:
      cycles - sets the cycle count to the specified number
      Throws:
      DeviceException
    • start

      void start() throws DeviceException
      For a time framing counter-timer this initiates framing.
      Throws:
      DeviceException
    • restart

      void restart() throws DeviceException
      For a time framing counter-timer this restarts framing, from the paused state.
      Throws:
      DeviceException
    • addFrameSet

      void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime) throws DeviceException
      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.
      Parameters:
      frameCount - number of frames required of this type
      requestedLiveTime - frame live time in milliseconds
      requestedDeadTime - frame dead time in milliseconds
      Throws:
      DeviceException
    • addFrameSet

      void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime, int deadPort, int livePort, int deadPause, int livePause) throws DeviceException
      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.
      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

      void clearFrameSets() throws DeviceException
      For a time framing counter-timer all current frameSets are cleared.
      Throws:
      DeviceException
    • loadFrameSets

      void loadFrameSets() throws DeviceException
      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.
      Throws:
      DeviceException
    • readChannel

      double[] readChannel(int startFrame, int frameCount, int channel) throws DeviceException
      For a time framing counter-timer read out a specified channel, beginning from the specified start frame number using the requested frame count.
      Parameters:
      startFrame - starting frame number (1st=0)
      frameCount - number of frames to read the counter data out from
      channel - read this channel
      Returns:
      array of requested readout counter-timer data
      Throws:
      DeviceException
    • readFrame

      double[] readFrame(int startChannel, int channelCount, int frame) throws DeviceException
      For a time framing counter-timer read out a specified frame, beginning from the specified start channel number using the requested channel count.
      Parameters:
      startChannel - starting channel number (1st=0)
      channelCount - number of channels to read the counter data out from
      frame - read this frame
      Returns:
      array of requested readout counter-timer data
      Throws:
      DeviceException
    • isSlave

      boolean isSlave() throws DeviceException
      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.
      Returns:
      true if the underlying
      Throws:
      DeviceException
    • setSlave

      void setSlave(boolean slave) throws DeviceException
      Parameters:
      slave -
      Throws:
      DeviceException