Package gda.device

Interface Memory

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable
All Known Implementing Classes:
EncoderCounter, Gdhist, GdhistTimes, Gdscaler, Scaler, Vvhist

public interface Memory extends Device
Interface to control three dimensional (x, y, time) memory devices. Methods are, in general, to be passed start and increment for each dimension.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear the complete memory system.
    void
    clear(int start, int count)
    Clear the specified number of frames/images/spectra starting with specified frame/image/spectrum number.
    void
    clear(int x, int y, int t, int dx, int dy, int dt)
    Clear the specified block of memory.
    int[]
    Get the size of the memory system.
    int
    Get the physical memory size
    int[]
    If the detector supports multiple pixel settings, this will return an array of possible values.
    void
    output(String file)
    Output data from memory directly to file
    double[]
    read(int frame)
    Read the specified frame/image/spectrum.
    double[]
    read(int x, int y, int t, int dx, int dy, int dt)
    Read the specified block of memory.
    void
    setDimension(int[] d)
    Set the size of the memory system.
    void
    Starts/enables the memory system.
    void
    Stops/disables the memory system.
    void
    write(double[] data, int frame)
    Write to the specified frame of memory.
    void
    write(double[] data, int x, int y, int t, int dx, int dy, int dt)
    Write to the specified block of memory.

    Methods inherited from interface gda.factory.Configurable

    configure, isConfigureAtStartup, isConfigured, reconfigure

    Methods inherited from interface gda.device.Device

    close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevel

    Methods inherited from interface gda.factory.Findable

    getName, setName

    Methods inherited from interface gda.observable.IObservable

    addIObserver, deleteIObserver, deleteIObservers
  • Method Details

    • clear

      void clear() throws DeviceException
      Clear the complete memory system.
      Throws:
      DeviceException
    • clear

      void clear(int start, int count) throws DeviceException
      Clear the specified number of frames/images/spectra starting with specified frame/image/spectrum number.
      Parameters:
      start - is the starting frame/image/spectrum number (1st = 0)
      count - is the number of frames/images/spectra to clear
      Throws:
      DeviceException
    • clear

      void clear(int x, int y, int t, int dx, int dy, int dt) throws DeviceException
      Clear the specified block of memory. The parameters give the ability to clear a 3D block of memory.
      Parameters:
      x - is the start address for the offset in the x dimension
      y - is the start address for the offset in the y dimension
      t - is the start address for the offset in the z or t dimension
      dx - is the address count in the x dimension
      dy - is the address count in the y dimension
      dt - is the address count in the z or t dimension
      Throws:
      DeviceException
    • start

      void start() throws DeviceException
      Starts/enables the memory system.
      Throws:
      DeviceException
    • stop

      void stop() throws DeviceException
      Stops/disables the memory system.
      Throws:
      DeviceException
    • read

      double[] read(int x, int y, int t, int dx, int dy, int dt) throws DeviceException
      Read the specified block of memory. The parameters give the ability to read a 3D block of memory.
      Parameters:
      x - is the start address for the offset in the x dimension
      y - is the start address for the offset in the y dimension
      t - is the start address for the offset in the z or t dimension
      dx - is the address count in the x dimension
      dy - is the address count in the y dimension
      dt - is the address count in the z or t dimension
      Returns:
      the data
      Throws:
      DeviceException
    • read

      double[] read(int frame) throws DeviceException
      Read the specified frame/image/spectrum.
      Parameters:
      frame - is the frame/image/spectrum number (1st = 0)
      Returns:
      the data
      Throws:
      DeviceException
    • setDimension

      void setDimension(int[] d) throws DeviceException
      Set the size of the memory system.
      Parameters:
      d - is the
      Throws:
      DeviceException
    • getDimension

      int[] getDimension() throws DeviceException
      Get the size of the memory system.
      Returns:
      the memory dimension in x and y
      Throws:
      DeviceException
    • write

      void write(double[] data, int x, int y, int t, int dx, int dy, int dt) throws DeviceException
      Write to the specified block of memory. The parameters give the ability to write a 3D block of memory.
      Parameters:
      data - is the data to write to the memory
      x - is the start address for the offset in the x dimension
      y - is the start address for the offset in the y dimension
      t - is the start address for the offset in the z or t dimension
      dx - is the address count in the x dimension
      dy - is the address count in the y dimension
      dt - is the address count in the z or t dimension
      Throws:
      DeviceException
    • write

      void write(double[] data, int frame) throws DeviceException
      Write to the specified frame of memory.
      Parameters:
      data - is the data to write to the memory
      frame - the area in memory corresponding to the specified frame.
      Throws:
      DeviceException
    • output

      void output(String file) throws DeviceException
      Output data from memory directly to file
      Parameters:
      file - is the fully qualified file name
      Throws:
      DeviceException
    • getMemorySize

      int getMemorySize() throws DeviceException
      Get the physical memory size
      Returns:
      the physical memory size expressed in words.
      Throws:
      DeviceException
    • getSupportedDimensions

      int[] getSupportedDimensions() throws DeviceException
      If the detector supports multiple pixel settings, this will return an array of possible values. Null otherwise. Assumes the detector is 2D with identical axes.
      Returns:
      list of supported resolutions
      Throws:
      DeviceException