virtual void setGalaxy(Galaxy& g);This function sets the galaxy pointer to point to
g.
Galaxy* galaxy();This function returns the galaxy pointer.
virtual void setup() = 0;This function (in derived classes) sets up the schedule. In compile-time schedulers such as those for SDF, a complete schedule is computed; others may do little more than minimal checks.
virtual void setStopTime(double limit) = 0;Set the stop time for the scheduler. Schedulers have an abstract notion of time; this determines how long the scheduler will run for.
virtual double getStopTime() = 0;Retrieve the stop time.
virtual void resetStopTime(double limit);Reset the stopping condition for the wormhole containing this Scheduler. The default implementation simply calls
setStopTime
with the same argument. For some derived types of schedulers, additional actions will be performed as well by derived Scheduler classes.
virtual int run() = 0;Run the scheduler until the stop time is reached, an error condition occurs, or it stops for some other reason.
virtual void setCurrentTime(double val);Set the current time for the scheduler.
virtual StringList displaySchedule();Return the schedule if this makes sense.
double now() const;Return the current time (the value of the protected member
currentTime).
int stopBeforeDeadlocked() const;Return the value of the
stopBeforeDeadFlag
protected member. It is set in timed domains to indicate that a scheduler inside a wormhole was suspended even though it had more work to do.
virtual const char* domain() const;Return the domain for this scheduler. This method is no longer used and will be removed from future releases; it dates back to the days in which a given scheduler could only be used in one domain.
void setTarget(Target& t);Set the target pointer to point to
t.
Target& target ();Return the target.
virtual void compileRun();Call code-generation functions in the Target to generate code for a run. In the base class, this just causes an error.
The following functions now forward requests to SimControl, which is responsible for controlling the simulation.
static void requestHalt();Calls
SimControl::declareErrorHalt.
NOTE: SimControl::requestHalt
only sets the halt bit, not the error bit.
static int haltRequested();Calls
SimControl::haltRequested.
Returns TRUE if the execution should halt.
static void clearHalt();Calls
SimControl::clearHalt.
Clears the halt and error bits.
// current time of the scheduler
double currentTime;
// flag set if stop before deadlocked.
// for untimed domain, it is always FALSE.
int stopBeforeDeadlocked;