Go to the first, previous, next, last section, table of contents.


CNEventBaseSched -- Abstract scheduler base class

SYNOPSIS

#include <CNCL/EventBaseSched.h>

TYPE

CN_EVENTBASESCHED

BASE CLASSES

CNObjedt

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION

Constructors:

CNEventBaseSched();
CNEventBaseSched(CNParam *);
Initializes the CNEventBaseSched.

In addition to the member functions required by CNCL, CNEventBaseSched provides:

CNSimTime::time();
Returns the simulation time.
CNStatistics *statistics() const;
void statistics(CNStatistics *st);
Sets/Gets the (optional) scheduler statistic. By default no statistic is used.
void delete_events_from(CNEventHandler *h);
void delete_events_to(CNEventHandler *h);
Deletes the events coming from or adressed to the eventhandler h. The following functions are defined virtual and must be defined in derived classes:
void add_event(CNEvent *ev)=0;
void send_event(CNEvent *ev)=0;
Adds/sends an event to an event handler.
void delete_event(CNEventID id)=0;
Deletes event with ID id.
void delete_events(CNEventHandler *evh, bool to=TRUE)=0;
Deletes all events from the list that are addressed to or are comming from event handler evh.
CNEvent *peek_event()=0;
CNEvent *peek_event(CNEventID id)=0;
Peeks at next event or event with ID id. Returns pointer to event, or NIL if not available.
CNEvent *next_event() = 0;
Retrieves next event from internal data structure.
void start();
void start(CNEvent *ev);
Starts the scheduler with an optional initialization event.
void stop()=0;
Stops the scheduler after processing the current event and deletes all pending events in the event list. May be used inside an event handler to stop the simulation.
CNEventIterator *create_iterator() = 0;
Creates an event iterator.
void process_events();
Process all events.
void process_now();
Processes all events scheduled for the actual simtime..


Go to the first, previous, next, last section, table of contents.