Gabriele maggio
unread,Jun 1, 2012, 4:35:46 AM6/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ns-3-users
I have a Vanet scenario in which 451 nodes have to send packet every
0.1 seconds in a broadcast way. The problem is how to generate
broadcast traffic!!! I've tried to use OnOffApplication
for(int i=0; i<1; i++)
{
OnOffHelper onoff ("ns3::UdpSocketFactory",Address
(InetSocketAddress (Ipv4Address ("255.255.255.255"), 80)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable
(1)));
onoff.SetAttribute ("OffTime", RandomVariableValue
(ConstantVariable (0)));
ApplicationContainer app = onoff.Install (wifiNodes.Get(i));
// Start the application
app.Start (Seconds (0.0));
app.Stop (Seconds (1.0));
// Create an optional packet sink to receive these packets
PacketSinkHelper sink ("ns3::UdpSocketFactory",
Address (InetSocketAddress
(Ipv4Address::GetAny (), 80)));
app = sink.Install (wifiNodes.Get(i));
app.Add (sink.Install (wifiNodes.Get(i)));
app.Start (Seconds (0.0));
app.Stop (Seconds (1.0));
}
but even if every node generate packets with the desired rate, I have
no received packets...Probably OnOffApplication is not adapt for this
kind of scenario, but I don't know which could be the right solution
to the problem.
Can anyone help me please?
Thank's