[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] problem in binding new class variable
Maybe you need to initialize the variable in ns../tcl/lib/ns-default.tcl.
-Bhagya
On Tue, 5 Jun 2001, Sergio Andreozzi wrote:
> I need to add some class variable to Agent/LossMonitor.
> I added the definition of the variable in the loss-monitor.h
>
> class LossMonitor : public Agent {
> public:
> LossMonitor();
> virtual int command(int argc, const char*const* argv);
> virtual void recv(Packet* pkt, Handler*);
> protected:
> ........
> int newvar_;
>
>
>
> LossMonitor::LossMonitor() : Agent(PT_NTYPE)
> { ..........
> newvar=0;
> bind("newvar_", &newvar_);
> }
>
>
> I compiled and all seemed to be good.
>
> When I execute a script I receive the following message:
>
> warning: no class variable Agent/LossMonitor::newvar_
>
> I don't understand where is the problem. Any other change to do???
>
> Thanks for your help
>
> Sergio
>
>
>
>