[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] can i dis"connect" a link between a src and sink?
Suppose you have 4 agents, A, B, C, D.
1) If you first do connect A,B, then A sends to B and B to A.
2) If you do afterwards connect A,C, then A sends to C and C to A. B sends to A
from the previous connect.
3) Then if you do connect C,D, A sends to C, B to A, C to D and D to C.
4) And then with connect C,B, A sends to C, B to C, C to B and D to C.
So the only thing connect A,B does is to set the target of A to B and B to A,
and does not disconnect any previous connected agents.
This way in a for loop, in order to be sure where you want to send, you should
issue the connect command just before sending. This way you will always send
where you want and you can even get acks until the next connect command
involving the target agent (like above 1,2,3)
You surely don't need to dig into C++ code, most propably you should read the
connect command in /ns/tcl/lib/ns-lib.tcl, which will hopefully make this all
clear to you.
Bye
Nick
melvin thomas wrote:
> --- "Nikolaos Katsarakis Austauschstud. (M.
> Schweigel)" <[email protected]> wrote: >
> Don't know about disconnect, but maybe it is
> > possible to do a connect between
> > source and target just before sending data. Although
>
> THIS METHOD THAT U SUGGEST ... I AM THINKING THAT IF I
> SET THIS LINK UP INSIDE A FOR LOOP .. IT WILL BE
> UN-CONNECTED AFTER IT INCR ?
>
> OR IS THERE NO WAY OF DOING THIS OTHER THAN DELVING
> INTO C++ ? AND IF THIS IS SO, WHERE DO I EVEN BEGIN ?
>
> PLS ADVISE ME ON WHAT I CAN DO TO RESOLVE THIS.
>
> TA
>
> > I don't know if it will
> > work with token ring, it surely works with UDP
> > agents who don't have acks.
> >
> > bye
> >
> > melvin thomas wrote:
> >
> > > Dear NS-USERS,
> > >
> > > I came across a disconnect in p296 of the on-line
> > > manual but it is referenced to html ... can i use
> > it?
> > >
> > > I am wondering if one can:
> > >
> > > $ns connect $source $sink
> > >
> > > can one also,
> > >
> > > $ns "disconnect" $source $sink ?
> > >
> > > I require this because I wish to simulate a token
> > ring
> > > wif randomness using rng so that any nodes can
> > send
> > > any other nodes other than
> . all nodes
> > created
> > > are equiped wif both src and sinks.
> > >
> > > pls advise if this is possible and/or feasible?
> > >
> > > Ta
> > >
> > >
> >
> _____________________________________________________________________________
> > > http://messenger.yahoo.com.au - Yahoo! Messenger
> > > - Voice chat, mail alerts, stock quotes and
> > favourite news and lots more!
> >
>
> _____________________________________________________________________________
> http://messenger.yahoo.com.au - Yahoo! Messenger
> - Voice chat, mail alerts, stock quotes and favourite news and lots more!