Class HostPingAlarmProcessor

All Implemented Interfaces:
PropertyChangeListener, EventListener, ValueProcessor

public class HostPingAlarmProcessor extends DefaultAlarmProcessor
This class listens to alarm events from input links (PVs) and converts them to alarm state of this record in following way:
  • Sets record alarm state to highest alarm state of input links.
  • Sets record value to 0 if there is no alarm state and 1 if there is alarm state in input links.
  • Sets record listens to machine state and blocks alarms when machine state does not match mask.
Author:
igor@scictrl.com
  • Constructor Details

    • HostPingAlarmProcessor

      public HostPingAlarmProcessor()

      Constructor for HostPingAlarmProcessor.

  • Method Details

    • main

      public static void main(String[] args)

      main.

      Parameters:
      args - an array of String objects
    • configure

      public void configure(Record record, org.apache.commons.configuration.HierarchicalConfiguration config)
      Configures the internals of value processor, provides reference to parent record and to configuration with root inside processor tag. Parent record is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.
      Specified by:
      configure in interface ValueProcessor
      Overrides:
      configure in class DefaultAlarmProcessor
      Parameters:
      record - the parent record.
      config - configuration with room inside processor tag.
    • process

      public void process()
      Called by Database in interval set by the trigger parameter in milliseconds. Not called if trigger in 0.
      Specified by:
      process in interface ValueProcessor
      Overrides:
      process in class AbstractValueProcessor