NAV Setting

Asked by Rahamatullah

Dear all,
I have a question regarding NAV setting. How to set NAV? Is there any individual FU to set NAV? Lets take a look at the the lines from 240 to 248 of the TXOP FU.

http://bazaar.launchpad.net/~comnets/openwns-wifimac/wifimac--main--1.0/annotate/head%3A/src/lowerMAC/TXOP.cpp

240 4.1.3

        friends.manager->setFrameExchangeDuration(compound->getCommandPool(),

241

                                                  friends.manager->getFrameExchangeDuration(compound->getCommandPool()) + nextFrameExchangeDuration);

242

243 56.1.3

        MESSAGE_BEGIN(NORMAL, this->logger, m, "Next frame exchange has duration ");

244 4.1.3

        m << nextFrameExchangeDuration;

245

        m << ", fit into TXOP, set NAV to ";

246 56.1.3

        m << friends.manager->getFrameExchangeDuration(compound->getCommandPool());

247 4.1.3

        MESSAGE_END();

248 52

        friends.txopWindow->setDuration(this->remainingTXOPDuration - 2*this->sifsDuration - this->expectedACKDuration);

I assume from the above code that NAV is set here using setFrameExchangeDuration() function. Am I right? If not, how the NAV has been set.

Thanking you,
Rahamatullah Khondoker

Question information

Language:
English Edit question
Status:
Solved
For:
openWNS WiFiMAC Edit question
Assignee:
No assignee Edit question
Solved by:
Harald Radke
Solved:
Last query:
Last reply:
Revision history for this message
Best Harald Radke (rat-comnets) said :
#1

Hello Rahamatullah,

the NAV for outgoing compounds is set by default in the processOutgoing() method of the lower MAC manager (to sifs + expected ACK duration)... indeed the manager also provides methods to get and set the NAV, so you have to get the manager from the FUN as friend and change the value with the setExchangeDuration() method

Hope that helps

Harald Radke

Revision history for this message
Rahamatullah (rahbd052000) said :
#2

Thanks Harald Radke, that solved my question.