Package org.metricshub.ipmi.core.coding
Class Decoder
java.lang.Object
org.metricshub.ipmi.core.coding.Decoder
Decodes RMCP packet into
ResponseData
.-
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseData
decode
(byte[] data, IpmiDecoder protocolDecoder, PayloadCoder payloadCoder) Decodes raw data intoResponseData
- a wrapper class for message-specific response data.
-
Method Details
-
decode
public static ResponseData decode(byte[] data, IpmiDecoder protocolDecoder, PayloadCoder payloadCoder) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Decodes raw data intoResponseData
- a wrapper class for message-specific response data.- Parameters:
data
- - raw RMCP packet to be decodedprotocolDecoder
- - instance ofIpmiDecoder
class for decoding of the IPMI session header and (if present) IPMI LAN packet. If IPMI LAN packet is present,Protocolv15Decoder
orProtocolv20Decoder
should be used (depending on IPMI protocol version used). Otherwise,PlainCommandv20Decoder
should be used.payloadCoder
- - instance ofPayloadCoder
class used for wrapping payload into message-dependentResponseData
object.- Returns:
ResponseData
- Throws:
IPMIException
- when request to the server fails.IllegalArgumentException
- when data is corruptedNoSuchAlgorithmException
- - when authentication, confidentiality or integrity algorithm fails.InvalidKeyException
- when creating of the authentication algorithm key fails- See Also:
-