OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address());
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
onOffHelper.SetAttribute ("PacketSize", StringValue ("100"));// Bytes
onOffHelper.SetAttribute ("DataRate",StringValue ("100kBps")); //
And the applications are all run by 1 seconds.
I had assumed that each client node should send out around 1000 packets in these two simulations. I found that in first simulation which uses PointToPointNetDevice the number of transmitted packet is 1003 and this result was correct.
However, in second simulation which uses WifiNetDevice the number of transmitted packet in different client nodes were different and much less than 1000 such like 600, 800.
So I was wondering if the NetDivices determine the actual performance of the OnOffApplication and cause this difference in the number of transmitted packets.
Best Regards,
Tianye