Class MonitoredPV

java.lang.Object
xal.extension.scan.MonitoredPV
Direct Known Subclasses:
WrappedChannel

public class MonitoredPV extends Object
Manage the monitor events for a Process Variable
Author:
shishlo, tap created October 31, 2005
  • Field Details

  • Method Details

    • getMonitoredPV

      public static MonitoredPV getMonitoredPV(String alias)
      Returns the monitoredPV attribute of the MonitoredPV class
      Parameters:
      alias - The Parameter
      Returns:
      The monitoredPV value
    • valueChanged

      public boolean valueChanged()
      Determine whether the value was changed since the last reset (i.e. setValueChanged(false)).
      Returns:
      true if the value was changed since the last time it was reset; false otherwise
    • setValueChanged

      public void setValueChanged(boolean valueChanged)
      Sets the boolean marker to the specified change state
      Parameters:
      valueChanged - The new value change marker state
    • removeMonitoredPV

      public static void removeMonitoredPV(String alias)
      Remove the monitored PV associated with the alias
      Parameters:
      alias - The Parameter
    • removeMonitoredPV

      public static void removeMonitoredPV(MonitoredPV mpv)
      Dispose of the monitored PV and remove its alias
      Parameters:
      mpv - the monitored PV to remove
    • getAliases

      public static Object[] getAliases()
      Returns the aliases attribute of the MonitoredPV class
      Returns:
      The aliases value
    • getAlias

      public String getAlias()
      Returns the alias attribute of the MonitoredPV object
      Returns:
      The alias value
    • getChannelName

      public String getChannelName()
      Get the name of the channel to be monitored
      Returns:
      The channelName value
    • getChannel

      public Channel getChannel()
      Get the channel to be monitored
      Returns:
      The channel value
    • setChannel

      public void setChannel(Channel channel)
      Sets the channel to monitor
      Parameters:
      channel - the new channel to monitor
    • setChannelQuietly

      public void setChannelQuietly(Channel channel)
      Sets the channelQuietly attribute of the MonitoredPV object
      Parameters:
      channel - The new channelQuietly value
    • setChannelName

      public void setChannelName(String channelName)
      Set the name of the channel to monitor
      Parameters:
      channelName - The new channelName value
    • setChannelNameQuietly

      public void setChannelNameQuietly(String chanName)
      Sets the name of the channel to monitor without posting events
      Parameters:
      chanName - The new channelNameQuietly value
    • getValue

      public double getValue()
      Get the latest value of the monitored channel
      Returns:
      The value value
    • isGood

      public boolean isGood()
      Determine whether the channel is good meaning that it is connected, has posted a monitored value and the latest event was successful
      Returns:
      channel status
    • addStateListener

      public void addStateListener(ActionListener actionListener)
      Add a listener for state change events from this monitored PV
      Parameters:
      actionListener - listener of state change events
    • removeStateListener

      public void removeStateListener(ActionListener actionListener)
      Remove the listener from getting state change events from this monitored PV
      Parameters:
      actionListener - the listener to remove
    • addValueListener

      public void addValueListener(ActionListener actionListener)
      Add a listener for value change events from this monitored PV
      Parameters:
      actionListener - The listener to add for value change events
    • removeValueListener

      public void removeValueListener(ActionListener actionListener)
      Remove the listener from getting value change events from this monitored PV
      Parameters:
      actionListener - the listener to remove
    • stopMonitor

      public void stopMonitor()
      Stop the monitor
    • startMonitor

      public void startMonitor()
      Start the monitor