public static class Udev.UdevDevice extends PointerType
Udev.UdevContext.deviceNewFromSyspath(String)
and friends. The device
object allows one to query current state, read and write attributes and
lookup properties of the device in question.Constructor and Description |
---|
UdevDevice() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDevnode()
Gets the devnode of this device
|
java.lang.String |
getDevtype()
Gets the devtype of this device
|
Udev.UdevDevice |
getParent()
Gets the parent of this device
|
Udev.UdevDevice |
getParentWithSubsystemDevtype(java.lang.String subsystem,
java.lang.String devtype)
Gets the parent of this device matching a subsystem and devtype
|
java.lang.String |
getPropertyValue(java.lang.String key)
Retrieves a device property from this device
|
java.lang.String |
getSubsystem()
Gets the subsystem of this device
|
java.lang.String |
getSysattrValue(java.lang.String sysattr)
Retrieves a device attribute from this device
|
java.lang.String |
getSysname()
Gets the sysname of this device
|
java.lang.String |
getSyspath()
Gets the syspath of this device
|
Udev.UdevDevice |
ref()
Acquire a further reference to this object.
|
void |
unref()
Drop a reference to this object.
|
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
public Udev.UdevDevice ref()
public void unref()
public Udev.UdevDevice getParent()
public Udev.UdevDevice getParentWithSubsystemDevtype(java.lang.String subsystem, java.lang.String devtype)
subsystem
- The subsystem to matchdevtype
- The device type to matchpublic java.lang.String getSyspath()
public java.lang.String getSysname()
public java.lang.String getDevnode()
public java.lang.String getDevtype()
public java.lang.String getSubsystem()
public java.lang.String getSysattrValue(java.lang.String sysattr)
sysattr
- The attribute to retrieve.public java.lang.String getPropertyValue(java.lang.String key)
key
- The property to retrieve.