SUMO - Simulation of Urban MObility
TraCIConstants.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2007-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
27 // holds codes used for TraCI
28 /****************************************************************************/
29 #ifndef TRACICONSTANTS_H
30 #define TRACICONSTANTS_H
31 
32 // ****************************************
33 // VERSION
34 // ****************************************
35 #define TRACI_VERSION 17
36 
37 // ****************************************
38 // COMMANDS
39 // ****************************************
40 // command: get version
41 #define CMD_GETVERSION 0x00
42 
43 // command: load
44 #define CMD_LOAD 0x01
45 
46 // command: simulation step
47 #define CMD_SIMSTEP 0x02
48 
49 // command: set connection priority (execution order)
50 #define CMD_SETORDER 0x03
51 
52 // command: stop node
53 #define CMD_STOP 0x12
54 
55 // command: Resume from parking
56 #define CMD_RESUME 0x19
57 
58 // command: set lane
59 #define CMD_CHANGELANE 0x13
60 
61 // command: slow down
62 #define CMD_SLOWDOWN 0x14
63 
64 // command: set sublane (vehicle)
65 #define CMD_CHANGESUBLANE 0x15
66 
67 // command: change target
68 #define CMD_CHANGETARGET 0x31
69 
70 // command: close sumo
71 #define CMD_CLOSE 0x7F
72 
73 
74 // command: subscribe induction loop (e1) context
75 #define CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT 0x80
76 // response: subscribe induction loop (e1) context
77 #define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT 0x90
78 // command: get induction loop (e1) variable
79 #define CMD_GET_INDUCTIONLOOP_VARIABLE 0xa0
80 // response: get induction loop (e1) variable
81 #define RESPONSE_GET_INDUCTIONLOOP_VARIABLE 0xb0
82 // command: subscribe induction loop (e1) variable
83 #define CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xd0
84 // response: subscribe induction loop (e1) variable
85 #define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xe0
86 
87 // command: subscribe multi-entry/multi-exit detector (e3) context
88 #define CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT 0x81
89 // response: subscribe multi-entry/multi-exit detector (e3) context
90 #define RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT 0x91
91 // command: get multi-entry/multi-exit detector (e3) variable
92 #define CMD_GET_MULTIENTRYEXIT_VARIABLE 0xa1
93 // response: get multi-entry/multi-exit detector (e3) variable
94 #define RESPONSE_GET_MULTIENTRYEXIT_VARIABLE 0xb1
95 // command: subscribe multi-entry/multi-exit detector (e3) variable
96 #define CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE 0xd1
97 // response: subscribe multi-entry/multi-exit detector (e3) variable
98 #define RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE 0xe1
99 
100 // command: subscribe traffic lights context
101 #define CMD_SUBSCRIBE_TL_CONTEXT 0x82
102 // response: subscribe traffic lights context
103 #define RESPONSE_SUBSCRIBE_TL_CONTEXT 0x92
104 // command: get traffic lights variable
105 #define CMD_GET_TL_VARIABLE 0xa2
106 // response: get traffic lights variable
107 #define RESPONSE_GET_TL_VARIABLE 0xb2
108 // command: set traffic lights variable
109 #define CMD_SET_TL_VARIABLE 0xc2
110 // command: subscribe traffic lights variable
111 #define CMD_SUBSCRIBE_TL_VARIABLE 0xd2
112 // response: subscribe traffic lights variable
113 #define RESPONSE_SUBSCRIBE_TL_VARIABLE 0xe2
114 
115 // command: subscribe lane context
116 #define CMD_SUBSCRIBE_LANE_CONTEXT 0x83
117 // response: subscribe lane context
118 #define RESPONSE_SUBSCRIBE_LANE_CONTEXT 0x93
119 // command: get lane variable
120 #define CMD_GET_LANE_VARIABLE 0xa3
121 // response: get lane variable
122 #define RESPONSE_GET_LANE_VARIABLE 0xb3
123 // command: set lane variable
124 #define CMD_SET_LANE_VARIABLE 0xc3
125 // command: subscribe lane variable
126 #define CMD_SUBSCRIBE_LANE_VARIABLE 0xd3
127 // response: subscribe lane variable
128 #define RESPONSE_SUBSCRIBE_LANE_VARIABLE 0xe3
129 
130 // command: subscribe vehicle context
131 #define CMD_SUBSCRIBE_VEHICLE_CONTEXT 0x84
132 // response: subscribe vehicle context
133 #define RESPONSE_SUBSCRIBE_VEHICLE_CONTEXT 0x94
134 // command: get vehicle variable
135 #define CMD_GET_VEHICLE_VARIABLE 0xa4
136 // response: get vehicle variable
137 #define RESPONSE_GET_VEHICLE_VARIABLE 0xb4
138 // command: set vehicle variable
139 #define CMD_SET_VEHICLE_VARIABLE 0xc4
140 // command: subscribe vehicle variable
141 #define CMD_SUBSCRIBE_VEHICLE_VARIABLE 0xd4
142 // response: subscribe vehicle variable
143 #define RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE 0xe4
144 
145 // command: subscribe vehicle type context
146 #define CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT 0x85
147 // response: subscribe vehicle type context
148 #define RESPONSE_SUBSCRIBE_VEHICLETYPE_CONTEXT 0x95
149 // command: get vehicle type variable
150 #define CMD_GET_VEHICLETYPE_VARIABLE 0xa5
151 // response: get vehicle type variable
152 #define RESPONSE_GET_VEHICLETYPE_VARIABLE 0xb5
153 // command: set vehicle type variable
154 #define CMD_SET_VEHICLETYPE_VARIABLE 0xc5
155 // command: subscribe vehicle type variable
156 #define CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xd5
157 // response: subscribe vehicle type variable
158 #define RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE 0xe5
159 
160 // command: subscribe route context
161 #define CMD_SUBSCRIBE_ROUTE_CONTEXT 0x86
162 // response: subscribe route context
163 #define RESPONSE_SUBSCRIBE_ROUTE_CONTEXT 0x96
164 // command: get route variable
165 #define CMD_GET_ROUTE_VARIABLE 0xa6
166 // response: get route variable
167 #define RESPONSE_GET_ROUTE_VARIABLE 0xb6
168 // command: set route variable
169 #define CMD_SET_ROUTE_VARIABLE 0xc6
170 // command: subscribe route variable
171 #define CMD_SUBSCRIBE_ROUTE_VARIABLE 0xd6
172 // response: subscribe route variable
173 #define RESPONSE_SUBSCRIBE_ROUTE_VARIABLE 0xe6
174 
175 // command: subscribe poi context
176 #define CMD_SUBSCRIBE_POI_CONTEXT 0x87
177 // response: subscribe poi context
178 #define RESPONSE_SUBSCRIBE_POI_CONTEXT 0x97
179 // command: get poi variable
180 #define CMD_GET_POI_VARIABLE 0xa7
181 // response: get poi variable
182 #define RESPONSE_GET_POI_VARIABLE 0xb7
183 // command: set poi variable
184 #define CMD_SET_POI_VARIABLE 0xc7
185 // command: subscribe poi variable
186 #define CMD_SUBSCRIBE_POI_VARIABLE 0xd7
187 // response: subscribe poi variable
188 #define RESPONSE_SUBSCRIBE_POI_VARIABLE 0xe7
189 
190 // command: subscribe polygon context
191 #define CMD_SUBSCRIBE_POLYGON_CONTEXT 0x88
192 // response: subscribe polygon context
193 #define RESPONSE_SUBSCRIBE_POLYGON_CONTEXT 0x98
194 // command: get polygon variable
195 #define CMD_GET_POLYGON_VARIABLE 0xa8
196 // response: get polygon variable
197 #define RESPONSE_GET_POLYGON_VARIABLE 0xb8
198 // command: set polygon variable
199 #define CMD_SET_POLYGON_VARIABLE 0xc8
200 // command: subscribe polygon variable
201 #define CMD_SUBSCRIBE_POLYGON_VARIABLE 0xd8
202 // response: subscribe polygon variable
203 #define RESPONSE_SUBSCRIBE_POLYGON_VARIABLE 0xe8
204 
205 // command: subscribe junction context
206 #define CMD_SUBSCRIBE_JUNCTION_CONTEXT 0x89
207 // response: subscribe junction context
208 #define RESPONSE_SUBSCRIBE_JUNCTION_CONTEXT 0x99
209 // command: get junction variable
210 #define CMD_GET_JUNCTION_VARIABLE 0xa9
211 // response: get junction variable
212 #define RESPONSE_GET_JUNCTION_VARIABLE 0xb9
213 // command: set junction variable
214 #define CMD_SET_JUNCTION_VARIABLE 0xc9
215 // command: subscribe junction variable
216 #define CMD_SUBSCRIBE_JUNCTION_VARIABLE 0xd9
217 // response: subscribe junction variable
218 #define RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE 0xe9
219 
220 // command: subscribe edge context
221 #define CMD_SUBSCRIBE_EDGE_CONTEXT 0x8a
222 // response: subscribe edge context
223 #define RESPONSE_SUBSCRIBE_EDGE_CONTEXT 0x9a
224 // command: get edge variable
225 #define CMD_GET_EDGE_VARIABLE 0xaa
226 // response: get edge variable
227 #define RESPONSE_GET_EDGE_VARIABLE 0xba
228 // command: set edge variable
229 #define CMD_SET_EDGE_VARIABLE 0xca
230 // command: subscribe edge variable
231 #define CMD_SUBSCRIBE_EDGE_VARIABLE 0xda
232 // response: subscribe edge variable
233 #define RESPONSE_SUBSCRIBE_EDGE_VARIABLE 0xea
234 
235 // command: subscribe simulation context
236 #define CMD_SUBSCRIBE_SIM_CONTEXT 0x8b
237 // response: subscribe simulation context
238 #define RESPONSE_SUBSCRIBE_SIM_CONTEXT 0x9b
239 // command: get simulation variable
240 #define CMD_GET_SIM_VARIABLE 0xab
241 // response: get simulation variable
242 #define RESPONSE_GET_SIM_VARIABLE 0xbb
243 // command: set simulation variable
244 #define CMD_SET_SIM_VARIABLE 0xcb
245 // command: subscribe simulation variable
246 #define CMD_SUBSCRIBE_SIM_VARIABLE 0xdb
247 // response: subscribe simulation variable
248 #define RESPONSE_SUBSCRIBE_SIM_VARIABLE 0xeb
249 
250 // command: subscribe GUI context
251 #define CMD_SUBSCRIBE_GUI_CONTEXT 0x8c
252 // response: subscribe GUI context
253 #define RESPONSE_SUBSCRIBE_GUI_CONTEXT 0x9c
254 // command: get GUI variable
255 #define CMD_GET_GUI_VARIABLE 0xac
256 // response: get GUI variable
257 #define RESPONSE_GET_GUI_VARIABLE 0xbc
258 // command: set GUI variable
259 #define CMD_SET_GUI_VARIABLE 0xcc
260 // command: subscribe GUI variable
261 #define CMD_SUBSCRIBE_GUI_VARIABLE 0xdc
262 // response: subscribe GUI variable
263 #define RESPONSE_SUBSCRIBE_GUI_VARIABLE 0xec
264 
265 // command: subscribe areal detector (e2) context
266 #define CMD_SUBSCRIBE_LANEAREA_CONTEXT 0x8d
267 // response: subscribe areal detector (e2) context
268 #define RESPONSE_SUBSCRIBE_LANEAREA_CONTEXT 0x9d
269 // command: get areal detector (e2) variable
270 #define CMD_GET_LANEAREA_VARIABLE 0xad
271 // response: get areal detector (e2) variable
272 #define RESPONSE_GET_LANEAREA_VARIABLE 0xbd
273 // command: subscribe areal detector (e2) variable
274 #define CMD_SUBSCRIBE_LANEAREA_VARIABLE 0xdd
275 // response: subscribe areal detector (e2) variable
276 #define RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE 0xed
277 
278 // command: subscribe person context
279 #define CMD_SUBSCRIBE_PERSON_CONTEXT 0x8e
280 // response: subscribe person context
281 #define RESPONSE_SUBSCRIBE_PERSON_CONTEXT 0x9e
282 // command: get person variable
283 #define CMD_GET_PERSON_VARIABLE 0xae
284 // response: get person variable
285 #define RESPONSE_GET_PERSON_VARIABLE 0xbe
286 // command: set person variable
287 #define CMD_SET_PERSON_VARIABLE 0xce
288 // command: subscribe person variable
289 #define CMD_SUBSCRIBE_PERSON_VARIABLE 0xde
290 // response: subscribe person variable
291 #define RESPONSE_SUBSCRIBE_PERSON_VARIABLE 0xee
292 
293 
294 // ****************************************
295 // POSITION REPRESENTATIONS
296 // ****************************************
297 // Position in geo-coordinates
298 #define POSITION_LON_LAT 0x00
299 // 2D cartesian coordinates
300 #define POSITION_2D 0x01
301 // Position in geo-coordinates with altitude
302 #define POSITION_LON_LAT_ALT 0x02
303 // 3D cartesian coordinates
304 #define POSITION_3D 0x03
305 // Position on road map
306 #define POSITION_ROADMAP 0x04
307 
308 
309 // ****************************************
310 // DATA TYPES
311 // ****************************************
312 // Boundary Box (4 doubles)
313 #define TYPE_BOUNDINGBOX 0x05
314 // Polygon (2*n doubles)
315 #define TYPE_POLYGON 0x06
316 // unsigned byte
317 #define TYPE_UBYTE 0x07
318 // signed byte
319 #define TYPE_BYTE 0x08
320 // 32 bit signed integer
321 #define TYPE_INTEGER 0x09
322 // float
323 #define TYPE_FLOAT 0x0A
324 // double
325 #define TYPE_DOUBLE 0x0B
326 // 8 bit ASCII string
327 #define TYPE_STRING 0x0C
328 // list of traffic light phases
329 #define TYPE_TLPHASELIST 0x0D
330 // list of strings
331 #define TYPE_STRINGLIST 0x0E
332 // compound object
333 #define TYPE_COMPOUND 0x0F
334 // color (four ubytes)
335 #define TYPE_COLOR 0x11
336 
337 
338 // ****************************************
339 // RESULT TYPES
340 // ****************************************
341 // result type: Ok
342 #define RTYPE_OK 0x00
343 // result type: not implemented
344 #define RTYPE_NOTIMPLEMENTED 0x01
345 // result type: error
346 #define RTYPE_ERR 0xFF
347 
348 // return value for invalid queries (especially vehicle is not on the road)
349 #define INVALID_DOUBLE_VALUE -1001.
350 // return value for invalid queries (especially vehicle is not on the road)
351 #define INVALID_INT_VALUE -1
352 // maximum value for client ordering (2 ^ 30 - 1)
353 #define MAX_ORDER 1073741823
354 
355 // ****************************************
356 // TRAFFIC LIGHT PHASES
357 // ****************************************
358 // red phase
359 #define TLPHASE_RED 0x01
360 // yellow phase
361 #define TLPHASE_YELLOW 0x02
362 // green phase
363 #define TLPHASE_GREEN 0x03
364 // tl is blinking
365 #define TLPHASE_BLINKING 0x04
366 // tl is off and not blinking
367 #define TLPHASE_NOSIGNAL 0x05
368 
369 
370 // ****************************************
371 // DIFFERENT DISTANCE REQUESTS
372 // ****************************************
373 // air distance
374 #define REQUEST_AIRDIST 0x00
375 // driving distance
376 #define REQUEST_DRIVINGDIST 0x01
377 
378 
379 // ****************************************
380 // VEHICLE REMOVAL REASONS
381 // ****************************************
382 // vehicle started teleport
383 #define REMOVE_TELEPORT 0x00
384 // vehicle removed while parking
385 #define REMOVE_PARKING 0x01
386 // vehicle arrived
387 #define REMOVE_ARRIVED 0x02
388 // vehicle was vaporized
389 #define REMOVE_VAPORIZED 0x03
390 // vehicle finished route during teleport
391 #define REMOVE_TELEPORT_ARRIVED 0x04
392 
393 // ****************************************
394 // PERSON/CONTAINER STAGES
395 // ****************************************
396 // person / container stopping
397 #define STAGE_WAITING_FOR_DEPART 0x00
398 // person / container stopping
399 #define STAGE_WAITING 0x01
400 // person walking / container transhiping
401 #define STAGE_WALKING 0x02
402 // person riding / container being transported
403 #define STAGE_DRIVING 0x03
404 
405 // ****************************************
406 // Stop Flags
407 // ****************************************
408 #define STOP_DEFAULT 0x00
409 #define STOP_PARKING 0x01
410 #define STOP_TRIGGERED 0x02
411 #define STOP_CONTAINER_TRIGGERED 0x04
412 #define STOP_BUS_STOP 0x08
413 #define STOP_CONTAINER_STOP 0x10
414 #define STOP_CHARGING_STATION 0x20
415 #define STOP_PARKING_AREA 0x40
416 
417 // ****************************************
418 // Departure Flags
419 // ****************************************
420 #define DEPARTFLAG_TRIGGERED -0x01
421 #define DEPARTFLAG_CONTAINER_TRIGGERED -0x02
422 #define DEPARTFLAG_NOW -0x03
423 
424 #define DEPARTFLAG_SPEED_RANDOM -0x02
425 #define DEPARTFLAG_SPEED_MAX -0x03
426 
427 #define DEPARTFLAG_LANE_RANDOM -0x02
428 #define DEPARTFLAG_LANE_FREE -0x03
429 #define DEPARTFLAG_LANE_ALLOWED_FREE -0x04
430 #define DEPARTFLAG_LANE_BEST_FREE -0x05
431 #define DEPARTFLAG_LANE_FIRST_ALLOWED -0x06
432 
433 #define DEPARTFLAG_POS_RANDOM -0x02
434 #define DEPARTFLAG_POS_FREE -0x03
435 #define DEPARTFLAG_POS_BASE -0x04
436 #define DEPARTFLAG_POS_LAST -0x05
437 #define DEPARTFLAG_POS_RANDOM_FREE -0x06
438 
439 #define ARRIVALFLAG_LANE_CURRENT -0x02
440 #define ARRIVALFLAG_SPEED_CURRENT -0x02
441 
442 #define ARRIVALFLAG_POS_RANDOM -0x02
443 #define ARRIVALFLAG_POS_MAX -0x03
444 
445 // ****************************************
446 // Routing modes
447 // ****************************************
448 // use custom weights if available, fall back to loaded weights and then to free-flow speed
449 #define ROUTING_MODE_DEFAULT 0x00
450 // use aggregated travel times from device.rerouting
451 #define ROUTING_MODE_AGGREGATED 0x01
452 
453 // ****************************************
454 // VARIABLE TYPES (for CMD_GET_*_VARIABLE)
455 // ****************************************
456 // list of instances' ids (get: all)
457 #define ID_LIST 0x00
458 
459 // count of instances (get: all)
460 #define ID_COUNT 0x01
461 
462 // subscribe object variables (get: all)
463 #define AUTOMATIC_VARIABLES_SUBSCRIPTION 0x02
464 
465 // subscribe context variables (get: all)
466 #define AUTOMATIC_CONTEXT_SUBSCRIPTION 0x03
467 
468 // generic attributes (get/set: all)
469 #define GENERIC_ATTRIBUTE 0x03
470 
471 // last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
472 #define LAST_STEP_VEHICLE_NUMBER 0x10
473 
474 // last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
475 #define LAST_STEP_MEAN_SPEED 0x11
476 
477 // last step vehicle list (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
478 #define LAST_STEP_VEHICLE_ID_LIST 0x12
479 
480 // last step occupancy (get: induction loops, lanes, edges)
481 #define LAST_STEP_OCCUPANCY 0x13
482 
483 // last step vehicle halting number (get: multi-entry/multi-exit detector, lanes, edges)
484 #define LAST_STEP_VEHICLE_HALTING_NUMBER 0x14
485 
486 // last step mean vehicle length (get: induction loops, lanes, edges)
487 #define LAST_STEP_LENGTH 0x15
488 
489 // last step time since last detection (get: induction loops)
490 #define LAST_STEP_TIME_SINCE_DETECTION 0x16
491 
492 // entry times
493 #define LAST_STEP_VEHICLE_DATA 0x17
494 
495 // last step jam length in vehicles
496 #define JAM_LENGTH_VEHICLE 0x18
497 
498 // last step jam length in meters
499 #define JAM_LENGTH_METERS 0x19
500 
501 // last step person list (get: edges)
502 #define LAST_STEP_PERSON_ID_LIST 0x1a
503 
504 
505 // traffic light states, encoded as rRgGyYoO tuple (get: traffic lights)
506 #define TL_RED_YELLOW_GREEN_STATE 0x20
507 
508 // index of the phase (set: traffic lights)
509 #define TL_PHASE_INDEX 0x22
510 
511 // traffic light program (set: traffic lights)
512 #define TL_PROGRAM 0x23
513 
514 // phase duration (set: traffic lights)
515 #define TL_PHASE_DURATION 0x24
516 
517 // controlled lanes (get: traffic lights)
518 #define TL_CONTROLLED_LANES 0x26
519 
520 // controlled links (get: traffic lights)
521 #define TL_CONTROLLED_LINKS 0x27
522 
523 // index of the current phase (get: traffic lights)
524 #define TL_CURRENT_PHASE 0x28
525 
526 // name of the current program (get: traffic lights)
527 #define TL_CURRENT_PROGRAM 0x29
528 
529 // controlled junctions (get: traffic lights)
530 #define TL_CONTROLLED_JUNCTIONS 0x2a
531 
532 // complete definition (get: traffic lights)
533 #define TL_COMPLETE_DEFINITION_RYG 0x2b
534 
535 // complete program (set: traffic lights)
536 #define TL_COMPLETE_PROGRAM_RYG 0x2c
537 
538 // assumed time to next switch (get: traffic lights)
539 #define TL_NEXT_SWITCH 0x2d
540 
541 // current state, using external signal names (get: traffic lights)
542 #define TL_EXTERNAL_STATE 0x2e
543 
544 // outgoing link number (get: lanes)
545 #define LANE_LINK_NUMBER 0x30
546 
547 // id of parent edge (get: lanes)
548 #define LANE_EDGE_ID 0x31
549 
550 // outgoing link definitions (get: lanes)
551 #define LANE_LINKS 0x33
552 
553 // list of allowed vehicle classes (get&set: lanes)
554 #define LANE_ALLOWED 0x34
555 
556 // list of not allowed vehicle classes (get&set: lanes)
557 #define LANE_DISALLOWED 0x35
558 
559 // list of foe lanes (get: lanes)
560 #define VAR_FOES 0x37
561 
562 // slope (get: edge, lane, vehicle, person)
563 #define VAR_SLOPE 0x36
564 
565 // speed (get: vehicle)
566 #define VAR_SPEED 0x40
567 
568 // maximum allowed/possible speed (get: vehicle types, lanes, set: edges, lanes)
569 #define VAR_MAXSPEED 0x41
570 
571 // position (2D) (get: vehicle, poi, inductionloop, areadetector; set: poi)
572 #define VAR_POSITION 0x42
573 
574 // position (3D) (get: vehicle, poi, set: poi)
575 #define VAR_POSITION3D 0x39
576 
577 // angle (get: vehicle)
578 #define VAR_ANGLE 0x43
579 
580 // angle (get: vehicle types, lanes, arealdetector, set: lanes)
581 #define VAR_LENGTH 0x44
582 
583 // color (get: vehicles, vehicle types, polygons, pois)
584 #define VAR_COLOR 0x45
585 
586 // max. acceleration (get: vehicles, vehicle types)
587 #define VAR_ACCEL 0x46
588 
589 // max. comfortable deceleration (get: vehicles, vehicle types)
590 #define VAR_DECEL 0x47
591 
592 // max. (physically possible) deceleration (get: vehicles, vehicle types)
593 #define VAR_EMERGENCY_DECEL 0x7b
594 
595 // apparent deceleration (get: vehicles, vehicle types)
596 #define VAR_APPARENT_DECEL 0x7c
597 
598 // action step length (get: vehicles, vehicle types)
599 #define VAR_ACTIONSTEPLENGTH 0x7d
600 
601 // last action time (get: vehicles)
602 #define VAR_LASTACTIONTIME 0x7f
603 
604 // driver's desired headway (get: vehicle types)
605 #define VAR_TAU 0x48
606 
607 // vehicle class (get: vehicle types)
608 #define VAR_VEHICLECLASS 0x49
609 
610 // emission class (get: vehicle types)
611 #define VAR_EMISSIONCLASS 0x4a
612 
613 // shape class (get: vehicle types)
614 #define VAR_SHAPECLASS 0x4b
615 
616 // minimum gap (get: vehicle types)
617 #define VAR_MINGAP 0x4c
618 
619 // width (get: vehicle types, lanes)
620 #define VAR_WIDTH 0x4d
621 
622 // shape (get: polygons)
623 #define VAR_SHAPE 0x4e
624 
625 // type id (get: vehicles, polygons, pois)
626 #define VAR_TYPE 0x4f
627 
628 // road id (get: vehicles)
629 #define VAR_ROAD_ID 0x50
630 
631 // lane id (get: vehicles, inductionloop, arealdetector)
632 #define VAR_LANE_ID 0x51
633 
634 // lane index (get: vehicles)
635 #define VAR_LANE_INDEX 0x52
636 
637 // route id (get & set: vehicles)
638 #define VAR_ROUTE_ID 0x53
639 
640 // edges (get: routes, vehicles)
641 #define VAR_EDGES 0x54
642 
643 // filled? (get: polygons)
644 #define VAR_FILL 0x55
645 
646 // position (1D along lane) (get: vehicle)
647 #define VAR_LANEPOSITION 0x56
648 
649 // route (set: vehicles)
650 #define VAR_ROUTE 0x57
651 
652 // travel time information (get&set: vehicle)
653 #define VAR_EDGE_TRAVELTIME 0x58
654 
655 // effort information (get&set: vehicle)
656 #define VAR_EDGE_EFFORT 0x59
657 
658 // last step travel time (get: edge, lane)
659 #define VAR_CURRENT_TRAVELTIME 0x5a
660 
661 // signals state (get/set: vehicle)
662 #define VAR_SIGNALS 0x5b
663 
664 // new lane/position along (set: vehicle)
665 #define VAR_MOVE_TO 0x5c
666 
667 // driver imperfection (set: vehicle)
668 #define VAR_IMPERFECTION 0x5d
669 
670 // speed factor (set: vehicle)
671 #define VAR_SPEED_FACTOR 0x5e
672 
673 // speed deviation (set: vehicle)
674 #define VAR_SPEED_DEVIATION 0x5f
675 
676 // routing mode (get/set: vehicle)
677 #define VAR_ROUTING_MODE 0x89
678 
679 // speed without TraCI influence (get: vehicle)
680 #define VAR_SPEED_WITHOUT_TRACI 0xb1
681 
682 // best lanes (get: vehicle)
683 #define VAR_BEST_LANES 0xb2
684 
685 // how speed is set (set: vehicle)
686 #define VAR_SPEEDSETMODE 0xb3
687 
688 // move vehicle to explicit (remote controlled) position (set: vehicle)
689 #define MOVE_TO_XY 0xb4
690 
691 // is the vehicle stopped, and if so parked and/or triggered?
692 // value = stopped + 2 * parking + 4 * triggered
693 #define VAR_STOPSTATE 0xb5
694 
695 // how lane changing is performed (get/set: vehicle)
696 #define VAR_LANECHANGE_MODE 0xb6
697 
698 // maximum speed regarding max speed on the current lane and speed factor (get: vehicle)
699 #define VAR_ALLOWED_SPEED 0xb7
700 
701 // position (1D lateral position relative to center of the current lane) (get: vehicle)
702 #define VAR_LANEPOSITION_LAT 0xb8
703 
704 // get/set prefered lateral alignment within the lane (vehicle)
705 #define VAR_LATALIGNMENT 0xb9
706 
707 // get/set maximum lateral speed (vehicle, vtypes)
708 #define VAR_MAXSPEED_LAT 0xba
709 
710 // get/set minimum lateral gap (vehicle, vtypes)
711 #define VAR_MINGAP_LAT 0xbb
712 
713 // get/set vehicle height (vehicle, vtypes)
714 #define VAR_HEIGHT 0xbc
715 
716 // get/set vehicle line
717 #define VAR_LINE 0xbd
718 
719 // get/set vehicle via
720 #define VAR_VIA 0xbe
721 
722 // current CO2 emission of a node (get: vehicle, lane, edge)
723 #define VAR_CO2EMISSION 0x60
724 
725 // current CO emission of a node (get: vehicle, lane, edge)
726 #define VAR_COEMISSION 0x61
727 
728 // current HC emission of a node (get: vehicle, lane, edge)
729 #define VAR_HCEMISSION 0x62
730 
731 // current PMx emission of a node (get: vehicle, lane, edge)
732 #define VAR_PMXEMISSION 0x63
733 
734 // current NOx emission of a node (get: vehicle, lane, edge)
735 #define VAR_NOXEMISSION 0x64
736 
737 // current fuel consumption of a node (get: vehicle, lane, edge)
738 #define VAR_FUELCONSUMPTION 0x65
739 
740 // current noise emission of a node (get: vehicle, lane, edge)
741 #define VAR_NOISEEMISSION 0x66
742 
743 // current person number (get: vehicle)
744 #define VAR_PERSON_NUMBER 0x67
745 
746 // number of persons waiting at a defined bus stop (get: simulation)
747 #define VAR_BUS_STOP_WAITING 0x67
748 
749 // current leader together with gap (get: vehicle)
750 #define VAR_LEADER 0x68
751 
752 // edge index in current route (get: vehicle)
753 #define VAR_ROUTE_INDEX 0x69
754 
755 // current waiting time (get: vehicle, lane)
756 #define VAR_WAITING_TIME 0x7a
757 
758 // current waiting time (get: vehicle)
759 #define VAR_ACCUMULATED_WAITING_TIME 0x87
760 
761 // upcoming traffic lights (get: vehicle)
762 #define VAR_NEXT_TLS 0x70
763 
764 // current time step (get: simulation)
765 #define VAR_TIME_STEP 0x70
766 
767 // current electricity consumption of a node (get: vehicle, lane, edge)
768 #define VAR_ELECTRICITYCONSUMPTION 0x71
769 
770 // number of loaded vehicles (get: simulation)
771 #define VAR_LOADED_VEHICLES_NUMBER 0x71
772 
773 // loaded vehicle ids (get: simulation)
774 #define VAR_LOADED_VEHICLES_IDS 0x72
775 
776 // number of departed vehicle (get: simulation)
777 #define VAR_DEPARTED_VEHICLES_NUMBER 0x73
778 
779 // departed vehicle ids (get: simulation)
780 #define VAR_DEPARTED_VEHICLES_IDS 0x74
781 
782 // number of vehicles starting to teleport (get: simulation)
783 #define VAR_TELEPORT_STARTING_VEHICLES_NUMBER 0x75
784 
785 // ids of vehicles starting to teleport (get: simulation)
786 #define VAR_TELEPORT_STARTING_VEHICLES_IDS 0x76
787 
788 // number of vehicles ending to teleport (get: simulation)
789 #define VAR_TELEPORT_ENDING_VEHICLES_NUMBER 0x77
790 
791 // ids of vehicles ending to teleport (get: simulation)
792 #define VAR_TELEPORT_ENDING_VEHICLES_IDS 0x78
793 
794 // number of arrived vehicles (get: simulation)
795 #define VAR_ARRIVED_VEHICLES_NUMBER 0x79
796 
797 // ids of arrived vehicles (get: simulation)
798 #define VAR_ARRIVED_VEHICLES_IDS 0x7a
799 
800 // delta t (get: simulation)
801 #define VAR_DELTA_T 0x7b
802 
803 // bounding box (get: simulation)
804 #define VAR_NET_BOUNDING_BOX 0x7c
805 
806 // minimum number of expected vehicles (get: simulation)
807 #define VAR_MIN_EXPECTED_VEHICLES 0x7d
808 
809 // number of vehicles starting to park (get: simulation)
810 #define VAR_STOP_STARTING_VEHICLES_NUMBER 0x68
811 
812 // ids of vehicles starting to park (get: simulation)
813 #define VAR_STOP_STARTING_VEHICLES_IDS 0x69
814 
815 // number of vehicles ending to park (get: simulation)
816 #define VAR_STOP_ENDING_VEHICLES_NUMBER 0x6a
817 
818 // ids of vehicles ending to park (get: simulation)
819 #define VAR_STOP_ENDING_VEHICLES_IDS 0x6b
820 
821 // number of vehicles starting to park (get: simulation)
822 #define VAR_PARKING_STARTING_VEHICLES_NUMBER 0x6c
823 
824 // ids of vehicles starting to park (get: simulation)
825 #define VAR_PARKING_STARTING_VEHICLES_IDS 0x6d
826 
827 // number of vehicles ending to park (get: simulation)
828 #define VAR_PARKING_ENDING_VEHICLES_NUMBER 0x6e
829 
830 // ids of vehicles ending to park (get: simulation)
831 #define VAR_PARKING_ENDING_VEHICLES_IDS 0x6f
832 
833 // clears the simulation of all not inserted vehicles (set: simulation)
834 #define CMD_CLEAR_PENDING_VEHICLES 0x94
835 
836 // triggers saving simulation state (set: simulation)
837 #define CMD_SAVE_SIMSTATE 0x95
838 
839 // sets/retrieves abstract parameter
840 #define VAR_PARAMETER 0x7e
841 
842 
843 // add an instance (poi, polygon, vehicle, person, route)
844 #define ADD 0x80
845 
846 // remove an instance (poi, polygon, vehicle, person)
847 #define REMOVE 0x81
848 
849 // copy an instance (vehicle type, other TBD.)
850 #define COPY 0x88
851 
852 // convert coordinates
853 #define POSITION_CONVERSION 0x82
854 
855 // distance between points or vehicles
856 #define DISTANCE_REQUEST 0x83
857 
858 // the current driving distance
859 #define VAR_DISTANCE 0x84
860 
861 // add a fully specified instance (vehicle)
862 #define ADD_FULL 0x85
863 
864 // find a car based route
865 #define FIND_ROUTE 0x86
866 
867 // find an intermodal route
868 #define FIND_INTERMODAL_ROUTE 0x87
869 
870 // force rerouting based on travel time (vehicles)
871 #define CMD_REROUTE_TRAVELTIME 0x90
872 
873 // force rerouting based on effort (vehicles)
874 #define CMD_REROUTE_EFFORT 0x91
875 
876 // validates current route (vehicles)
877 #define VAR_ROUTE_VALID 0x92
878 
879 // retrieve information regarding the current person/container stage
880 #define VAR_STAGE 0xc0
881 
882 // retrieve information regarding the next edge including crossings and walkingAreas (pedestrians only)
883 #define VAR_NEXT_EDGE 0xc1
884 
885 // retrieve information regarding the number of remaining stages
886 #define VAR_STAGES_REMAINING 0xc2
887 
888 // retrieve the current vehicle id for the driving stage (person, container)
889 #define VAR_VEHICLE 0xc3
890 
891 // append a person stage (person)
892 #define APPEND_STAGE 0xc4
893 
894 // append a person stage (person)
895 #define REMOVE_STAGE 0xc5
896 
897 // zoom
898 #define VAR_VIEW_ZOOM 0xa0
899 
900 // view position
901 #define VAR_VIEW_OFFSET 0xa1
902 
903 // view schema
904 #define VAR_VIEW_SCHEMA 0xa2
905 
906 // view by boundary
907 #define VAR_VIEW_BOUNDARY 0xa3
908 
909 // screenshot
910 #define VAR_SCREENSHOT 0xa5
911 
912 // track vehicle
913 #define VAR_TRACK_VEHICLE 0xa6
914 
915 
916 #endif