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

Re: Control of applications in ns



> I am at the moment implementing an "application" for ns, and I was
> wondering what exactly starts executing the code in your application class
> (preferebly derived from ns's application class),it is not the call to
> the start procedure in Application, as I can see that the start, stop and 
> resume is called from the command method, so what executes the command
> method, and how often(or what triggers execution) is "command" executed.

They are accessed from otcl. For example, in tcl/ex/simple.tcl, a CBR
application is created then later it's started by calling "$cbr0 start".
The command() stuff is used for otcl linkage, more details are available
in the first chapter in the ns documentation.

> Which send method should be used? from what I see from the sourcecode for
> Application and Agent, the send method in Application invokes the sendmsg
> method in the class Agent, which then prints out a message to standard
> error that it is not implemented. Any explanations, advice?  

I think that depends on which particular agent you are using. For example,
UDP only implements sendmsg(), but some other agents may have implemented
other send() methods. So if your application wants to use those other
send(), make sure the underlying agent supports them. 

Hope this helps. 

- Haobo