I am a Postdoctoral Research Fellow with The SUTD-MIT International Design Centre (IDC), Singapore University of Technology and Design (SUTD). My research topic is about protocol and algorithm design, resource allocation and localisation in wireless sensor network, UAV network and Ad Hoc network. I also enjoy the mobile programming (Android and Objective-C) and web server development. Thanks for sharing.
Jan 29, 2013
Compile threshold.cc in NS2
In ns2, if you want to calculate the receiving power threshold of a node, you may want to use threshold tool which has been integrated in ns2 source code.
I don`t know why the threshold.cc is not compiled in the new version of ns2 like ns-allinone-2.35. So we have to do it by ourselves. In ubuntu, if you try to do "gcc threshold.cc", you will get an error message of "<iostream.h>".
So, we replace this line "#include<iostream.h>" by
#include<iostream>
#include<cstring>
using namespace std;
Then, compile it with g++,
g++ threshold.cc -o threshold
Subscribe to:
Post Comments (Atom)
thanks a lot <3
ReplyDeletethreshold -m TwoRayGround -r 0.95 40
ReplyDeleteit gives error that threshold:command not found.
the correct is ./threshold -m TwoRayGround -r 0.95 40
Deletethat is right. thx.
Deleteits working, thanks a lot............
ReplyDeletePlz anybody tell me,
ReplyDeleteIn the following statement used for defining frequency in Hz, what is the meaning of "e"
"double freq = 914.0e6; // frequency"
Hi Pooja,
DeleteSorry to reply you so late. I got a bunch of comments to reply. Here it means 914 * 10^6 which is 914MHz.