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

[ns] Probems when I attach my agent?



Hi ns-users !!!	

I create my own agent  Agent/UMTSBS. Therefore I have a ns-umts.tcl which
contains the procedure Agent/UMTSBS instproc init (this file is in the
folder ns-2.1b6/tcl/lib like ns-mip.tcl, ns-lib.tcl...) and my procedures in
c++ (in the file umts.h umts.cc).

I think that I have to change the follow lines in the files ns-lit.tcl and
Makefile.in  in order to attach my agent to ns code:

ns-lib.tcl ---> adding the line   source ns-umts.tcl
Makefile.in ---> adding the lines  umts.o\  and the tcl/lib/ns-umts.tcl \

Once I have done the configure and makefile... I can't see any errors.

But when I execute my file umts.tcl  with the command --->   ns umts.tcl

A huge quantity of lines appear. In fact all this lines belong to file
ns-lib.tcl. At the end of this file appears:

: wrong # args: should be {Agent/UMTSBS instproc name args body}
    (Class instproc line 1)
    invoked from within
"Agent/UMTSBS instproc init { node args }"


My file ns-umts.tcl contains:

Agent/UMTSBS instproc init { node args }
{
    eval $self next args
    
    $self instvar BcastTarget_ 
    set BcastTarget_ [new Classifier/Replicator]
    $self bcast-target $BcastTarget_
    
    $self start 
}

I can't see any error... this files are the same as Agent/MIPBS instproc
init...   
If I cut the line   source ns-umts.tcl  in the file ns-lib.tcl  the ns works
well because when I put  the command   ns  appears  %. But If I add the same
line .... the ns doesn't work. Appears the above lines comented.

I'd like to know if anybody see where is my error.

Take in your advance....


----------------------------------------------------------------------------
/   Albert Prats Barrull					       /
/   CSELT - Via G.Reiss Romoli 274 - 10148 Torino (ITALY)    /
/    e-mail: [email protected]				       / 
----------------------------------------------------------------------------