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

Re: which method?



On Mon, 23 Aug 1999, Haobo Yu wrote:

> Each agent should have an instvar node_. See Node::attach{} in
> tcl/lib/ns-node.tcl.
> 

Yes, I noticed that. The problem is that the src agent only knows the
address of the destination(dst_), it does not know the destination agent,
so the first step for me is to get destination agent from its address.
Curently I modified Simulator connect {} method to provide the dst agent
information to the srd agent. But if there is a method for me to get the
agent information from its address, it will be great.

> - Haobo
> 
> On Sun, 22 Aug 1999, Zhenhai Duan wrote:
> 
> > Is there a method for me to get the node on which an agent sits from its
> > address? See, after the command
> > 
> > $ns connect $src_agent $dst_agent
> > 
> > the src_agent has the destination address(dst_) of the dst_agent, how can
> > I get the node information from this address? or I need to rewrite connect
> > method to give the node information of the dst_agent?
> > 
> > Thanks.
> > --Zhenhai
> > --------------------------------------------------------------
> > Zhenhai Duan		        PhD student	
> > Computer Science Department	http://www.cs.umn.edu/~duan
> > University of Minnesota, TC	Phone: (612)626-7526(O)
> > -------------------------------------------------------------- 
> > 
> > 
>