equal
deleted
inserted
replaced
180 NS_LOG_INFO ("Create Applications."); |
180 NS_LOG_INFO ("Create Applications."); |
181 uint16_t port = 9; // Discard port (RFC 863) |
181 uint16_t port = 9; // Discard port (RFC 863) |
182 |
182 |
183 OnOffHelper onoff ("ns3::UdpSocketFactory", |
183 OnOffHelper onoff ("ns3::UdpSocketFactory", |
184 Address (InetSocketAddress (Ipv4Address ("10.1.1.3"), port))); |
184 Address (InetSocketAddress (Ipv4Address ("10.1.1.3"), port))); |
185 onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); |
185 onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]")); |
186 onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); |
186 onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]")); |
187 |
187 |
188 ApplicationContainer app = onoff.Install (n0); |
188 ApplicationContainer app = onoff.Install (n0); |
189 // Start the application |
189 // Start the application |
190 app.Start (Seconds (1.0)); |
190 app.Start (Seconds (1.0)); |
191 app.Stop (Seconds (10.0)); |
191 app.Stop (Seconds (10.0)); |