[ns] Error in creating new agent

Ibrahim3100 ibrahimkt at hotmail.com
Fri May 15 09:12:13 PDT 2009


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

[user at localhost ~]$ ns ibrahim.tcl
ns:
[code omitted because of length]
: invalid command name "Agent/Ibrahim"
    while executing
"Agent/Ibrahim set packetSize_ 64"
[user at 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


ottoman wrote:
> 
> 
>  Hi
> 
> I have NS2.33 running on FC9 in VMWARE. I have to create a new agent.
> 
> I have made the following changes in the below listed files
> 
> *Makefile*
> 
> VanetCR/vanetcr.o VanetCR/vanetcr_accdb.o VanetCR/vanetcr_myheard.o \
> VanetCR/vanetcr_nghbdb.o VanetCR/vanetcr_sspdb.o \
> 
> *ns-default.tcl*
> 
> Agent/VanetCR set packetSize_ 1000    ;# for VANETCR added May 5th, 2009
> Agent/VanetCR set jitterFactorRBC_ 0.0001
> Agent/VanetCR set jitterFactorRev_ 0.0002
> Agent/VanetCR set sig_delay_ 0.003255
> Agent/VanetCR set verif_delay_ 0.00762
> Agent/VanetCR set lastheard_interval_ 1
> Agent/VanetCR set statinterval_ 0.01
> 
> *ns-packet.tcl*
> 
> # Wireless:
>     ARP     # Address Resolution Protocol, network wireless stack
>     GAF     # Geographic Adaptive Delity, for ad-hoc networks
>     LL     # network wireless stack
>     LRWPAN  # zheng, wpan/p802_15_4mac.cc
>     Mac     # network wireless stack
>     *VanetCR # Added for Vanet on May 5th, 2009*
> 
> *packet.h*
> 
> name_[PT_VANETCR]= "VanetCR"; //Added for VANETCR on May 5th, 2009
> static const packet_t PT_VANETCR = 61; //for VANETCR May 5th, 2009
> 
> *After Modifications
> *
> I execute the following commands to recompile
> 
> touch common/packet.cc
> make
> make clean
> configure
> 
> 
> *ERROR*
> 
> [root at localhost ns-2.33]# ns
> ns:
> [code omitted because of length]
> : invalid command name "Agent/VanetCR"
>     while executing
> "Agent/VanetCR set packetSize_ 1000    "
> 
>  the strange thing is as soon as I make this change in ns-default.tcl. All
> other tcl files also stop working and the error I listed before is
> returned.
> 
> Any help inthis regard will be highly appreciated.
> 
> Thanks & Regards,
> 
> Usman
> 313-424-0122
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-in-creating-new-agent-tp23410893p23562932.html
Sent from the ns-users mailing list archive at Nabble.com.



More information about the Ns-users mailing list