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()
long
Return how long the device has been running in ms.void
setCurrentTags
(List<String> currentTags) void
setDevLinks
(List<String> devLinks) void
setDevname
(String devname) void
void
void
setNodePath
(String nodePath) void
setOwner
(UdevDeviceOwner owner) void
setProperties
(Map<String, String> properties) void
setSubsystem
(String subsystem) void
setSysname
(String sysname) void
setSyspath
(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
-