Hello
i want to create module in veins for connect between two cars by its NIC 802,11p where i create a folder sub Modules in veins named Mytest , inside this i create File NED for defined network description i import module nic80211p and i create other module named Netwreklayer and i connect them by its gates :
networkLayer.lowerLayerOut --> nic80211p.upperLayerIn;
networkLayer.lowerControlOut --> nic80211p.upperControlIn;
nic80211p.upperControlOut --> networkLayer.lowerControlIn;
nic80211p.upperLayerOut --> networkLayer.lowerLayerIn;
My question is for how to create vanet simulation between cars by use sumo and its c++ file
file networklayer.ned
module NetworkLayer
{
gates:
input upperLayerIn; // from upper layer
output upperLayerOut; // to uppe layer
input upperControlIn; // control from upper layer
output upperControlOut; // control to upper layer
input lowerLayerIn; // from lower layer
output lowerLayerOut; // to lower layer
input lowerControlIn; // control from lower layer
output lowerControlOut; // control to lower layer
}
File car.ned
package org.car2x.veins.modules.Mytest;
import org.car2x.veins.base.modules.BaseMobility;
import org.car2x.veins.modules.nic.Nic80211p;
import org.car2x.veins.nodes.Car;
//
// TODO documentation
//
module CarFekair
{
types:
submodules:
nic80211p: Nic80211p {
@display("p=150,163");
}
networkLayer: NetworkLayer {
@display("p=149,50");
}
connections:
networkLayer.lowerLayerOut --> nic80211p.upperLayerIn;
networkLayer.lowerControlOut --> nic80211p.upperControlIn;
nic80211p.upperControlOut --> networkLayer.lowerControlIn;
nic80211p.upperLayerOut --> networkLayer.lowerLayerIn;
}
Please help me; i ‘am beginner in simulators omnet++