#include <RecipientBlockAckAgreementHandler.h>
inet::ieee80211::RecipientBlockAckAgreementHandler::~RecipientBlockAckAgreementHandler |
( |
| ) |
|
|
virtual |
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
Referenced by processReceivedAddbaRequest().
83 MACAddress originatorAddr = addbaReq->getTransmitterAddress();
84 auto id = std::make_pair(originatorAddr, addbaReq->getTid());
87 RecipientBlockAckAgreement *agreement =
new RecipientBlockAckAgreement(originatorAddr, addbaReq->getTid(), addbaReq->getStartingSequenceNumber(), addbaReq->getBufferSize(), addbaReq->getBlockAckTimeoutValue());
89 EV_DETAIL <<
"Block Ack Agreement is added with the following parameters: " << *agreement << endl;
93 throw cRuntimeError(
"TODO");
uint16_t id
Definition: TCP_NSC.cc:85
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
62 simtime_t now = simTime();
64 auto agreement =
id.second;
65 if (agreement->getExpirationTime() == now) {
66 MACAddress receiverAddr =
id.first.first;
67 Tid tid =
id.first.second;
68 procedureCallback->processMgmtFrame(
buildDelba(receiverAddr, tid, 39));
int8_t Tid
Definition: Ieee80211Defs.h:28
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
virtual void scheduleInactivityTimer(IBlockAckAgreementHandlerCallback *callback)
Definition: RecipientBlockAckAgreementHandler.cc:34
virtual Ieee80211Delba * buildDelba(MACAddress receiverAddr, Tid tid, int reasonCode)
Definition: RecipientBlockAckAgreementHandler.cc:101
Referenced by processReceivedAddbaRequest().
113 Ieee80211AddbaResponse *addbaResponse =
new Ieee80211AddbaResponse(
"AddbaResponse");
114 addbaResponse->setReceiverAddress(frame->getTransmitterAddress());
116 Tid tid = frame->getTid();
117 addbaResponse->setTid(tid);
118 addbaResponse->setBlockAckPolicy(!frame->getBlockAckPolicy() && blockAckAgreementPolicy->delayedBlockAckPolicySupported() ?
false :
true);
119 addbaResponse->setBufferSize(frame->getBufferSize() <= blockAckAgreementPolicy->getMaximumAllowedBufferSize() ? frame->getBufferSize() : blockAckAgreementPolicy->getMaximumAllowedBufferSize());
120 addbaResponse->setBlockAckTimeoutValue(blockAckAgreementPolicy->getBlockAckTimeoutValue() == 0 ? blockAckAgreementPolicy->getBlockAckTimeoutValue() : frame->getBlockAckTimeoutValue());
121 addbaResponse->setAMsduSupported(blockAckAgreementPolicy->aMsduSupported());
122 return addbaResponse;
int8_t Tid
Definition: Ieee80211Defs.h:28
Referenced by blockAckAgreementExpired().
103 Ieee80211Delba *delba =
new Ieee80211Delba(
"Delba");
104 delba->setReceiverAddress(receiverAddr);
105 delba->setInitiator(
false);
107 delba->setReasonCode(reasonCode);
simtime_t inet::ieee80211::RecipientBlockAckAgreementHandler::computeEarliestExpirationTime |
( |
| ) |
|
|
protectedvirtual |
Referenced by scheduleInactivityTimer().
26 simtime_t earliestTime = SIMTIME_MAX;
28 auto agreement =
id.second;
29 earliestTime =
std::min(earliestTime, agreement->getExpirationTime());
double min(const double a, const double b)
Returns the minimum of a and b.
Definition: SCTPAssociation.h:270
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
163 EV_INFO <<
"Processing Addba Request from " << addbaRequest->getTransmitterAddress() << endl;
164 if (blockAckAgreementPolicy->isAddbaReqAccepted(addbaRequest)) {
165 EV_DETAIL <<
"Addba Request has been accepted. Creating a new Block Ack Agreement." << endl;
167 EV_DETAIL <<
"Agreement is added with the following parameters: " << *agreement << endl;
168 EV_DETAIL <<
"Building Addba Response" << endl;
170 callback->processMgmtFrame(addbaResponse);
virtual RecipientBlockAckAgreement * addAgreement(Ieee80211AddbaRequest *addbaReq)
Definition: RecipientBlockAckAgreementHandler.cc:81
virtual Ieee80211AddbaResponse * buildAddbaResponse(Ieee80211AddbaRequest *frame, IRecipientBlockAckAgreementPolicy *blockAckAgreementPolicy)
Definition: RecipientBlockAckAgreementHandler.cc:111
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
virtual void scheduleInactivityTimer(IBlockAckAgreementHandlerCallback *callback)
Definition: RecipientBlockAckAgreementHandler.cc:34
virtual void updateAgreement(Ieee80211AddbaResponse *frame)
Definition: RecipientBlockAckAgreementHandler.cc:125
void inet::ieee80211::RecipientBlockAckAgreementHandler::processTransmittedDelba |
( |
Ieee80211Delba * |
delba | ) |
|
|
overridevirtual |
Implements inet::ieee80211::IRecipientBlockAckAgreementHandler.
48 Tid tid = qosFrame->getTid();
49 MACAddress originatorAddr = qosFrame->getTransmitterAddress();
int8_t Tid
Definition: Ieee80211Defs.h:28
Definition: Ieee80211Frame_m.h:142
virtual RecipientBlockAckAgreement * getAgreement(Tid tid, MACAddress originatorAddr) override
Definition: RecipientBlockAckAgreementHandler.cc:148
virtual void scheduleInactivityTimer(IBlockAckAgreementHandlerCallback *callback)
Definition: RecipientBlockAckAgreementHandler.cc:34
void inet::ieee80211::RecipientBlockAckAgreementHandler::terminateAgreement |
( |
MACAddress |
originatorAddr, |
|
|
Tid |
tid |
|
) |
| |
|
protectedvirtual |
Referenced by processReceivedDelba(), and processTransmittedDelba().
139 auto agreementId = std::make_pair(originatorAddr, tid);
142 RecipientBlockAckAgreement *agreement = it->second;
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
Referenced by processTransmittedAddbaResp().
127 auto id = std::make_pair(frame->getReceiverAddress(), frame->getTid());
130 RecipientBlockAckAgreement *agreement = it->second;
131 agreement->addbaResposneSent();
134 throw cRuntimeError(
"Agreement is not found");
std::map< std::pair< MACAddress, Tid >, RecipientBlockAckAgreement * > blockAckAgreements
Definition: RecipientBlockAckAgreementHandler.h:38
The documentation for this class was generated from the following files: