Class DummyDAServer

All Implemented Interfaces:
Device, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
DummyXStripDAServer

public class DummyDAServer extends DAServer
A Dummy DA.Server implementation
  • Field Details

    • key

      protected static int key
    • handles

      protected HashMap<Integer,String> handles
    • fail

      protected boolean fail
  • Constructor Details

    • DummyDAServer

      public DummyDAServer()
      initialise array etc.
  • Method Details

    • isConnected

      public boolean isConnected()
      Description copied from class: DAServer
      Returns the state of the socket connection
      Overrides:
      isConnected in class DAServer
      Returns:
      true if connected
    • connect

      public void connect()
      Overrides:
      connect in class DAServer
    • reconnect

      public void reconnect()
      Description copied from class: DAServer
      Tidy existing socket streams and try to connect them again within the thread. This method is synchronized as both the main thread and run thread use this method.
      Overrides:
      reconnect in class DAServer
    • 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 DAServer
    • sendCommand

      public Object sendCommand(String command)
      Overrides:
      sendCommand in class DAServer
    • parseReadCommand

      protected Object parseReadCommand(String command)
    • parseFileCommand

      protected Object parseFileCommand(String command)
    • parseXspressCommand

      protected Object parseXspressCommand(String command)
    • parseTFGCommand

      protected Object parseTFGCommand(String command, Object rc)
    • parseXspressFormatRunCommand

      protected void parseXspressFormatRunCommand(StringTokenizer tokenizer)
    • parseTFGGenerateCommand

      protected Object parseTFGGenerateCommand(String command)
    • getLongBinaryData

      public long[] getLongBinaryData(String command, int data_size)
      Description copied from class: DAServer
      Get binary data from the server and transform to long (64bit) *
      Overrides:
      getLongBinaryData in class DAServer
      Parameters:
      command - an unterminated command
      data_size - number of data values to fetch.
      Returns:
      returns data as an array.
    • getIntBinaryData

      public int[] getIntBinaryData(String command, int data_size)
      Description copied from class: DAServer
      Get binary data from the server and transform to int[] (32bit)
      Overrides:
      getIntBinaryData in class DAServer
      Parameters:
      command - an unterminated command
      data_size - number of data values to fetch.
      Returns:
      returns data as an array.
    • getBinaryData

      public double[] getBinaryData(String command, int data_size)
      Description copied from class: DAServer
      Get binary data from the server and transform to double
      Overrides:
      getBinaryData in class DAServer
      Parameters:
      command - an unterminated command
      data_size - number of data values to fetch.
      Returns:
      returns data as an array.
    • close

      public void close() throws DeviceException
      dummy close the server, resets open paths
      Specified by:
      close in interface Device
      Overrides:
      close in class DAServer
      Throws:
      DeviceException
      See Also:
    • isNonRandomTestData

      public boolean isNonRandomTestData()
      Returns:
      the nonRandomTestData
    • setNonRandomTestData

      public void setNonRandomTestData(boolean nonRandomTestData)
      Parameters:
      nonRandomTestData - the nonRandomTestData to set
    • getDataFile

      public String getDataFile()
      Returns:
      Returns the mofoil2Data.
    • setDataFile

      public void setDataFile(String dataFile)
      Parameters:
      dataFile - The data to set.
    • resetScanPointCount

      public void resetScanPointCount()
      Called for classes using DummyDAServer in fileData mode.
    • getXspressMode

      public DUMMY_XSPRESS2_MODE getXspressMode()
      Returns:
      Returns the xspressMode.
    • setXspressMode

      public void setXspressMode(DUMMY_XSPRESS2_MODE xspressMode)
      Parameters:
      xspressMode - The xspressMode to set.
    • getFloatBinaryData

      public float[] getFloatBinaryData(String message, int ndata)
      Description copied from class: DAServer
      Get binary data from the server as float
      Overrides:
      getFloatBinaryData in class DAServer
      Parameters:
      message - an unterminated command
      ndata - number of data values to fetch.
      Returns:
      returns data as an array.
    • getMemorySize

      public int getMemorySize()