How to provide more than one destination address in BMAC protocol for MiXiM

47 views
Skip to first unread message

Megh Piyon

unread,
May 23, 2017, 12:01:51 PM5/23/17
to OMNeT++ Users
Hello all.

Below you find the code from the omnetpp.ini file of the BMAC protocol example from the MiXiM 2.3 and OMNeT++ 4.6. This example uses 'Sensor Application Layer' as its application layer module.


**.node[*].applicationType = "SensorApplLayer"

**.appl.trafficType = "periodic"

**.appl.trafficParam = ${traffic = 1..19 step 2}s

**.appl.nbPackets = 10

**.appl.initializationTime = 10s

**.appl.destAddr = 4

**.node[4].appl.broadcastPackets = true


Using this code, I can provide a particular destination address to all the packets of a sender node. For example, **.node[3].appl.destAddr = 4. Now all the packets generated in node [3] has the destination address of node [4]. 


I would like to provide more than one destination addresses in this line (**.node[3].appl.destAddr = 4).  For example, how to change this code so that node [3] can send packets to both node [2] and node [4] during the simulation.


Does anyone have any idea about how to provide more than one destination address using the Sensor Application Layer? Thanks in advance.

Thomas Menzel

unread,
May 23, 2017, 12:09:52 PM5/23/17
to OMNeT++ Users
A unicast packet can only have one destination. What exactly do you mean with 'send packets to both nodes'?

Megh Piyon

unread,
May 23, 2017, 12:15:51 PM5/23/17
to OMNeT++ Users
Thanks for the quick reply.

What I found that one specific node sends only to the specific one address mentioned using (**.node[3].appl.destAddr = 4) in the omnetpp.ini file.

However, during a simulation, one node might need to send unicast packets to many other nodes, not only to a single node. I am unable to define that. My sender node sends only unicast packets to only one node during the whole simulation. (I do not want to use broadcast addresses)

This is what I mean by the term "send packets to both nodes".

Thomas Menzel

unread,
May 23, 2017, 12:25:06 PM5/23/17
to OMNeT++ Users
I'm not having the simulation code at hand...

Check where your application module (cc file) is reading the paramater provided by the ini file. After reading this (default) value, you can change it to whatever you like by writing whatever c++ code you want.
Reply all
Reply to author
Forward
0 new messages