Class ReadFruData
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder<ReadFruDataResponseData>
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, addressed to LUN 0.ReadFruData(int fruId, BaseUnit unit, int offset, int countToRead, int lun) Initiates ReadFruData for both encoding and decoding. -
Method Summary
Modifier and TypeMethodDescriptiondecodeFruData(List<ReadFruDataResponseData> fruData) DecodesFruRecords from data provided byReadFruDatacommand.decodeFruData(List<ReadFruDataResponseData> fruData, List<String> problems) Decodes the FRU data read in chunks, reporting the areas and records it had to skip.byteRetrieves 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
answers, getNetworkFunctionCode, getSupportedPayloadType, isCommandResponseMethods 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, addressed to LUN 0.- Parameters:
fruId- - ID of the FRU to get info from. Must be less than 256. To get FRU ID useGetSdrto retrieveFruDeviceLocatorRecord.unit- -BaseUnitindicating if the FRU device is accessed inBaseUnit.BytesorBaseUnit.Wordsoffset- - offset to read, in bytes (sent in words when the device is word-addressed, so it must be even then)countToRead- - number of bytes to read. Cannot exceed 255;
-
ReadFruData
Initiates ReadFruData for both encoding and decoding.- Parameters:
fruId- - ID of the FRU to get info from. Must be less than 256.unit- -BaseUnitindicating if the FRU device is accessed inBaseUnit.BytesorBaseUnit.Wordsoffset- - offset to read, in bytes (sent in words when the device is word-addressed, so it must be even then)countToRead- - number of bytes to read. Cannot exceed 255;lun- the LUN of the FRU device, the access LUN of its FRU Device Locator record (IPMI 2.0 table 43-7), 0 to 3- Throws:
IllegalArgumentException- when the count or the FRU ID exceeds 255, or the LUN is not 0 to 3
-
-
Method Details
-
getCommandCode
public byte getCommandCode()Description copied from class:IpmiCommandCoderRetrieves command code specific for command represented by this class- Specified by:
getCommandCodein classIpmiCommandCoder<ReadFruDataResponseData>- Returns:
- command code
-
getNetworkFunction
Description copied from class:IpmiCommandCoderRetrieves network function specific for command represented by this class.- Specified by:
getNetworkFunctionin classIpmiCommandCoder<ReadFruDataResponseData>- Returns:
- network function, or null for a command of a network function
NetworkFunctiondoes not list, which overridesIpmiCommandCoder.getNetworkFunctionCode()instead - See Also:
-
getResponseData
public ReadFruDataResponseData getResponseData(IpmiMessage message) throws IPMIException, NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoderRetrieves payload-specific response data from IPMI message- Specified by:
getResponseDatain classIpmiCommandCoder<ReadFruDataResponseData>- 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
DecodesFruRecords from data provided byReadFruDatacommand. Size of the FRU Inventory Area might exceed size of the communication packet so it might come in manyReadFruDataResponseDatapackets.- Parameters:
fruData- - list ofReadFruDataResponseDatacontaining FRU data- Returns:
- list of
FruRecords containing decoded FRU data.
-
decodeFruData
public static List<FruRecord> decodeFruData(List<ReadFruDataResponseData> fruData, List<String> problems) Decodes the FRU data read in chunks, reporting the areas and records it had to skip.- Parameters:
fruData- the chunks of the FRU data, in orderproblems- receives a message for each area or multirecord that was skipped: beyond or truncated by the data read, or impossible to decode- Returns:
- the records of the chassis, board and product areas and of the multirecord area that could be decoded,
or the single
SpdInfoof a memory module whose FRU device returns its SPD data, or the singlePiromInfoof a processor whose FRU device returns its Processor Information ROM - Throws:
IllegalArgumentException- when the common header is missing, of an unknown format or corrupt, or when the SPD data or the Processor Information ROM is of a revision the library does not decode or is truncated
-