Class UpsResult

    • Constructor Detail

      • 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 Detail

      • 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.
        the UPSNAME or null if unavailable.
      • getStatus

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

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

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

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

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

        public float getOutputv()
        Gets the voltage the UPS is supplying to your equipment.
        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.
        the NOMOUTV or Float.NaN if unavailable.
      • getLoadpct

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

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

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

        public float getNombattv()
        Gets the nominal battery voltage.
        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.
        the EXTBATTS or -1 if unavailable.
      • getBadbatts

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

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

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

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

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