Reputation: 128
On Veins applications (veins/src/modules/application/app_name.(cc, h
), how to get values like
*.car[*].appl.numVehicles
from theini
file?
I can get values like sim-time-limit
(see below) and anothers createad by me one, by I can't acess values on *.car[*].*
or *.rsu[*].*
from ini file.
stringTmp = ev.getConfig()->getConfigValue("sim-time-limit");
I'd appreciate any help
Upvotes: 1
Views: 494
Reputation: 46
I got the "numVehicles
" parameter from the .ini file using the following codification:
long numV = Veins::TraCIScenarioManagerLaunchdAccess().get()->par("numVehicles").longValue();
I hope this can help you.
Douglas
Upvotes: 3
Reputation: 6943
Reading parameter values of a module can be done via a call to this module's par(...)
method.
I would highly recommend doing the TicToc tutorial, where this is demonstrated succinctly
Upvotes: 1