More fixes on propagation model

This commit is contained in:
Tim Schubert 2020-08-19 16:26:27 +02:00
parent ad22221f42
commit df97dfa3e4
4 changed files with 71 additions and 88 deletions

View file

@ -74,17 +74,18 @@ int main (int argc, char *argv[])
// Install internet stack on nodes
AodvHelper aodv;
aodv.Set ("HelloInterval", TimeValue (Seconds (1)));
aodv.Set ("TtlStart", UintegerValue (10));
aodv.Set ("TtlIncrement", UintegerValue (10));
aodv.Set ("TtlThreshold", UintegerValue (100));
aodv.Set ("RreqRetries", UintegerValue (100));
aodv.Set ("RreqRateLimit", UintegerValue (10));
aodv.Set ("RerrRateLimit", UintegerValue (10));
aodv.Set ("ActiveRouteTimeout", TimeValue (Minutes (1)));
aodv.Set ("NextHopWait", TimeValue (MilliSeconds (200)));
aodv.Set ("NetDiameter", UintegerValue (1000));
aodv.Set ("PathDiscoveryTime", TimeValue (Seconds (1)));
//aodv.Set ("HelloInterval", TimeValue (Minutes (1)));
aodv.Set ("TtlStart", UintegerValue (5));
aodv.Set ("TtlIncrement", UintegerValue (5));
aodv.Set ("TtlThreshold", UintegerValue (200));
aodv.Set ("RreqRetries", UintegerValue (1000));
aodv.Set ("RreqRateLimit", UintegerValue (100));
//aodv.Set ("RerrRateLimit", UintegerValue (1));
//aodv.Set ("ActiveRouteTimeout", TimeValue (Minutes (1)));
//aodv.Set ("NextHopWait", TimeValue (MilliSeconds (200)));
aodv.Set ("NetDiameter", UintegerValue (100));
//aodv.Set ("AllowedHelloLoss", UintegerValue (10000));
//aodv.Set ("PathDiscoveryTime", TimeValue (Seconds (1)));
InternetStackHelper stack;
stack.SetRoutingHelper (aodv);
@ -107,8 +108,8 @@ int main (int argc, char *argv[])
Address remote = stations.Get (1)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0);
std::cout << "REMOTE=" << Ipv4Address::ConvertFrom (remote);
UdpClientHelper echoClient (remote, 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (360));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (10.0)));
echoClient.SetAttribute ("MaxPackets", UintegerValue (60));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1)));
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
clientApps.Add (echoClient.Install (stations.Get (3)));
@ -118,9 +119,11 @@ int main (int argc, char *argv[])
std::cout << "Context,Sequence Number,Timestamp,Delay" << std::endl;
serverApps.Start (Seconds (1));
clientApps.Start (Seconds (2));
clientApps.Start (Seconds (1));
serverApps.Stop (Minutes (1));
clientApps.Stop (Minutes (1));
Simulator::Stop (Minutes (60));
Simulator::Stop (Minutes (1));
Simulator::Run ();
Simulator::Destroy ();