Well.. The title is self-explanatory haha
I want to access a variable that is inside my C++ code, inside my agent,
actually. So, what I have done is the following..
This is the constructor for my Agent:

ProtexAgent::ProtexAgent() : Agent(PT_PROTEX)
{
  bind("packetSize_", &size_);
  bind("protexDst",&aim);
  node = NULL;
  myaddr = 0;
}

Then, on my tcl script I try to change its value with this:
"$node_($a) set protexDst $b"

But it does not work at all.. The error message:
"warning: no class variable Agent/Protex::protexDst

        see tcl-object.tcl in tclcl for info about this warning."

How can I correctly bind a variable of my C++ code to be accessed in my
tcl script?



Thanks,
Fernando.

Reply via email to