Package xal.ca

Class Monitor

java.lang.Object
xal.ca.Monitor
Direct Known Subclasses:
Epics7Monitor

public abstract class Monitor extends Object
Monitor
Version:
1.0
Author:
Christopher K. Allen, Tom Pelaia
  • Field Details

    • VALUE

      public static final int VALUE
      The monitor is triggered when the PV value change.
      See Also:
    • LOG

      public static final int LOG
      The monitor is triggered when the PV log value change.
      See Also:
    • ALARM

      public static final int ALARM
      The monitor is triggered when the PV alarm state change.
      See Also:
    • intMaskEvent

      protected int intMaskEvent
      event mask for firing monitor
    • xalChan

      protected Channel xalChan
      Channel to monitor
  • Constructor Details

    • Monitor

      protected Monitor(Channel chan, int intMaskEvent) throws ConnectionException
      Creates new Monitor
      Parameters:
      chan - Channel object to monitor
      intMaskEvent - code specifying when monitor event is fired
      Throws:
      ConnectionException - Channel is not connected
  • Method Details

    • clear

      public abstract void clear()
      Stop the monitoring of PV
    • getChannel

      public Channel getChannel()
      Return the associated Channel object
      Returns:
      channel being monitored
    • begin

      protected abstract void begin() throws MonitorException
      Start the channel monitoring
      Throws:
      MonitorException - unable to setup the channel access monitor
    • finalize

      protected void finalize() throws Throwable
      Make sure monitoring is shut down before destruction
      Overrides:
      finalize in class Object
      Throws:
      Throwable - upon failure
    • postValueRecord

      protected final void postValueRecord(IEventSinkValue listener, ValueAdaptor adaptor)
      Post the value record to the listener.
      Parameters:
      listener - The object receiving the monitor record.
      adaptor - The adaptor to the internal data record.
    • postStatusRecord

      protected final void postStatusRecord(IEventSinkValStatus listener, StatusAdaptor adaptor)
      Post the value-status record to the listener.
      Parameters:
      listener - The object receiving the monitor record.
      adaptor - The adaptor to the internal data record.
    • postTimeRecord

      protected final void postTimeRecord(IEventSinkValTime listener, TimeAdaptor adaptor)
      Post the value-status-timestamp record to the listener.
      Parameters:
      listener - The object receiving the monitor record.
      adaptor - The adaptor to the internal data record.