SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TraCIConstants.h
Go to the documentation of this file.
1
/****************************************************************************/
15
/****************************************************************************/
16
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
17
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
18
/****************************************************************************/
19
//
20
// This file is part of SUMO.
21
// SUMO is free software: you can redistribute it and/or modify
22
// it under the terms of the GNU General Public License as published by
23
// the Free Software Foundation, either version 3 of the License, or
24
// (at your option) any later version.
25
//
26
/****************************************************************************/
27
#ifndef TRACICONSTANTS_H
28
#define TRACICONSTANTS_H
29
30
31
// ****************************************
32
// VERSION
33
// ****************************************
34
#define TRACI_VERSION 3
35
36
// ****************************************
37
// COMMANDS
38
// ****************************************
39
// command: get version
40
#define CMD_GETVERSION 0x00
41
42
// command: simulation step (new version)
43
#define CMD_SIMSTEP2 0x02
44
45
// command: stop node
46
#define CMD_STOP 0x12
47
48
// command: set lane
49
#define CMD_CHANGELANE 0x13
50
51
// command: slow down
52
#define CMD_SLOWDOWN 0x14
53
54
// command: change target
55
#define CMD_CHANGETARGET 0x31
56
57
// command: Position Conversion
58
#define CMD_POSITIONCONVERSION 0x71
59
60
// command: Distance Request
61
#define CMD_DISTANCEREQUEST 0x72
62
63
// command: add vehicle
64
#define CMD_ADDVEHICLE 0x74
65
66
// command: move node
67
#define CMD_MOVENODE 0x80
68
69
// command: close sumo
70
#define CMD_CLOSE 0x7F
71
72
73
74
// command: get induction loop (e1) variable
75
#define CMD_GET_INDUCTIONLOOP_VARIABLE 0xa0
76
// response: get induction loop (e1) variable
77
#define RESPONSE_GET_INDUCTIONLOOP_VARIABLE 0xb0
78
// command: subscribe induction loop (e1) variable
79
#define CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xd0
80
// response: subscribe induction loop (e1) variable
81
#define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xe0
82
83
// command: get multi-entry/multi-exit detector (e3) variable
84
#define CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xa1
85
// response: get areal detector (e3) variable
86
#define RESPONSE_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xb1
87
// command: subscribe multi-entry/multi-exit detector (e3) variable
88
#define CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xd1
89
// response: subscribe areal detector (e3) variable
90
#define RESPONSE_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xe1
91
92
// command: get traffic lights variable
93
#define CMD_GET_TL_VARIABLE 0xa2
94
// response: get traffic lights variable
95
#define RESPONSE_GET_TL_VARIABLE 0xb2
96
// command: set traffic lights variable
97
#define CMD_SET_TL_VARIABLE 0xc2
98
// command: subscribe traffic lights variable
99
#define CMD_SUBSCRIBE_TL_VARIABLE 0xd2
100
// response: subscribe traffic lights variable
101
#define RESPONSE_SUBSCRIBE_TL_VARIABLE 0xe2
102
103
// command: get lane variable
104
#define CMD_GET_LANE_VARIABLE 0xa3
105
// response: get lane variable
106
#define RESPONSE_GET_LANE_VARIABLE 0xb3
107
// command: set lane variable
108
#define CMD_SET_LANE_VARIABLE 0xc3
109
// command: subscribe lane variable
110
#define CMD_SUBSCRIBE_LANE_VARIABLE 0xd3
111
// response: subscribe lane variable
112
#define RESPONSE_SUBSCRIBE_LANE_VARIABLE 0xe3
113
114
// command: get vehicle variable
115
#define CMD_GET_VEHICLE_VARIABLE 0xa4
116
// response: get vehicle variable
117
#define RESPONSE_GET_VEHICLE_VARIABLE 0xb4
118
// command: set vehicle variable
119
#define CMD_SET_VEHICLE_VARIABLE 0xc4
120
// command: subscribe vehicle variable
121
#define CMD_SUBSCRIBE_VEHICLE_VARIABLE 0xd4
122
// response: subscribe vehicle variable
123
#define RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE 0xe4
124
125
// command: get vehicle type variable
126
#define CMD_GET_VEHICLETYPE_VARIABLE 0xa5
127
// response: get vehicle type variable
128
#define RESPONSE_GET_VEHICLETYPE_VARIABLE 0xb5
129
// command: set vehicle type variable
130
#define CMD_SET_VEHICLETYPE_VARIABLE 0xc5
131
// command: subscribe vehicle type variable
132
#define CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xd5
133
// response: subscribe vehicle type variable
134
#define RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xe5
135
136
// command: get route variable
137
#define CMD_GET_ROUTE_VARIABLE 0xa6
138
// response: get route variable
139
#define RESPONSE_GET_ROUTE_VARIABLE 0xb6
140
// command: set route variable
141
#define CMD_SET_ROUTE_VARIABLE 0xc6
142
// command: subscribe route variable
143
#define CMD_SUBSCRIBE_ROUTE_VARIABLE 0xd6
144
// response: subscribe route variable
145
#define RESPONSE_SUBSCRIBE_ROUTE_VARIABLE 0xe6
146
147
// command: get poi variable
148
#define CMD_GET_POI_VARIABLE 0xa7
149
// response: get poi variable
150
#define RESPONSE_GET_POI_VARIABLE 0xb7
151
// command: set poi variable
152
#define CMD_SET_POI_VARIABLE 0xc7
153
// command: subscribe poi variable
154
#define CMD_SUBSCRIBE_POI_VARIABLE 0xd7
155
// response: subscribe poi variable
156
#define RESPONSE_SUBSCRIBE_POI_VARIABLE 0xe7
157
158
// command: get polygon variable
159
#define CMD_GET_POLYGON_VARIABLE 0xa8
160
// response: get polygon variable
161
#define RESPONSE_GET_POLYGON_VARIABLE 0xb8
162
// command: set polygon variable
163
#define CMD_SET_POLYGON_VARIABLE 0xc8
164
// command: subscribe polygon variable
165
#define CMD_SUBSCRIBE_POLYGON_VARIABLE 0xd8
166
// response: subscribe polygon variable
167
#define RESPONSE_SUBSCRIBE_POLYGON_VARIABLE 0xe8
168
169
// command: get junction variable
170
#define CMD_GET_JUNCTION_VARIABLE 0xa9
171
// response: get junction variable
172
#define RESPONSE_GET_JUNCTION_VARIABLE 0xb9
173
// command: set junction variable
174
#define CMD_SET_JUNCTION_VARIABLE 0xc9
175
// command: subscribe junction variable
176
#define CMD_SUBSCRIBE_JUNCTION_VARIABLE 0xd9
177
// response: subscribe junction variable
178
#define RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE 0xe9
179
180
// command: get edge variable
181
#define CMD_GET_EDGE_VARIABLE 0xaa
182
// response: get edge variable
183
#define RESPONSE_GET_EDGE_VARIABLE 0xba
184
// command: set edge variable
185
#define CMD_SET_EDGE_VARIABLE 0xca
186
// command: subscribe edge variable
187
#define CMD_SUBSCRIBE_EDGE_VARIABLE 0xda
188
// response: subscribe edge variable
189
#define RESPONSE_SUBSCRIBE_EDGE_VARIABLE 0xea
190
191
// command: get simulation variable
192
#define CMD_GET_SIM_VARIABLE 0xab
193
// response: get simulation variable
194
#define RESPONSE_GET_SIM_VARIABLE 0xbb
195
// command: set simulation variable
196
#define CMD_SET_SIM_VARIABLE 0xcb
197
// command: subscribe simulation variable
198
#define CMD_SUBSCRIBE_SIM_VARIABLE 0xdb
199
// response: subscribe simulation variable
200
#define RESPONSE_SUBSCRIBE_SIM_VARIABLE 0xeb
201
202
// command: get GUI variable
203
#define CMD_GET_GUI_VARIABLE 0xac
204
// response: get GUI variable
205
#define RESPONSE_GET_GUI_VARIABLE 0xbc
206
// command: set GUI variable
207
#define CMD_SET_GUI_VARIABLE 0xcc
208
// command: subscribe GUI variable
209
#define CMD_SUBSCRIBE_GUI_VARIABLE 0xdc
210
// response: subscribe GUI variable
211
#define RESPONSE_SUBSCRIBE_GUI_VARIABLE 0xec
212
213
214
215
// ****************************************
216
// POSITION REPRESENTATIONS
217
// ****************************************
218
// Position in geo-coordinates
219
#define POSITION_LAT_LON 0x00
220
// 2D cartesian coordinates
221
#define POSITION_2D 0x01
222
// Position in geo-coordinates with altitude
223
#define POSITION_LAT_LON_ALT 0x02
224
// 3D cartesian coordinates
225
#define POSITION_3D 0x03
226
// Position on road map
227
#define POSITION_ROADMAP 0x04
228
229
230
231
// ****************************************
232
// DATA TYPES
233
// ****************************************
234
// Boundary Box (4 doubles)
235
#define TYPE_BOUNDINGBOX 0x05
236
// Polygon (2*n doubles)
237
#define TYPE_POLYGON 0x06
238
// unsigned byte
239
#define TYPE_UBYTE 0x07
240
// signed byte
241
#define TYPE_BYTE 0x08
242
// 32 bit signed integer
243
#define TYPE_INTEGER 0x09
244
// float
245
#define TYPE_FLOAT 0x0A
246
// double
247
#define TYPE_DOUBLE 0x0B
248
// 8 bit ASCII string
249
#define TYPE_STRING 0x0C
250
// list of traffic light phases
251
#define TYPE_TLPHASELIST 0x0D
252
// list of strings
253
#define TYPE_STRINGLIST 0x0E
254
// compound object
255
#define TYPE_COMPOUND 0x0F
256
// color (four ubytes)
257
#define TYPE_COLOR 0x11
258
259
260
261
// ****************************************
262
// RESULT TYPES
263
// ****************************************
264
// result type: Ok
265
#define RTYPE_OK 0x00
266
// result type: not implemented
267
#define RTYPE_NOTIMPLEMENTED 0x01
268
// result type: error
269
#define RTYPE_ERR 0xFF
270
271
// return value for invalid queries (especially vehicle is not on the road)
272
#define INVALID_DOUBLE_VALUE -1001.
273
// return value for invalid queries (especially vehicle is not on the road)
274
#define INVALID_INT_VALUE -1
275
276
277
278
// ****************************************
279
// TRAFFIC LIGHT PHASES
280
// ****************************************
281
// red phase
282
#define TLPHASE_RED 0x01
283
// yellow phase
284
#define TLPHASE_YELLOW 0x02
285
// green phase
286
#define TLPHASE_GREEN 0x03
287
// tl is blinking
288
#define TLPHASE_BLINKING 0x04
289
// tl is off and not blinking
290
#define TLPHASE_NOSIGNAL 0x05
291
292
293
294
// ****************************************
295
// DIFFERENT DISTANCE REQUESTS
296
// ****************************************
297
// air distance
298
#define REQUEST_AIRDIST 0x00
299
// driving distance
300
#define REQUEST_DRIVINGDIST 0x01
301
302
303
304
// ****************************************
305
// VARIABLE TYPES (for CMD_GET_*_VARIABLE)
306
// ****************************************
307
// list of instances' ids (get: all)
308
#define ID_LIST 0x00
309
310
// count of instances (get: all)
311
#define ID_COUNT 0x01
312
313
// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
314
#define LAST_STEP_VEHICLE_NUMBER 0x10
315
316
// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
317
#define LAST_STEP_MEAN_SPEED 0x11
318
319
// last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
320
#define LAST_STEP_VEHICLE_ID_LIST 0x12
321
322
// last step occupancy (get: induction loops, lanes, edges)
323
#define LAST_STEP_OCCUPANCY 0x13
324
325
// last step vehicle halting number (get: multi-entry/multi-exit detector, lanes, edges)
326
#define LAST_STEP_VEHICLE_HALTING_NUMBER 0x14
327
328
// last step mean vehicle length (get: induction loops, lanes, edges)
329
#define LAST_STEP_LENGTH 0x15
330
331
// last step time since last detection (get: induction loops)
332
#define LAST_STEP_TIME_SINCE_DETECTION 0x16
333
334
// entry times
335
#define LAST_STEP_VEHICLE_DATA 0x17
336
337
338
// traffic light states, encoded as rRgGyYoO tuple (get: traffic lights)
339
#define TL_RED_YELLOW_GREEN_STATE 0x20
340
341
// index of the phase (set: traffic lights)
342
#define TL_PHASE_INDEX 0x22
343
344
// traffic light program (set: traffic lights)
345
#define TL_PROGRAM 0x23
346
347
// phase duration (set: traffic lights)
348
#define TL_PHASE_DURATION 0x24
349
350
// controlled lanes (get: traffic lights)
351
#define TL_CONTROLLED_LANES 0x26
352
353
// controlled links (get: traffic lights)
354
#define TL_CONTROLLED_LINKS 0x27
355
356
// index of the current phase (get: traffic lights)
357
#define TL_CURRENT_PHASE 0x28
358
359
// name of the current program (get: traffic lights)
360
#define TL_CURRENT_PROGRAM 0x29
361
362
// controlled junctions (get: traffic lights)
363
#define TL_CONTROLLED_JUNCTIONS 0x2a
364
365
// complete definition (get: traffic lights)
366
#define TL_COMPLETE_DEFINITION_RYG 0x2b
367
368
// complete program (set: traffic lights)
369
#define TL_COMPLETE_PROGRAM_RYG 0x2c
370
371
// assumed time to next switch (get: traffic lights)
372
#define TL_NEXT_SWITCH 0x2d
373
374
375
376
// outgoing link number (get: lanes)
377
#define LANE_LINK_NUMBER 0x30
378
379
// id of parent edge (get: lanes)
380
#define LANE_EDGE_ID 0x31
381
382
// outgoing link definitions (get: lanes)
383
#define LANE_LINKS 0x33
384
385
// list of allowed vehicle classes (get&set: lanes)
386
#define LANE_ALLOWED 0x34
387
388
// list of not allowed vehicle classes (get&set: lanes)
389
#define LANE_DISALLOWED 0x35
390
391
392
// speed (get: vehicle)
393
#define VAR_SPEED 0x40
394
395
// maximum allowed/possible speed (get: vehicle types, lanes, set: edges, lanes)
396
#define VAR_MAXSPEED 0x41
397
398
// position (2D) (get: vehicle, poi, set: poi)
399
#define VAR_POSITION 0x42
400
401
// angle (get: vehicle)
402
#define VAR_ANGLE 0x43
403
404
// angle (get: vehicle types, lanes, set: lanes)
405
#define VAR_LENGTH 0x44
406
407
// color (get: vehicles, vehicle types, polygons, pois)
408
#define VAR_COLOR 0x45
409
410
// max. acceleration (get: vehicle types)
411
#define VAR_ACCEL 0x46
412
413
// max. deceleration (get: vehicle types)
414
#define VAR_DECEL 0x47
415
416
// driver reaction time (get: vehicle types)
417
#define VAR_TAU 0x48
418
419
// vehicle class (get: vehicle types)
420
#define VAR_VEHICLECLASS 0x49
421
422
// emission class (get: vehicle types)
423
#define VAR_EMISSIONCLASS 0x4a
424
425
// shape class (get: vehicle types)
426
#define VAR_SHAPECLASS 0x4b
427
428
// minimum gap (get: vehicle types)
429
#define VAR_MINGAP 0x4c
430
431
// width (get: vehicle types, lanes)
432
#define VAR_WIDTH 0x4d
433
434
// shape (get: polygons)
435
#define VAR_SHAPE 0x4e
436
437
// type id (get: vehicles, polygons, pois)
438
#define VAR_TYPE 0x4f
439
440
// road id (get: vehicles)
441
#define VAR_ROAD_ID 0x50
442
443
// lane id (get: vehicles)
444
#define VAR_LANE_ID 0x51
445
446
// lane index (get: vehicles)
447
#define VAR_LANE_INDEX 0x52
448
449
// route id (get & set: vehicles)
450
#define VAR_ROUTE_ID 0x53
451
452
// edges (get: routes)
453
#define VAR_EDGES 0x54
454
455
// filled? (get: polygons)
456
#define VAR_FILL 0x55
457
458
// position (1D along lane) (get: vehicle)
459
#define VAR_LANEPOSITION 0x56
460
461
// route (set: vehicles)
462
#define VAR_ROUTE 0x57
463
464
// travel time information (get&set: vehicle)
465
#define VAR_EDGE_TRAVELTIME 0x58
466
467
// effort information (get&set: vehicle)
468
#define VAR_EDGE_EFFORT 0x59
469
470
// last step travel time (get: edge, lane)
471
#define VAR_CURRENT_TRAVELTIME 0x5a
472
473
// signals state (get/set: vehicle)
474
#define VAR_SIGNALS 0x5b
475
476
// new lane/position along (set: vehicle)
477
#define VAR_MOVE_TO 0x5c
478
479
// driver imperfection (set: vehicle)
480
#define VAR_IMPERFECTION 0x5d
481
482
// speed factor (set: vehicle)
483
#define VAR_SPEED_FACTOR 0x5e
484
485
// speed deviation (set: vehicle)
486
#define VAR_SPEED_DEVIATION 0x5f
487
488
// speed without TraCI influence (get: vehicle)
489
#define VAR_SPEED_WITHOUT_TRACI 0xb1
490
491
// best lanes (get: vehicle)
492
#define VAR_BEST_LANES 0xb2
493
494
// how speed is set (set: vehicle)
495
#define VAR_SPEEDSETMODE 0xb3
496
497
498
499
500
// current CO2 emission of a node (get: vehicle, lane, edge)
501
#define VAR_CO2EMISSION 0x60
502
503
// current CO emission of a node (get: vehicle, lane, edge)
504
#define VAR_COEMISSION 0x61
505
506
// current HC emission of a node (get: vehicle, lane, edge)
507
#define VAR_HCEMISSION 0x62
508
509
// current PMx emission of a node (get: vehicle, lane, edge)
510
#define VAR_PMXEMISSION 0x63
511
512
// current NOx emission of a node (get: vehicle, lane, edge)
513
#define VAR_NOXEMISSION 0x64
514
515
// current fuel consumption of a node (get: vehicle, lane, edge)
516
#define VAR_FUELCONSUMPTION 0x65
517
518
// current noise emission of a node (get: vehicle, lane, edge)
519
#define VAR_NOISEEMISSION 0x66
520
521
522
523
// current time step (get: simulation)
524
#define VAR_TIME_STEP 0x70
525
526
// number of loaded vehicles (get: simulation)
527
#define VAR_LOADED_VEHICLES_NUMBER 0x71
528
529
// loaded vehicle ids (get: simulation)
530
#define VAR_LOADED_VEHICLES_IDS 0x72
531
532
// number of departed vehicle (get: simulation)
533
#define VAR_DEPARTED_VEHICLES_NUMBER 0x73
534
535
// departed vehicle ids (get: simulation)
536
#define VAR_DEPARTED_VEHICLES_IDS 0x74
537
538
// number of vehicles starting to teleport (get: simulation)
539
#define VAR_TELEPORT_STARTING_VEHICLES_NUMBER 0x75
540
541
// ids of vehicles starting to teleport (get: simulation)
542
#define VAR_TELEPORT_STARTING_VEHICLES_IDS 0x76
543
544
// number of vehicles ending to teleport (get: simulation)
545
#define VAR_TELEPORT_ENDING_VEHICLES_NUMBER 0x77
546
547
// ids of vehicles ending to teleport (get: simulation)
548
#define VAR_TELEPORT_ENDING_VEHICLES_IDS 0x78
549
550
// number of arrived vehicles (get: simulation)
551
#define VAR_ARRIVED_VEHICLES_NUMBER 0x79
552
553
// ids of arrived vehicles (get: simulation)
554
#define VAR_ARRIVED_VEHICLES_IDS 0x7a
555
556
// delta t (get: simulation)
557
#define VAR_DELTA_T 0x7b
558
559
// bounding box (get: simulation)
560
#define VAR_NET_BOUNDING_BOX 0x7c
561
562
// minimum number of expected vehicles (get: simulation)
563
#define VAR_MIN_EXPECTED_VEHICLES 0x7d
564
565
566
567
// add an instance (poi, polygon, vehicle, route)
568
#define ADD 0x80
569
570
// remove an instance (poi, polygon)
571
#define REMOVE 0x81
572
573
// convert coordinates
574
#define POSITION_CONVERSION 0x82
575
576
// distance between points or vehicles
577
#define DISTANCE_REQUEST 0x83
578
579
580
// force rerouting based on travel time (vehicles)
581
#define CMD_REROUTE_TRAVELTIME 0x90
582
583
// force rerouting based on effort (vehicles)
584
#define CMD_REROUTE_EFFORT 0x91
585
586
// validates current route (vehicles)
587
#define VAR_ROUTE_VALID 0x92
588
589
590
591
// zoom
592
#define VAR_VIEW_ZOOM 0xa0
593
594
// view position
595
#define VAR_VIEW_OFFSET 0xa1
596
597
// view schema
598
#define VAR_VIEW_SCHEMA 0xa2
599
600
// view by boundary
601
#define VAR_VIEW_BOUNDARY 0xa3
602
603
// screenshot
604
#define VAR_SCREENSHOT 0xa5
605
606
// track vehicle
607
#define VAR_TRACK_VEHICLE 0xa6
608
609
610
611
#endif
build
buildd
sumo-0.15.0~dfsg
src
traci-server
TraCIConstants.h
Generated on Wed Jul 18 2012 22:58:36 for SUMO - Simulation of Urban MObility by
1.8.1.1