TraCI/Control-related commands
Contents |
Control-related commands
Command 0x00: Get Version
Please note that this command is not yet supported in version 0.12.0.
| - |
| no parameters |
|---|
Response 0x00: Version
| integer | string |
| API Version | Identifier |
|---|
The server responds to a Get Version command by sending two items:
- an API Version of 1 identifies the current state of the TraCI API. It is guaranteed to increase as soon as
- the TraCI message format (or its command format) changes
- any TraCI command presented on these pages uses different parameters (either in data type, binary representation, or in meaning)
- an Identifier string identifies the software version running on the TraCI server in human-readable form
- no guarantee is made regarding the content of this string
- as an example, for SUMO 0.12.0, this string is "SUMO 0.12.0"
Tip
The client can find out if a particular command is supported by the current TraCI server (i.e., SUMO) by looking at the status response of the command. It may report "not implemented."
Command 0x01: Simulation Step
| integer | ubyte |
| TargetTime [ms] | PositionType |
|---|
The network simulator sends this command repetitively, triggering the traffic simulator to simulate the next simulation step up to target time (which is the actual simulation time of the network simulator plus one simulation step). Furthermore, the simulation times are kept synchronized.
A status response and (optionally) a collection of Move Node commands (see below) is returned. All responses are sent as one TraCI message.
This command is marked deprecated! Use Simulation Step 2 instead.
Response 0x80: Move Node
| integer | integer | position |
| NodeId | TargetTime [ms] | Position |
|---|
When node movement information has been requested in the Simulation Step command (by setting PositionType to a value other 0), performing a simulation step will trigger a series of 'Move Node responses. For each moving vehicle, the network simulator receives a Move Node response as reply to the Simulation Step command. The network simulator must convert these movement information into linear movements to make sure that each node reaches its Position at TargetTime. The Position representation is interpreted according to the given PositionType in the Simulation Step command.
Command 0x02: Simulation Step(2)
| integer |
| TargetTime [ms] |
|---|
Forces SUMO to perform simulation. If TargetTime is 0 (zero), SUMO performs exactly one time step. Otherwise SUMO performs the simulation until the given time step is reached. If the given time step is smaller than the simulation step then SUMO performs one simulation step.
The response of this command is a list of active Subscription Responses referring to the last step executed:
| integer | <SUBSCRIPTION RESPONSE> | ... | <SUBSCRIPTION RESPONSE> |
| Number of following subscription responses | <RESPONSE#1> | ... | <RESPONSE#n> |
|---|
Command 0x7F: Close ()
Tells TraCI to close the connection to any client, stop simulation and shut down sumo.