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

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



It was my first idea.
I put a printf there and nothing was displayed, this means that
probably this function is not used....
Moreover In that function I could not find the node pointer
and I'n not sure that the binding of my variable is done before
the binding of the energy...
:-)

However.. I found a solution... I'm modifing the DSR algorithm,
so in recv method when I receive a packet I update (only one time)
the energy of the node with a surplus charge that is my variable
So All node have a common charge and my variable (> or < 0)
generate the energie differences. It's a bit silly... but for now
I'm solving this problem in this way... if someone in the mailing
list has a better idea... tell me!
Marceau Coupechoux wrote:

> Hi,
> I have seen in the method "command" of mobilenode.cc the Tcl command
> "setenergy": it calls energy_model()->setenergy(...). You can maybe use
> that command. If you to assign this value to your variable you can
> insert in "command" at the line of setenergy: myvariable = argv[2],
> bye,
>
> Riccardo Russo wrote:
> >
> > Hi,
> > I don't know if it's possible to do this with the energy.
> > In fact a did this:
> > $node_(23) set myvariable 0.03
> > and now I would change the C++ code to set energy to this
> > specific value.
> > There is something like:
> > $node_(23) set initial_energy_ 0.03???
> >
> > Riccardo
>
> --
> 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]
> --------------------------------------