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

Re: [ns] implementation question




Take a look at class Simulator method create-wireless-node {} defined in
tcl/lib/ns-lib.tcl file. There you would need to add the case for yr agent
which should call yr agent-creation routine.
See dsdv as an example implementation.
...
switch -exact $routingAgent_ {
	    DSDV     {
		        set ragent [$self create-dsdv-agent $node]
	    yr_agent {
	                set ragent [$self create-yr-agent $node]
            ....

Hope this helps,
--Padma.

 On Tue, 20 Mar 2001, Piyush Khengar wrote:


> Hi,
>
> I'm trying to implement a new ad hoc routing protocol for my PhD project and
> urgently need your help!
>
> The protocol is basically derived from the Agent class. So far I have
> managed to implement most of the main core of the adhoc agent. Now I want to
> be able to select my protocol in simulation scripts like you would do for
> any other ad hoc protocol, e.g:
>
>     $ns_ node-config -adhocRouting DSDV
>
> I've looked everywhere but I can't find out how to do this...
>
> At the moment I can only get the protocol working as two simple agents
> attached to two nodes that are explicitly connected via a wired link - quite
> useless! Also, I don't want to have to explicitly connect two adhoc agents
> together for them to work.
>
> I would appreciate it greatly if anyone could help me with the above.
>
> Many thanks,
> Piyush Khengar
>
> PS. I am using ns-2.1b7 on RedHat 7.0
>

-- 
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau

Padmaparna Haldar