Package xal.extension.scan
Class MonitoredPV
java.lang.Object
xal.extension.scan.MonitoredPV
- Direct Known Subclasses:
WrappedChannel
Manage the monitor events for a Process Variable
- Author:
- shishlo, tap created October 31, 2005
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStateListener(ActionListener actionListener) Add a listener for state change events from this monitored PVvoidaddValueListener(ActionListener actionListener) Add a listener for value change events from this monitored PVgetAlias()Returns the alias attribute of the MonitoredPV objectstatic Object[]Returns the aliases attribute of the MonitoredPV classGet the channel to be monitoredGet the name of the channel to be monitoredstatic MonitoredPVgetMonitoredPV(String alias) Returns the monitoredPV attribute of the MonitoredPV classdoublegetValue()Get the latest value of the monitored channelbooleanisGood()Determine whether the channel is good meaning that it is connected, has posted a monitored value and the latest event was successfulstatic voidremoveMonitoredPV(String alias) Remove the monitored PV associated with the aliasstatic voidDispose of the monitored PV and remove its aliasvoidremoveStateListener(ActionListener actionListener) Remove the listener from getting state change events from this monitored PVvoidremoveValueListener(ActionListener actionListener) Remove the listener from getting value change events from this monitored PVvoidsetChannel(Channel channel) Sets the channel to monitorvoidsetChannelName(String channelName) Set the name of the channel to monitorvoidsetChannelNameQuietly(String chanName) Sets the name of the channel to monitor without posting eventsvoidsetChannelQuietly(Channel channel) Sets the channelQuietly attribute of the MonitoredPV objectvoidsetValueChanged(boolean valueChanged) Sets the boolean marker to the specified change statevoidStart the monitorvoidStop the monitorbooleanDetermine whether the value was changed since the last reset (i.e.
-
Field Details
-
monitor
monitor of channel to monitor
-
-
Method Details
-
getMonitoredPV
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
Remove the monitored PV associated with the alias- Parameters:
alias- The Parameter
-
removeMonitoredPV
Dispose of the monitored PV and remove its alias- Parameters:
mpv- the monitored PV to remove
-
getAliases
Returns the aliases attribute of the MonitoredPV class- Returns:
- The aliases value
-
getAlias
Returns the alias attribute of the MonitoredPV object- Returns:
- The alias value
-
getChannelName
Get the name of the channel to be monitored- Returns:
- The channelName value
-
getChannel
Get the channel to be monitored- Returns:
- The channel value
-
setChannel
Sets the channel to monitor- Parameters:
channel- the new channel to monitor
-
setChannelQuietly
Sets the channelQuietly attribute of the MonitoredPV object- Parameters:
channel- The new channelQuietly value
-
setChannelName
Set the name of the channel to monitor- Parameters:
channelName- The new channelName value
-
setChannelNameQuietly
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
Add a listener for state change events from this monitored PV- Parameters:
actionListener- listener of state change events
-
removeStateListener
Remove the listener from getting state change events from this monitored PV- Parameters:
actionListener- the listener to remove
-
addValueListener
Add a listener for value change events from this monitored PV- Parameters:
actionListener- The listener to add for value change events
-
removeValueListener
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
-