问题
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
回答1:
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
回答2:
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
来源:https://stackoverflow.com/questions/35075324/on-veins-how-to-get-some-values-from-ini-file