[ns] Directional Antenna support in ns2.34?

2010-03-21 Thread The Learner


Hi all.
I would like to know if ns-allinone-2.34 (2.34 version) provides support for
Directional Antenna?
Which file I should check for the in ns2 directory?

Regards,
The Learner.
-- 
View this message in context: 
http://old.nabble.com/Directional-Antenna-support-in-ns2.34--tp27975754p27975754.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] EXEC error????

2010-03-21 Thread pietro.luigi.c

Hi,

I try to execute this tcl script:

set maxDist 15
set stepDist 2

set maxVel 20
set stepVel 2
set xDest 14

for { set i 1 } { $i  $maxDist } { incr i } {
#uso tcp_bt_df.tcl DISTANZATRAINODI
puts TCP OVER BT DISTANZA FISSA: $i metri
exec ns tcp_bt_df.tcl $i
}

and i have this error:

(10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00

 Flow info: dateRate Delay DeliveryRaio -- 
1:  21340.00 (170720/8.00)  0.033507 (5.361120/160) 1.00 (1 - 
0/442)
0:  1340.00 (10720/8.00)0.001145 (0.183200/160) 1.00 (1 - 
0/442)
 nsCmd:_o53 start
Page time: 1.287225 2060
0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00
1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 
0.00
1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 
0.00
0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00
while executing
exec ns tcp_bt_df.tcl $i
(for body line 4)
invoked from within
for { set i 1 } { $i  $maxDist } { incr i } {
#uso tcp_bt_df.tcl DISTANZATRAINODI
puts TCP OVER BT DISTANZA FISSA: $i metri
exec ns tcp_bt_df.tc...
(file tcp_bt.tcl line 10)


Where's the error??

I'm sure script TCL tcp_bt... is correct!

Thank u in advance,
Pietro


Re: [ns] EXEC error????

2010-03-21 Thread Teerawat Issariyakul


Hi Pietro,

Here is my suggestion. If you are sure that tcp_bt.tcl is correct,
try to run the following

ns tcp_bt.tcl 1
ns tcp_bt.tcl 2
ns tcp_bt.tcl 3
...

Keep changing the last number until it hits 15.

Does it create any error?

Best Regards,

Teerawat Issariyakul
http://www.ns2ultimate.com/
http://www.ece.ubc.ca/~teerawat
http://www.t-issariyakul.blogspot.com
http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417
http://twitter.com/T_Bear


On 3/21/2010, pietro.luig...@alice.it pietro.luig...@alice.it wrote:


Hi,

I try to execute this tcl script:

set maxDist 15
set stepDist 2

set maxVel 20
set stepVel 2
set xDest 14

for { set i 1 } { $i  $maxDist } { incr i } {
   #uso tcp_bt_df.tcl DISTANZATRAINODI
   puts TCP OVER BT DISTANZA FISSA: $i metri
   exec ns tcp_bt_df.tcl $i
}

and i have this error:

(10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00

 Flow info: dateRate Delay DeliveryRaio --
1: 21340.00 (170720/8.00)  0.033507 (5.361120/160) 1.00 (1 - 
0/442)
0: 1340.00 (10720/8.00)0.001145 (0.183200/160) 1.00 (1 - 
0/442)
 nsCmd:_o53 start
Page time: 1.287225 2060
0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 
0.00
1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 
0.00
1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 
0.00
0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 
0.00
while executing
exec ns tcp_bt_df.tcl $i
(for body line 4)
invoked from within
for { set i 1 } { $i  $maxDist } { incr i } {
   #uso tcp_bt_df.tcl DISTANZATRAINODI
   puts TCP OVER BT DISTANZA FISSA: $i metri
   exec ns tcp_bt_df.tc...
(file tcp_bt.tcl line 10)


Where's the error??

I'm sure script TCL tcp_bt... is correct!

Thank u in advance,
Pietro




[ns] segmentation fault while calling getLoc function(getting node position)

2010-03-21 Thread Ghofrane

Hello,
I
need to get the current position of the node during the simulation,
so I added in the cc file:
double ox,oy,oz;
MobileNode *
otherNode;
otherNode = (MobileNode
*)(Node::get_node_by_address(id));
otherNode-getLoc(ox,oy,oz);

but
I have a segmentation fault at the beginning of the simulation. Can you help me 
please to   solve this problem ?
Is there any other method to know  the current node position?

Thanks


  


[ns] Is Agent::recv(Packet* p, Handler *) called only when a BroadcastPacket o a packet whit his address is come to an Agent?

2010-03-21 Thread Francesco Salpietro

I have a configuration like this:

node($i) attach-agent MyAgent($i) [$i from 1 to 3]
 
$ns connect MyAgent(1) MyAgent(3)  [only for this Agent]

n1n2-n3

In my wireless simulation, n1 is out of the range of n3, but n2 is in both 
ranges; then with the AODV routing algo,  n2 forwards all the pkt from n1 to n3.
The question is:
When n2 receive this kind of packets (n1 --- [n2]---n3) the method 
Agent::recv(Packet* p, Handler *) isn't invoked
There is another method in class Agent or a way to access at this Packet* p?

PLEASE, i need your help!!!

Thanks in advance!!


---
Francesco Salpietro




[ns] Invitation to connect on LinkedIn

2010-03-21 Thread Larissa Vasconcelos

LinkedIn
Larissa Vasconcelos requested to add you as a connection on 
LinkedIn:
--

Rishabh,

I'd like to add you to my professional network on LinkedIn.

- Larissa

Accept invitation from Larissa Vasconcelos
http://www.linkedin.com/e/XYLt_3zkkGuzoc16gPkCk3Z-PrP/blk/I598087706_3/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_cRYSc3sTe30Uejl9bT5hjRoOs65GbPoQcz4Oc3gScj4LrCBxbOYWrSlI/EML_comm_afe/

View invitation from Larissa Vasconcelos
http://www.linkedin.com/e/XYLt_3zkkGuzoc16gPkCk3Z-PrP/blk/I598087706_3/0PnPoMdPsUc3wVdkALqnpPbOYWrSlI/svi/

--

Why might connecting with Larissa Vasconcelos be a good idea?

People Larissa Vasconcelos knows can discover your profile:
Connecting to Larissa Vasconcelos will attract the attention of LinkedIn users. 
See who's been viewing your profile:

http://www.linkedin.com/e/wvp/inv18_wvmp/

 
--
(c) 2010, LinkedIn Corporation


[ns] Ping packets not recieved in wireless simulations

2010-03-21 Thread Vaibhav Sinha

Hi,

I have encountered a problem while using Ping protocol. While the protocol 
works file when used in wired simulation, for some reason, it fails for 
wireless. In case of wireless, the recv() function of the protocol is not 
called at all.

Can somebody point out the reason for this. 

I have included the TCL scripts for both wired and wireless case.
__
Wireless case:

#Define a 'recv' function for the class 'Agent/Ping'
Agent/Ping instproc recv {from rtt} {
    $self instvar node_
    puts node [$node_ id] received ping answer from \
  $from with round-trip-time $rtt ms.
}
# == 
# Define options 
# == 
 
set val(chan)   Channel/WirelessChannel 
set val(prop)   Propagation/FreeSpace 
set val(netif)  Phy/WirelessPhy 
 
set val(mac)    Mac/802_11 
 
set val(ifq)    Queue/DropTail/PriQueue 
set val(ll) LL 
set val(ant)    Antenna/OmniAntenna 
set val(x)  670   ;# X dimension of the topography 
set val(y)  670   ;# Y dimension of the topography 
set val(ifqlen) 50    ;# max packet in ifq 
set val(seed)   0.0 
 
set val(adhocRouting)   FLOODING 
# when set to flooding, only one node is accounted for 
 
set val(nn) 3   ;# how many nodes are simulated 
set val(stop)   200.0   ;# simulation time 
 
# = 
# Main Program 
# == 
# == 
 
# 
# Initialize Global Variables 
# 
 
# create simulator instance 
set ns    [new Simulator] 
 
# setup topography object 
set topo    [new Topography] 
 
#use new trace format 
$ns use-newtrace 
 
# create trace object for ns and nam 
set tracefd    [open ping_wl.tr w] 
$ns trace-all $tracefd 
 
set namtrace [open ping_wl.nam w] 
$ns namtrace-all-wireless $namtrace $val(x) $val(y) 
 
 
# define topology 
$topo load_flatgrid $val(x) $val(y) 
 
# 
# Create God 
# 
set god_ [create-god $val(nn)] 
 
#$god_ on 
# when god turned on, ns segfaults 
 
# 
# define how node should be created 
# 
 
# Create channel #1 
set chan_1_ [new $val(chan)] 
 
#global node setting 
$ns node-config -adhocRouting $val(adhocRouting) \ 
  -llType $val(ll) \ 
  -macType $val(mac) \ 
  -ifqType $val(ifq) \ 
  -ifqLen $val(ifqlen) \ 
  -antType $val(ant) \ 
  -propType $val(prop) \ 
  -phyType $val(netif) \ 
  -topoInstance $topo \ 
  -agentTrace ON \ 
  -routerTrace ON \ 
  -macTrace OFF \ 
  -mobilityTrace OFF \ 
  -channel $chan_1_ 
 
# 
#  Create the specified number of nodes [$val(nn)] and attach them 
#  to the channel. 
 
for {set i 0} {$i  $val(nn) } {incr i} { 
 set node_($i) [$ns node $i] 
 $node_($i) random-motion 0    ;# disable random motion 
} 
 
$god_ set-dist 0 1 1 
 
#setting initial positions of the nodes 
#nodes are stationary for throughout the simulation 
$node_(0) set Z_ 0. 
$node_(0) set Y_ 0.00 
$node_(0) set X_ 0.00 
 
$node_(1) set Z_ 0. 
$node_(1) set Y_ 0.0 
$node_(1) set X_ 10.0

$node_(2) set Z_ 0. 
$node_(2) set Y_ 20.0 
$node_(2) set X_ 20.0

set p0 [new Agent/Ping]
$ns attach-agent $node_(0) $p0
set p1 [new Agent/Ping]
$ns attach-agent $node_(1) $p1
set p2 [new Agent/Ping]
$ns attach-agent $node_(2) $p2

#Connect the two agents
$ns connect $p0 $p2
$ns connect $p0 $p1
$ns connect $p2 $p1

#Schedule events
$ns at 0.2 $p0 send
$ns at 0.4 $p1 send
$ns at 0.6 $p0 send
$ns at 0.6 $p1 send
$ns at 1.0 finish

#Run the simulation
$ns run

__

Wired Case:

#Define a 'recv' function for the class 'Agent/Ping'
Agent/Ping instproc recv {from rtt} {
    $self instvar node_
    puts node [$node_ id] received ping answer from \
  $from with round-trip-time $rtt ms.
}

set ns [new Simulator]

set nf [open out.nam w]
$ns namtrace-all $nf

set tracefd    [open ping.tr w]
$ns trace-all $tracefd

#Create three nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
#Connect the nodes with one link
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
$ns duplex-link $n0 $n2 1Mb 10ms DropTail
$ns duplex-link $n2 $n1 1Mb 10ms DropTail



#Create two ping agents and attach them to the nodes n0 and n1
set p0 [new Agent/Ping]
$ns attach-agent $n0 $p0
set p1 [new Agent/Ping]
$ns attach-agent $n1 $p1
set p2 [new Agent/Ping]
$ns attach-agent $n2 $p2

#Connect the two agents
$ns connect $p0 $p2
$ns connect $p0 $p1
$ns connect $p2 $p1

#Schedule events
$ns at 0.2 $p0 send

[ns] Segment fault

2010-03-21 Thread stalin babu

Hi .

 when i am running a tcl script i got an error segment fault.

 i am run the simulation for 10 nodes it's run sucessfully. when i am trying
to run simulation for 20 nodes
 at the end of simulation it gives an error  segment fault . plese help
me

 thank u an advance