#include <RecipientBlockAckAgreementHandler.h>
◆ ~RecipientBlockAckAgreementHandler()
| inet::ieee80211::RecipientBlockAckAgreementHandler::~RecipientBlockAckAgreementHandler |
( |
| ) |
|
|
virtual |
◆ addAgreement()
76 MacAddress originatorAddr = addbaReq->getTransmitterAddress();
77 auto id = std::make_pair(originatorAddr, addbaReq->getTid());
80 RecipientBlockAckAgreement *agreement =
new RecipientBlockAckAgreement(originatorAddr, addbaReq->getTid(), addbaReq->getStartingSequenceNumber(), addbaReq->getBufferSize(), addbaReq->getBlockAckTimeoutValue());
82 EV_DETAIL <<
"Block Ack Agreement is added with the following parameters: " << *agreement << endl;
Referenced by processReceivedAddbaRequest().
◆ blockAckAgreementExpired()
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
53 simtime_t now = simTime();
55 auto agreement =
id.second;
56 if (agreement->getExpirationTime() == now) {
57 MacAddress receiverAddr =
id.first.first;
58 Tid tid =
id.first.second;
59 const auto& delba =
buildDelba(receiverAddr, tid, 39);
60 auto delbaPacket =
new Packet(
"Delba", delba);
61 procedureCallback->processMgmtFrame(delbaPacket, delba);
◆ buildAddbaResponse()
107 auto addbaResponse = makeShared<Ieee80211AddbaResponse>();
108 addbaResponse->setReceiverAddress(addbaRequest->getTransmitterAddress());
110 Tid tid = addbaRequest->getTid();
111 addbaResponse->setTid(tid);
112 addbaResponse->setBlockAckPolicy(!addbaRequest->getBlockAckPolicy() && blockAckAgreementPolicy->delayedBlockAckPolicySupported() ?
false :
true);
113 addbaResponse->setBufferSize(addbaRequest->getBufferSize() <= blockAckAgreementPolicy->getMaximumAllowedBufferSize() ? addbaRequest->getBufferSize() : blockAckAgreementPolicy->getMaximumAllowedBufferSize());
114 addbaResponse->setBlockAckTimeoutValue(blockAckAgreementPolicy->getBlockAckTimeoutValue() == 0 ? blockAckAgreementPolicy->getBlockAckTimeoutValue() : addbaRequest->getBlockAckTimeoutValue());
115 addbaResponse->setAMsduSupported(blockAckAgreementPolicy->aMsduSupported());
116 return addbaResponse;
Referenced by processReceivedAddbaRequest().
◆ buildDelba()
| const Ptr< Ieee80211Delba > inet::ieee80211::RecipientBlockAckAgreementHandler::buildDelba |
( |
MacAddress |
receiverAddr, |
|
|
Tid |
tid, |
|
|
int |
reasonCode |
|
) |
| |
|
protectedvirtual |
97 auto delba = makeShared<Ieee80211Delba>();
98 delba->setReceiverAddress(receiverAddr);
99 delba->setInitiator(
false);
101 delba->setReasonCode(reasonCode);
Referenced by blockAckAgreementExpired().
◆ computeEarliestExpirationTime()
| simtime_t inet::ieee80211::RecipientBlockAckAgreementHandler::computeEarliestExpirationTime |
( |
| ) |
|
|
protectedvirtual |
17 simtime_t earliestTime = SIMTIME_MAX;
19 auto agreement =
id.second;
20 earliestTime =
std::min(earliestTime, agreement->getExpirationTime());
Referenced by scheduleInactivityTimer().
◆ getAgreement()
◆ processReceivedAddbaRequest()
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
157 EV_INFO <<
"Processing Addba Request from " << addbaRequest->getTransmitterAddress() << endl;
158 if (blockAckAgreementPolicy->isAddbaReqAccepted(addbaRequest)) {
159 EV_DETAIL <<
"Addba Request has been accepted. Creating a new Block Ack Agreement." << endl;
161 EV_DETAIL <<
"Agreement is added with the following parameters: " << *agreement << endl;
162 EV_DETAIL <<
"Building Addba Response" << endl;
164 auto addbaResponsePacket =
new Packet(
"AddbaResponse", addbaResponse);
165 callback->processMgmtFrame(addbaResponsePacket, addbaResponse);
◆ processReceivedDelba()
◆ processTransmittedAddbaResp()
◆ processTransmittedDelba()
| void inet::ieee80211::RecipientBlockAckAgreementHandler::processTransmittedDelba |
( |
const Ptr< const Ieee80211Delba > & |
delba | ) |
|
|
overridevirtual |
◆ qosFrameReceived()
◆ scheduleInactivityTimer()
◆ terminateAgreement()
| void inet::ieee80211::RecipientBlockAckAgreementHandler::terminateAgreement |
( |
MacAddress |
originatorAddr, |
|
|
Tid |
tid |
|
) |
| |
|
protectedvirtual |
◆ updateAgreement()
| void inet::ieee80211::RecipientBlockAckAgreementHandler::updateAgreement |
( |
const Ptr< const Ieee80211AddbaResponse > & |
addbaResponse | ) |
|
|
protectedvirtual |
121 auto id = std::make_pair(addbaResponse->getReceiverAddress(), addbaResponse->getTid());
124 RecipientBlockAckAgreement *agreement = it->second;
125 agreement->addbaResposneSent();
128 throw cRuntimeError(
"Agreement is not found");
Referenced by processTransmittedAddbaResp().
◆ blockAckAgreements
The documentation for this class was generated from the following files: