Class SensorsRequest

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

public final class SensorsRequest extends Object
Reads the sensors of the BMC: the Full and Compact sensor records of the SDR repository, each with its Get Sensor Reading. The selection is applied before the readings are requested, so that an unselected sensor costs no round trip.
  • Method Details

    • types

      public SensorsRequest types(SensorType... sensorTypes)
      Reads only the sensors of the given types.
      Parameters:
      sensorTypes - the types to read
      Returns:
      this request
    • names

      public SensorsRequest names(String... globs)
      Reads only the sensors whose name matches one of the given patterns, case-insensitively: * matches any characters and ? one character ("CPU? Temp", "*Fan*").
      Parameters:
      globs - the name patterns
      Returns:
      this request
    • timeout

      public SensorsRequest timeout(Duration deadline)
      Overrides the deadline of the client for this request.
      Parameters:
      deadline - the time the request may take, session setup included
      Returns:
      this request
    • execute

      public SensorList execute()
      Reads the selected sensors.
      Returns:
      the sensors, in the order of the SDR repository
      Throws:
      IpmiClientException - when the repository or a reading cannot be read