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

Re: Attach the same agent on multiple nodes



On Thu, 5 Nov 1998, Kannan Varadhan wrote:

> On Wed, 4 Nov 1998, Lloyd Wood wrote:
> > 
> > set rcvr [new Agent/LossMonitor]
> > $ns attach-agent $n3 $rcvr
> > $ns attach-agent $n4 $rcvr
> > $ns attach-agent $n5 $rcvr
> > 
> > It _does_ look extremely odd, but at least it's only a LossMonitor,
> > not a traffic source.  Still, how does it monitor multiple nodes at
> > once? 
> 
> It doesn't.  It is being used as a generic sink in those multicast
> examples, and for ease of coding.  Fewer lines of tcl code to stare at.

That's it? No deep and meaningful C++ memory savings?

I humbly submit that, when it comes to the ns example code, the more
explicit lines of tcl code and comments the ns user climbing the
learning curve has to stare at, the better... this isn't the sort of
habit you want ns users to pick up, since they'll only bug you with
questions about their awfully deterministic simulation results later
on. (Or worse, publish papers about them.)


> Agent/Null would have been a better, more representative candidate.
> In general, the standard agents are not written to be hooked up to
> multiple separate nodes to do useful useful things.  However,
> because agents can find the destination address of the packet and
> hence the node that received this packet, it is concievable that a
> single agent could do separate useful things.
> 
> ... might be useful for some meta monitoring purposes ...
> afterall, nothing in ns says no :-)

Everything is theoretically possible in ns.

For what is practically possible and sensible, we must look to the
documentation and example code as our guide. 

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>