Package com.tccc.kos.core.service.udev
Class UdevDevice
java.lang.Object
com.tccc.kos.core.service.udev.UdevDevice
Device from udev adapter. This represents a device discovered by udev
during an insertion / discovery event. These are typically devices that
can be inserted / removed on the fly and need to be processed accordingly.
A
UdevDevice is fairly low level and is typically abstracted by
SerialService and StorageService which make them easier
to work with. However, in the event of a device that is neither storage
or serial, direct access to the UdevDevice allows a way to
handle custom processing of the device.
A majority of the properties in this object come directly from udev. Please see udev documentation to understand their meaning.
A UdevDevice is claimed by an owner, which has exclusive
access to the device and receives lifecycle events. The owner
should not be modified directly as it is typically assigned
during device discovery.
- Version:
- 2023-09-16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()getNode()getOwner()longReturn how long the device has been running in ms.voidsetCurrentTags(List<String> currentTags) voidsetDevLinks(List<String> devLinks) voidsetDevname(String devname) voidvoidvoidsetNodePath(String nodePath) voidsetOwner(UdevDeviceOwner owner) voidsetProperties(Map<String, String> properties) voidsetSubsystem(String subsystem) voidsetSysname(String sysname) voidsetSyspath(String syspath) toString()
-
Constructor Details
-
UdevDevice
public UdevDevice()
-
-
Method Details
-
getRunTimeMs
public long getRunTimeMs()Return how long the device has been running in ms. This is how long since the device was first discovered. -
toString
-
getId
-
getNodePath
-
getSyspath
-
getSubsystem
-
getDevname
-
getSysname
-
getProperties
-
getCurrentTags
-
getDevLinks
-
getOwner
-
getNode
-
setId
-
setNodePath
-
setSyspath
-
setSubsystem
-
setDevname
-
setSysname
-
setProperties
-
setCurrentTags
-
setDevLinks
-
setOwner
-
setNode
-