Class WindowsPowerSourceJNA
java.lang.Object
oshi.hardware.common.AbstractPowerSource
oshi.hardware.common.platform.windows.WindowsPowerSource
oshi.hardware.platform.windows.WindowsPowerSourceJNA
- All Implemented Interfaces:
oshi.hardware.PowerSource
@ThreadSafe
public final class WindowsPowerSourceJNA
extends oshi.hardware.common.platform.windows.WindowsPowerSource
JNA-based Windows power source implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface oshi.hardware.PowerSource
oshi.hardware.PowerSource.CapacityUnits -
Field Summary
Fields inherited from class oshi.hardware.common.platform.windows.WindowsPowerSource
BATTERY_CAPACITY_RELATIVE, BATTERY_CHARGING, BATTERY_DEVICE_NAME_LEVEL, BATTERY_DISCHARGING, BATTERY_ESTIMATED_TIME_LEVEL, BATTERY_INFORMATION_LEVEL, BATTERY_IS_SHORT_TERM, BATTERY_MANUFACTURE_DATE_LEVEL, BATTERY_MANUFACTURE_NAME_LEVEL, BATTERY_POWER_ON_LINE, BATTERY_SERIAL_NUMBER_LEVEL, BATTERY_SYSTEM_BATTERY, BATTERY_TEMPERATURE_LEVEL, IOCTL_BATTERY_QUERY_INFORMATION, IOCTL_BATTERY_QUERY_STATUS, IOCTL_BATTERY_QUERY_TAG -
Constructor Summary
ConstructorsConstructorDescriptionWindowsPowerSourceJNA(String psName, String psDeviceName, double psRemainingCapacityPercent, double psTimeRemainingEstimated, double psTimeRemainingInstant, double psPowerUsageRate, double psVoltage, double psAmperage, boolean psPowerOnLine, boolean psCharging, boolean psDischarging, oshi.hardware.PowerSource.CapacityUnits psCapacityUnits, int psCurrentCapacity, int psMaxCapacity, int psDesignCapacity, int psCycleCount, String psChemistry, LocalDate psManufactureDate, String psManufacturer, String psSerialNumber, double psTemperature) -
Method Summary
Methods inherited from class oshi.hardware.common.AbstractPowerSource
getAmperage, getCapacityUnits, getChemistry, getCurrentCapacity, getCycleCount, getDesignCapacity, getDeviceName, getManufactureDate, getManufacturer, getMaxCapacity, getName, getPowerUsageRate, getRemainingCapacityPercent, getSerialNumber, getTemperature, getTimeRemainingEstimated, getTimeRemainingInstant, getVoltage, isCharging, isDischarging, isPowerOnLine, toString, updateAttributes
-
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, oshi.hardware.PowerSource.CapacityUnits psCapacityUnits, int psCurrentCapacity, int psMaxCapacity, int psDesignCapacity, int psCycleCount, String psChemistry, LocalDate psManufactureDate, String psManufacturer, String psSerialNumber, double psTemperature)
-
-
Method Details
-
queryPowerSources
- Specified by:
queryPowerSourcesin classoshi.hardware.common.AbstractPowerSource
-
getPowerSources
Gets Battery Information.- Returns:
- A list of PowerSource objects representing batteries, etc.
-