libgpiod  2.0.1
Public Types | Public Member Functions
gpiod::edge_event Class Referencefinal

Immutable object containing data about a single edge event. More...

#include <edge-event.hpp>

Public Types

enum class  event_type { RISING_EDGE = 1 , FALLING_EDGE }
 Edge event types. More...
 

Public Member Functions

 edge_event (const edge_event &other)
 Copy constructor. More...
 
 edge_event (edge_event &&other) noexcept
 Move constructor. More...
 
edge_eventoperator= (const edge_event &other)
 Copy assignment operator. More...
 
edge_eventoperator= (edge_event &&other) noexcept
 Move assignment operator. More...
 
event_type type () const
 Retrieve the event type. More...
 
timestamp timestamp_ns () const noexcept
 Retrieve the event time-stamp. More...
 
line::offset line_offset () const noexcept
 Read the offset of the line on which this event was registered. More...
 
unsigned long global_seqno () const noexcept
 Get the global sequence number of this event. More...
 
unsigned long line_seqno () const noexcept
 Get the event sequence number specific to the concerned line. More...
 

Detailed Description

Immutable object containing data about a single edge event.

Definition at line 33 of file edge-event.hpp.

Member Enumeration Documentation

◆ event_type

Edge event types.

Enumerator
RISING_EDGE 

This is a rising edge event.

FALLING_EDGE 

This is falling edge event.

Definition at line 40 of file edge-event.hpp.

Constructor & Destructor Documentation

◆ edge_event() [1/2]

gpiod::edge_event::edge_event ( const edge_event other)

Copy constructor.

Parameters
otherObject to copy.

◆ edge_event() [2/2]

gpiod::edge_event::edge_event ( edge_event &&  other)
noexcept

Move constructor.

Parameters
otherObject to move.

Member Function Documentation

◆ global_seqno()

unsigned long gpiod::edge_event::global_seqno ( ) const
noexcept

Get the global sequence number of this event.

Returns
Sequence number of the event relative to all lines in the associated line request.

◆ line_offset()

line::offset gpiod::edge_event::line_offset ( ) const
noexcept

Read the offset of the line on which this event was registered.

Returns
Line offset.

◆ line_seqno()

unsigned long gpiod::edge_event::line_seqno ( ) const
noexcept

Get the event sequence number specific to the concerned line.

Returns
Sequence number of the event relative to this line within the lifetime of the associated line request.

◆ operator=() [1/2]

edge_event& gpiod::edge_event::operator= ( const edge_event other)

Copy assignment operator.

Parameters
otherObject to copy.
Returns
Reference to self.

◆ operator=() [2/2]

edge_event& gpiod::edge_event::operator= ( edge_event &&  other)
noexcept

Move assignment operator.

Parameters
otherObject to move.
Returns
Reference to self.

◆ timestamp_ns()

timestamp gpiod::edge_event::timestamp_ns ( ) const
noexcept

Retrieve the event time-stamp.

Returns
Time-stamp in nanoseconds as registered by the kernel using the configured edge event clock.

◆ type()

event_type gpiod::edge_event::type ( ) const

Retrieve the event type.

Returns
Event type (rising or falling edge).

The documentation for this class was generated from the following file: