> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To post to this group, send email to ns-3-...@googlegroups.com.
> To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
>
>
--
Ivo Calado
PhD candidate in Electrical Engineering
Embedded Systems and Pervasive Computing Lab - http://embeddedlab.org
Electrical Engineering Department - http://dee.ufcg.edu.br/
Federal University of Campina Grande - http://www.ufcg.edu.br
Professor of the Federal Institute of Education, Science and
Technology of Alagoas - http://ifal.edu.br
PGP: 0xD7C3860A pgp.mit.edu
Putt's Law:
Technology is dominated by two types of people:
Those who understand what they do not manage.
Those who manage what they do not understand.
[]'s
[]'s
Hi Ivo,
Thank you for your time! Had a look at the examples, and the code is very easy to understand. Configuring the parameters seems quite easy. But I have a few more questions:
1. How do I compile a particular file, say tcp-nsc-lfn.cc, after modifying it?
2. Can I simulate a 10 Gbps link?
3. The output file is in pcap format. How can I obtain the throughput etc from that file?
void
ReceivedPacket (std::string context, Ptr<const Packet> p, const
Address& addr)
{
long size = p->GetSize();
long time = floor(Simulator::Now().GetSeconds());
if(mapa.find(time) == mapa.end()) {
mapa[time] = size;
} else {
mapa[time] += size;
}
}
void Throughput() {
for(map<long, double>::iterator it = mapa.begin(); it != mapa.end(); it++) {
double value = (it->second * 8)/1000000;
cout<<it->first<<" "<<value<<endl;
}
}
Hi Ivo,
I incorporated the Throughput() function in your example into my code, and got a list of numbers.void ReceivedPacket (std::string context, Ptr<const Packet> p, const Address& addr) { long size = p->GetSize(); long time = floor(Simulator::Now().GetSeconds()); if(mapa.find(time) == mapa.end()) { mapa[time] = size; } else { mapa[time] += size; } } void Throughput() { for(map<long, double>::iterator it = mapa.begin(); it != mapa.end(); it++) { double value = (it->second * 8)/1000000; cout<<it->first<<" "<<value<<endl; } }
I can see that you are storing the packet size in some sort of a hash (am not familiar with C++), but I don't see anything accessing the values stored. In the Throughput() function, what does 'it->second' refer to? Following is the list of numbers I got - please tell me which one is the actual throughput. Is it showing that the throughput achieved is 472 Mbps?
Hi Vishal,
as far as I know, the ns-3 generate events following the period defined in application sendrate. For instance, suppose that you are