an error handler for simulation errors. More...
#include <ssim.h>
Public Member Functions | |
virtual void | clear () throw () |
handles a clear operation. | |
virtual void | handle_busy (ProcessId p, const Event *e) throw () |
handles busy-process conditions. | |
virtual void | handle_terminated (ProcessId p, const Event *e) throw () |
handles terminated-process conditions. |
an error handler for simulation errors.
Simulation errors occur when an event is scheduled for a process that is either terminated or busy processing other events. These conditions may or may not represent application errors. In any case, the simulator delegates the handling of these conditions to an error handler, which is implemented by extending this class.
|
inlinevirtual |
handles a clear operation.
This method is called by Sim::clear(). This enables any counters or other internal state of the error handler to be reset as necessary.
|
inlinevirtual |
handles busy-process conditions.
A busy-process condition occurs when a process is scheduled to process an event at a time when it is still busy processing other events.
This method is executed within the simulation in the context of the busy process. This means that the handler may access the simulation's current time as well as all the interface functions of the simulator. In particular, this method may also signal events to the busy process (e.g., with self_signal_event()).
p | is the id of the busy process |
e | is the scheduled event (possibly NULL) |
|
inlinevirtual |
handles terminated-process conditions.
A terminated-process condition occurs when a process is scheduled to process an event at a time when it has already terminated its execution.
This method is executed within the simulation in the context of the busy process. This means that the handler may access the simulation's current time as well as all the interface functions of the simulator. In particular, this method may also signal events to the busy process (e.g., with self_signal_event()).
p | is the id of the terminated process |
e | is the scheduled event (possibly NULL) |