How to calculate power consumed

26 views
Skip to first unread message

kanda

unread,
Feb 4, 2010, 1:02:43 AM2/4/10
to omnetpp
hi,

I'm trying to simulate a wireless sensor network in omnet++4.0 . I
require a standard formula for the reduction of power of the sensor
node during transmission of messages. Pls provide links . Thanks in
Advance.

Alfonso Ariza

unread,
Feb 4, 2010, 11:25:06 AM2/4/10
to omn...@googlegroups.com
you need to use a battery model. You can find battery models in mixim and
inetmanet

--------------------------------------------------
From: "kanda" <dines...@gmail.com>
Sent: Thursday, February 04, 2010 7:02 AM
To: "omnetpp" <omn...@googlegroups.com>
Subject: [Omnetpp-l] How to calculate power consumed

> --
> You received this message because you are subscribed to the Google Groups
> "omnetpp" group.
> To post to this group, send email to omn...@googlegroups.com.
> To unsubscribe from this group, send email to
> omnetpp+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/omnetpp?hl=en.
>
>

Vitali Anselm

unread,
Feb 4, 2010, 4:20:06 PM2/4/10
to omn...@googlegroups.com
Hello,
 
I wonder whether there is a bug within AbstractRadioExtended.cc, exactly in "void AbstractRadioExtended::initialize(int stage)". I guess, that the first IF condition is wrong because it returns always TRUE, so that only the "propagationModel" is possible, but I need my Ieee80216ReceptionModel. I think the condition should be : if (cc->par("propagationModel").str()=="")   
 
 
if
(cc->par("propagationModel").str()!="")            <<<<<<<<<<<<< I guess this condition is wrong
receptionModel = (IReceptionModel *) createOne(cc->par(
"propagationModel").stringValue());
else
{
if (par("attenuationModel").stdstringValue ()=="tworay")
receptionModel = createReceptionModelTwoRay();
else if (par("attenuationModel").stdstringValue ()=="pathlost")
receptionModel = createReceptionModelPathLost();
else
receptionModel = createReceptionModel();
}
receptionModel->initializeFrom(
this);
 
radioModel = createRadioModel();
radioModel->initializeFrom(
this);

kanda subramanian

unread,
Feb 4, 2010, 8:56:04 PM2/4/10
to omn...@googlegroups.com
Thank you Alfonsa sir.

I have finished 90% of my project in omnetpp 4 in windows. Now can in integrate mixim as part of my project?? I have tried installing mixim for mobility feature but the simulation runs separately. Is it possible to use d battery model alone in my project without major changes??

Thanks once again.

Juan-Carlos.M...@sophia.inria.fr

unread,
Feb 5, 2010, 4:48:22 AM2/5/10
to omn...@googlegroups.com
Vitali,

It's possible, but be aware that abstractRadioExtended is mean to be
subclassed in your really radio implementation. so. if you want to
implement a Ieee80216 radio, you should extend the AbstractRadioExtended
and set there all the parameters according your needs.

JcM

Vitali Anselm wrote:
> Hello,
>
> I wonder whether there is a bug within AbstractRadioExtended.cc,
> exactly in "void AbstractRadioExtended::initialize(int stage)". I
> guess, that the first IF condition is wrong because it returns always
> TRUE, so that only the "propagationModel" is possible, but I need my

> Ieee80216ReceptionModel. I think the condition should be : *if*

> (cc->par("propagationModel").str()=="")
>
>

> *if* (cc->par("propagationModel").str()!="") <<<<<<<<<<<<<

> I guess this condition is wrong
>
> receptionModel = (IReceptionModel *)
> createOne(cc->par("propagationModel").stringValue());
>

> *else*
>
> {
>
> *if* (par("attenuationModel").stdstringValue ()=="_tworay_")
>
> receptionModel = createReceptionModelTwoRay();
>
> *else* *if* (par("attenuationModel").stdstringValue ()=="_pathlost_")
>
> receptionModel = createReceptionModelPathLost();
>
> *else*
>
> receptionModel = createReceptionModel();
>
> }
>
> receptionModel->initializeFrom(*this*);
>
>
>
> radioModel = createRadioModel();
>
> radioModel->initializeFrom(*this*);

Alfonso Ariza

unread,
Feb 5, 2010, 12:04:44 PM2/5/10
to omn...@googlegroups.com
Yes, the mixim battery model is very easy to modify

Alfonso Ariza

unread,
Feb 5, 2010, 12:18:33 PM2/5/10
to omn...@googlegroups.com
fixed
--
Reply all
Reply to author
Forward
0 new messages