Class IpmiLanRequest
java.lang.Object
org.metricshub.ipmi.core.coding.payload.IpmiPayload
org.metricshub.ipmi.core.coding.payload.lan.IpmiLanMessage
org.metricshub.ipmi.core.coding.payload.lan.IpmiLanRequest
A wrapper class for IPMB LAN message
-
Field Summary
Fields inherited from class org.metricshub.ipmi.core.coding.payload.lan.IpmiLanMessage
MAX_SEQUENCE_NUMBER, MIN_SEQUENCE_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionIpmiLanRequest(int networkFunctionCode, byte commandCode, byte[] requestData, byte sequenceNumber) Builds IpmiLanRequest addressed at LUN 0, under a network function given by its code, which may be oneNetworkFunctiondoes not list: Transport (0Ch), Group Extension (2Ch: DCMI, PICMG), OEM/Group (2Eh), controller-specific OEM (30h-3Eh), IPMI 2.0 table 5-1.IpmiLanRequest(NetworkFunction networkFunction, byte commandCode, byte[] requestData, byte sequenceNumber) Builds IpmiLanRequest addressed at LUN 0.IpmiLanRequest(NetworkFunction networkFunction, byte commandCode, byte[] requestData, byte sequenceNumber, byte lun) Builds IpmiLanRequest. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Converts IpmiLanMessage to byte array.intGets expected size of LAN message in bytes.Methods inherited from class org.metricshub.ipmi.core.coding.payload.lan.IpmiLanMessage
getCommand, getIpmiCommandData, getNetworkFunction, getNetworkFunctionCode, getRequesterAddress, getRequesterLogicalUnitNumber, getResponderAddress, getResponderLogicalUnitNumber, getSequenceNumber, setCommand, setNetworkFunction, setRequesterAddress, setRequesterLogicalUnitNumber, setResponderAddress, setResponderLogicalUnitNumber, setSequenceNumberMethods inherited from class org.metricshub.ipmi.core.coding.payload.IpmiPayload
encryptPayload, getData, getEncryptedPayload, setData
-
Constructor Details
-
IpmiLanRequest
public IpmiLanRequest(NetworkFunction networkFunction, byte commandCode, byte[] requestData, byte sequenceNumber) Builds IpmiLanRequest addressed at LUN 0.- Parameters:
networkFunction- - command specificNetworkFunctioncommandCode- - command specificCommandCodesrequestData- - command specific payloadsequenceNumber- - used to match request and response - must be in range [0-63]
-
IpmiLanRequest
public IpmiLanRequest(NetworkFunction networkFunction, byte commandCode, byte[] requestData, byte sequenceNumber, byte lun) Builds IpmiLanRequest.- Parameters:
networkFunction- - command specificNetworkFunctioncommandCode- - command specificCommandCodesrequestData- - command specific payloadsequenceNumber- - used to match request and response - must be in range [0-63]lun- - target Logical Unit Number. Must be in range [0-3].
-
IpmiLanRequest
public IpmiLanRequest(int networkFunctionCode, byte commandCode, byte[] requestData, byte sequenceNumber) Builds IpmiLanRequest addressed at LUN 0, under a network function given by its code, which may be oneNetworkFunctiondoes not list: Transport (0Ch), Group Extension (2Ch: DCMI, PICMG), OEM/Group (2Eh), controller-specific OEM (30h-3Eh), IPMI 2.0 table 5-1.- Parameters:
networkFunctionCode- - the network function code of the request, 00h to 3FhcommandCode- - the command coderequestData- - command specific payload, null for nonesequenceNumber- - used to match request and response - must be in range [0-63]- Throws:
IllegalArgumentException- when the code does not fit in 6 bits
-
-
Method Details
-
getPayloadLength
public int getPayloadLength()Description copied from class:IpmiLanMessageGets expected size of LAN message in bytes.- Specified by:
getPayloadLengthin classIpmiLanMessage
-
getPayloadData
public byte[] getPayloadData()Description copied from class:IpmiLanMessageConverts IpmiLanMessage to byte array.- Specified by:
getPayloadDatain classIpmiLanMessage- Returns:
- payload
-