[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] how to add new TracedVars (and subsequently trace them)?



Dear all,

could someone tell me what exactly I have to do to add a new traceable variable (TracedInt, TracedDouble, ...) to an existing agent (e.g. rtProto/DV)? (And then, how to trace it...)

I tried the following:
1) add the variable in the c++ code for the Agent/rtProto/DV:
    - declare the new variable (a TracedInt, rtsChanged_) 
    - bind it to the Tcl instance variable (rtsChanged_) in the agent's init() member function
2) added the trace(TracedVar* v) function for the agent to establish the way it has to be written to the trace 

Apparently, this is NOT sufficient, for the trace() function I added to rtProto/DV is never called...

Kind regards,
Chris.