Class Fru

java.lang.Object
org.metricshub.ipmi.client.Fru

public final class Fru extends Object
A Field Replaceable Unit of the system: the board, chassis, product and multirecord areas of its FRU inventory (IPMI Platform Management FRU Information Storage Definition), located by an SDR record. A FRU that could not be read entirely is not complete() and lists its problems().
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the board info area, as the protocol core decodes it.
    Returns the chassis info area, as the protocol core decodes it.
    boolean
    Tells whether the FRU inventory was read and decoded entirely.
    Returns the entity the FRU is part of.
    int
    Returns the instance of the entity the FRU is part of: 1 for the first power supply, 2 for the second one.
    int
    id()
    Returns the FRU device ID, 0 for the FRU of the system board.
    Returns the SDR record that locates the FRU, as the protocol core decodes it.
    Returns the manufacturer, from the product area, or from the board area when the product area does not name it.
    Returns the model, from the product name of the product area, or from the board product name when the product area does not give it.
    Returns the records of the multirecord area (power supply information, DC output, management access...), as the protocol core decodes them.
    Returns the name of the FRU, from the ID string of its locator record.
    Returns the part number: the product model number of the product area, or the board part number when the product area does not give it.
    Returns what went wrong while reading the FRU: a read refused by the BMC (with its completion code), a read without reply, data truncated at an offset, an area that could not be decoded.
    Returns the product info area, as the protocol core decodes it.
    Returns every area and multirecord decoded from the FRU inventory.
    Returns the serial number, from the product area, or from the board area when the product area does not give it.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • id

      public int id()
      Returns the FRU device ID, 0 for the FRU of the system board.
      Returns:
      the device ID
    • name

      public String name()
      Returns the name of the FRU, from the ID string of its locator record.
      Returns:
      the name
    • entity

      public EntityId entity()
      Returns the entity the FRU is part of.
      Returns:
      the entity, EntityId.Other for an OEM entity ID
    • entityInstance

      public int entityInstance()
      Returns the instance of the entity the FRU is part of: 1 for the first power supply, 2 for the second one.
      Returns:
      the entity instance, 0 to 255
    • manufacturer

      public String manufacturer()
      Returns the manufacturer, from the product area, or from the board area when the product area does not name it.
      Returns:
      the manufacturer, empty when neither area names it
    • model

      public String model()
      Returns the model, from the product name of the product area, or from the board product name when the product area does not give it.
      Returns:
      the model, empty when neither area gives it
    • serialNumber

      public String serialNumber()
      Returns the serial number, from the product area, or from the board area when the product area does not give it.
      Returns:
      the serial number, empty when neither area gives it
    • partNumber

      public String partNumber()
      Returns the part number: the product model number of the product area, or the board part number when the product area does not give it.
      Returns:
      the part number, empty when neither area gives it
    • board

      public Optional<BoardInfo> board()
      Returns the board info area, as the protocol core decodes it.
      Returns:
      the board area, empty when the FRU has none or it could not be decoded
    • product

      public Optional<ProductInfo> product()
      Returns the product info area, as the protocol core decodes it.
      Returns:
      the product area, empty when the FRU has none or it could not be decoded
    • chassis

      public Optional<ChassisInfo> chassis()
      Returns the chassis info area, as the protocol core decodes it.
      Returns:
      the chassis area, empty when the FRU has none or it could not be decoded
    • multiRecords

      public List<MultiRecordInfo> multiRecords()
      Returns the records of the multirecord area (power supply information, DC output, management access...), as the protocol core decodes them.
      Returns:
      the multirecords, empty when the FRU has none
    • records

      public List<FruRecord> records()
      Returns every area and multirecord decoded from the FRU inventory.
      Returns:
      the records, in the order of the FRU inventory
    • locator

      public FruDeviceLocatorRecord locator()
      Returns the SDR record that locates the FRU, as the protocol core decodes it.
      Returns:
      the locator record
    • complete

      public boolean complete()
      Tells whether the FRU inventory was read and decoded entirely.
      Returns:
      false when a read failed or an area could not be decoded: problems() says what
    • problems

      public List<String> problems()
      Returns what went wrong while reading the FRU: a read refused by the BMC (with its completion code), a read without reply, data truncated at an offset, an area that could not be decoded.
      Returns:
      the problems, empty when the FRU is complete()
    • toString

      public String toString()
      Overrides:
      toString in class Object