examples: Fix compilation warning
This commit is contained in:
@@ -217,22 +217,31 @@ int main (int argc, char *argv[])
|
||||
|
||||
uint64_t rxBytes;
|
||||
double throughput;
|
||||
bool error = false;
|
||||
if (apHasTraffic)
|
||||
{
|
||||
rxBytes = payloadSize * DynamicCast<UdpServer> (staServerApp.Get (0))->GetReceived ();
|
||||
throughput = (rxBytes * 8) / (simulationTime * 1000000.0); //Mbit/s
|
||||
std::cout << "AP Throughput: " << throughput << " Mbit/s" << std::endl;
|
||||
if (throughput == 0)
|
||||
{
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
if (staHasTraffic)
|
||||
{
|
||||
rxBytes = payloadSize * DynamicCast<UdpServer> (apServerApp.Get (0))->GetReceived ();
|
||||
throughput = (rxBytes * 8) / (simulationTime * 1000000.0); //Mbit/s
|
||||
std::cout << "STA Throughput: " << throughput << " Mbit/s" << std::endl;
|
||||
if (throughput == 0)
|
||||
{
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
Simulator::Destroy ();
|
||||
|
||||
if (throughput == 0)
|
||||
if (error)
|
||||
{
|
||||
NS_LOG_ERROR ("No traffic received!");
|
||||
exit (1);
|
||||
|
||||
Reference in New Issue
Block a user