Scheduler Package
The user can specify that some of the primitive activities are to be implemented as tasks in the Profile Editor. The tasks are actually C functions started as co-routines. The Rational Statemate simulation itself is a task, which runs concurrently with the other started tasks.
Controlling all those tasks is the responsibility of statecharts, which issue different actions to the different activities (i.e., start, stop, suspend, resume). All this is handled by a scheduler package, which is supplied with the simulator and is available on Rational Statemate platforms only. This package supports multi-tasking programming within the context of a single process.
Below we describe how the user may add his own tasks, apart from those created for each task-like primitive activity, and how to use the scheduler for controlling them.