All Implemented Interfaces:
Serializable

public class UpsResult extends TableMultiResult implements Serializable
Author:
AO Industries, Inc.
See Also:
  • Field Summary

    Fields inherited from class com.aoindustries.noc.monitor.common.Result

    latency, time
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpsResult(long time, long latency, AlertLevel alertLevel, String error)
     
    UpsResult(long time, long latency, AlertLevel alertLevel, String upsname, String status, float linev, float lotrans, float hitrans, float linefreq, float outputv, float nomoutv, float loadpct, float bcharge, float battv, float nombattv, int extbatts, int badbatts, MilliInterval tonbatt, MilliInterval cumonbatt, MilliInterval timeleft, float itemp)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the number of bad battery packs.
    float
    Gets the battery voltage as supplied by the UPS.
    float
    Gets the percentage charge on the batteries.
    Gets the cumulative time on batteries since apcupsd started.
    int
    Gets the number of external batteries as defined by the user.
    float
    Gets the line voltage above which the UPS will switch to batteries.
    float
    Gets the internal UPS temperature as supplied by the UPS.
    float
    Gets the line frequency in hertz as given by the UPS.
    float
    Gets the current line voltage as returned by the UPS.
    float
    Gets the percentage of load capacity as estimated by the UPS.
    float
    Gets the line voltage below which the UPS will switch to batteries.
    float
    Gets the nominal battery voltage.
    float
    Gets the output voltage that the UPS will attempt to supply when on battery power.
    float
    Gets the voltage the UPS is supplying to your equipment.
    getRowData(int index)
    Gets the data for one row.
    int
    Gets the number of data elements for this result.
    Gets the current status of the UPS (ONLINE, CHARGING, ONBATT, etc.).
    Gets the remaining runtime left on batteries as estimated by the UPS.
    Gets the time currently on batteries.
    Gets the name of the UPS as stored in the EEPROM or in the UPSNAME directive in the configuration file.

    Methods inherited from class com.aoindustries.noc.monitor.common.TableMultiResult

    getAlertLevel, getError

    Methods inherited from class com.aoindustries.noc.monitor.common.Result

    getLatency, getTime

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UpsResult

      public UpsResult(long time, long latency, AlertLevel alertLevel, String error)
    • UpsResult

      public UpsResult(long time, long latency, AlertLevel alertLevel, String upsname, String status, float linev, float lotrans, float hitrans, float linefreq, float outputv, float nomoutv, float loadpct, float bcharge, float battv, float nombattv, int extbatts, int badbatts, MilliInterval tonbatt, MilliInterval cumonbatt, MilliInterval timeleft, float itemp)
  • Method Details

    • getRowDataSize

      public int getRowDataSize()
      Description copied from class: TableMultiResult
      Gets the number of data elements for this result.
      Specified by:
      getRowDataSize in class TableMultiResult
    • getRowData

      public Object getRowData(int index)
      Description copied from class: TableMultiResult
      Gets the data for one row. This should not include the time and latency, they are implied. When there is an error, getRowData will not be checked and should return null.
      Specified by:
      getRowData in class TableMultiResult
    • getUpsname

      public String getUpsname()
      Gets the name of the UPS as stored in the EEPROM or in the UPSNAME directive in the configuration file.
      Returns:
      the UPSNAME or null if unavailable.
    • getStatus

      public String getStatus()
      Gets the current status of the UPS (ONLINE, CHARGING, ONBATT, etc.).
      Returns:
      the STATUS or null if unavailable.
    • getLinev

      public float getLinev()
      Gets the current line voltage as returned by the UPS.
      Returns:
      the LINEV or Float.NaN if unavailable.
    • getLotrans

      public float getLotrans()
      Gets the line voltage below which the UPS will switch to batteries.
      Returns:
      the LOTRANS or Float.NaN if unavailable.
    • getHitrans

      public float getHitrans()
      Gets the line voltage above which the UPS will switch to batteries.
      Returns:
      the HITRANS or Float.NaN if unavailable.
    • getLinefreq

      public float getLinefreq()
      Gets the line frequency in hertz as given by the UPS.
      Returns:
      the LINEFREQ or Float.NaN if unavailable.
    • getOutputv

      public float getOutputv()
      Gets the voltage the UPS is supplying to your equipment.
      Returns:
      the OUTPUTV or Float.NaN if unavailable.
    • getNomoutv

      public float getNomoutv()
      Gets the output voltage that the UPS will attempt to supply when on battery power.
      Returns:
      the NOMOUTV or Float.NaN if unavailable.
    • getLoadpct

      public float getLoadpct()
      Gets the percentage of load capacity as estimated by the UPS.
      Returns:
      the LOADPCT or Float.NaN if unavailable.
    • getBcharge

      public float getBcharge()
      Gets the percentage charge on the batteries.
      Returns:
      the BCHARGE or Float.NaN if unavailable.
    • getBattv

      public float getBattv()
      Gets the battery voltage as supplied by the UPS.
      Returns:
      the BATTV or Float.NaN if unavailable.
    • getNombattv

      public float getNombattv()
      Gets the nominal battery voltage.
      Returns:
      the NOMBATTV or Float.NaN if unavailable.
    • getExtbatts

      public int getExtbatts()
      Gets the number of external batteries as defined by the user. A correct number here helps the UPS compute the remaining runtime more accurately.
      Returns:
      the EXTBATTS or -1 if unavailable.
    • getBadbatts

      public int getBadbatts()
      Gets the number of bad battery packs.
      Returns:
      the BADBATTS or -1 if unavailable.
    • getTonbatt

      public MilliInterval getTonbatt()
      Gets the time currently on batteries.
      Returns:
      the TONBATT or null if unavailable.
    • getCumonbatt

      public MilliInterval getCumonbatt()
      Gets the cumulative time on batteries since apcupsd started.
      Returns:
      the CUMONBATT or null if unavailable.
    • getTimeleft

      public MilliInterval getTimeleft()
      Gets the remaining runtime left on batteries as estimated by the UPS.
      Returns:
      the TIMELEFT or null if unavailable.
    • getItemp

      public float getItemp()
      Gets the internal UPS temperature as supplied by the UPS.
      Returns:
      the ITEMP or Float.NaN if unavailable.