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

[ns] TclClass("EnergyModel") & Class Node/MobileNode



Hi All,

In EnergyModel.cc, the EnergyModelClass constructor
calls the TclClass constructor and passes
"EnergyModel" as the argument. What does it do? Refer
to some tcl timplementation of EnergyModel?

EnergyModelClass ():TclClass ("EnergyModel") {}

What I have found is that there is no EnergyModel
class defined in TCL. Its infact just a part of the
mobile node as has been defined in ns-lib.tcl in
~ns/tcl/lib. But for some other things, like a mobile
node, mobilenode.cc has this statement:

MobileNodeClass() : TclClass("Node/MobileNode") {}

And it refers to the ns-mobilenode.tcl in ~/tcl/lib,
which defines all the procedures related to the mobile
node in tcl. But why is it different from the case of
Energy/Model where Energy/Model is not a class, yet in
the C implementation of EnergyModelClass, its
constructor calls the TclClass constructor.

My second question is that even though
ns-mobilenode.tcl defines tcl implementation of all
the procedures related to the mobilenode class but
where that class was first declared. Like there should
be statement like:

Class Node/MobileNode -superclass Node

But I cant find that statement in ns-mobilenode.tcl or
is it somewhere else?

Ahmad

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com