Loading...
Searching...
No Matches
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.
| edge_event (edge_event &&other) noexcept
| Move constructor.
| ~edge_event ()
edge_event & | operator= (const edge_event &other)
| Copy assignment operator.
edge_event & | operator= (edge_event &&other) noexcept
| Move assignment operator.
event_type | type () const
| Retrieve the event type.
timestamp | timestamp_ns () const noexcept
| Retrieve the event time-stamp.
line::offset | line_offset () const noexcept
| Read the offset of the line on which this event was registered.
unsigned long | global_seqno () const noexcept
| Get the global sequence number of this event.
unsigned long | line_seqno () const noexcept
| Get the event sequence number specific to the concerned line.

## Detailed Description

Immutable object containing data about a single edge event.

## Member Enumeration Documentation

## event_type

enum class gpiod::edge_event::event_type

strong

Edge event types.

Enumerator
RISING_EDGE | This is a rising edge event.
FALLING_EDGE | This is falling edge event.

## Constructor & Destructor Documentation

## edge_event() [1/2]

gpiod::edge_event::edge_event | ( | const edge_event & | other | ) |

Copy constructor.

Parameters

  other | Object to copy.

## edge_event() [2/2]

gpiod::edge_event::edge_event | ( | edge_event && | other | ) |

noexcept

Move constructor.

Parameters

  other | Object to move.

## ~edge_event()

gpiod::edge_event::~edge_event | ( |  | ) |

## 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

  other | Object to copy.

Returns
  Reference to self.

## operator=() [2/2]

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

noexcept

Move assignment operator.

Parameters

  other | Object 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:

- edge-event.hpp