Difference between revisions of "TraCI/Induction Loop Value Retrieval"

From Sumo
Jump to navigation Jump to search
(Command 0xa0: Get Induction Loop Variable (ubyte Variable, string InductionLoopID))
Line 1: Line 1:
 
= Induction Loop Value Retrieval =
 
= Induction Loop Value Retrieval =
== Command 0xa0: Get Induction Loop Variable (ubyte '''Variable''', string '''InductionLoopID''') ==
+
== Command 0xa0: Get Induction Loop Variable ==
 +
{| cellpadding="4" cellspacing="0" border="0"
 +
| align="center"| ubyte
 +
| align="center"| string
 +
|-
 +
! style="border: 1pt solid;" | Variable
 +
! style="border: 1pt solid;" | Induction Loop ID
 +
|}
 
Asks for the value of a certain variable of the named [[SUMO_OUTPUT_E1|induction loop (e1 detector)]]. The value returned is the state of the asked variable/value within the last simulation step. Please note that for asking values from your [[SUMO_OUTPUT_E1|induction loops]] with TraCI, you have to:
 
Asks for the value of a certain variable of the named [[SUMO_OUTPUT_E1|induction loop (e1 detector)]]. The value returned is the state of the asked variable/value within the last simulation step. Please note that for asking values from your [[SUMO_OUTPUT_E1|induction loops]] with TraCI, you have to:
 
* define them
 
* define them
Line 31: Line 38:
 
|}
 
|}
  
=== Response 0xb0: Induction Loop Variable (ubyte '''Variable''', string '''InductionLoopID''', ubyte '''ValueType''', ValueType '''Value''') ===
+
== Response 0xb0: Induction Loop Variable ==
 +
{| cellpadding="4" cellspacing="0" border="0"
 +
| width="75" align="center"| ubyte
 +
| width="75" align="center"| string
 +
| width="150" align="center"| ubyte
 +
| width="75" align="center"| <return_type>     
 +
|-
 +
! style="border: 1pt solid;" | Variable
 +
! style="border: 1pt solid;" | Induction Loop ID
 +
! style="border: 1pt solid;" | Return type of the variable
 +
! style="border: 1pt solid;" | <VARIABLE_VALUE>
 +
|}
 
The respond to a '''"Command Get Induction Loop Variable"'''.
 
The respond to a '''"Command Get Induction Loop Variable"'''.
 +
 +
== Notes ==
 +
* You can find [[SUMO_OUTPUT_E1|some further description on induction loops]]

Revision as of 09:09, 27 July 2009

Induction Loop Value Retrieval

Command 0xa0: Get Induction Loop Variable

ubyte string
Variable Induction Loop ID

Asks for the value of a certain variable of the named induction loop (e1 detector). The value returned is the state of the asked variable/value within the last simulation step. Please note that for asking values from your induction loops with TraCI, you have to:

  • define them
  • set their frequency to 1s

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

Overview Retrievable Induction Loop Variables
Variable ValueType Description
id list (0x00) string* Returns a list of ids of all known induction loops within the scenario (the given Induction Loop ID is ignored)
last step vehicle number (0x10) integer Returns the number of vehicles that were on the named induction loop within the last simulation step [#];
Note:
This value corresponds to the nVehEntered measure of induction loops.
last step mean speed (0x11) float Returns the mean speed of vehicles that were on the named induction loop within the last simulation step [m/s]
last step vehicle ids (0x12) string* Returns the list of ids of vehicles that were on the named induction loop in the last simulation step

Response 0xb0: Induction Loop Variable

ubyte string ubyte <return_type>
Variable Induction Loop ID Return type of the variable <VARIABLE_VALUE>

The respond to a "Command Get Induction Loop Variable".

Notes