Class WindowsPowerSource

java.lang.Object
oshi.hardware.common.AbstractPowerSource
oshi.hardware.common.platform.windows.WindowsPowerSource
All Implemented Interfaces:
PowerSource
Direct Known Subclasses:
WindowsPowerSourceJNA

@ThreadSafe public abstract class WindowsPowerSource extends AbstractPowerSource
A Power Source
  • Field Details

    • IOCTL_BATTERY_QUERY_TAG

      protected static final int IOCTL_BATTERY_QUERY_TAG
      IOCTL code to query battery tag.
      See Also:
    • IOCTL_BATTERY_QUERY_INFORMATION

      protected static final int IOCTL_BATTERY_QUERY_INFORMATION
      IOCTL code to query battery information.
      See Also:
    • IOCTL_BATTERY_QUERY_STATUS

      protected static final int IOCTL_BATTERY_QUERY_STATUS
      IOCTL code to query battery status.
      See Also:
    • BATTERY_SYSTEM_BATTERY

      protected static final int BATTERY_SYSTEM_BATTERY
      Battery capability flag: system battery.
      See Also:
    • BATTERY_IS_SHORT_TERM

      protected static final int BATTERY_IS_SHORT_TERM
      Battery capability flag: short-term (UPS).
      See Also:
    • BATTERY_CAPACITY_RELATIVE

      protected static final int BATTERY_CAPACITY_RELATIVE
      Battery capability flag: capacity is relative (percent).
      See Also:
    • BATTERY_POWER_ON_LINE

      protected static final int BATTERY_POWER_ON_LINE
      Battery power state flag: AC power online.
      See Also:
    • BATTERY_DISCHARGING

      protected static final int BATTERY_DISCHARGING
      Battery power state flag: discharging.
      See Also:
    • BATTERY_CHARGING

      protected static final int BATTERY_CHARGING
      Battery power state flag: charging.
      See Also:
    • BATTERY_INFORMATION_LEVEL

      protected static final int BATTERY_INFORMATION_LEVEL
      Query information level: battery information.
      See Also:
    • BATTERY_TEMPERATURE_LEVEL

      protected static final int BATTERY_TEMPERATURE_LEVEL
      Query information level: temperature.
      See Also:
    • BATTERY_ESTIMATED_TIME_LEVEL

      protected static final int BATTERY_ESTIMATED_TIME_LEVEL
      Query information level: estimated time remaining.
      See Also:
    • BATTERY_DEVICE_NAME_LEVEL

      protected static final int BATTERY_DEVICE_NAME_LEVEL
      Query information level: device name.
      See Also:
    • BATTERY_MANUFACTURE_DATE_LEVEL

      protected static final int BATTERY_MANUFACTURE_DATE_LEVEL
      Query information level: manufacture date.
      See Also:
    • BATTERY_MANUFACTURE_NAME_LEVEL

      protected static final int BATTERY_MANUFACTURE_NAME_LEVEL
      Query information level: manufacturer name.
      See Also:
    • BATTERY_SERIAL_NUMBER_LEVEL

      protected static final int BATTERY_SERIAL_NUMBER_LEVEL
      Query information level: serial number.
      See Also:
  • Constructor Details

    • WindowsPowerSource

      protected WindowsPowerSource(String psName, String psDeviceName, double psRemainingCapacityPercent, double psTimeRemainingEstimated, double psTimeRemainingInstant, double psPowerUsageRate, double psVoltage, double psAmperage, boolean psPowerOnLine, boolean psCharging, boolean psDischarging, PowerSource.CapacityUnits psCapacityUnits, int psCurrentCapacity, int psMaxCapacity, int psDesignCapacity, int psCycleCount, String psChemistry, LocalDate psManufactureDate, String psManufacturer, String psSerialNumber, double psTemperature)
      Constructor.
      Parameters:
      psName - the psName
      psDeviceName - the psDeviceName
      psRemainingCapacityPercent - the psRemainingCapacityPercent
      psTimeRemainingEstimated - the psTimeRemainingEstimated
      psTimeRemainingInstant - the psTimeRemainingInstant
      psPowerUsageRate - the psPowerUsageRate
      psVoltage - the psVoltage
      psAmperage - the psAmperage
      psPowerOnLine - the psPowerOnLine
      psCharging - the psCharging
      psDischarging - the psDischarging
      psCapacityUnits - the psCapacityUnits
      psCurrentCapacity - the psCurrentCapacity
      psMaxCapacity - the psMaxCapacity
      psDesignCapacity - the psDesignCapacity
      psCycleCount - the psCycleCount
      psChemistry - the psChemistry
      psManufactureDate - the psManufactureDate
      psManufacturer - the psManufacturer
      psSerialNumber - the psSerialNumber
      psTemperature - the psTemperature