From a7a9b57e4d28822bc338632c31967322ce69befe Mon Sep 17 00:00:00 2001 From: Richard Whitehouse Date: Tue, 17 May 2011 22:39:06 +0100 Subject: [PATCH] Output data to output file --- src/simulation/model/analysis.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/simulation/model/analysis.cc b/src/simulation/model/analysis.cc index 90f7631..c3f7380 100644 --- a/src/simulation/model/analysis.cc +++ b/src/simulation/model/analysis.cc @@ -120,7 +120,7 @@ void Analysis::analyseCsma(){ } } else { mit = it->packet.begin(); ++mit; - std::cout << mit->first << std::endl; + std::cerr << mit->first << std::endl; assert(false); } @@ -149,19 +149,18 @@ void Analysis::analyseCsma(){ } else if(it->type == "r"){ ++(total.received); } else { - std::cout << it->type << std::endl; + std::cerr << it->type << std::endl; assert(false); } } - std::cout << "ARP +: " << arp.added << " -: " << arp.removed << " r: " << arp.received << std::endl; - std::cout << "UDP +: " << udp.added << " -: " << udp.removed << " r: " << udp.received << std::endl; + output << "ARP +: " << arp.added << " -: " << arp.removed << " r: " << arp.received << std::endl; + output << "UDP +: " << udp.added << " -: " << udp.removed << " r: " << udp.received << std::endl; - std::cout << "UCa +: " << unicast.added << " -: " << unicast.removed << " r: " << unicast.received << std::endl; - std::cout << "BCa +: " << broadcast.added << " -: " << broadcast.removed << " r: " << broadcast.received << std::endl; + output << "UCa +: " << unicast.added << " -: " << unicast.removed << " r: " << unicast.received << std::endl; + output << "BCa +: " << broadcast.added << " -: " << broadcast.removed << " r: " << broadcast.received << std::endl; - std::cout << "Total +: " << total.added << " -: " << total.removed << " r: " << total.received << std::endl; - + output << "Total +: " << total.added << " -: " << total.removed << " r: " << total.received << std::endl; //std::vector >::iterator hit; -- 2.34.1