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

Re: Re: [ns] Node energy --- urgent!




I just did it. I don't know where ns put energy = initialenergy.
My variable is ok. I need only to know where initialenergy is assigned
to energy in the code.
In tclscript I could define initial_energy, but this variable is the
starting

energy for every node. I have just define a new variable
(like for example X_ or speed  that are node qualities). I compiled and
it's all right. The problem is know to understand where the energy
of each mobilenode is assigned to initialenergy. I have to sobstitue
that
part of the code with energy = my_default_energy_for_this_node


Marceau Coupechoux wrote:

> Hi,
> you have to "bind" the new variable in the constructor of the node and

> give a default value in ns-default.tcl.
>
> Riccardo Russo wrote:
> >
> > Hi all.
> > I have a simple proble. I have defined a new variable in node
structure
> > (c++ and tcl) because
> > I would give to each node a different energy value.
> > Now I don't know where in mobilenode.cc I have to set the energy to
this
> > value (that is
> > set in TCL script). Anybody has an idea?
> > Thanks a lot
>
> --
> Marceau Coupechoux
> --------------------------------------
> Alcatel CIT Corporate Research Center
> Radio Department (UTR)
>
> Route de Nozay 91460 Marcoussis France
> tel : 01 69 63 43 59 fax : 43 60
> mel : [email protected]
> --------------------------------------