Search code examples
omnet++veinssimulationx

On Veins, how to get some values from ini file?


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


Solution

  • 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