Package com.diozero.api
Class DeviceEvent
- java.lang.Object
-
- com.diozero.api.Event
-
- com.diozero.api.DeviceEvent
-
- Direct Known Subclasses:
AnalogInputEvent
,DigitalInputEvent
public abstract class DeviceEvent extends Event
Abstract class representing an event from a GPIO device.
-
-
Constructor Summary
Constructors Constructor Description DeviceEvent(int gpio, long epochTime, long nanoTime)
Constructor for a device event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getGpio()
-
Methods inherited from class com.diozero.api.Event
getEpochTime, getNanoTime
-
-
-
-
Constructor Detail
-
DeviceEvent
public DeviceEvent(int gpio, long epochTime, long nanoTime)
Constructor for a device event.- Parameters:
gpio
- GPIO numberepochTime
- Unix epoch time: milliseconds elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap secondsnanoTime
- The Java Virtual Machine's high-resolution time source, in nanoseconds (note this is unrelated to epochTime and uses CLOCK_MONOTONIC in the C clock_gettime() function)
-
-