Rev | Line | |
---|
[31] | 1 | |
---|
| 2 | /** |
---|
| 3 | * Mazilu Sinziana |
---|
| 4 | * |
---|
| 5 | * EZCab Implementation |
---|
| 6 | * EZCab Global Constants |
---|
| 7 | * |
---|
| 8 | * */ |
---|
| 9 | |
---|
| 10 | package vnsim.applications.ezcab; |
---|
| 11 | |
---|
| 12 | /** |
---|
| 13 | * |
---|
| 14 | * EZCab Globals Class |
---|
| 15 | * |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | public class EzcabGlobals { |
---|
| 19 | |
---|
| 20 | /* client doesn't have a preference in choosing a network */ |
---|
| 21 | public static final int DEFAULT_NETWORK = 0; |
---|
| 22 | /* a general ID of a client */ |
---|
| 23 | public static final int DEFAULT_CLIENT = 0; |
---|
| 24 | |
---|
| 25 | /* state of a cab - may be occupied or free */ |
---|
| 26 | public static final int FREE_STATE = 0; |
---|
| 27 | public static final int BUSY_STATE = 1; |
---|
| 28 | public static final int WAITING_STATE = 2; |
---|
| 29 | //public static final int NONE_STATE = -1; |
---|
| 30 | |
---|
| 31 | /* timeout constant */ |
---|
| 32 | public static final long TIMEOUT = 10 * 60 * 1000L; |
---|
| 33 | /* max hops constant */ |
---|
| 34 | public static final int MAX_HOPS = 100; |
---|
| 35 | /* max distance constant between client and cab */ |
---|
| 36 | public static final int MAX_DIST = 3000; |
---|
| 37 | |
---|
| 38 | /* type of entity constants: client or cab */ |
---|
| 39 | public static final byte CLIENT = 0; |
---|
| 40 | public static final byte CAB = 1; |
---|
| 41 | |
---|
| 42 | /* sending time constant for cab entity, who doesn't have normally sending time */ |
---|
| 43 | public static final float CAB_SENDING_TIME = -1; |
---|
| 44 | |
---|
| 45 | /* type of messages */ |
---|
| 46 | public static final int REQUEST = 0; |
---|
| 47 | public static final int RESPONSE = 1; |
---|
| 48 | public static final int ACK = 2; |
---|
| 49 | |
---|
| 50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.