Go to the documentation of this file.
86 Rprintf(
"(time=%f,%s), ",
it->time,
it->event->str().c_str());
95 const Event * e = 0) throw() {
102 const Event * e = 0) throw() {
124 const Event * e = (*a).event;
136 const Event * e = (*it).event;
156 static bool lock =
false;
174 if (action.
event != 0)
176 delete(action.
event);
199 switch (action.
type) {
230 if (action.
event != 0)
232 delete(action.
event);
248 if (
processes[pid].terminated)
return -1;
a_table_t::iterator ForwardIterator
static void set_stop_time(Time t=INIT_TIME)
stops the execution of the simulation at the given time
static void self_signal_event(const Event *e)
signal an event to the current process immediately
GNU Free Documentation License March Inc Temple MA USA Everyone is permitted to copy and distribute verbatim copies of this license but changing it is not allowed PREAMBLE The purpose of this License is to make a or other written document free in the sense of with or without modifying it
static SimErrorHandler * error_handler
const char * Version
version identifier for this ssim library
ProcessId activate()
activates this process within the simulator.
virtual void handle_terminated(ProcessId p, const Event *e)
handles terminated-process conditions.
static void schedule_now(ActionType i, ProcessId p, const Event *e=0)
Virtual class (interface) representing processes running within the simulator.
virtual void stop(void)
executed when the process is explicitly stopped.
static ProcessId create_process(Process *)
creates a new process
virtual void clear()
handles a clear operation.
static void set_error_handler(SimErrorHandler *)
registers a handler for simulation errors.
virtual void initialize(void)
action executed when the process is initialized.
static Time clock()
returns the current virtual time for the current process
int ProcessId
process identifier type
std::vector< T >::iterator iterator
ProcessId pid() const
process id of this process.
static void stop_process()
stops the execution of the current process
an error handler for simulation errors.
double Time
virtual time type
basic event in the simulation.
static void advance_delay(Time)
advance the execution time of the current process.
virtual void process_event(const Event *msg)
action executed in response to an event signaled to this process.
static ProcessId current_process
static void schedule(Time t, ActionType i, ProcessId p, const Event *e=0)
Action(Time t, ActionType at, ProcessId p, const Event *e=0)
static ProcessId this_process()
returns the current process
virtual void handle_busy(ProcessId p, const Event *e)
handles busy-process conditions.
boost::function< bool(const Event *)> EventPredicate
static void stop_simulation()
stops execution of the simulation
const ProcessId NULL_PROCESSID
no process will be identified by NULL_PROCESSID
static void clear()
clears out internal data structures
const Time INIT_TIME
beginning of time
name space for the Siena simulator.
static void signal_event(ProcessId p, const Event *e)
signal an event to the given process immediately
static void run_simulation()
starts execution of the simulation
bool operator<(const Action &a) const
static void ignore_event(EventPredicate pred)
std::vector< PDescr > PsTable