public class WmiUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
OHM_NAMESPACE
The namespace where Open Hardware Monitor publishes to WMI,
OHM_NAMESPACE="ROOT\\OpenHardwareMonitor". |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Enum<T>> |
getDateString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Date value from a WmiResult as a String in ISO 8601 format
|
static <T extends Enum<T>> |
getDateTime(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a DateTime value from a WmiResult as an OffsetDateTime
|
static <T extends Enum<T>> |
getFloat(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Float value from a WmiResult
|
static <T extends Enum<T>> |
getRefString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Reference value from a WmiResult as a String
|
static <T extends Enum<T>> |
getSint32(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Sint32 value from a WmiResult.
|
static <T extends Enum<T>> |
getString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a String value from a WmiResult
|
static <T extends Enum<T>> |
getUint16(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Uint16 value from a WmiResult.
|
static <T extends Enum<T>> |
getUint32(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets an UINT32 value from a WmiResult.
|
static <T extends Enum<T>> |
getUint32asLong(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets an UINT32 value from a WmiResult as a long, preserving the unsignedness.
|
static <T extends Enum<T>> |
getUint64(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result,
T property,
int index)
Gets a Uint64 value from a WmiResult (parsing the String).
|
static <T extends Enum<T>> |
queryToString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery<T> query)
Translate a WmiQuery to the actual query string
|
public static final String OHM_NAMESPACE
OHM_NAMESPACE="ROOT\\OpenHardwareMonitor". This namespace is not
built-in to WMI, so if OHM is not running would result in unnecessary log
messages.public static <T extends Enum<T>> String queryToString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery<T> query)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.query - The WmiQuery objectpublic static <T extends Enum<T>> String getString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> String getDateString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> OffsetDateTime getDateTime(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchBuilder.UNIX_EPOCHpublic static <T extends Enum<T>> String getRefString(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> long getUint64(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> int getUint32(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> long getUint32asLong(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> int getSint32(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> int getUint16(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchpublic static <T extends Enum<T>> float getFloat(com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<T> result, T property, int index)
T - WMI queries use an Enum to identify the fields to query, and use
the enum values as keys to retrieve the results.result - The WmiResult from which to fetch the valueproperty - The property (column) to fetchindex - The index (row) to fetchCopyright © 2019. All rights reserved.