Hi All!
I want to access the lower layer parameters using my agent (agent.cc).  I am 
using get-mac-object for returning the mac handle.

I am using this command in my test.tcl$ajd0 get_macObject [$node(0) 
get-mac-object]
 

3. I have this thing in the ns-mobilenode.tclNode/MobileNode instproc 
get-mac-object {}
{
puts "in get-mac-object"$self instvar mac_
if {$mac_(0)==""} {
puts "NO mac object is present"
} else {
return $mac_(0)
}
}
 

 

4. i have wriiten this in agent.ccif (strcasecmp(argv[1], "get_macObject")== 0)
{
Tcl& tcl = Tcl::instance();
TclObject* obj = TclObject::lookup(argv[2]);
if(obj== 0)
{
tcl.eval("puts \"A ----------------------ERROR###############--- =\"");return 
(TCL_ERROR);


}
Macobj = (Mac802_11*) obj;
tcl.eval("puts \"A ----------------------#############WORKING###############--- 
=\"");
macfound = true;
return TCL_OK;
}
 
it compiled well but when i start simulate the test.tcl I come to this
 ns test.tcl -dist 20
ns: 
[code omitted because of length]
: wrong # args: should be {Node/MobileNode instproc name args body}
    (Class instproc line 1)
    invoked from within
"Node/MobileNode instproc get-mac-object {}"
Please suggest me where I am lagging.
Thanks
Atif



      

Reply via email to