libgpiod
Public Types | Public Member Functions | List of all members
gpiod::edge_event Class Referencefinal

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

#include <edge-event.hpp>

Public Types

enum  event_type { event_type::RISING_EDGE = 1, event_type::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_event ()
 
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.

Member Enumeration Documentation

Edge event types.

Enumerator
RISING_EDGE 

This is a rising edge event.

FALLING_EDGE 

This is falling edge event.

Constructor & Destructor Documentation

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

Copy constructor.

Parameters
otherObject to copy.
gpiod::edge_event::edge_event ( edge_event &&  other)
noexcept

Move constructor.

Parameters
otherObject to move.
gpiod::edge_event::~edge_event ( )

Member Function Documentation

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 gpiod::edge_event::line_offset ( ) const
noexcept

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

Returns
Line offset.
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.
edge_event& gpiod::edge_event::operator= ( const edge_event other)

Copy assignment operator.

Parameters
otherObject to copy.
Returns
Reference to self.
edge_event& gpiod::edge_event::operator= ( edge_event &&  other)
noexcept

Move assignment operator.

Parameters
otherObject to move.
Returns
Reference to self.
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.
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: