Package oshi.driver.windows
Class DeviceTree
java.lang.Object
oshi.driver.windows.DeviceTree
Utility to query device interfaces via Config Manager Device Tree functions
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
getDevNodeProperty
(int node, int cmDrp, com.sun.jna.Memory buf, com.sun.jna.ptr.IntByReference size) static Quintet
<Set<Integer>, Map<Integer, Integer>, Map<Integer, String>, Map<Integer, String>, Map<Integer, String>> queryDeviceTree
(com.sun.jna.platform.win32.Guid.GUID guidDevInterface) Queries devices matching the specified device interface and returns maps representing device tree relationships, name, device ID, and manufacturer
-
Field Details
-
MAX_PATH
private static final int MAX_PATH- See Also:
-
SA
private static final com.sun.jna.platform.win32.SetupApi SA -
C32
private static final com.sun.jna.platform.win32.Cfgmgr32 C32
-
-
Constructor Details
-
DeviceTree
private DeviceTree()
-
-
Method Details
-
queryDeviceTree
public static Quintet<Set<Integer>,Map<Integer, queryDeviceTreeInteger>, Map<Integer, String>, Map<Integer, String>, Map<Integer, String>> (com.sun.jna.platform.win32.Guid.GUID guidDevInterface) Queries devices matching the specified device interface and returns maps representing device tree relationships, name, device ID, and manufacturer- Parameters:
guidDevInterface
- The GUID of a device interface class for which the tree should be collected.- Returns:
- A
Quintet
of maps indexed by node ID, where the key set represents node IDs for all devices matching the specified device interface GUID. The first element is a set containing devices with no parents, match the device interface requested.. The second element maps each node ID to its parents, if any. This map's key set excludes the no-parent devices returned in the first element. The third element maps a node ID to a name or description. The fourth element maps a node id to a device ID. The fifth element maps a node ID to a manufacturer.
-
getDevNodeProperty
private static String getDevNodeProperty(int node, int cmDrp, com.sun.jna.Memory buf, com.sun.jna.ptr.IntByReference size)
-