Class LhmSensor

java.lang.Object
oshi.driver.common.windows.wmi.LhmSensor

@ThreadSafe public class LhmSensor extends Object
Constants, property enums, and WHERE clause builders for LibreHardwareMonitor WMI sensor data.

LHM publishes sensor data to ROOT\LibreHardwareMonitor when it is running. This class provides the shared constants and query builders for the Sensor and Hardware tables.

  • Field Details

  • Constructor Details

    • LhmSensor

      protected LhmSensor()
      Default constructor.
  • Method Details

    • buildSensorWmiClassNameWithWhere

      public static String buildSensorWmiClassNameWithWhere(String parent, String sensorType)
      Builds the WMI class name with WHERE clause for sensor queries.
      Parameters:
      parent - the LHM hardware identifier (e.g. /gpu-nvidia/0)
      sensorType - the sensor type string (e.g. "Load", "SmallData")
      Returns:
      the WMI class name with WHERE clause
    • buildGpuHardwareWmiClassName

      public static String buildGpuHardwareWmiClassName()
      Builds the WMI class name with WHERE clause for GPU hardware queries.
      Returns:
      the WMI class name with WHERE clause filtering GPU hardware types
    • querySensors

      public static WmiResult<LhmSensor.LhmSensorProperty> querySensors(WmiQueryExecutor h, String parent, String sensorType)
      Queries all sensors of a given type belonging to a specific hardware parent.
      Parameters:
      h - An instantiated WmiQueryExecutor.
      parent - the LHM hardware identifier (e.g. /gpu-nvidia/0)
      sensorType - the sensor type string (e.g. "Load", "SmallData")
      Returns:
      WMI result containing NAME, VALUE, and PARENT columns
    • queryGpuHardware

      public static WmiResult<LhmSensor.LhmHardwareProperty> queryGpuHardware(WmiQueryExecutor h)
      Queries all GPU hardware entries from LHM to discover parent identifiers.
      Parameters:
      h - An instantiated WmiQueryExecutor.
      Returns:
      WMI result with IDENTIFIER and NAME columns for all GPU hardware entries