java.lang.Object
java.lang.Enum<PowerCommand>
org.metricshub.ipmi.core.coding.commands.chassis.PowerCommand
All Implemented Interfaces:
Serializable, Comparable<PowerCommand>

public enum PowerCommand extends Enum<PowerCommand>
Specifies types of commands that can be sent to BMC via ChassisControl command.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Pulse a diagnostic interrupt (optional) that goes directly to the processors, typically to make the operating system write a diagnostic dump: an NMI on IA-32 systems.
    Hard reset.
    Power cycle (optional): a power off interval of at least 1 second, then power up.
    Force system into soft off (S4/S5) state.
    Power up the system.
    Initiate a soft shutdown of the operating system via ACPI (optional), by emulating a fatal overtemperature.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the code of the command in the request data of Chassis Control (IPMI 2.0 table 28-4, byte 1 bits 3:0).
    parseInt(int value)
    Returns the command of a Chassis Control code.
    Returns the enum constant of this type with the specified name.
    static PowerCommand[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PowerDown

      public static final PowerCommand PowerDown
      Force system into soft off (S4/S5) state. This is for 'emergency' management power down actions. The command does not initiate a clean shut-down of the operating system prior to powering down the system.
    • PowerUp

      public static final PowerCommand PowerUp
      Power up the system.
    • PowerCycle

      public static final PowerCommand PowerCycle
      Power cycle (optional): a power off interval of at least 1 second, then power up. When the system is off, the BMC is recommended to do nothing and answer D5h; some power the system up instead. Check the power state first and only cycle a system that is on.
    • HardReset

      public static final PowerCommand HardReset
      Hard reset. In some implementations, the BMC may not know whether a reset will cause any particular effect and will pulse the system reset signal regardless of power state. If the implementation can tell that no action will occur if a reset is delivered in a given power state, then it is recommended (but still optional) that a D5h 'Request parameter(s) not supported in present state.' error completion code be returned.
    • DiagnosticInterrupt

      public static final PowerCommand DiagnosticInterrupt
      Pulse a diagnostic interrupt (optional) that goes directly to the processors, typically to make the operating system write a diagnostic dump: an NMI on IA-32 systems.
    • SoftShutdown

      public static final PowerCommand SoftShutdown
      Initiate a soft shutdown of the operating system via ACPI (optional), by emulating a fatal overtemperature.
  • Method Details

    • values

      public static PowerCommand[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PowerCommand valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      Returns the code of the command in the request data of Chassis Control (IPMI 2.0 table 28-4, byte 1 bits 3:0).
      Returns:
      the code, 0 to 5
    • parseInt

      public static PowerCommand parseInt(int value)
      Returns the command of a Chassis Control code.
      Parameters:
      value - the code, 0 to 5
      Returns:
      the command
      Throws:
      IllegalArgumentException - when the code is not 0 to 5