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: u64
The 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: LineEdgeEventKind
The event trigger identifier.
offset: Offset
The offset of the line that triggered the event.
seqno: u32
The sequence number for this event in the sequence of events for all the lines in this line request.
line_seqno: u32
The sequence number for this event in the sequence of events on this particular line.
Implementations
sourceimpl LineEdgeEvent
impl LineEdgeEvent
sourcepub fn from_slice(d: &[u8]) -> Result<&LineEdgeEvent>
pub fn from_slice(d: &[u8]) -> 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
sourceimpl Clone for LineEdgeEvent
impl Clone for LineEdgeEvent
sourcefn clone(&self) -> LineEdgeEvent
fn clone(&self) -> LineEdgeEvent
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more