TraCI/Lane Value Retrieval

From Sumo
Revision as of 13:15, 20 May 2009 by Dkrajzew (talk | contribs) (New page: = Lane Value Retrieval = == Command 0xa3: Get Lane Variable (ubyte '''Variable''', string '''LaneID''') == Asks for the value of a certain variable of the named lane. The following variab...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lane Value Retrieval

Command 0xa3: Get Lane Variable (ubyte Variable, string LaneID)

Asks for the value of a certain variable of the named lane.

The following variable values can be retrieved, the type of the return value is also shown in the table.

Overview Retrievable Lane Variables
Variable ValueType Description
link number (0x30) ubyte Returns the number of links outgoing from this lane [#]
links (0x33) compund Returns descriptions of the links outgoing from this lane [m]
length (0x44) float Returns the length of thhe named lane [m]
vmax (0x41) float Returns the maximum speed allowed on this lane [m/s]


Response 0xb3: Lane Variable (ubyte Variable, string LaneID, ubyte ValueType, ValueType Value)

The respond to a "Command Get Lane Variable".

Response 0xb2: Traffic Lights Variable (ubyte Variable, string TrafficLightID, ubyte ValueType, ValueType Value)

The respond to a "Command Get Traffic Lights Variable".

Structure of compound object links

If you request the list of links, an compound object is returned, structured as following. Attention, each part is fowarded by a byte which represents its data type, except "length".

integer type + integer link ... link
Length Number of links Link 1 ... Link n

where link is decribed by:

type + string type + string type + ubyte type + ubyte type + ubyte type + string type + string type + float
consecutive not internal lane consecutive internal lane has priority (=1) or not (=0) is opened (=1) or not (=0) has approaching foe (=1) or not (=0) (current) state (not yet implemented, always="") direction (not yet implemented, always="") length [m] - only valid if not using internal lanes