Class EPICSConnector.OneShotGet

java.lang.Object
org.scictrl.csshell.epics.EPICSConnector.OneShotGet
All Implemented Interfaces:
gov.aps.jca.event.ConnectionListener, gov.aps.jca.event.GetListener, EventListener
Enclosing class:
EPICSConnector

public static class EPICSConnector.OneShotGet extends Object implements gov.aps.jca.event.ConnectionListener, gov.aps.jca.event.GetListener
Makes one time asynchronous requests.
  • Constructor Details

    • OneShotGet

      public OneShotGet(String name, gov.aps.jca.Context ctx, gov.aps.jca.dbr.DBRType type) throws IllegalStateException, gov.aps.jca.CAException
      Constructor.
      Parameters:
      name - the name of remote channel
      ctx - the context for the connection
      type - the data type of the connection
      Throws:
      IllegalStateException - if connection fails
      gov.aps.jca.CAException - if connection fails
    • OneShotGet

      public OneShotGet(gov.aps.jca.Channel channel, gov.aps.jca.dbr.DBRType type)
      Constructor
      Parameters:
      channel - the channel to make requests to
      type - the default data type
  • Method Details

    • connectionChanged

      public void connectionChanged(gov.aps.jca.event.ConnectionEvent ev)
      Specified by:
      connectionChanged in interface gov.aps.jca.event.ConnectionListener
    • getCompleted

      public void getCompleted(gov.aps.jca.event.GetEvent ev)
      Specified by:
      getCompleted in interface gov.aps.jca.event.GetListener
    • getFutureDBR

      public gov.aps.jca.dbr.DBR getFutureDBR(long timeout) throws Exception
      Requests DBR data and waits till result or timeout.
      Parameters:
      timeout - the timeout to wait for data
      Returns:
      returns DBR for connection
      Throws:
      Exception - if request fails
    • getFutureMetaData

      public MetaData getFutureMetaData(long timeout) throws Exception
      Requests metadata and waits for result or timeout.
      Parameters:
      timeout - the timeout to wait for data
      Returns:
      returns MetaData object for channel.
      Throws:
      Exception - if request fails
    • requestMetaData

      public void requestMetaData(PropertyChangeListener callback) throws Exception
      Requests metadata in asynchronous way and delivers result to callback.
      Parameters:
      callback - the callback for the request
      Throws:
      Exception - if request fails
    • getFuturePoop

      public Poop<?,gov.aps.jca.dbr.DBR> getFuturePoop(long timeout) throws Exception
      Blacks call and waits for result in future.
      Parameters:
      timeout - timeout for wiating
      Returns:
      result
      Throws:
      Exception - if error