Package xal.smf.scada

Class BatchConnectionTest

java.lang.Object
xal.smf.scada.BatchConnectionTest

public class BatchConnectionTest extends Object
Class for checking the connectivity of many EPICS channels simultaneously.

Ported from XAL on Jul 15, 2014.
· Jonathan M. Freed

Since:
Mar 11, 2011
Author:
Christopher K. Allen
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    final class 
    This class is used is a Channel Access connection monitor.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new BatchConnectionTest object for the given accelerator device.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of the current set of channels that passed the connectivity test (even if some channels in the original batch failed).
    void
    setChecking(boolean bolChecking)
    Force the connection checking on or off.
    boolean
    testConnection(Class<?> clsScada, double dblTmOut)
    Test the given (implied) SCADA class for channel connectivity of . its SCADA fields All the channels for the set of PVs are identified (i.e., read back, set, etc.) then the connections are tested in batch mode, rather than serially.
    boolean
    testConnection(Collection<ScadaFieldDescriptor> setFds, double dblTmOut)
    Test the given set of PV field descriptors for channel connectivity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BatchConnectionTest

      public BatchConnectionTest(AcceleratorNode smfDev)
      Creates a new BatchConnectionTest object for the given accelerator device.
      Parameters:
      smfDev - accelerator hardware under test
      Since:
      Mar 11, 2011
  • Method Details

    • setChecking

      public void setChecking(boolean bolChecking)
      Force the connection checking on or off. If connection checking is turned off the checking methods (testConnection(Class, double) and testConnection(Collection, double)) perform no operation and return a value of true.
      Parameters:
      bolChecking - if true then connection checking continues as normal if false then connection checking is turned off regardless
      Since:
      Mar 28, 2011
    • testConnection

      public boolean testConnection(Class<?> clsScada, double dblTmOut) throws BadStructException, BadChannelException
      Test the given (implied) SCADA class for channel connectivity of . its SCADA fields All the channels for the set of PVs are identified (i.e., read back, set, etc.) then the connections are tested in batch mode, rather than serially. Thus, the given timeout until failure applies to all the channels at once.
      Parameters:
      clsScada - class type of the SCADA data structure under test
      dblTmOut - timeout before connectivity test fails (in seconds)
      Returns:
      true if all connections are available, false otherwise
      Throws:
      BadStructException - the given class has no SCADA field annotations
      BadChannelException - bad channel handle, no channel bound to it
      Since:
      Mar 16, 2011
      See Also:
    • testConnection

      public boolean testConnection(Collection<ScadaFieldDescriptor> setFds, double dblTmOut) throws BadChannelException, IllegalArgumentException
      Test the given set of PV field descriptors for channel connectivity. All the channels for the set of PVs are identified (i.e., read back, set, etc.) then the connections are tested in batch mode, rather than serially. Thus, the given timeout until failure applies to all the channels at once.
      Parameters:
      setFds - set of field descriptors
      dblTmOut - timeout before connectivity test fails (in seconds)
      Returns:
      true if all channels described in the list are connected, false otherwise
      Throws:
      BadChannelException - bad channel handle, no channel bound to it
      IllegalArgumentException - the given collection of descriptors is empty
      Since:
      Mar 11, 2011
    • getConnectedChannels

      public Set<Channel> getConnectedChannels()
      Returns a copy of the current set of channels that passed the connectivity test (even if some channels in the original batch failed).
      Returns:
      (copy) set channels from the original batch that we able to connect
      Since:
      Mar 11, 2011