Class SolCoder
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.sol.SolCoder
Implementation of
PayloadCoder for payload type PayloadType.Sol.
This coder is used during exchanging SOL messages between BMC and application.-
Constructor Summary
ConstructorsConstructorDescriptionSolCoder(byte[] message, byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, Set<SolOperation> operations, CipherSuite cipherSuite) Creates newSolCoder.SolCoder(byte[] message, CipherSuite cipherSuite) Creates newSolCoder.SolCoder(byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, CipherSuite cipherSuite) Creates newSolCoder.SolCoder(Set<SolOperation> operations, CipherSuite cipherSuite) Creates newSolCoder. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetResponseData(IpmiMessage message) Retrieves payload-specific response data from IPMI messageinthashCode()Methods inherited from class org.metricshub.ipmi.core.coding.PayloadCoder
encodePayload, getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
-
Constructor Details
-
SolCoder
public SolCoder(byte[] message, byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, Set<SolOperation> operations, CipherSuite cipherSuite) Creates newSolCoder. Use this constructor if you want to send character data, operations and ACK/NACK in single packet.- Parameters:
message- data to send as byte arrayackNackSequenceNumber- sequence number of packet that is ACKd/NACKdacceptedCharacters- number of characters accepted from the ACKd/NACKd packetackState- actual acknowledge state -SolAckState.ACKorSolAckState.NACKoperations- set of operations to invoke on remote serial portcipherSuite-CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session
-
SolCoder
Creates newSolCoder. Use this constructor for character data only packets (no ACK/NACK and no operations will be sent).- Parameters:
message- data to send as byte arraycipherSuite-CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session.
-
SolCoder
Creates newSolCoder. Use this constructor for packets that should only invoke operations on remote serial port.- Parameters:
operations- set of operations to invoke on remote serial port.cipherSuite-CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session
-
SolCoder
public SolCoder(byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, CipherSuite cipherSuite) Creates newSolCoder. Use this constructor for ACK/NACK packet, that only sends ACK/NACK for specific remote message.- Parameters:
ackNackSequenceNumber- sequence number of packet that is ACKd/NACKdacceptedCharacters- number of characters accepted from the ACKd/NACKd packetackState- actual acknowledge state -SolAckState.ACKorSolAckState.NACKcipherSuite-CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session.
-
-
Method Details
-
getSupportedPayloadType
- Specified by:
getSupportedPayloadTypein classPayloadCoder
-
getResponseData
public ResponseData getResponseData(IpmiMessage message) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoderRetrieves payload-specific response data from IPMI message- Specified by:
getResponseDatain classPayloadCoder- 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
-
equals
-
hashCode
public int hashCode()
-