Class GetChassisStatusResponseData
java.lang.Object
org.metricshub.ipmi.core.coding.commands.chassis.GetChassisStatusResponseData
- All Implemented Interfaces:
ResponseData
The reply to Get Chassis Status (IPMI 2.0 table 28-3): the current power state, the last power event, the
miscellaneous chassis state and, when the BMC sends it, the front panel button capabilities. The byte numbers below
are those of the table, where byte 1 is the completion code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe message of theIllegalAccessExceptionthat the front panel button getters throw when the reply has no front panel button capabilities byte. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty reply, without front panel button capabilities. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacFailed()Tells whether the AC failed (byte 3 bit 0).booleanTells whether a cooling or fan fault was detected (byte 4 bit 3).booleanTells whether a drive fault was detected (byte 4 bit 2).Returns the state of the chassis identify (byte 4 bits 5:4), which the BMC reports when it supports the Chassis Identify command and its state (isChassisIdentifyCommandSupported()).byteReturns the current power state byte as the BMC sent it (byte 2), which the power getters below decode.byteReturns the front panel button capabilities byte as the BMC sent it (byte 5, optional).byteReturns the last power event byte as the BMC sent it (byte 3).byteReturns the miscellaneous chassis state byte as the BMC sent it (byte 4).Returns the power restore policy: what the chassis does when AC power returns (byte 2 bits 6:5).booleanTells whether the BMC supports the Chassis Identify command and reports its state (byte 4 bit 6).booleanTells whether a chassis intrusion is active (byte 4 bit 0).booleanTells whether the diagnostic interrupt button can be disabled (byte 5 bit 6).booleanTells whether the diagnostic interrupt button is disabled (byte 5 bit 2).booleanTells whether the reply has the optional front panel button capabilities byte (byte 5): the front panel button getters throwIllegalAccessExceptionwhen it does not.booleanTells whether the front panel lockout is active: power off and reset with the chassis push-buttons are disabled (byte 4 bit 1).booleanTells whether the chassis is shut down because a chassis panel interlock switch is active (byte 2 bit 2).booleanTells whether the controller attempted to turn the system power on or off and the system did not enter the desired state (byte 2 bit 4).booleanTells whether a fault was detected in the main power subsystem (byte 2 bit 3).booleanTells whether the power off button can be disabled (byte 5 bit 4).booleanTells whether the power off button is disabled (byte 5 bit 0).booleanTells whether the system power is on (byte 2 bit 0).booleanTells whether the system was shut down because of a power overload (byte 2 bit 1).booleanTells whether the reset button can be disabled (byte 5 bit 5).booleanTells whether the reset button is disabled (byte 5 bit 1).booleanTells whether the standby (sleep) button can be disabled (byte 5 bit 7).booleanTells whether the standby (sleep) button is disabled (byte 5 bit 3).voidsetCurrentPowerState(byte currentPowerState) Sets the current power state byte.voidsetFrontPanelButtonCapabilities(byte frontPanelButtonCapabilities) Sets the front panel button capabilities byte, which makes the front panel button getters available.voidsetLastPowerEvent(byte lastPowerEvent) Sets the last power event byte.voidsetMiscChassisState(byte miscChassisState) Sets the miscellaneous chassis state byte.booleanTells whether the last power down was caused by a power interlock being activated (byte 3 bit 2).booleanTells whether the last 'Power is on' state was entered with an IPMI command (byte 3 bit 4).booleanTells whether the last power down was caused by a power fault (byte 3 bit 3).booleanTells whether the last power down was caused by a power overload (byte 3 bit 1).
-
Field Details
-
FRONT_PANEL_BUTTON_CAPABILITIES_NOT_SET_MESSAGE
The message of theIllegalAccessExceptionthat the front panel button getters throw when the reply has no front panel button capabilities byte.- See Also:
-
-
Constructor Details
-
GetChassisStatusResponseData
public GetChassisStatusResponseData()Creates an empty reply, without front panel button capabilities.
-
-
Method Details
-
setCurrentPowerState
public void setCurrentPowerState(byte currentPowerState) Sets the current power state byte.- Parameters:
currentPowerState- the current power state byte (byte 2)
-
getCurrentPowerState
public byte getCurrentPowerState()Returns the current power state byte as the BMC sent it (byte 2), which the power getters below decode.- Returns:
- the current power state byte
-
getPowerRestorePolicy
Returns the power restore policy: what the chassis does when AC power returns (byte 2 bits 6:5).- Returns:
- the power restore policy,
PowerRestorePolicy.Unknownfor 11b
-
isPowerControlFault
public boolean isPowerControlFault()Tells whether the controller attempted to turn the system power on or off and the system did not enter the desired state (byte 2 bit 4).- Returns:
- True when controller attempted to turn system power on or off, but system did not enter desired state
-
isPowerFault
public boolean isPowerFault()Tells whether a fault was detected in the main power subsystem (byte 2 bit 3).- Returns:
- True when fault was detected in main power subsystem.
-
isInterlock
public boolean isInterlock()Tells whether the chassis is shut down because a chassis panel interlock switch is active (byte 2 bit 2).- Returns:
- True when interlock was detected (chassis is presently shut down because a chassis panel interlock switch is active)
-
isPowerOverload
public boolean isPowerOverload()Tells whether the system was shut down because of a power overload (byte 2 bit 1).- Returns:
- True when system was shut down because of power overload condition.
-
isPowerOn
public boolean isPowerOn()Tells whether the system power is on (byte 2 bit 0).- Returns:
- True when system power is on.
-
setLastPowerEvent
public void setLastPowerEvent(byte lastPowerEvent) Sets the last power event byte.- Parameters:
lastPowerEvent- the last power event byte (byte 3)
-
getLastPowerEvent
public byte getLastPowerEvent()Returns the last power event byte as the BMC sent it (byte 3).- Returns:
- the last power event byte
-
wasIpmiPowerOn
public boolean wasIpmiPowerOn()Tells whether the last 'Power is on' state was entered with an IPMI command (byte 3 bit 4).- Returns:
- True when last 'Power is on' state was entered via IPMI command.
-
wasPowerFault
public boolean wasPowerFault()Tells whether the last power down was caused by a power fault (byte 3 bit 3).- Returns:
- True if last power down caused by power fault.
-
wasInterlock
public boolean wasInterlock()Tells whether the last power down was caused by a power interlock being activated (byte 3 bit 2).- Returns:
- True if last power down caused by a power interlock being activated.
-
wasPowerOverload
public boolean wasPowerOverload()Tells whether the last power down was caused by a power overload (byte 3 bit 1).- Returns:
- True if last power down caused by a Power overload.
-
acFailed
public boolean acFailed()Tells whether the AC failed (byte 3 bit 0).- Returns:
- True if AC failed.
-
setMiscChassisState
public void setMiscChassisState(byte miscChassisState) Sets the miscellaneous chassis state byte.- Parameters:
miscChassisState- the miscellaneous chassis state byte (byte 4)
-
getMiscChassisState
public byte getMiscChassisState()Returns the miscellaneous chassis state byte as the BMC sent it (byte 4).- Returns:
- the miscellaneous chassis state byte
-
isChassisIdentifyCommandSupported
public boolean isChassisIdentifyCommandSupported()Tells whether the BMC supports the Chassis Identify command and reports its state (byte 4 bit 6).- Returns:
- True if Chassis Identify command and state info supported.
-
getChassisIdentifyState
Returns the state of the chassis identify (byte 4 bits 5:4), which the BMC reports when it supports the Chassis Identify command and its state (isChassisIdentifyCommandSupported()).- Returns:
- the chassis identify state,
ChassisIdentifyState.Unknownfor the reserved value 11b - Throws:
IllegalStateException- when the BMC does not report the state (isChassisIdentifyCommandSupported()is false)
-
coolingFaultDetected
public boolean coolingFaultDetected()Tells whether a cooling or fan fault was detected (byte 4 bit 3).- Returns:
- True if cooling or fan fault was detected.
-
driveFaultDetected
public boolean driveFaultDetected()Tells whether a drive fault was detected (byte 4 bit 2).- Returns:
- True if drive fault was detected.
-
isFrontPanelLockoutActive
public boolean isFrontPanelLockoutActive()Tells whether the front panel lockout is active: power off and reset with the chassis push-buttons are disabled (byte 4 bit 1).- Returns:
- True if Front Panel Lockout active (power off and reset via chassis push-buttons disabled.).
-
isChassisIntrusionActive
public boolean isChassisIntrusionActive()Tells whether a chassis intrusion is active (byte 4 bit 0).- Returns:
- True if Chassis intrusion is active.
-
setFrontPanelButtonCapabilities
public void setFrontPanelButtonCapabilities(byte frontPanelButtonCapabilities) Sets the front panel button capabilities byte, which makes the front panel button getters available.- Parameters:
frontPanelButtonCapabilities- the front panel button capabilities byte (byte 5)
-
getFrontPanelButtonCapabilities
public byte getFrontPanelButtonCapabilities()Returns the front panel button capabilities byte as the BMC sent it (byte 5, optional).- Returns:
- the front panel button capabilities byte, 0 when the reply has none
(
isFrontPanelButtonCapabilitiesSet())
-
isStandbyButtonDisableAllowed
Tells whether the standby (sleep) button can be disabled (byte 5 bit 7).- Returns:
- Standby (sleep) button disable is allowed.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isDiagnosticInterruptButtonDisableAllowed
Tells whether the diagnostic interrupt button can be disabled (byte 5 bit 6).- Returns:
- Diagnostic Interrupt button disable is allowed.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isResetButtonDisableAllowed
Tells whether the reset button can be disabled (byte 5 bit 5).- Returns:
- Reset button disable is allowed.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isPowerOffButtonDisableAllowed
Tells whether the power off button can be disabled (byte 5 bit 4).- Returns:
- Power off button disable allowed (in the case there is a single combined power/standby (sleep) button, disabling power off also disables sleep requests via that button.)
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isStandbyButtonDisabled
Tells whether the standby (sleep) button is disabled (byte 5 bit 3).- Returns:
- Standby (sleep) button disabled.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isDiagnosticInterruptButtonDisabled
Tells whether the diagnostic interrupt button is disabled (byte 5 bit 2).- Returns:
- Diagnostic Interrupt button disabled.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isResetButtonDisabled
Tells whether the reset button is disabled (byte 5 bit 1).- Returns:
- Reset button disabled.
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isPowerOffButtonDisabled
Tells whether the power off button is disabled (byte 5 bit 0).- Returns:
- Power off button disabled (in the case there is a single combined power/standby (sleep) button, the sleep requests of that button are also disabled.)
- Throws:
IllegalAccessException- when Front Panel Button Capabilities wasn't set.
-
isFrontPanelButtonCapabilitiesSet
public boolean isFrontPanelButtonCapabilitiesSet()Tells whether the reply has the optional front panel button capabilities byte (byte 5): the front panel button getters throwIllegalAccessExceptionwhen it does not.- Returns:
- whether the reply has the front panel button capabilities byte
-