Reputation: 41
Is that possible for a node to be both VeinsInetMobility and TraCIMobility? If so how?
Upvotes: 2
Views: 287
Reputation: 6943
As you did not specify software versions, I am assuming Veins 5a1 with its veins_inet
subproject, INET 4.0.0, and SUMO 1.1.0. Getting the list of planned road IDs is simple then: just use the methods of VeinsInetMobility
- no need to use two mobility modules.
For example, in VeinsInetSampleApplication
you can use it to directly call functions from TraCICommandInterface
like so: traciVehicle->getPlannedRoadIds()
(similar to the code shown here).
If you are using INET 3 via veins_inet3
, you may simply adapt the functions of veins_inet
for this project to do the same.
Upvotes: 1