Class DeviceTree


  • @ThreadSafe
    public final class DeviceTree
    extends java.lang.Object
    Utility to query device interfaces via Config Manager Device Tree functions
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static com.sun.jna.platform.win32.Cfgmgr32 C32  
      private static int MAX_PATH  
      private static com.sun.jna.platform.win32.SetupApi SA  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DeviceTree()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String getDevNodeProperty​(int node, int cmDrp, com.sun.jna.Memory buf, com.sun.jna.ptr.IntByReference size)  
      static Quintet<java.util.Set<java.lang.Integer>,​java.util.Map<java.lang.Integer,​java.lang.Integer>,​java.util.Map<java.lang.Integer,​java.lang.String>,​java.util.Map<java.lang.Integer,​java.lang.String>,​java.util.Map<java.lang.Integer,​java.lang.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SA

        private static final com.sun.jna.platform.win32.SetupApi SA
      • C32

        private static final com.sun.jna.platform.win32.Cfgmgr32 C32
    • Constructor Detail

      • DeviceTree

        private DeviceTree()
    • Method Detail

      • queryDeviceTree

        public static Quintet<java.util.Set<java.lang.Integer>,​java.util.Map<java.lang.Integer,​java.lang.Integer>,​java.util.Map<java.lang.Integer,​java.lang.String>,​java.util.Map<java.lang.Integer,​java.lang.String>,​java.util.Map<java.lang.Integer,​java.lang.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
        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 java.lang.String getDevNodeProperty​(int node,
                                                           int cmDrp,
                                                           com.sun.jna.Memory buf,
                                                           com.sun.jna.ptr.IntByReference size)