Let’s get into this article to know about process of writing a code based on OMNeT++ along with all the required steps.
Phase: I
Initially, our technical professionals have highlighted some sample code based on process in the following.
network AODVUUNetwork
{
parameters:
int numHosts;
submodules:
radioMedium: Ieee80211ScalarRadioMedium {
parameters:
@display(“p=50,50”);
}
configurator: IPv4NetworkConfigurator {
parameters:
config = xml(“<config><interface hosts=’*’ address=’145.236.x.x’ netmask=’255.255.0.0’/></config>”);
@display(“p=50,100”);
}
routingTableRecorder: RoutingTableRecorder {
parameters:
@display(“p=50,150”);
}
lifecycleController: LifecycleController {
parameters:
@display(“p=50,200”);
}
scenarioManager: ScenarioManager {
parameters:
script = default(xml(“<scenario/>”));
@display(“p=50,250”);
}
host[numHosts]: AdhocHost {
parameters:
@display(“i=device/pocketpc_s;r=,,#707070”);
}
connections allowunconnected:
}
package inet.examples.manetrouting.aodvuu;
import inet.common.lifecycle.LifecycleController;
import inet.common.scenario.ScenarioManager;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.node.inet.AdhocHost;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
Phase: II
Following that, we have to write some code based on OMNeT++ and we have to create a network file, then right click the project and make sure of the following steps such as,
Project name > New > Network Description File (NED)
Specification of network file name
Written code in the created Ned file
You guys can absolutely reach us to clarify all your doubts and our research professionals will provide the complete research support.