public class ReadFruData extends IpmiCommandCoder
Constructor and Description |
---|
ReadFruData(int fruId,
BaseUnit unit,
int offset,
int countToRead)
Initiates ReadFruData for both encoding and decoding.
|
ReadFruData(IpmiVersion version,
CipherSuite cipherSuite,
AuthenticationType authenticationType,
int fruId,
BaseUnit unit,
int offset,
int countToRead)
Initiates ReadFruData for both encoding and decoding.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<FruRecord> |
decodeFruData(java.util.List<ReadFruDataResponseData> fruData)
Decodes
FruRecord s from data provided by ReadFruData
command. |
byte |
getCommandCode()
Retrieves command code specific for command represented by this class
|
NetworkFunction |
getNetworkFunction()
Retrieves network function specific for command represented by this
class.
|
ResponseData |
getResponseData(IpmiMessage message)
Retrieves command-specific response data from IPMI message
|
encodeCommand, getAuthenticationType, getCipherSuite, getIpmiVersion, isCommandResponse, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
public ReadFruData(int fruId, BaseUnit unit, int offset, int countToRead)
fruId
- - ID of the FRU to get info from. Must be less than 256. To
get FRU ID use GetSdr
to retrieve
FruDeviceLocatorRecord
.unit
- - BaseUnit
indicating if the FRU device is accessed in
BaseUnit.Bytes
or BaseUnit.Words
offset
- - offset to read in units specified by unitcountToRead
- - size of the area to read in unit. Cannot exceed 255;IpmiCommandCoder.setSessionParameters(IpmiVersion, CipherSuite,
AuthenticationType)
public ReadFruData(IpmiVersion version, CipherSuite cipherSuite, AuthenticationType authenticationType, int fruId, BaseUnit unit, int offset, int countToRead)
version
- - IPMI version of the command.cipherSuite
- - CipherSuite
containing authentication,
confidentiality and integrity algorithms for this session.authenticationType
- - Type of authentication used. Must be RMCPPlus for IPMI v2.0.fruId
- - ID of the FRU to get info from. Must be less than 256. To
get FRU ID use GetSdr
to retrieve
FruDeviceLocatorRecord
.unit
- - BaseUnit
indicating if the FRU device is accessed in
BaseUnit.Bytes
or BaseUnit.Words
offset
- - offset to read in units specified by unitcountToRead
- - size of the area to read in unit. Cannot exceed 255;public byte getCommandCode()
IpmiCommandCoder
getCommandCode
in class IpmiCommandCoder
public NetworkFunction getNetworkFunction()
IpmiCommandCoder
getNetworkFunction
in class IpmiCommandCoder
NetworkFunction
public ResponseData getResponseData(IpmiMessage message) throws java.lang.IllegalArgumentException, IPMIException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
IpmiCommandCoder
getResponseData
in class IpmiCommandCoder
message
- - IPMI messagejava.lang.IllegalArgumentException
- when message is not a response for class-specific command or
response has invalid length.IPMIException
- when response completion code isn't OK.java.security.NoSuchAlgorithmException
- when authentication, confidentiality or integrity algorithm
fails.java.security.InvalidKeyException
- when creating of the authentication algorithm key failspublic static java.util.List<FruRecord> decodeFruData(java.util.List<ReadFruDataResponseData> fruData)
FruRecord
s from data provided by ReadFruData
command. Size of the FRU Inventory Area might exceed size of the
communication packet so it might come in many
ReadFruDataResponseData
packets.fruData
- - list of ReadFruDataResponseData
containing FRU dataFruRecord
s containing decoded FRU data.