Closed alizz-99 closed 4 months ago
An RSU is not a vehicle and thus has no VehicleController
. You can get access to the TraCI API via the World.traci.core module, though.
cModule* traci = getModuleByPath("World.traci.core");
cModule*
to traci::Core*
: auto core = check_and_cast<traci::Core*>(source);core->getAPI()
Of course, you should check for each step if the operation was successful, i.e. that no null pointer is returned.
Hello! I have created a service to incorporate it in the RSU, and I would like to control the traffic lights from this service. For example, the vehicles has the mVehicleController = &getFacilities().get_const(); but for the RSU-s this doesn't work for me. I don't know if there is any other way to get to the traci data from these service files.
Thank you!!