SSim C++ API documentation (v. 1.3.2)

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

ssim::Process Class Reference

Virtual class (interface) representing processes running within the simulator. More...

#include <ssim.h>

Inheritance diagram for ssim::Process:

ssim::ProcessWithPId List of all members.

Public Methods

virtual void init (void)
 action when the process is created.

virtual void process_event (const Event *msg)
virtual void process_timeout ()
virtual void stop (void)
 executed when the process is explicitly stopped.


Detailed Description

Virtual class (interface) representing processes running within the simulator.

A simulated process must implement this basic interface.


Member Function Documentation

void ssim::Process::init void    [inline, virtual]
 

action when the process is created.

This execution step is scheduled when the process is created through Sim::create_process. This action is executed before any event or timeout.

void ssim::Process::process_event const Event   msg [inline, virtual]
 

action executed in response to an event signaled to this process.

Notice that the signaled event should not be used outside this method, other than by signaling it to a process through Sim::signal_event. Specifically, the Event pointer passed to this method should be considered invalid outside this method. in fact, the simulator proceeds to de-allocate every event object that is not signaled to any other process.

The implementation of this method may specify the duration of the actions associated with this response using the advance_delay method. By default, the duration of an action is 0.

See also:
Sim::signal_event(const Event*,ProcessId), Sim::signal_event(const Event*,ProcessId,Time) Sim::advance_delay(Time).

void ssim::Process::process_timeout   [inline, virtual]
 

action executed in response to a timeout.

This method defines the actions explicitly scheduled for this process by the process itself. These actions are scheduled by calling Sim::set_timeout(Time).

The implementation of this method may specify the duration of the actions associated with this response using the advance_delay method. By default, the duration of an action is 0.

void ssim::Process::stop void    [inline, virtual]
 

executed when the process is explicitly stopped.

A process is stopped by a call to Sim::stop_process(ProcessId). This method is executed immediately after the process has processed all the events or timeouts scheduled before the call to Sim::stop_process.


The documentation for this class was generated from the following file:
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