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) Creates newSolCoder.SolCoder(byte[] message, byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, Set<SolOperation> operations) Creates newSolCoder.SolCoder(byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState) Creates newSolCoder.SolCoder(byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, Set<SolOperation> operations) Creates newSolCoder.SolCoder(Set<SolOperation> operations) Creates newSolCoder. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetResponseData(IpmiMessage ipmiMessage) Retrieves payload-specific response data from IPMI messageinthashCode()booleanMethods 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) 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 port
-
SolCoder
public SolCoder(byte[] message) 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 array
-
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.
-
SolCoder
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.NACK
-
SolCoder
public SolCoder(byte ackNackSequenceNumber, byte acceptedCharacters, SolAckState ackState, Set<SolOperation> operations) Creates newSolCoder. Use this constructor for ACK/NACK packet, that only sends ACK/NACK for specific remote message, with the state of the serial lines the console holds.- Parameters:
ackNackSequenceNumber- sequence number of packet that is ACKd/NACKdacceptedCharacters- number of characters accepted from the ACKd/NACKd packetackState- actual acknowledge state -SolAckState.ACKorSolAckState.NACKoperations- the operations of the packet: the serial line states the console holds
-
-
Method Details
-
isAcknowledgeOnly
public boolean isAcknowledgeOnly()- Returns:
- whether the packet only acknowledges a packet of the BMC: it goes out with packet sequence number 0, and the BMC does not acknowledge it
-
getSupportedPayloadType
- Specified by:
getSupportedPayloadTypein classPayloadCoder
-
getResponseData
public ResponseData getResponseData(IpmiMessage ipmiMessage) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoderRetrieves payload-specific response data from IPMI message- Specified by:
getResponseDatain classPayloadCoder- Parameters:
ipmiMessage- - 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()
-