Class MonitoredArrayPV

java.lang.Object
xal.extension.scan.MonitoredArrayPV

public class MonitoredArrayPV extends Object
This class keeps a reference to the PV with array data and listens to the data change.
Version:
July 29, 2005
Author:
shishlo created October 31, 2005
  • Constructor Details

    • MonitoredArrayPV

      public MonitoredArrayPV()
      Constructor for the MonitoredArrayPV object.
  • Method Details

    • getArrayListener

      public ActionListener getArrayListener()
      Returns the array listener that is one of the inner MonitoredPV object listeners
      Returns:
      The array listener object
    • getValues

      public double[] getValues()
      Returns the reference to the data array. The operations with this array should be synchronized by syncObj that can be received by using getSyncObject() method.
      Returns:
      The data array
    • setChannelName

      public void setChannelName(String chanName)
      Sets the channel name.
      Parameters:
      chanName - The new channel name.
    • setChannelNameQuietly

      public void setChannelNameQuietly(String chanName)
      Sets the channel name without creating the monitor.
      Parameters:
      chanName - The new channel name.
    • getChannelName

      public String getChannelName()
      Returns the channel name
      Returns:
      The channel name.
    • setChannel

      public void setChannel(Channel chIn)
      Sets the channel.
      Parameters:
      chIn - The new channel.
    • setChannelQuietly

      public void setChannelQuietly(Channel chIn)
      Sets the channel without creating the monitor.
      Parameters:
      chIn - The new channel.
    • getChannel

      public Channel getChannel()
      Returns the channel.
      Returns:
      The channel.
    • getSyncObject

      public Object getSyncObject()
      Returns the syncObj reference. It is used for synchronization.
      Returns:
      The syncObj reference
    • setSyncObject

      protected void setSyncObject(Object syncObj)
      Sets the syncObject attribute of the MonitoredArrayPV object. This method has to be called from UpdatingController class only.
      Parameters:
      syncObj - The new syncObject value
    • getSwitchOn

      public boolean getSwitchOn()
      Returns true if the update monitor is working. By default it is On.
      Returns:
      true if the update monitor is working, false otherwise.
    • setSwitchOn

      public void setSwitchOn(boolean switchOn)
      Sets the switch on key for monitoring.
      Parameters:
      switchOn - The new switchOn value
    • getMonitoredPV

      public MonitoredPV getMonitoredPV()
      Gets the monitoredPV attribute of the MonitoredArrayPV object
      Returns:
      The monitoredPV value
    • finalize

      protected void finalize() throws Throwable
      Removes the monitored PV.
      Overrides:
      finalize in class Object
      Throws:
      Throwable