SSim C++ API documentation (v. 1.7.6)
Public Member Functions | List of all members
ssim::SimErrorHandler Class Reference

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.

Detailed Description

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.

See Also
Sim::set_error_handler(SimErrorHandler *)
Examples:
bs.cc.

Member Function Documentation

virtual void ssim::SimErrorHandler::clear ( ) throw ()
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.

See Also
Sim::clear()
virtual void ssim::SimErrorHandler::handle_busy ( ProcessId  p,
const Event e 
) throw ()
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()).

Parameters
pis the id of the busy process
eis the scheduled event (possibly NULL)
virtual void ssim::SimErrorHandler::handle_terminated ( ProcessId  p,
const Event e 
) throw ()
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()).

Parameters
pis the id of the terminated process
eis the scheduled event (possibly NULL)

The documentation for this class was generated from the following file: