#include <CNCL/EventScheduler.h>
CN_EVENTSCHEDULER
CNEventBaseSched
None
CNEvent, CNEventList, CNEventHandler, CNEventHeapSched
CNEventScheduler
is the central simulation control. It manages the
events and delivers them to the addressed event handlers.
Scheduled events are sorted with respect to their scheduled simulation time and their priority. If there are two or more events with exactly the same scheduled simulation time and the same priority, they are processed in FIFO order.
If this exact behaviour is not strictly required, if scheduled simulation time and priority are sufficient to determine the procession order of events, then CNEventHeapSched should be used instead of CNEventScheduler. CNEventHeapSched avoids some potential performace deficiencies CNEventScheduler might show.
Constructors:
CNEventScheduler();
CNEventScheduler(CNParam *param);
In addition to the member functions required by CNCL, CNEventScheduler
provides:
void add_event(CNEvent *ev);
void send_event(CNEvent *ev);
void delete_event(CNEventID id);
id
.
void delete_events(CNEventHandler *evh, bool to=TRUE);
evh
or that are coming from the event handler if to
equals FALSE.
CNEvent *peek_event();
CNEvent *peek_event(CNEventID id);
CNEvent *next_event();
id
. Returns pointer to
event, or NIL
if not available.
void stop();
CNEventIterator *create_iterator();
Go to the first, previous, next, last section, table of contents.