Interface PVAlarm

  • All Known Implementing Classes:
    PVAlarmFactory

    public interface PVAlarm
    PVAlarm. Attach to a PVData alarm structure. Note that an alarm structure has the following structure:
        structure alarm
            int severity
            int status
            string message
     
    This interface converts between the integer severity and the enum alarmSeverity.
    Author:
    mrk
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean attach​(PVField pvField)
      Attempt to attach to the alarm field.
      void detach()
      Remove attachment to alarm field.
      void get​(Alarm alarm)
      Get the alarm values from the attached alarm field and write to the specified Alarm.
      boolean isAttached()
      Is this attached to an alarm structure?
      boolean set​(Alarm alarm)
      Set the alarm.
    • Method Detail

      • attach

        boolean attach​(PVField pvField)
        Attempt to attach to the alarm field. The field must either be an alarm field itself or a subfield of the parent of a field named value.
        Parameters:
        pvField - the field for which to find an alarm field
        Returns:
        (false,true) if alarm field (not found, found).
      • detach

        void detach()
        Remove attachment to alarm field.
      • isAttached

        boolean isAttached()
        Is this attached to an alarm structure?
        Returns:
        (false,true) is (not, is) attached to an alarm structure
      • get

        void get​(Alarm alarm)
        Get the alarm values from the attached alarm field and write to the specified Alarm.
        Parameters:
        alarm - the Alarm to be updated
        Throws:
        IllegalStateException - if this PVAlarm not attached to an alarm field
      • set

        boolean set​(Alarm alarm)
        Set the alarm.
        Parameters:
        alarm - the new value
        Returns:
        (false,true) if the alarm field is (immutable,updated)