0

I have a general question regarding the transmission sequence. In INET ->exapmles->manetrouting->dynamicNodeCreation, how does it decide which node should initiate beacon transmission. And how does the next node would be selected to transmit.

I tried to go through the tic-toc example where getIndex() in initialize function is used for the selection of transmitting node (eg txc10.cc). But I haven't figure out such functionality in INET examples.

Is there a way, in which I can select the respective node for beacon transmission as par my beacon occupancy map vector?

Is there a way, in which I can select the resepective node for beacon transmission as par my beacon occupancy map vector.

I beg your forgiveness for not being comprehensive for this problem.

Peter
  • 158
  • 1
  • 14
  • I just figure it out that in INET framework, mostly the next communication opportunity is awarded when the back off timer becomes -1. The functionality is implemented in mac.cc file. So once a node finish beacon transmission and all other nodes receive the data or noise, all start a random back off timer through mac.cc and then the winner (who gets -1 counter earliest), starts transmission. – Peter Apr 17 '15 at 07:14
  • Dear Peter, if you consider your comment to be correct, either add the comment as an addition in the end of your question, or use the option to _answer your own question_. – user4786271 May 04 '15 at 10:36
  • hi @user4786271 , what I wanted to say here was about the random backoff procedure in mac moulde of INET. But then I implemented a complete new appraoch. I made a new module above mac layer and in the intailization phase, I used something like this :- `scheduleAt(simTime()+uniform(0,beaconInterval) , beaconTimer)` . Here uniform is a Omnet defined uniform distribution function and gives a random value, beaconInterval is the time after which next superframe will start and beaconTimer is a timer message. – Peter May 04 '15 at 13:25
  • why not add this explanations as an answer to this question? – user4786271 May 04 '15 at 20:41

1 Answers1

0

I will take the example of INET ->examples->manetrouting->dynamicNodeCreation to answer my question. When I run this example in omnet the first event after initialize (at run time) is 'beaconTimer' for a fixhost (in my case it is meshtest.fixhost2[4].wlan[0].magmt ) So basically its starting with mgmt submodule. (If you check hierarchy of any single node at run time, it would be :- Delayunit -> wlan0 and in wlan0 its again mgmt->mac->radio. The code for mgmt is written in inet->source->linklayer->ieee80211->mgmt->Ieee80211MgmtAP.cc

Now in the initialize function for this class, there is a code line scheduleAt(simTime()+uniform(0,beaconInterval) , beaconTimer) . Here uniform is a Omnet defined uniform distribution function and gives a random value, beaconInterval is the time after which next super frame will start and beaconTimer is a message. This function schedule a random time for sending beacons for all nodes (respectively by their own mgmt module). So whichever device got the lowest value by this uniform function, will start beacon sending. Other devices should follow accordingly.

Now if I want to send beacons in prescheduled manner then I would change in handleTimer function in the same module as it provides the scheduleAt() function for next event.

Peter
  • 158
  • 1
  • 14