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

SMachines Class Reference

#include <SMachines.h>

Inherits SPassiveMachines.

Inheritance diagram for SMachines:

Inheritance graph
[legend]
List of all members.

Public Types

typedef leda_dictionary< int,
SJobExecInfo * > 
MapJobToInfo

Public Methods

 SMachines (STaskSystem &rTS)
virtual void deallocate (SJob &job)
virtual void allocate (SJob &job, int pos=-1)
virtual void allocate (SJob &job, SComplexPosition *pComplexPos)
double getFinishTime (double currTime, SJob &job) const
virtual double getNextEventTime (double currTime) const
virtual void simulate (double oldTime, double newTime)
bool isEnvAvail () const
const SEnvironment & getEnv () const
SEnvironment & getEnv ()
virtual SPassiveMachinesMod & getModifier ()
SMachinesMod & getMachModifier ()
void reset ()
STopology & getTopology () const
bool isAllocated (const SJob &job) const
bool isMachFree (int pos)
const leda_set< SJob * > & getAllocatedJobs () const
int getPos (const SJob &job) const
double getStartOfAlloc (const SJob &job) const
leda_list< int > getFreeMachines () const
bool canEmbedAt (const STopology &top, int pos) const
void addObserver (SObserver &obs)
void deleteObserver (SObserver &obs)
void notifyObservers (const SEvent &event)

Protected Methods

SJobExecInfo & getInfo (const SJob &job)
const SJobExecInfo & getInfo (const SJob &job) const

Protected Attributes

STaskSystem * _pTaskSys

Friends

class SMachinesMod

Detailed Description

A block of active machines. They are active, because they actually process jobs. The main difference to passive machines is the event handler, which takes care of the processing state of the jobs. Access the modifier to set properties.
See also:
SMachinesMod


Member Typedef Documentation

typedef leda_dictionary<int, SJobExecInfo*> SPassiveMachines::MapJobToInfo [inherited]
 


Constructor & Destructor Documentation

SMachines::SMachines (  STaskSystem &    rTS ) 
 

Constructor


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 SMachines::allocate (  SJob &    job,
SComplexPosition *    pComplexPos
)  [virtual]
 

Reimplemented from SPassiveMachines.

void SMachines::allocate (  SJob &    job,
int    pos = -1
)  [virtual]
 

Allocate a job. Also changes the state of the job.

Parameters:
job  job to be allocated
pos  position where the topology of job shall be embedded. The default value is only valid if the machines have a SSetTopology! (in a set topology you don't want to specify the position. all positions are equivalent.)

Reimplemented from SPassiveMachines.

bool SPassiveMachines::canEmbedAt (  const STopology &    top,
int    pos
)  const [inline, inherited]
 

Return whether a topology could be embedded at a certain position

Parameters:
top  topology
pos  position
Returns:
true, if could be embedded, otherwise false

void SMachines::deallocate (  SJob &    job )  [virtual]
 

Deallocate a job from machine. Also changes the state of the job.

Parameters:
job  job to be deallocated

Reimplemented from SPassiveMachines.

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 leda_set<SJob*>& SPassiveMachines::getAllocatedJobs (    )  const [inline, inherited]
 

Get all currently allocated jobs

SEnvironment& SMachines::getEnv (    )  [inline]
 

Get access to the environment

const SEnvironment& SMachines::getEnv (    )  const [inline]
 

Get read-only access to the environment

double SMachines::getFinishTime (  double    currTime,
SJob &    job
)  const
 

Return time when the execution of the job will be over if the state of the machine remains as it is.

Parameters:
job  job
Returns:
finish time of job

leda_list<int> SPassiveMachines::getFreeMachines (    )  const [inline, inherited]
 

Get a list of all machines where no job (or part of a job) is running

const SJobExecInfo& SPassiveMachines::getInfo (  const SJob &    job )  const [inline, protected, inherited]
 

Get read-only access to information about the allocation of a job

SJobExecInfo& SPassiveMachines::getInfo (  const SJob &    job )  [inline, protected, inherited]
 

Get access to information about the allocation of a job

SMachinesMod& SMachines::getMachModifier (    )  [inline]
 

Get access to the SMachines-modifier

virtual SPassiveMachinesMod& SMachines::getModifier (    )  [inline, virtual]
 

Get access to the SPassiveMachines-modifier

Reimplemented from SPassiveMachines.

double SMachines::getNextEventTime (  double    currTime )  const [virtual]
 

Return the time, when the next event will be generated the job.

Parameters:
currTime  the current simulation time (only events happening later are interesting)
Returns:
next event time

Reimplemented from SPassiveMachines.

int SPassiveMachines::getPos (  const SJob &    job )  const [inline, inherited]
 

Return the position where a job is currently embedded

Parameters:
job  job
Returns:
position in topology

double SPassiveMachines::getStartOfAlloc (  const SJob &    job )  const [inherited]
 

Return the time when the job was allocated to the machine

STopology& SPassiveMachines::getTopology (    )  const [inline, inherited]
 

Get access to the topology of the machines. It contains information about the embedded jobs.

bool SPassiveMachines::isAllocated (  const SJob &    job )  const [inherited]
 

Return whether a job is allocated on a machine

Parameters:
job  job
Returns:
true, if allocated, otherwise false

bool SMachines::isEnvAvail (    )  const [inline]
 

Returns whether an environment was assigned to the machines

Returns:
true, if environment is assigned

bool SPassiveMachines::isMachFree (  int    pos )  [inherited]
 

No descriptions

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 SPassiveMachines::reset (    )  [inherited]
 

Reset machines. Allocated jobs will be deallocated and the topology is resetted.

void SMachines::simulate (  double    oldTime,
double    newTime
)  [virtual]
 

Advance the simulation time until the next time step.

Parameters:
oldTime  the time from which the simulation time is advanced.
newTime  the time up to which the simulation time is advanced.

Reimplemented from SPassiveMachines.


Friends And Related Function Documentation

friend class SMachinesMod [friend]
 

@supplierCardinality 1..*


Member Data Documentation

STaskSystem* SPassiveMachines::_pTaskSys [protected, inherited]
 


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