MiXim: write extra attenuation in AirFrame

53 views
Skip to first unread message

Ralf Zenker

unread,
Mar 10, 2010, 6:06:33 AM3/10/10
to omn...@googlegroups.com
Hi folks,
 
 
I use MiXim 1.1 and OMNet++ 4.0 and need some input concerning receiving power and especially path loss calculation.
 
In my simulation I use as channel model a simple path loss model, which is a standard channel model in MiXim. Now I want to add some extra attenuations, which are independent of distance. 
 
There are 2 extra attenuations: One is caused at the sending node and one is caused at the receiving node. My goal is to add these 2 attenuations to the AirFrame, so that they are attended when I use the methods:
Signal& signal = frame->getSignal();
ConstMapping* recvPowerMap = signal.getReceivingPower();
 
Are there any suggestions how to realize this issue?
 
 
Best wishes,
Ralf

Daniel Willkomm

unread,
Mar 10, 2010, 7:48:24 AM3/10/10
to omn...@googlegroups.com, Ralf Zenker
You should create your own analogue module. Take a look at the analogue module
tutorial on the wiki. This should give you an idea how to implement it

Daniel

--
-----------------------------------------
o Dipl.-Ing. Daniel Willkomm
o TU-Berlin
o Telecommunication Networks Group
o http://www.tkn.tu-berlin.de/~willkomm/
o Mail: will...@tkn.tu-berlin.de

Ralf Zenker

unread,
Mar 10, 2010, 8:16:35 AM3/10/10
to omnetpp
Thank you Daniel. I think there will be a problem with the needed
attenuation from the sending node.

In my opinion the analogue module is called by the receiving node. If
this is right it is not possible to get parameters from the
omnetpp.ini which are only for the sending node.

An example:
Node[0] is sending node and Node[1] receiving node. The parameters in
omnetpp.ini are
Network.node[0].nic.phy.parameter = 4.0
Network.node[1].nic.phy.parameter = 1.0
If my assumptions are right and the analogue module is called only by
the receiver it is not possible to work with the sending parameter
from Node[0]. I can only process the parameter from Node[1].

Is my assumption right? If yes, how can the sending node influence the
analogue module? If no, do you have any idea how I can process the
parameters from sending nodes?

> o   Mail: willk...@tkn.tu-berlin.de

Daniel Willkomm

unread,
Mar 10, 2010, 8:23:07 AM3/10/10
to omn...@googlegroups.com, Ralf Zenker
Look at the tutorial (and the pathloss module), and you will see it is
possible. The pathloss also needs information of the sender (the position)
which is passed via the airframe.

Daniel

o Mail: will...@tkn.tu-berlin.de

Ralf Zenker

unread,
Mar 10, 2010, 8:52:53 AM3/10/10
to omnetpp
Thanks Daniel

> o   Mail: willk...@tkn.tu-berlin.de

Ralf Zenker

unread,
Mar 11, 2010, 8:36:32 AM3/11/10
to omnetpp
Hi,


today I wrote a new analogue model and I found a problem concerning
the described problem above:
The information I need is not static and not known at initialisation.
So it is not possible to put this value in the
"getAnalogueModelFromName()" Method.

Do you have any suggestion how I can change some parameters for the
analogueModel during lifetime?


thanks in advance

Daniel Willkomm

unread,
Mar 11, 2010, 8:47:30 AM3/11/10
to omn...@googlegroups.com, Ralf Zenker
You should REALLY take a look at the tutorial

http://sourceforge.net/apps/trac/mixim/wiki/HowToWriteOwnAnalogueModel

you will find answers to all the questions you ask here :-)

Daniel

o Mail: will...@tkn.tu-berlin.de

Karl Wessel

unread,
Mar 11, 2010, 9:00:53 AM3/11/10
to omn...@googlegroups.com
Hi,

If there is no way the AnalogueModel can calculate this parameter itself
from values passed during initialisation then there are two ways:

If the parameter is somehow dependent on the sender you can subclass
your own AirFrame message type which can hold this parameter and sent
this one in your own subclassed PhyLayer (override
"encapsMsg()"-method). The same way you can provide information about
the sender to the receiver (like its already done with the Move of the
sender).

If your parameter is only dependent on the receiving PhyLayer then you
can just keep a pointer to the AnalogueModel instance created in the
"getAnalogueModelFromName()" method and make it accessible at the point
where your parameter changes. Or you can give your AnalogueModel a
pointer to your PhyLayer-instance by which the AnalogueModel can access
the parameter during lifetime.

Hope this helps.

Karl

Ralf Zenker schrieb:

Ralf Zenker

unread,
Mar 11, 2010, 9:40:26 AM3/11/10
to omnetpp
Thanks Karl, I will try it.
Reply all
Reply to author
Forward
0 new messages