Re: [ns] Help: error when using node generated by create_topology in NS format

2007-06-10 Thread Filippos Kolovos

-
Good morning

As it looks like from your code,
you are declaring the array n($i) only inside
your proc. However, because it is a local variable
it gets erased after the proc's execution. Therefore,
in your main script, when you try to access it with
$ns monitor-queue $n(3) $n(6)  the interpreter
complains with an error.

What I would do in order to quickly solve this situation, would
be to declare the n array outside the proc and then import it
inside the procedure with global. This way, all changes made to
the array inside the proc, will stay and after the end of the procedure,
without disrupting
the execution flow.

That is why the interpreter cannot find the array in your main script.
According
to the script: it was never created (!?).

Hope that I have helped.

Regards,

-Fk


On 6/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 From: khodor abboud [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Fri, 08 Jun 2007 17:05:10 +0200
 Subject: [ns] Help: error when using node generated by create_topology in
 NS format


 Hello evry Body,

 I am using the NS format generated by brite. when i try to use the node
 generated by the procedure create_topology (for monotoring per example), i
 have this error :

 // can't read n(3): no such variable
 while executing
 $ns monitor-queue create_topology.$n(3) $n(6) 
 invoked from within
 set qmon36  [$ns monitor-queue create_topology.$n(3) $n(6) ]
 (file topology.tcl line 189)//


 the code is :

 // proc create_topology {} {
 global ns

 #nodes:
 set num_node 10
 for {set i 0} {$i  $num_node} {incr i} {
set n($i) [$ns mpls-node]
 }

 set node0 [$ns node]
 set node1 [$ns node]

  #links:
 set qtype CBQ

 $ns duplex-link $node0 $n(3) 10.0Mb 3ms DropTail
 $ns duplex-link $n(0) $n(6) 10.0Mb 2.312773335190996ms $qtype
 $ns duplex-link $n(1) $n(0) 10.0Mb 2.9694568204843463ms $qtype
 $ns duplex-link $n(2) $n(1) 10.0Mb 1.8352240604833803ms $qtype
 $ns duplex-link $n(3) $n(2) 10.0Mb 1.5822334297190923ms $qtype
 $ns duplex-link $n(4) $n(0) 10.0Mb 1.4360234541568795ms $qtype
 $ns duplex-link $n(5) $n(3) 10.0Mb 2.559521441995941ms $qtype
 $ns duplex-link $n(6) $n(3) 10.0Mb 0.7953178172063804ms $qtype
 $ns duplex-link $n(7) $n(4) 10.0Mb 2.7512102890042183ms $qtype
 $ns duplex-link $n(8) $n(7) 10.0Mb 1.6254465755920127ms $qtype
 $ns duplex-link $n(9) $n(3) 10.0Mb 0.5596028576377098ms $qtype
 $ns duplex-link $n(7) $node1 10.0Mb 3ms DropTail
 }

 #end function create_topology


 set qs 100



 ## Queue Monitor for some links

 set qmon36  [$ns monitor-queue $n(3) $n(6) ]

 set qmon63  [$ns monitor-queue $n(6) $n(3) ]

 set sample36 [new Samples]

 $qmon04 set-delay-samples $sample36

 set sample63 [new Samples]

 $qmon40 set-delay-samples $sample63

 $ns queue-limit $n(3) $n(6) $qs //

 Best regards,

 _
 Ten :  Messenger en illimité sur votre mobile !
 http://mobile.live.fr/messenger/ten/






-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


Re: [ns] one sender-multiple receivers

2007-06-10 Thread Kwnstantina Palla

Filippe and Anvay thank you very much for your reply!
I think that it can be done using UDP agents on each node and changing a
little the C++ code.
My thought is to make changes so that the sender can send to all nodes
through  defining iphdr-daddr() == IP_BROADCAST in the creation of the
packet. So i don't have to use more than one agent in each node or make a
loop in tcl.
I didn't try it yet, but i think it might work.
Please tell me your opinions.

(Filippe seuxaristw polu. Pes mou tin gnwmi sou an mporeis!)


[ns] SMAC with Directed Diffusio

2007-06-10 Thread zitouni rafik

Hello,
   
  I have the problem when I use the SMAC protocol with directed diffusion 
DIFFUSION/PROB implementation. 
  In the trace I have Collusion in the reception of SYNC packets with INTEREST 
packets of routing protocol.
   
  Can you give me the solution to avoid theses collusion. 
   
  Thanks in advance. 
   

  
-
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


[ns] wpanassociation to coordinator based on address

2007-06-10 Thread DRAGOS BORDEIANU

Hello, 

I am trying to have a ns2.31+nam simulation which is like following: I have two 
coordinators starting two star PANs and I want that each coordinator to have 
five children from which it gathers data.
 My problem is that I am not sure on which criterion the end device is 
associating with a coordinator, I suppose the criterion is the distance. So, 
all is fine; but, what if I want that an end-device closer to coordinator A to 
be associated to coordinator B? Is it possible to simulate in ns2 that an 
end-device knows the 64-bit address of the coordinator it wants to associate 
to and the end-device will associate to that coordinator and no other? Or, is 
it possible that the coordinator to hold a table with the preferred 64-bit 
addresses of end-devices so that only those end-devices could associate to that 
coordianator?

Thank you for your time and help,

Dragos Bordeianu

P.S. How can I verify if I have got any answers to my questions? Thanks!


   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.


[ns] measure latency from tracefile

2007-06-10 Thread Samir Salman

Guys,

I got the tracefile of my new mac protocol. Any ideas how to measure  
one-hop or end-end latency from the given data?

thank you in advance,

~Samir