View Javadoc
1   /*
2    * Copyright 2020-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.hardware.platform.unix.aix;
6   
7   import java.time.LocalDate;
8   import java.util.Collections;
9   import java.util.List;
10  
11  import oshi.annotation.concurrent.ThreadSafe;
12  import oshi.hardware.PowerSource;
13  import oshi.hardware.common.AbstractPowerSource;
14  
15  /**
16   * A Power Source
17   */
18  @ThreadSafe
19  public final class AixPowerSource extends AbstractPowerSource {
20  
21      public AixPowerSource(String name, String deviceName, double remainingCapacityPercent,
22              double timeRemainingEstimated, double timeRemainingInstant, double powerUsageRate, double voltage,
23              double amperage, boolean powerOnLine, boolean charging, boolean discharging, CapacityUnits capacityUnits,
24              int currentCapacity, int maxCapacity, int designCapacity, int cycleCount, String chemistry,
25              LocalDate manufactureDate, String manufacturer, String serialNumber, double temperature) {
26          super(name, deviceName, remainingCapacityPercent, timeRemainingEstimated, timeRemainingInstant, powerUsageRate,
27                  voltage, amperage, powerOnLine, charging, discharging, capacityUnits, currentCapacity, maxCapacity,
28                  designCapacity, cycleCount, chemistry, manufactureDate, manufacturer, serialNumber, temperature);
29      }
30  
31      /**
32       * Gets Battery Information. AIX does not provide any battery statistics, as most servers are not designed to be run
33       * on battery.
34       *
35       * @return An empty list.
36       */
37      public static List<PowerSource> getPowerSources() {
38          return Collections.emptyList();
39      }
40  }