Class Win32PnPEntity
java.lang.Object
io.github.eggy03.ferrumx.windows.entity.system.Win32PnPEntity
Immutable representation of a Plug and Play (PnP) device on Windows systems.
Fields correspond to properties retrieved from the WMI Win32_PnPEntity class.
Instances of this class represent entries as they would appear in the Windows Device Manager.
Usage examples
// Build a new Plug and Play device instance
Win32PnPEntity device = Win32PnPEntity.builder()
.deviceId("USB\\VID_045E&PID_07A5\\6&1A2C0F8&0&2")
.name("USB Composite Device")
.manufacturer("Microsoft")
.present(true)
.status("OK")
.build();
// Create a modified copy using the builder
Win32PnPEntity updatedDevice = device.toBuilder()
.status("Degraded")
.build();
- Since:
- 3.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionA vendor-defined list of compatible identification strings that Windows Setup uses as fallback identifiers when no matching hardware ID is found.(package private) @Nullable StringA human-readable description of the device.(package private) @Nullable StringIdentifier of the Plug and Play device.A vendor-defined list of hardware identification strings used by Windows Setup to match the device to an INF file.(package private) @Nullable StringName of the manufacturer of the Plug and Play device.(package private) @Nullable StringThe name by which the device is known.(package private) @Nullable StringWindows Plug and Play device identifier of the logical device.(package private) @Nullable BooleanIndicates whether this Plug and Play device is currently present in the system.(package private) @Nullable StringCurrent operational status of the PnP Device. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
deviceId
Identifier of the Plug and Play device. -
pnpDeviceId
Windows Plug and Play device identifier of the logical device. -
hardwareId
-
compatibleId
-
name
The name by which the device is known. -
description
A human-readable description of the device. -
manufacturer
Name of the manufacturer of the Plug and Play device. -
present
Indicates whether this Plug and Play device is currently present in the system. Note: This property is not supported on Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista. -
status
Current operational status of the PnP Device.Possible OPERATIONAL values:
- "OK"
- "Degraded"
- "Pred Fail"
Possible NON-OPERATIONAL values:
- "Unknown"
- "Error"
- "Starting"
- "Stopping"
- "Service"
Possible OTHER values:
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
-
-
Constructor Details
-
Win32PnPEntity
public Win32PnPEntity()
-
-
Method Details
-
isPresent
-
toString
-