Class SetSessionPrivilegeLevel
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder<SetSessionPrivilegeLevelResponseData>
org.metricshub.ipmi.core.coding.commands.session.SetSessionPrivilegeLevel
public class SetSessionPrivilegeLevel
extends IpmiCommandCoder<SetSessionPrivilegeLevelResponseData>
Wrapper class for Set Session Privilege Level command
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCompletion code: the requested level exceeds the privilege limit of the channel or of the user.static final intCompletion code: the requested level is not available for this user (IPMI 2.0 table 22-24). -
Constructor Summary
ConstructorsConstructorDescriptionSetSessionPrivilegeLevel(PrivilegeLevel privilegeLevel) InitiatesSetSessionPrivilegeLevelfor encoding and decoding -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdescribeRefusal(IPMIException refusal) Says why the BMC refused the level: the meaning of the command-specific completion codes of Set Session Privilege Level (IPMI 2.0 table 22-24), or the message of the error reply for the other codes, then the code.byteRetrieves command code specific for command represented by this classRetrieves network function specific for command represented by this class.Returns the level the command requests.getResponseData(IpmiMessage message) Retrieves payload-specific response data from IPMI messageMethods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
answers, getNetworkFunctionCode, getSupportedPayloadType, isCommandResponseMethods inherited from class org.metricshub.ipmi.core.coding.PayloadCoder
encodePayload, getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
-
Field Details
-
LEVEL_NOT_AVAILABLE
public static final int LEVEL_NOT_AVAILABLECompletion code: the requested level is not available for this user (IPMI 2.0 table 22-24).- See Also:
-
LEVEL_ABOVE_LIMIT
public static final int LEVEL_ABOVE_LIMITCompletion code: the requested level exceeds the privilege limit of the channel or of the user.- See Also:
-
-
Constructor Details
-
SetSessionPrivilegeLevel
InitiatesSetSessionPrivilegeLevelfor encoding and decoding- Parameters:
privilegeLevel- - RequestedPrivilegeLevelto acquire. Can not be higher than level declared during starting session.
-
-
Method Details
-
describeRefusal
Says why the BMC refused the level: the meaning of the command-specific completion codes of Set Session Privilege Level (IPMI 2.0 table 22-24), or the message of the error reply for the other codes, then the code.- Parameters:
refusal- the error reply- Returns:
- the reason, ending with the completion code in hexadecimal
-
getPrivilegeLevel
Returns the level the command requests.- Returns:
- the privilege level,
PrivilegeLevel.MaximumAvailablewhen the command only returns the present level of the session
-
getCommandCode
public byte getCommandCode()Description copied from class:IpmiCommandCoderRetrieves command code specific for command represented by this class- Specified by:
getCommandCodein classIpmiCommandCoder<SetSessionPrivilegeLevelResponseData>- Returns:
- command code
-
getNetworkFunction
Description copied from class:IpmiCommandCoderRetrieves network function specific for command represented by this class.- Specified by:
getNetworkFunctionin classIpmiCommandCoder<SetSessionPrivilegeLevelResponseData>- Returns:
- network function, or null for a command of a network function
NetworkFunctiondoes not list, which overridesIpmiCommandCoder.getNetworkFunctionCode()instead - See Also:
-
getResponseData
public SetSessionPrivilegeLevelResponseData getResponseData(IpmiMessage message) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoderRetrieves payload-specific response data from IPMI message- Specified by:
getResponseDatain classIpmiCommandCoder<SetSessionPrivilegeLevelResponseData>- Parameters:
message- - IPMI message- Returns:
- response data
- Throws:
IPMIException- when response completion code isn't OK.NoSuchAlgorithmException- when authentication, confidentiality or integrity algorithm fails.InvalidKeyException- when creating of the authentication algorithm key fails
-