Class WindowsPowerSourceJNA

All Implemented Interfaces:
PowerSource

@ThreadSafe public final class WindowsPowerSourceJNA extends WindowsPowerSource
JNA-based Windows power source implementation.
  • Constructor Details

    • WindowsPowerSourceJNA

      public WindowsPowerSourceJNA(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)
  • Method Details

    • queryPowerSources

      protected List<PowerSource> queryPowerSources()
      Description copied from class: AbstractPowerSource
      Returns a fresh list of power sources for this platform, used by AbstractPowerSource.updateAttributes(). Each concrete subclass implements this by delegating to its own static getPowerSources() factory method.
      Specified by:
      queryPowerSources in class AbstractPowerSource
      Returns:
      A list of PowerSource objects representing batteries, etc.
    • getPowerSources

      public static List<PowerSource> getPowerSources()
      Gets Battery Information.
      Returns:
      A list of PowerSource objects representing batteries, etc.