public final class Encoder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
encode(IpmiEncoder protcolEncoder,
IpmiCommandCoder commandCoder,
int sequenceNumber,
int sessionId)
Encodes IPMI command specified by commandCoder into byte array raw data.
|
public static byte[] encode(IpmiEncoder protcolEncoder, IpmiCommandCoder commandCoder, int sequenceNumber, int sessionId) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
protcolEncoder
- - instance of IpmiEncoder
class for encoding of the
IPMI session header. Protocolv15Decoder
or
Protocolv20Decoder
should be used (depending on IPMI
protocol version used).commandCoder
- - instance of IpmiCommandCoder
class used for building
IPMI message payload.sequenceNumber
- - A generated sequence number used for matching request and
response. If IPMI message is sent in a session, it is used as
a Session Sequence Number. For all IPMI messages,
sequenceNumber % 256 is used as a IPMI LAN Message sequence
number and as an IPMI payload message tag.sessionId
- - ID of the managed system's session message is being sent in.
For sessionless commands should be set to 0.java.security.NoSuchAlgorithmException
- - when authentication, confidentiality or integrity algorithm
fails.java.security.InvalidKeyException
- - when creating of the algorithm key fails