IT++ Logo
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
itpp::Base_Event Class Referenceabstract

Base Event Class. More...

#include <itpp/protocol/events.h>

Inheritance diagram for itpp::Base_Event:
itpp::Data_Event< itpp::Signal, itpp::ACK * > itpp::Data_Event< itpp::Signal, bool > itpp::Data_Event< itpp::Signal, itpp::Link_Packet * > itpp::Data_Event< itpp::Signal, int > itpp::Data_Event< itpp::Signal, void * > itpp::Data_Event< itpp::Signal, itpp::Packet * > itpp::Data_Event< itpp::Signal, itpp::Array< itpp::Packet * > > itpp::Data_Event< itpp::Signal, DataType > itpp::Data_Event< itpp::Signal, std::string > itpp::Data_Event< itpp::Signal, double > itpp::Data_Event< ObjectType, DataType > itpp::Event< ObjectType >

Public Member Functions

 Base_Event (const Ttype delta_time)
 Schedule an event at time delta_time from now. More...
 
virtual ~Base_Event ()
 Destructor. More...
 
void cancel ()
 Cancel an event. More...
 

Protected Member Functions

virtual void exec (void)=0
 ADD DOCUMENTATION HERE. More...
 

Protected Attributes

Ttype delta_t
 ADD DOCUMENTATION HERE. More...
 
Ttype expire_t
 ADD DOCUMENTATION HERE. More...
 
bool active
 ADD DOCUMENTATION HERE. More...
 
unsigned long long int id
 ADD DOCUMENTATION HERE. More...
 

Static Protected Attributes

static unsigned long long int global_id = 0
 ADD DOCUMENTATION HERE. More...
 

Friends

class Base_Signal
 
class Event_Queue
 
struct Compare_Base_Event_Times
 

Detailed Description

Base Event Class.

An abstract Base class of Events that can be used to derive new events. All Event classes need to define the exec() function which is called when the event expires. An event has an execution time and an id.

Definition at line 68 of file events.h.

Constructor & Destructor Documentation

◆ Base_Event()

itpp::Base_Event::Base_Event ( const Ttype  delta_time)
inline

Schedule an event at time delta_time from now.

Definition at line 78 of file events.h.

References active, delta_t, expire_t, global_id, and it_assert.

◆ ~Base_Event()

virtual itpp::Base_Event::~Base_Event ( )
inlinevirtual

Destructor.

Definition at line 87 of file events.h.

Member Function Documentation

◆ cancel()

void itpp::Base_Event::cancel ( )
inline

Cancel an event.

Definition at line 90 of file events.h.

References active.

◆ exec()

virtual void itpp::Base_Event::exec ( void  )
protectedpure virtual

Friends And Related Function Documentation

◆ Base_Signal

friend class Base_Signal
friend

Definition at line 71 of file events.h.

◆ Event_Queue

friend class Event_Queue
friend

Definition at line 73 of file events.h.

◆ Compare_Base_Event_Times

friend struct Compare_Base_Event_Times
friend

Definition at line 75 of file events.h.

Member Data Documentation

◆ delta_t

Ttype itpp::Base_Event::delta_t
protected

ADD DOCUMENTATION HERE.

Definition at line 96 of file events.h.

Referenced by itpp::Event_Queue::add(), and Base_Event().

◆ expire_t

Ttype itpp::Base_Event::expire_t
protected

ADD DOCUMENTATION HERE.

Definition at line 98 of file events.h.

Referenced by itpp::Event_Queue::add(), Base_Event(), and itpp::Compare_Base_Event_Times::operator()().

◆ active

bool itpp::Base_Event::active
protected

ADD DOCUMENTATION HERE.

Definition at line 100 of file events.h.

Referenced by Base_Event(), and cancel().

◆ id

unsigned long long int itpp::Base_Event::id
protected

ADD DOCUMENTATION HERE.

Definition at line 102 of file events.h.

Referenced by itpp::Compare_Base_Event_Times::operator()().

◆ global_id

unsigned long long int itpp::Base_Event::global_id = 0
staticprotected

ADD DOCUMENTATION HERE.

Definition at line 104 of file events.h.

Referenced by Base_Event().


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

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.4