equal
deleted
inserted
replaced
114 NS_LOG_INFO ("Create Applications."); |
114 NS_LOG_INFO ("Create Applications."); |
115 uint16_t port = 9; // Discard port (RFC 863) |
115 uint16_t port = 9; // Discard port (RFC 863) |
116 |
116 |
117 OnOffHelper onoff ("ns3::UdpSocketFactory", |
117 OnOffHelper onoff ("ns3::UdpSocketFactory", |
118 Address (InetSocketAddress (i3i2.GetAddress (1), port))); |
118 Address (InetSocketAddress (i3i2.GetAddress (1), port))); |
119 onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); |
119 onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]")); |
120 onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); |
120 onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]")); |
121 |
121 |
122 ApplicationContainer apps = onoff.Install (c.Get (0)); |
122 ApplicationContainer apps = onoff.Install (c.Get (0)); |
123 apps.Start (Seconds (1.0)); |
123 apps.Start (Seconds (1.0)); |
124 apps.Stop (Seconds (10.0)); |
124 apps.Stop (Seconds (10.0)); |
125 |
125 |