Add ECOFEN

This commit is contained in:
Loic Guegan 2019-04-12 16:05:29 +02:00
parent cb10ad2490
commit 32ccf612d0
7 changed files with 54 additions and 18 deletions

View file

@ -11,7 +11,7 @@ Cell createCell(uint32_t nbSensors, Ptr<ns3::Node> ap){
sensors.Create(nbSensors);
// Place nodes somehow, this is required by every wireless simulation
for (uint8_t i = 0; i < nbSensors; ++i)
for (uint32_t i = 0; i < nbSensors; i++)
{
sensors.Get (i)->AggregateObject (CreateObject<ConstantPositionMobilityModel> ());
}
@ -106,7 +106,7 @@ CloudInfos createCloud(int nbHop, uint32_t bandwidth, uint32_t latency){
p2pDevices = pointToPoint.Install (curNodes);
Ipv4AddressHelper address;
address.SetBase (("10.1."+std::to_string(i)+".0").c_str(), "255.255.255.0");
address.SetBase (("10."+std::to_string(i+1)+".0.0").c_str(), "255.255.0.0"); // Remember: 10.0.0.0 is used by WIFI
Ipv4InterfaceContainer p2pInterfaces;
p2pInterfaces = address.Assign (p2pDevices);