[Smac-users] Re: energy - smac in ns
mehmet b.
mbuyukozer at yahoo.com
Tue May 10 20:24:16 PDT 2005
Hi Utku, as it seems you did not overwrite energy-model.h and energy-model.cc under ns-2.28/mobile/ also you should overwrite other files,
ns-2.28/mobile/energy-model.h
ns-2.28/mobile/energy-model.cc
ns-2.28/common/node.h
ns-2.28/mac/smac.cc
ns-2.28/mac/smac.h
ns-2.28/mac/wireless-phy.cc
ns-2.28/mac/wireless-phy.h
ns-2.28/tcl/lib/ns-mobilenode.tcl
I put all these files to these directories and I got one last error from wireless-phy.cc which seemed getDist function was not added to the wireless-phy.cc. I added this function to the end of file and also added header description to wireless-phy.h , then I successfully compiled.
double WirelessPhy::getDist(double Pr, double Pt, double Gt, double Gr,
double hr, double ht, double L, double lambda)
Best regards.
Mehmet
Utku Acer <utkuacer at gmail.com> wrote:
Hello,
First, thanks for sharing your work. I tried to use your code. I put
all the files in the zip file to the places that the original files
reside. After that when I tried to make that it gave me the following
warning and the error. Is there something I am missing or doing wrong?
Thank you very much.
Best,
Utku
In file included from ./common/node.h:59,
from mac/channel.h:47,
from mac/phy.h:60,
from mac/mac.h:48,
from mac/channel.cc:56:
./mobile/energy-model.h: In constructor
`EnergyModel::EnergyModel(MobileNode*, double, double, double)':
./mobile/energy-model.h:198: warning: `EnergyModel::node_on_' will be
initialized after
./mobile/energy-model.h:153: warning: `double EnergyModel::last_send_time_'
./mobile/energy-model.h:98: warning: when initialized here
mac/channel.cc: In member function `void
WirelessChannel::calcHighestAntennaZ(Phy*)':
mac/channel.cc:632: error: 'class WirelessPhy' has no member named 'getDist'
make: *** [mac/channel.o] Error 1
> ---------- Forwarded message ----------
> From: "Ali Hummos"
> To: smac-users at mailman.isi.edu
> Date: Sat, 07 May 2005 23:38:00 +0000
> Subject: [Smac-users] RE: Smac-users Digest, Vol 13, Issue 2
>
>
>
> Hi,
>
> I have modified some files in ns2 to solve the energy problem of smac based on the hint We Yei provided to this mailing list couple of months ago. I believe my modification solves the energy problem of smac in ns2.
>
> Please see my website (under miscellaneous) for more details and to download the modified files with explanation and some Energy results for 3 cases (No Sleep, SMAC with Adaptive Listening, and SMAC without Adaptive Listening). Please feel free to email me if you have any questions regarding my modification.
>
> http://student.cse.fau.edu/~AABUEL/
>
>
>
> Based on this modification, you can now specify the sleep power in your NS2 Tcl file:
>
>
>
> $ns_ node-config -rxPower 1.00 \
>
> -txPower 2.00 \
>
> -idlePower 1.00 \
>
> -sleepPower 0.00\
>
>
>
>
>
>
>
> Thanks
>
>
>
> Ali Abu-EL Humos
>
> PH.D Cadidate
>
> Computer Science and Engineering
>
> Florida Atlantic University
>
> aabuel at fau.edu
>
_______________________________________________
Smac-users mailing list
Smac-users at mailman.isi.edu
http://mailman.isi.edu/mailman/listinfo/smac-users
---------------------------------
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.isi.edu/pipermail/smac-users/attachments/20050510/3f811fb8/attachment.html
More information about the Smac-users
mailing list