Class LhmSensor
java.lang.Object
oshi.driver.common.windows.wmi.LhmSensor
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLHM Hardware properties.static enumSensor properties returned by LHM WMI queries. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilds the WMI class name with WHERE clause for GPU hardware queries.static StringbuildSensorWmiClassNameWithWhere(String parent, String sensorType) Builds the WMI class name with WHERE clause for sensor queries.Queries all GPU hardware entries from LHM to discover parent identifiers.static WmiResult<LhmSensor.LhmSensorProperty> querySensors(WmiQueryExecutor h, String parent, String sensorType) Queries all sensors of a given type belonging to a specific hardware parent.
-
Field Details
-
LHM_NAMESPACE
-
SENSOR
-
HARDWARE
-
-
Constructor Details
-
LhmSensor
protected LhmSensor()Default constructor.
-
-
Method Details
-
buildSensorWmiClassNameWithWhere
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
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 instantiatedWmiQueryExecutor.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
Queries all GPU hardware entries from LHM to discover parent identifiers.- Parameters:
h- An instantiatedWmiQueryExecutor.- Returns:
- WMI result with IDENTIFIER and NAME columns for all GPU hardware entries
-