[ns] total tx power in energy-model.cc - how to display it?
Chuah Seong Ping
SPCHUAH at ntu.edu.sg
Thu Sep 18 04:57:16 PDT 2008
Hi all,
I want to know the total transmission energy of a wireless node. I
initiated the energy model by:
$ns_ node-config -energyModel $energymodel \
-rxPower $p_rx \
-txPower $p_tx \
-initialEnergy $initialenergy
There is this variable et_ in /mobile/energy-model.cc to keep track of
the transmission energy.
But how do I pull out this variable to display its value? I tried to
show it through printf but the NS simulation didn't print its value as
stdio! In fact, all printf messages inserted in /mobile/energy-model.cc
, /mac/wireless-phy.cc , /mac/mac-802_11.cc were not shown as stdio!
Can anyone please advice?
Millions thanks in advance.
Regards,
Seong Ping
More information about the Ns-users
mailing list