Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. uint32_t totalPackets = DynamicCast<PacketSink>(apps.Get(0))->GetTotalRx();
  2. double throughput = (totalPackets-numPackets)*8/(1000000.0);
  3. Vector pos = GetPosition(node);; //position of mobile node
  4. std::cout << pos.x << "\t" << throughput << std::endl;
  5.  
  6.  
  7. Simulator::Schedule(Seconds (1.0), &ThroughputPerSecond, apps , totalPackets , node);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement