Package alarm

Class AlarmDataUnit

All Implemented Interfaces:
Comparable

public class AlarmDataUnit extends PamDataUnit
  • Constructor Details

    • AlarmDataUnit

      public AlarmDataUnit(long timeMilliseconds)
      Constructor for normal operation.
      Parameters:
      timeMilliseconds -
    • AlarmDataUnit

      public AlarmDataUnit(long timeMilliseconds, long[] firstStateTimes, long[] lastStateTimes, int highestStatus, double highestScore)
      constructor to use when reading back from databse
      Parameters:
      timeMilliseconds -
      firstStateTimes -
      lastStateTimes -
      highestStatus -
      highestScore -
  • Method Details

    • setAlarmStatus

      public void setAlarmStatus(int alarmStatus, double score, long timeMillis)
      Sets the alarm state and records the start and end times for each of those states.
      Parameters:
      alarmStatus - new status
      timeMillis - time milliseconds
    • getCurrentStatus

      public int getCurrentStatus()
    • setCurrentStatus

      public void setCurrentStatus(int currentStatus)
    • getHighestStatus

      public int getHighestStatus()
    • setHighestStatus

      public void setHighestStatus(int highestStatus)
    • getFirstStateTime

      public long[] getFirstStateTime()
    • getLastStateTime

      public long[] getLastStateTime()
    • getCurrentScore

      public double getCurrentScore()
    • getHighestScore

      public double getHighestScore()
    • getLastUpdate

      public long getLastUpdate()
    • isActive

      public boolean isActive()
    • setActive

      public void setActive(boolean isActive)
    • getExtraFieldData

      public String[] getExtraFieldData()
      Returns:
      the extraFieldData
    • setExtraFieldData

      public void setExtraFieldData(String[] extraFieldData)
      Parameters:
      extraFieldData - the extraFieldData to set
    • getEndTimeInMilliseconds

      public long getEndTimeInMilliseconds()
      Overrides:
      getEndTimeInMilliseconds in class PamDataUnit