Class ReadFruData
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
org.metricshub.ipmi.core.coding.commands.fru.ReadFruData
A wrapper class for Read FRU Data Command request.
The command returns the specified data from the FRU Inventory Info area.
The command returns the specified data from the FRU Inventory Info area.
-
Constructor Summary
ConstructorsConstructorDescriptionReadFruData
(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. -
Method Summary
Modifier and TypeMethodDescriptiondecodeFruData
(List<ReadFruDataResponseData> fruData) DecodesFruRecord
s from data provided byReadFruData
command.byte
Retrieves command code specific for command represented by this classRetrieves network function specific for command represented by this class.getResponseData
(IpmiMessage message) Retrieves payload-specific response data from IPMI messageMethods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
getSupportedPayloadType, isCommandResponse
Methods inherited from class org.metricshub.ipmi.core.coding.PayloadCoder
encodePayload, getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
-
Constructor Details
-
ReadFruData
Initiates ReadFruData for both encoding and decoding. Sets session parameters to default.- Parameters:
fruId
- - ID of the FRU to get info from. Must be less than 256. To get FRU ID useGetSdr
to retrieveFruDeviceLocatorRecord
.unit
- -BaseUnit
indicating if the FRU device is accessed inBaseUnit.Bytes
orBaseUnit.Words
offset
- - offset to read in units specified by unitcountToRead
- - size of the area to read in unit. Cannot exceed 255;- See Also:
-
ReadFruData
public ReadFruData(IpmiVersion version, CipherSuite cipherSuite, AuthenticationType authenticationType, int fruId, BaseUnit unit, int offset, int countToRead) Initiates ReadFruData for both encoding and decoding.- Parameters:
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 useGetSdr
to retrieveFruDeviceLocatorRecord
.unit
- -BaseUnit
indicating if the FRU device is accessed inBaseUnit.Bytes
orBaseUnit.Words
offset
- - offset to read in units specified by unitcountToRead
- - size of the area to read in unit. Cannot exceed 255;
-
-
Method Details
-
getCommandCode
public byte getCommandCode()Description copied from class:IpmiCommandCoder
Retrieves command code specific for command represented by this class- Specified by:
getCommandCode
in classIpmiCommandCoder
- Returns:
- command code
-
getNetworkFunction
Description copied from class:IpmiCommandCoder
Retrieves network function specific for command represented by this class.- Specified by:
getNetworkFunction
in classIpmiCommandCoder
- Returns:
- network function
- See Also:
-
getResponseData
public ResponseData getResponseData(IpmiMessage message) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoder
Retrieves payload-specific response data from IPMI message- Specified by:
getResponseData
in 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
-
decodeFruData
DecodesFruRecord
s from data provided byReadFruData
command. Size of the FRU Inventory Area might exceed size of the communication packet so it might come in manyReadFruDataResponseData
packets.- Parameters:
fruData
- - list ofReadFruDataResponseData
containing FRU data- Returns:
- list of
FruRecord
s containing decoded FRU data.
-