Asking for help about inserting new agent in the NS2.31+crcn environment~
In order to realize the simulation, I need to insert new agent in Ns2+crcn environment to add my own method. However, I tried to insert a basic agent to learn the fundmental procedure of inserting the new agent.
The former steps went very well, then, when I run the script with the command: ns-crcn extra_agent.tcl, there showed up a mistake.
The mistake appears below.
wuzhen@wuzhen-virtual-machine:~/ns-allinone-2.31/ns-2.31$ ns-crcn extra_agent.tcl
invalid command name "Agent/MyAgentOtcl"
while executing
"Agent/MyAgentOtcl create _o3 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/MyAgentOtcl"
invoked from within
"set myagent [new Agent/MyAgentOtcl]"
(file "extra_agent.tcl" line 1)
Did any one meet the same problem? Asking for help~
Best regards!
|