How to add another RSU submodules?

246 Views Asked by At

I want to make some VANET simulation using OMNeT++, Veins, SUMO.

I was rewrite some code in Veins example code "RSUExampleScenario".

RSUExampleScenario.ned

import org.car2x.veins.nodes.RSU;
import org.car2x.veins.nodes.Scenario;

network RSUExampleScenario extends Scenario
{
     @display("bgb=800,800");
     submodules:
          rsu[1]: RSU
          {
               @display("p=150,140;i=veins/sign/yellowdiamond;is=vs");
          }
          rsu[2]: RSU
          {
               @display("p=180,140;i=veins/sign/yellowdiamond;is=vs");
          }

}

But it still seems that the RSU has not been added. How can I add an RSU module?

1

There are 1 best solutions below

0
On BEST ANSWER

I was found how to add RSU node in simulation. If you want to add two RSU node in your simulation, you can write code like below.

veins/examples/veins/omnetpp.ini

# RSU SETTINGS
*.rsu[0].mobility.x = 2000
*.rsu[0].mobility.y = 2000
*.rsu[0].mobility.z = 3
*.rsu[1].mobility.x = 2100
*.rsu[1].mobility.y = 2000
*.rsu[1].mobility.z = 3

veins/examples/veins/RSUExampleScenario.ned

submodules:
     rsu[2]: RSU
     {
          @display("p=150,140;i=veins/sign/yellowdiamond;is=vs");
     }