problem adding a new protocol

View: New views
3 Messages — Rating Filter:   Alert me  

problem adding a new protocol

by mgupta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message






hi ns-users,
 
                    i have followed all the steps for adding a new clustering agent in ns-2.31. but when i run the tcl script i get the following error message--
 
[code omitted because of length]
invalid command name "Agent/MyClusAgent"
while executing
"Agent/MyClusAgent set packetsize_ 100"
 
the last line was added in ns-default.tcl.
 
after adding the necessary lines in the respective files (packet.h, ns-default.tcl, ns-packet.tcl) i ran make as --
 
./configure
make clean
make depend
make
 
please help me with this situation
 
meeta


     

Re: problem adding a new protocol

by Ibrahim3100 () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hi ns-users,
 
                    i have followed all the steps for adding a new clustering agent in ns-2.31. but when i run the tcl script i get the following error message--
 
[code omitted because of length]
invalid command name "Agent/MyClusAgent"
while executing
"Agent/MyClusAgent set packetsize_ 100"
 
the last line was added in ns-default.tcl.
 
after adding the necessary lines in the respective files (packet.h, ns-default.tcl, ns-packet.tcl) i ran make as --
 
./configure
make clean
make depend
make
 
please help me with this situation
 
meeta


     



Re: problem adding a new protocol

by Ibrahim3100 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   
   I got same this error message when i run the tcl script  as follow:

[user@localhost ~]$ ns ibrahim.tcl
ns:
[code omitted because of length]
: invalid command name "Agent/Ibrahim"
    while executing
"Agent/Ibrahim set packetSize_ 64"
[user@localhost ~]$

this happened because of the name of the class in the linkage part not correct, i mean in the .cc file you should check the spelling in this line for example: IbrahimClass() : TclClass("Agent/ibrahim") {} , the error happened because of the "Agent/ibrahim"  ibrahim is not  correct name it must be "Agent/Ibrahim". In your case must be "Agent/MyClusAgent" so check the spelling name.

I hope this help you.

Ibrahim

   
mgupta wrote:




hi ns-users,
 
                    i have followed all the steps for adding a new clustering agent in ns-2.31. but when i run the tcl script i get the following error message--
 
[code omitted because of length]
invalid command name "Agent/MyClusAgent"
while executing
"Agent/MyClusAgent set packetsize_ 100"
 
the last line was added in ns-default.tcl.
 
after adding the necessary lines in the respective files (packet.h, ns-default.tcl, ns-packet.tcl) i ran make as --
 
./configure
make clean
make depend
make
 
please help me with this situation
 
meeta