SSim C++ API documentation (v. 1.3.2)

Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Examples  

SSim C++ API Documentation

This documentation describes the C++ application programming interface to Ssim, a very simple discrete-event sequential simulation library. The simulator implemented by ssim executes reactive processes. These processes are defined in terms of discrete execution steps performed at given times, or in response to an interaction (an event) with another process. During the execution of an action, a process may schedule other future actions for itself, or it may signal events to another processes, which will respond by processing the signalled events at the given time. The simulation terminates when no more actions are scheduled.

The ssim library consists of essentially two classes defined within the ssim namespace: ssim::Sim which defines the interface to the simulator, and ssim::Process which defines the interface for processes that the simulator can execute. Sim offers basic primitives for scheduling actions, signaling events, and for creating, starting, and stopping processes. Process declares the execution steps scheduled when a process is started, periodically scheduled, signaled, and stopped.

The execution of the simulation is based on a virtual clock that represents the time in the simulated world. The virtual clock is simply a counter, therefore the time unit is determined by the semantics of the simulated processes. The initial value of the virtual clock is 0. The passage of (virtual) time in the simulated world is explicitly controlled by each process, essentially in three ways:

In addition to the basic Process class, the library provides a utility class ProcessWithPId, that automate some common procedures for process implementations.


Copyright © 2002 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga