Struct gpiocdev_uapi::v2::LineEdgeEvent
source · #[repr(C)]pub struct LineEdgeEvent {
pub timestamp_ns: u64,
pub kind: LineEdgeEventKind,
pub offset: Offset,
pub seqno: u32,
pub line_seqno: u32,
/* private fields */
}Expand description
Information about an edge event on a requested line.
Fields§
§timestamp_ns: u64The best estimate of time of event occurrence, in nanoseconds.
By default the timestamp is read from CLOCK_MONOTONIC and is intended to allow the accurate measurement of the time between events. It does not provide the wall-clock time.
If the LineFlags::EVENT_CLOCK_REALTIME flag is set then the
timestamp is read from CLOCK_REALTIME.
kind: LineEdgeEventKindThe event trigger identifier.
offset: OffsetThe offset of the line that triggered the event.
seqno: u32The sequence number for this event in the sequence of events for all the lines in this line request.
line_seqno: u32The sequence number for this event in the sequence of events on this particular line.
Implementations§
source§impl LineEdgeEvent
impl LineEdgeEvent
sourcepub fn from_slice(d: &[u64]) -> Result<&LineEdgeEvent>
pub fn from_slice(d: &[u64]) -> Result<&LineEdgeEvent>
Read an edge event from a buffer.
The buffer is assumed to have been populated by a read of the line request File, so the content is validated before being returned.
Trait Implementations§
source§impl Clone for LineEdgeEvent
impl Clone for LineEdgeEvent
source§fn clone(&self) -> LineEdgeEvent
fn clone(&self) -> LineEdgeEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for LineEdgeEvent
impl Debug for LineEdgeEvent
source§impl PartialEq for LineEdgeEvent
impl PartialEq for LineEdgeEvent
source§fn eq(&self, other: &LineEdgeEvent) -> bool
fn eq(&self, other: &LineEdgeEvent) -> bool
self and other values to be equal, and is used
by ==.