Use Time() constructor with integer values
This commit is contained in:
@@ -50,17 +50,17 @@ main(int argc, char* argv[])
|
||||
UdpEchoServerHelper echoServer(9);
|
||||
|
||||
ApplicationContainer serverApps = echoServer.Install(nodes.Get(1));
|
||||
serverApps.Start(Seconds(1.0));
|
||||
serverApps.Stop(Seconds(10.0));
|
||||
serverApps.Start(Seconds(1));
|
||||
serverApps.Stop(Seconds(10));
|
||||
|
||||
UdpEchoClientHelper echoClient(interfaces.GetAddress(1), 9);
|
||||
echoClient.SetAttribute("MaxPackets", UintegerValue(1));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0)));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1)));
|
||||
echoClient.SetAttribute("PacketSize", UintegerValue(1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install(nodes.Get(0));
|
||||
clientApps.Start(Seconds(2.0));
|
||||
clientApps.Stop(Seconds(10.0));
|
||||
clientApps.Start(Seconds(2));
|
||||
clientApps.Stop(Seconds(10));
|
||||
|
||||
Simulator::Run();
|
||||
Simulator::Destroy();
|
||||
|
||||
@@ -41,18 +41,18 @@ interfaces = address.Assign(devices)
|
||||
echoServer = ns.UdpEchoServerHelper(9)
|
||||
|
||||
serverApps = echoServer.Install(nodes.Get(1))
|
||||
serverApps.Start(ns.Seconds(1.0))
|
||||
serverApps.Stop(ns.Seconds(10.0))
|
||||
serverApps.Start(ns.Seconds(1))
|
||||
serverApps.Stop(ns.Seconds(10))
|
||||
|
||||
address = interfaces.GetAddress(1).ConvertTo()
|
||||
echoClient = ns.UdpEchoClientHelper(address, 9)
|
||||
echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0)))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1)))
|
||||
echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024))
|
||||
|
||||
clientApps = echoClient.Install(nodes.Get(0))
|
||||
clientApps.Start(ns.Seconds(2.0))
|
||||
clientApps.Stop(ns.Seconds(10.0))
|
||||
clientApps.Start(ns.Seconds(2))
|
||||
clientApps.Stop(ns.Seconds(10))
|
||||
|
||||
ns.Simulator.Run()
|
||||
ns.Simulator.Destroy()
|
||||
|
||||
@@ -79,17 +79,17 @@ main(int argc, char* argv[])
|
||||
UdpEchoServerHelper echoServer(9);
|
||||
|
||||
ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma));
|
||||
serverApps.Start(Seconds(1.0));
|
||||
serverApps.Stop(Seconds(10.0));
|
||||
serverApps.Start(Seconds(1));
|
||||
serverApps.Stop(Seconds(10));
|
||||
|
||||
UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9);
|
||||
echoClient.SetAttribute("MaxPackets", UintegerValue(1));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0)));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1)));
|
||||
echoClient.SetAttribute("PacketSize", UintegerValue(1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install(p2pNodes.Get(0));
|
||||
clientApps.Start(Seconds(2.0));
|
||||
clientApps.Stop(Seconds(10.0));
|
||||
clientApps.Start(Seconds(2));
|
||||
clientApps.Stop(Seconds(10));
|
||||
|
||||
Ipv4GlobalRoutingHelper::PopulateRoutingTables();
|
||||
|
||||
|
||||
@@ -69,17 +69,17 @@ csmaInterfaces = address.Assign(csmaDevices)
|
||||
echoServer = ns.UdpEchoServerHelper(9)
|
||||
|
||||
serverApps = echoServer.Install(csmaNodes.Get(nCsma.value))
|
||||
serverApps.Start(ns.Seconds(1.0))
|
||||
serverApps.Stop(ns.Seconds(10.0))
|
||||
serverApps.Start(ns.Seconds(1))
|
||||
serverApps.Stop(ns.Seconds(10))
|
||||
|
||||
echoClient = ns.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9)
|
||||
echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0)))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1)))
|
||||
echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024))
|
||||
|
||||
clientApps = echoClient.Install(p2pNodes.Get(0))
|
||||
clientApps.Start(ns.Seconds(2.0))
|
||||
clientApps.Stop(ns.Seconds(10.0))
|
||||
clientApps.Start(ns.Seconds(2))
|
||||
clientApps.Stop(ns.Seconds(10))
|
||||
|
||||
ns.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
|
||||
|
||||
|
||||
@@ -147,21 +147,21 @@ main(int argc, char* argv[])
|
||||
UdpEchoServerHelper echoServer(9);
|
||||
|
||||
ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma));
|
||||
serverApps.Start(Seconds(1.0));
|
||||
serverApps.Stop(Seconds(10.0));
|
||||
serverApps.Start(Seconds(1));
|
||||
serverApps.Stop(Seconds(10));
|
||||
|
||||
UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9);
|
||||
echoClient.SetAttribute("MaxPackets", UintegerValue(1));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0)));
|
||||
echoClient.SetAttribute("Interval", TimeValue(Seconds(1)));
|
||||
echoClient.SetAttribute("PacketSize", UintegerValue(1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install(wifiStaNodes.Get(nWifi - 1));
|
||||
clientApps.Start(Seconds(2.0));
|
||||
clientApps.Stop(Seconds(10.0));
|
||||
clientApps.Start(Seconds(2));
|
||||
clientApps.Stop(Seconds(10));
|
||||
|
||||
Ipv4GlobalRoutingHelper::PopulateRoutingTables();
|
||||
|
||||
Simulator::Stop(Seconds(10.0));
|
||||
Simulator::Stop(Seconds(10));
|
||||
|
||||
if (tracing)
|
||||
{
|
||||
|
||||
@@ -135,21 +135,21 @@ address.Assign(apDevices)
|
||||
echoServer = ns.UdpEchoServerHelper(9)
|
||||
|
||||
serverApps = echoServer.Install(csmaNodes.Get(nCsma.value))
|
||||
serverApps.Start(ns.Seconds(1.0))
|
||||
serverApps.Stop(ns.Seconds(10.0))
|
||||
serverApps.Start(ns.Seconds(1))
|
||||
serverApps.Stop(ns.Seconds(10))
|
||||
|
||||
echoClient = ns.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9)
|
||||
echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0)))
|
||||
echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1)))
|
||||
echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024))
|
||||
|
||||
clientApps = echoClient.Install(wifiStaNodes.Get(nWifi.value - 1))
|
||||
clientApps.Start(ns.Seconds(2.0))
|
||||
clientApps.Stop(ns.Seconds(10.0))
|
||||
clientApps.Start(ns.Seconds(2))
|
||||
clientApps.Stop(ns.Seconds(10))
|
||||
|
||||
ns.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
|
||||
|
||||
ns.Simulator.Stop(ns.Seconds(10.0))
|
||||
ns.Simulator.Stop(ns.Seconds(10))
|
||||
|
||||
if tracing.value:
|
||||
phy.SetPcapDataLinkType(phy.DLT_IEEE802_11_RADIO)
|
||||
|
||||
Reference in New Issue
Block a user