Re: [ns] what is antenna gain unit in ns2?

2013-04-24 Thread Tuan LE HUU NGUYEN

On 24/04/2013 2:29 CH, Behnaz Bostanipour wrote:
> Hello,
>
> In ns2, default.tcl we have :
>
> Antenna/OmniAntenna set Gt_ 1.0
> Antenna/OmniAntenna set Gr_ 1.0
>
> what is the unit of the gain? watts or dBm?
>
> Thanks,
> Behnaz
>

Hi Behnaz,

I think it is measured in dB (or dBi).

Regards,



Re: [ns] Node Coordinates

2013-04-17 Thread Tuan LE HUU NGUYEN

On 17/04/2013 2:00 CH, Najma Ismat wrote:
> Hi,I want to print the position of nodes at the start of the simulation on 
> the terminal window, can anyone guide how to do that? I have included 
> mobility pattern file in my tcl script for the node placement and 
> position.Regards,Najma 

Hi Najma,

You can try this code in TCL script:

set posx [$node1 set X_]
puts $posx

This will print out the X component of coordinates of node. Do the same 
thing for Y and Z (replace X_ with Y_  or Z_) (but actually you don't 
need the Z).

Best regards,



Re: [ns] Problem in mark greig's wireless1.tcl

2013-04-15 Thread Tuan LE HUU NGUYEN

On 15/04/2013 1:18 SA, Sahil Sharma wrote:
> Hi,
>
> Thanks for the reply. It worked for me.The tcl script wireless1.tcl is
> working perfectly now.
>
> I have one more problem, in tutorial its written "Running wireless1-out.nam
> we see the three mobilenodes moving in nam window. "
> I see that wireless1-out.nam have been created in the directory but have no
> idea how to run it. What is the exact command to run ".nam" file.
>

It's easy, you type this command in Terminal (assume that the file named 
wireless1-out.nam)
nam wireless1-out.nam



Re: [ns] error in running make file

2013-04-13 Thread Tuan LE HUU NGUYEN

Sorry, it should be like this (there's no asterisk marks):

sudo apt-get update
sudo apt-get install build-essential
gcc -v



Re: [ns] error in running make file

2013-04-13 Thread Tuan LE HUU NGUYEN

On 12/04/2013 9:07 CH, Mallika Sharma wrote:
> ubuntu-12
>

I found a solution on the Internet 
(http://ubuntuforums.org/showthread.php?t=1083933), try these commands 
in Terminal:

sudo apt-get update
sudo apt-get install*build-essential*
gcc -v




Re: [ns] process to run .cc file

2013-04-12 Thread Tuan LE HUU NGUYEN

On 10/04/2013 3:50 CH, Mallika Sharma wrote:
> i m doing a project on ns2 version 2.34.Can anyone plz tell me how to run a
> .cc file.
> thanx

Actually  a .cc file just contain the code in C/C++ language and cannot 
be executed. You need to compile it with a C++ compiler. For example you 
have a file test.cc, you can compile this file with this command in 
Terminal:
gcc test.cc -o test.o

Then set the execute permission for the output file test.o (with chmod) 
and you can run the compiled file. For example typing this command in 
the Terminal (at the directory that contains the file test.o):
./test.o

Best regards,



Re: [ns] error in running make file

2013-04-12 Thread Tuan LE HUU NGUYEN

On 12/04/2013 4:40 CH, Mallika Sharma wrote:
> While running the make command i got the error that "make: *** no target
> specified and no makefile found. stop." and while running the code "g++ -c
> -o something .o something.cc" the error which i got is g++ and
> pentium-builder packages are not installed.i tried to install the packages
> but they didn't install.
> plz help
>
> regards
What kind of system that you're using? Ubuntu, Feroda, Debian... or sth 
else?



Re: [ns] displaying energy as a text in nsnam

2013-04-08 Thread Tuan LE HUU NGUYEN

On 09/04/2013 9:04 SA, nitpro wrote:
> I want to display the energy of a node in nsnam. I have multiple nodes and
> for each node I want to display the energy. How to do this?
>
>
>
> --
> View this message in context: 
> http://network-simulator-ns-2.7690.n7.nabble.com/displaying-energy-as-a-text-in-nsnam-tp26596.html
> Sent from the ns-users mailing list archive at Nabble.com.
>

Hi nitpro,

I don't know what is the "energy" that you meant (I'm new to ns2 too. Is 
it the transmission power?). But in nsnam you can display a label above 
a node, by add this command in the TCL script:
$node label "thing_you_want_to_display"
You can display value of a variable, or a text string, or both as the 
label of a node in nsnam.

Best ragards,



Re: [ns] Installation problem: Ns2.29 in fedora

2013-04-07 Thread Tuan LE HUU NGUYEN

On 06/04/2013 6:49 CH, Aska123 wrote:
> WHile installing Ns2.29 in fedora . i got error : make error : make command
> not found
>
>
>
> --
> View this message in context: 
> http://network-simulator-ns-2.7690.n7.nabble.com/Installation-problem-Ns2-29-in-fedora-tp26576.html
> Sent from the ns-users mailing list archive at Nabble.com.
>

It seems that your system doesn't have the make tool. Try this command 
in Terminal:
yum install gcc-c++ automake autoconf

(this command require root privilege or sudoers privilege)

Best regards,



[ns] How to get the current transmission power of a mobile node?

2013-04-03 Thread Tuan LE HUU NGUYEN

Hi everybody,

I would like to ask, in ns2 is there any way to get the current 
transmission power of a mobile node? I see that the transmission power 
is stored in a variable named Pt_ as defined in wirelessphy.h. There is 
also a C++ function named getPt() which is defined in the file 
wirelessphy.cc, it returns the value of Pt_ variable. So how can I 
"call" this function via a TCL script?

Best regards,