Scheduler
Public Member Functions | Protected Attributes | List of all members
Scheduler::Event Class Referenceabstract

#include <event.h>

Inheritance diagram for Scheduler::Event:
Scheduler::MissedDeadline Scheduler::NewProcess Scheduler::Ready Scheduler::StartProc Scheduler::StopSimulation Scheduler::Terminates Scheduler::TimeOut Scheduler::Waiting

Public Member Functions

 Event (double time, bool renew=true)
 Event constructor. More...
 
void setTask (std::shared_ptr< Process > task)
 if the event is specific to a task, set it here. TODO not all events have an associated task. This should be moved More...
 
double getTime ()
 get the time at which the event is scheduled More...
 
virtual void process ()=0
 handle the the event TODO: 'process' is maybe not the best word for that, given that our simulator actually manipulated processes More...
 
virtual ~Event ()
 
virtual void print ()
 print information about the event More...
 
virtual std::string getName ()=0
 get the name of the event More...
 

Protected Attributes

double time
 
bool renew
 
std::shared_ptr< Processtask {nullptr}
 
TriggeringEvent eventType {nothing}
 The event type is need by the scheduling discipline, to determine if this kind of event triggers invokatio of that discipline. More...
 

Detailed Description

Definition at line 26 of file event.h.

Constructor & Destructor Documentation

Event::Event ( double  time,
bool  renew = true 
)

Event constructor.

Parameters
timethe time at which the event is to be scheduled
renewset this to true if the event has to be repeated (for periodic events). It will then reschedule itself according to its behavior.

Definition at line 23 of file event.cpp.

Event::~Event ( )
virtual

Definition at line 27 of file event.cpp.

Member Function Documentation

virtual std::string Scheduler::Event::getName ( )
pure virtual
double Event::getTime ( )

get the time at which the event is scheduled

Returns
the time at which the event is scheduled

Definition at line 36 of file event.cpp.

void Event::print ( )
virtual

print information about the event

Reimplemented in Scheduler::MissedDeadline.

Definition at line 41 of file event.cpp.

virtual void Scheduler::Event::process ( )
pure virtual

handle the the event TODO: 'process' is maybe not the best word for that, given that our simulator actually manipulated processes

Implemented in Scheduler::NewJob, Scheduler::NewInteractiveProcess, Scheduler::NewProcess, Scheduler::StartProc, Scheduler::Terminates, Scheduler::MissedDeadline, Scheduler::Ready, Scheduler::StopSimulation, Scheduler::Waiting, and Scheduler::TimeOut.

void Event::setTask ( std::shared_ptr< Process task)

if the event is specific to a task, set it here. TODO not all events have an associated task. This should be moved

Definition at line 31 of file event.cpp.

Member Data Documentation

TriggeringEvent Scheduler::Event::eventType {nothing}
protected

The event type is need by the scheduling discipline, to determine if this kind of event triggers invokatio of that discipline.

Definition at line 64 of file event.h.

bool Scheduler::Event::renew
protected

Definition at line 59 of file event.h.

std::shared_ptr<Process> Scheduler::Event::task {nullptr}
protected

Definition at line 60 of file event.h.

double Scheduler::Event::time
protected

Definition at line 58 of file event.h.


The documentation for this class was generated from the following files: