Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
DEPriorityFreeScheduler Class Reference

#include <DEPriorityFreeScheduler.h>

Inheritance diagram for DEPriorityFreeScheduler:
DEBaseSched

Public Member Functions

const char * className () const
 
StringList displaySchedule ()
 
int fetchEvent (InDEPort *p, double timeVal)
 
double getStopTime ()
 
bool handleSpecialEvent ()
 
int isA (const char *) const
 
double nextEvent () const
 
BasePrioQueue * queue ()
 
void resetStopTime (double limit)
 
virtual int run ()
 
void setCurrentTime (double val)
 
bool setPortDepths ()
 
void setStopTime (double limit)
 
void setup ()
 
double whenStop ()
 
- Public Member Functions inherited from DEBaseSched
int checkDelayFreeLoop ()
 
const char * className () const
 
int computeDepth ()
 
const char * domain () const
 
int isA (const char *) const
 

Static Public Member Functions

static int fireStar (DEStar *pStar)
 

Protected Member Functions

void createStarCaches (DEStar *pStar)
 
void deleteStarCaches (DEStar *pStar)
 
- Protected Member Functions inherited from DEBaseSched
int checkLoop (PortHole *p, DEStar *s)
 
int setDepth (PortHole *p, DEStar *s)
 
int errorDelayFree (PortHole *p)
 
void errorUndefined (PortHole *p)
 

Static Protected Attributes

static const int cDefaultPriority = 0
 
- Static Protected Attributes inherited from DEBaseSched
static const int cDefaultToUniversalPriority = -1
 

Special event handling

Implemented by florin

void putEvent (Particle *p, double pLevel, double pFineLevel=0)
 
unsigned int cancelEvent (int pEvID)
 
unsigned int cancelEvent (int pEvID, const Star *pDest)
 
unsigned int cancelEvent (const SpecialEvent *pEv, int pEvID)
 
unsigned int cancelEvent (const SpecialEvent *pEv, const Type *pData)
 
double getTimeOfEvent (const SpecialEvent *pEv, int pEvID) const
 
bool isScheduled (const SpecialEvent *pEv, int pEvID) const
 
void resortEvents ()
 
bool notifyDeletionOfStar (DEStar *pStar)
 
bool notifyDeletionOfPort (DEStar *pStar, DEPortHole *pPort)
 
bool notifyCreationOfStar (DEStar *pStar)
 
bool notifyCreationOfPort (DEPortHole *pPort)
 

Additional Inherited Members

- Public Attributes inherited from DEBaseSched
double relTimeScale
 

Detailed Description

Scheduler for Discrete-Event models. this scheduler uses a specialized data structure for managing the pending events and does not use priorities assigned to portholes.

Member Function Documentation

StringList DEPriorityFreeScheduler::displaySchedule ( )

Display the schedule for this model. Since this is a dynamic scheduler, this method is not (very) useful.

int DEPriorityFreeScheduler::fireStar ( DEStar pStar)
inlinestatic

Fire a star and send its outputs. This is a replacement for DEStar::sendOutput() and fires the ports in reverse order of their appearance in the port list. AND-input-conditions are handled here also.

bool DEPriorityFreeScheduler::handleSpecialEvent ( )

Handle the highest prioritized special event.

int DEPriorityFreeScheduler::isA ( const char *  ) const

class identification

double DEPriorityFreeScheduler::nextEvent ( ) const
virtual

Return the time of the next event.

See Also
DEBaseSched::nextEvent()

Implements DEBaseSched.

bool DEPriorityFreeScheduler::notifyDeletionOfPort ( DEStar pStar,
DEPortHole pPort 
)

Discard all events destined for a given port.

Returns
Number of discarded events, <0 if an error occured.
bool DEPriorityFreeScheduler::notifyDeletionOfStar ( DEStar pStar)

Remove all pending events for a given star.

Returns
Number of discarded events, <0 if an error occured.
void DEPriorityFreeScheduler::resortEvents ( )
inline

Mutability support Resort all events in the queue based on newly assigned fineLevels. Since this scheduler does not support finelevels (port priorities) the implementation remains empty.

int DEPriorityFreeScheduler::run ( )
virtual

Run the system until the stopping conditions are met. When inside a wormhole, this method can be invoke multiple times during a run

Return values
TRUEsuccessful run
FALSEsimulation produced an error
bool DEPriorityFreeScheduler::setPortDepths ( )

Set the depth member of all input ports. For the model of computation, this finelevel is equal for all ports. Also sets the depth of wormhole boundary outputs to a fixed value.

Note
This method has been made public since the port depths need to be reset after instanciation of a dynamic instance.
void DEPriorityFreeScheduler::setStopTime ( double  limit)
inline

Set up the stopping condition.

void DEPriorityFreeScheduler::setup ( )

The setup function initialize the global event queue and notify the blockes of the queue name.

double DEPriorityFreeScheduler::whenStop ( )
inlinevirtual

Output the stopping time

Reimplemented from DEBaseSched.

Member Data Documentation

const int DEPriorityFreeScheduler::cDefaultPriority = 0
staticprotected

Common port priority for all input ports