In sumo, my simulation has a traffic light called 539320442
.
I want that a RSU (that exists in veins) changes this traffic light's phase.
So I created a Trafficlight
variable in the TraCIDemoRSU11p.h
as it follows:
TraCICommandInterface::Trafficlight* RSU_traffic_light;
Now I would like to get this traffic light that has id: 539320442
and change its phase by using:
void TraCICommandInterface::Traffic_light::setPhase(string, integer)
The problem is that in the TraCIDemoRSU11p.cc
I couldn't get the traffic light and save it in:
RSU_traffic_light;
So I was wondering how can I get this traffic light and save it in RSU_traffic_light
:
RSU_traffic_light = getTrafficLightbyID("539320442");
Would it be something like that? What is the exactly syntax for it?