Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SPlayer Class Reference

#include <SPlayer.h>

Inherits SSchedAlgorithm.

Inheritance diagram for SPlayer:

Inheritance graph
[legend]
List of all members.

Public Methods

 SPlayer ()
 SPlayer (STaskSystem *pTS)
virtual ~SPlayer ()
bool load (std::istream &in)
virtual void startup ()
virtual double innerLoop (const leda_list< STSysSchedEvent > &)
virtual bool isFinished () const
virtual const leda_string getDescription () const
virtual const leda_string & getName () const
virtual const SClassificationgetClassification () const
virtual SLeaBibEntrygetLeaBibEntry () const
int getNumOfAllEvents () const
int getNumOfCurEvent () const
STaskSystemgetTaskSystem ()
const STaskSystemgetTaskSystem () const
virtual void setTaskSystem (STaskSystem &rTS)
virtual leda_string getCurrentActionDescription (const int level) const
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)

Static Public Methods

const leda_string & getNameFromClass ()

Protected Methods

virtual void setCurrentActionDescription (const int level, leda_string descr)

Detailed Description

The player module is not an algorithm in the way that it computes a schedule by its own, but it re-plays a previously recorded scheduling procedure. From the outside its behavior cannot be distinguished from the actual algorithm that was recorded before by the player logger.

See also:
SPlayerLog


Constructor & Destructor Documentation

SPlayer::SPlayer  
 

Constructor.

Parameters:
pTS  pointer to a tasksystem

SPlayer::SPlayer STaskSystem   pTS
 

SPlayer::~SPlayer   [virtual]
 

Destructor.


Member Function Documentation

void SObservable::addObserver SObserver   obs [inline, inherited]
 

Here another component can register himself as observer of this component

Parameters:
obs  observer that wants to be notified of events created by this class

void SObservable::deleteObserver SObserver   obs [inline, inherited]
 

Here another component can delete himself from the list of observers of this component

Parameters:
obs  observer that doesn't want to be notified anymore

const SClassification & SPlayer::getClassification   [virtual]
 

Returns the classification scheme of the problem, which the algorithm is able to solve. NOTE: will be abstract!

Returns:
problem classification

Implements SSchedAlgorithm.

virtual leda_string SSchedAlgorithm::getCurrentActionDescription const int    level const [inline, virtual, inherited]
 

Clones a scheduling algorithm.

Returns:
pointer to the cloned algorithm

const leda_string SPlayer::getDescription   [virtual]
 

Returns a textual description about this algorithm. This should contain at least the solved problem classification, complexity and a short description how the algorithm works

Returns:
description

Implements SSchedAlgorithm.

SLeaBibEntry & SPlayer::getLeaBibEntry   [virtual]
 

Returns a dictionary providing detailed information about the algorithm NOTE: will be abstract!

Returns:
dictionary

Implements SSchedAlgorithm.

const leda_string & SPlayer::getName   [virtual]
 

Returns the name of the scheduling algorithm, e.g. "Coffman-Graham" NOTE: will be abstract!

Returns:
algorithms name

Implements SSchedAlgorithm.

const leda_string& SSchedAlgorithm::getNameFromClass   [static, inherited]
 

int SPlayer::getNumOfAllEvents   const [inline]
 

The player-file contains a list of events, which are stored in an action list. The number of events is equal to the length of the action list.

Returns:
the number of events

int SPlayer::getNumOfCurEvent   const [inline]
 

Get the number of events that already have been re-played.

Returns:
re-played number of events

const STaskSystem& SSchedAlgorithm::getTaskSystem   const [inline, inherited]
 

Get a read-only reference to the tasksystem.

Returns:
tasksystem

STaskSystem& SSchedAlgorithm::getTaskSystem   [inline, inherited]
 

Get a reference to the tasksystem.

Returns:
tasksystem

double SPlayer::innerLoop const leda_list< STSysSchedEvent > &    [virtual]
 

Allocating and deallocating of jobs on machines. The algorithm gets the events of the current simulation step, in order to react on these events ("online algorithm"). The algorithm can define a relative alarm time (relative to the current simumlation step); then the tasksystem will advance until the alarm time and call innerLoop() again. This is used for preemtion for instance. If this time is <= 0 the alarm function is deactivated.

Parameters:
rEvents  list of scheduling events
Returns:
relative alarm time

Implements SSchedAlgorithm.

bool SPlayer::isFinished   [virtual]
 

The player module will be finished when either the action list is empty or the end of the action list is received.

Returns:
player module is finished or not

Reimplemented from SSchedAlgorithm.

bool SPlayer::load std::istream &    in
 

Load the player-file, that contains a list of events, from the specified stream and store the events in an action list.

Parameters:
in  input-stream

void SObservable::notifyObservers const SEvent   event [inline, inherited]
 

Inform all observers of this component about an event. The Observers will receive this event by their SObserver::update()-method.

Parameters:
event  an event that is sent to all observers of this component
See also:
SObserver::update()

void SSchedAlgorithm::setCurrentActionDescription const int    level,
leda_string    descr
[protected, virtual, inherited]
 

virtual void SSchedAlgorithm::setTaskSystem STaskSystem   rTS [inline, virtual, inherited]
 

This should contain initialization code which shall be run only the first time the algorithm works on a specific task system.

Parameters:
rTS  reference to the tasksystem

void SPlayer::startup   [virtual]
 

Called before a simulation run starts.

Reimplemented from SSchedAlgorithm.


The documentation for this class was generated from the following files:
Generated on Thu May 22 16:50:51 2003 for Sketch-it! by doxygen1.2.18