examples: (fixes #2594) Fix throughput calculation in vht-wifi-network

This commit is contained in:
Sébastien Deronne
2016-12-27 09:29:00 +01:00
parent 2f9c69d6a7
commit ed66ffad0d
2 changed files with 5 additions and 7 deletions

View File

@@ -53,6 +53,7 @@ Bugs fixed
- Bug 2563 - Modify pybindgen version check to >= minimum version required
- Bug 2564 - Simulation crashes when CtsTimeout is triggered for A-MPDU transmissions
- Bug 2566 - BlockAckManager::GetNRetryNeededPackets missing some packets in the queue
- Bug 2594 - vht-wifi-network provides very low throughtput at MCS 6, 160 MHz, SGI
Known issues
------------

View File

@@ -195,19 +195,16 @@ int main (int argc, char *argv[])
Simulator::Run ();
Simulator::Destroy ();
double throughput = 0;
uint64_t rxBytes = 0;
if (udp)
{
//UDP
uint32_t totalPacketsThrough = DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0); //Mbit/s
rxBytes = payloadSize * DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
}
else
{
//TCP
uint32_t totalPacketsThrough = DynamicCast<PacketSink> (sinkApp.Get (0))->GetTotalRx ();
throughput = totalPacketsThrough * 8 / (simulationTime * 1000000.0); //Mbit/s
rxBytes = payloadSize * DynamicCast<PacketSink> (sinkApp.Get (0))->GetTotalRx ();
}
double throughput = (rxBytes * 8) / (simulationTime * 1000000.0); //Mbit/s
std::cout << i << "\t\t\t" << j << " MHz\t\t\t" << k << "\t\t\t" << throughput << " Mbit/s" << std::endl;
}
j *= 2;