orca-sim
|
This class models a discrete event. More...
#include <Event.hpp>
Public Member Functions | |
Event (SimulationTime, TimedModel *) | |
Default constructor. More... | |
Event () | |
Alternative constructor, required for creating arrays of Event elements. More... | |
bool | operator< (const Event &e) const |
Comparing operator. More... | |
Public Attributes | |
SimulationTime | time |
Point in time when the event will trigger. More... | |
TimedModel * | timedModel |
Model whose activation function will be called once the event triggers. More... | |
This class models a discrete event.
In orca-sim, events have a reference (a pointer) to the <cycle> funcion of the associated hardware model, which will be executed at time <time> by the simulation engine. Events occur once.
Event::Event | ( | SimulationTime | t, |
TimedModel * | p | ||
) |
Default constructor.
t | point in time to execute the event |
p | a pointer to the associated hardware module |
Definition at line 45 of file Event.cpp.
Event::Event | ( | ) |
bool Event::operator< | ( | const Event & | e | ) | const |
Comparing operator.
Operator overload for '<'.
An event occurs first in time if its time is less than the compared event (required by the priority queue, see <std::priority_queue>).
Use by the internal queue for sorting events by time.
e | Event to be compared with the instance |
Definition at line 36 of file Event.cpp.
SimulationTime orcasim::base::Event::time |
TimedModel* orcasim::base::Event::timedModel |