Difference between revisions of "TraCI/Change Vehicle State"

From Sumo
Jump to navigation Jump to search
(Created page with '= Command 0xc4: Change Vehicle State (ubyte '''Variable''', string '''TrafficLightsID''', ubyte '''ValueType''', ValueType '''Value''') = {{Caution|Note that this API is currentl…')
 
Line 1: Line 1:
= Command 0xc4: Change Vehicle State (ubyte '''Variable''', string '''TrafficLightsID''', ubyte '''ValueType''', ValueType '''Value''') =
+
= Command 0xc4: Change Vehicle State =
 
{{Caution|Note that this API is currently only available in the SVN version}}
 
{{Caution|Note that this API is currently only available in the SVN version}}
 
+
{| cellpadding="4" cellspacing="0" border="0"
 +
| align="center"| ubyte
 +
| align="center"| string
 +
| width="150" align="center"| ubyte
 +
| align="center"| <value_type>
 +
|-
 +
! style="border: 1pt solid;" | Variable
 +
! style="border: 1pt solid;" | Vehicle ID
 +
! style="border: 1pt solid;" | Type of the value
 +
! style="border: 1pt solid;" | New Value
 +
|}
 
Changes the state of a vehicle. Because it is possible to change different values of a vehicle, the number of parameter to supply and their types differ between commands. The following values can be changed, the parameter which must be given are also shown in the table.
 
Changes the state of a vehicle. Because it is possible to change different values of a vehicle, the number of parameter to supply and their types differ between commands. The following values can be changed, the parameter which must be given are also shown in the table.
  

Revision as of 09:23, 27 July 2009

Command 0xc4: Change Vehicle State

Caution:
Note that this API is currently only available in the SVN version
ubyte string ubyte <value_type>
Variable Vehicle ID Type of the value New Value

Changes the state of a vehicle. Because it is possible to change different values of a vehicle, the number of parameter to supply and their types differ between commands. The following values can be changed, the parameter which must be given are also shown in the table.

Overview Changeable Vehicle Variables
Variable ValueType Description
max speed (0x11) float Sets the vehicle's maximum speed to the given value
stop (0x12) string, float, byte, double Lets the vehicle stop at the given edge, at the given position and lane. The vehicle will stop for the given duration.
phase index (0x22) integer Sets the phase of the traffic light to the given. The given index must be valid for the current program of the traffic light, this means it must be between 0 and the number of phases known to the current program of the tls - 1.
change lane (0x13) byte, float Forces a lane change to the lane with the given index; if successfull, the lane will be chosen for the given amount of time.
slow down (0x14) float, double Reduces the speed to the given for the given amount of time.
change target (0x31) string The vehicle's destination edge is set to the given. The route is rebuilt.