- Added the Schedulable interface
- Renamed SchedulableStatus to DynamicSchedulable - Implemented almost all methods of DynamicSchedulable git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@630 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
94c0b563c7
commit
a1662de194
22 changed files with 492 additions and 239 deletions
18
src/main.cc
18
src/main.cc
|
@ -29,7 +29,7 @@
|
|||
#include "backend/history.hh"
|
||||
#include "backend/static_schedulable.hh"
|
||||
#include "backend/schedulable_queue.hh"
|
||||
#include "backend/schedulable_status.hh"
|
||||
#include "backend/dynamic_schedulable.hh"
|
||||
#include "backend/slice.hh"
|
||||
#include "backend/static_process.hh"
|
||||
#include "backend/policy.hh"
|
||||
|
@ -112,12 +112,12 @@ main(int argc, char* argv[])
|
|||
StaticProcess p5("P5", 1,2,3);
|
||||
StaticProcess p6("P6", 10,2,1);
|
||||
|
||||
SchedulableStatus ss1(p1);
|
||||
SchedulableStatus ss2(p2);
|
||||
SchedulableStatus ss3(p3);
|
||||
SchedulableStatus ss4(p4);
|
||||
SchedulableStatus ss5(p5);
|
||||
SchedulableStatus ss6(p6);
|
||||
DynamicSchedulable ss1(p1);
|
||||
DynamicSchedulable ss2(p2);
|
||||
DynamicSchedulable ss3(p3);
|
||||
DynamicSchedulable ss4(p4);
|
||||
DynamicSchedulable ss5(p5);
|
||||
DynamicSchedulable ss6(p6);
|
||||
|
||||
SchedulableQueue initial;
|
||||
initial.add_at_bottom(ss1);
|
||||
|
@ -166,7 +166,7 @@ main(int argc, char* argv[])
|
|||
quale = h.get_simulation_status_at(0); //stato iniziale
|
||||
|
||||
cout << quale->get_item_at(0)->get_schedulable()->get_name();
|
||||
smart_ptr<const sgpem::SchedulableStatus> quale2 = h.get_scheduled_at(1);
|
||||
smart_ptr<const sgpem::DynamicSchedulable> quale2 = h.get_scheduled_at(1);
|
||||
cout << quale2->get_schedulable()->get_name();
|
||||
|
||||
h.truncate_at(0);
|
||||
|
@ -186,7 +186,7 @@ main(int argc, char* argv[])
|
|||
|
||||
h.truncate_at(2);
|
||||
|
||||
smart_ptr<const sgpem::SchedulableStatus> quale2;
|
||||
smart_ptr<const sgpem::DynamicSchedulable> quale2;
|
||||
quale2 = h.get_scheduled_at(0);
|
||||
if (quale2) cout << "\n" << quale2->get_schedulable()->get_name(); else cout << "NO";
|
||||
quale2 = h.get_scheduled_at(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue