Project

General

Profile

Revision 76cefba1

ID76cefba1ddbc3bddf37a16ccea1ad0a74a6d74cc

Added by Priya about 12 years ago

Merged scheduler implementations and modified order structrure class

View differences:

scout/libscout/src/helper_classes/Order.h
1 1
#ifndef _ORDER_
2 2
#define _ORDER_
3 3

  
4
#define MAX_WAIT_TIME 120 //2 minutes in seconds
5

  
4 6
typedef unsigned int Address;
5 7
typedef unsigned int Path;
6 8
typedef double Time;
7 9

  
8 10
class Order {
9
    int orderID;
10
    Address orderSource, orderDest;
11
    Time orderDeadline, orderStartTime;
12
    Path orderPath;
13
    Time orderEstTime;
11
    int id;
12
    Address source, dest;
13
    Time start_time;
14
    Path path;
15
    Time est_time;
14 16
public:
15
    Order();
16
    Order(int ID, Address source, Address dest, Time deadline, Time start_time, Path path, Time est_time);
17
    Time getpriority() const;
17
    Order(int order_id, Address order_source, Address order_dest, Time order_deadline, Time order_start_time, Path order_path, Time order_est_time);
18

  
18 19
    int getid() const;
20
    Address get_source() const;
21
    Address get_dest() const;
22
    Time get_start_time() const;
23
    Path get_path() const;
24
    void set_path(Path order_path);
25
    
19 26
};
20 27

  
21 28
class CompareOrder {
22
    public:
23
        bool operator()(Order& o1, Order& o2);
29
  public:
30
    bool operator()(Order& o1, Order& o2);   
24 31
};
25
#endif
32

  
33
#endif

Also available in: Unified diff