avr-classes
Public Types | Public Member Functions | List of all members
Event Class Reference

#include <event.h>

Public Types

enum  { INVALID_EVENT_ID = 0xff }
 

Public Member Functions

 Event (uint8_t eventId=INVALID_EVENT_ID)
 
uint8_t getId (void) const
 
bool operator== (Event const &rhs) const
 
bool operator!= (Event const &rhs) const
 

Detailed Description

Event that can be sent. Basically wraps a numeric event ID to be assigned by the user. The last event ID is reserved for an invalid marker.

Constructor & Destructor Documentation

◆ Event()

Event::Event ( uint8_t  eventId = INVALID_EVENT_ID)
inline

Constructor, defaulting to create an invalid event.

Parameters
eventIdEvent ID to assign.

Member Function Documentation

◆ getId()

uint8_t Event::getId ( void  ) const
inline

Getter for event ID.

Returns
ID of event.

◆ operator!=()

bool Event::operator!= ( Event const &  rhs) const
inline

Inequality operator

Parameters
rhsRight hand side of comparison.
Returns
True if instances are not equal, false otherwise.

◆ operator==()

bool Event::operator== ( Event const &  rhs) const
inline

Equality operator

Parameters
rhsRight hand side of comparison.
Returns
True if instances are equal, false otherwise.