[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] $pa send $node in Marc Greis's tutorial



normally agents are "configure"d in tcl. to accomplish your task, you
might just haeva  send command. 

i couldnt follow what you meant by sending to some agent of a particular
node. would you know apriori which agent you wanna send to. a node can
have multiple agents attached to it. 

another thing you could do is this:
 
1. in tcl have a command to search for an agent of a particular type
attached to a node. you can return a pointer.

2. implement a send command where you take this 
[$ns gimme-agent Agent/TCP $n1] as an argument. then you can do a tcl
lookup and get a pointer to the object ..... say its target ..... then 
simply send it to the target or do a target->recv(packet) (you must do
somehting about about hte packet timestamps)

debo

On Wed, 2 May 2001, m s wrote:

> Hi
> 
>   I tried the agent example in Marc Greis's tutorial chapter VII...which 
> works fine but now I have the problem that I need to implement an agent 
> which sends packets to specific nodes in the topology but the method send() 
> is not taking the destination as a parameter..I guessed that an in 
> implementation of '$pa send $node' might help & re-reading the tutorial 
> chapter again..I found that it is refering to it at the end of the chapter 
> as an experiment to try implementing....:
> 
> "send ping packets with '$pa send $node' (where 'pa' is a ping agent
> 'node' a node) without having to connect the agent 'pa' with the ping agent 
> on 'node' first"
> 
> 
> So, I would appreciate a lot if someone can give some hints on how to send 
> packets from an agent to the corresponding agent attached to a specific node 
> in the topology. Or if there any similar code in the NS2 files that is 
> implemented in the same way.
> 
> Thanks in advance,
> Mohamed
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
>