Mario
Mario

Reputation: 5

Modify beaconing in a VANET project

I am new in Veins simulation and I did the Tic Toc tutorial for the OMNeT++'s work. I need to change the beaconing between nodes and Rsu in a Veins, sumo and OMNeT interaction.

I work with OMNeT 5.4.1, SUMO 0.30.0 and Veins 4.7.1.

I want to make the implementation of a function that change the frequency of beaconing due the number of nodes, but this nodes are generated by TraCIScenarioManagerLaunched and I don't know how access to the parameters of this nodes.

I'm working in a network created by me that is a extended of network call Scenario.ned.

Upvotes: 1

Views: 202

Answers (1)

thardes2
thardes2

Reputation: 1186

You could use something like this:

auto hosts = manager->getManagedHosts();
for(auto h: hosts){
    YOUCLASS* o = FindModule<YOUCLASS*>::findSubModule((h.second));
    o.beaconInterval = X;
}

The first line gives you all available hosts in the network. While the list of hosts is iterated you can use FindModule to search for the module to set your beacon rate.

However, this approach highly depends on your implementation.

Upvotes: 1

Related Questions