INET Framework for OMNeT++/OMNEST
inet::ieee80211::RecipientAckProcedure Class Reference

#include <RecipientAckProcedure.h>

Inheritance diagram for inet::ieee80211::RecipientAckProcedure:
inet::ieee80211::IRecipientAckProcedure

Public Member Functions

virtual void processReceivedFrame (Ieee80211DataOrMgmtFrame *dataOrMgmtFrame, IRecipientAckPolicy *ackPolicy, IProcedureCallback *callback) override
 
virtual void processTransmittedAck (Ieee80211ACKFrame *ack) override
 
- Public Member Functions inherited from inet::ieee80211::IRecipientAckProcedure
virtual ~IRecipientAckProcedure ()
 

Protected Member Functions

virtual Ieee80211ACKFramebuildAck (Ieee80211DataOrMgmtFrame *dataOrMgmtFrame) const
 

Protected Attributes

int numReceivedAckableFrame = 0
 
int numSentAck = 0
 

Member Function Documentation

Ieee80211ACKFrame * inet::ieee80211::RecipientAckProcedure::buildAck ( Ieee80211DataOrMgmtFrame dataOrMgmtFrame) const
protectedvirtual

Referenced by processReceivedFrame().

41 {
42  Ieee80211ACKFrame *ack = new Ieee80211ACKFrame("ACK");
43  ack->setReceiverAddress(dataOrMgmtFrame->getTransmitterAddress());
44  return ack;
45 }
void inet::ieee80211::RecipientAckProcedure::processReceivedFrame ( Ieee80211DataOrMgmtFrame dataOrMgmtFrame,
IRecipientAckPolicy ackPolicy,
IProcedureCallback callback 
)
overridevirtual

Implements inet::ieee80211::IRecipientAckProcedure.

24 {
26  // After a successful reception of a frame requiring acknowledgment, transmission of the ACK frame
27  // shall commence after a SIFS period, without regard to the busy/idle state of the medium. (See Figure 9-9.)
28  if (ackPolicy->isAckNeeded(dataOrMgmtFrame)) {
29  auto ackFrame = buildAck(dataOrMgmtFrame);
30  ackFrame->setDuration(ackPolicy->computeAckDurationField(dataOrMgmtFrame));
31  callback->transmitControlResponseFrame(ackFrame, dataOrMgmtFrame);
32  }
33 }
int numReceivedAckableFrame
Definition: RecipientAckProcedure.h:32
virtual Ieee80211ACKFrame * buildAck(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame) const
Definition: RecipientAckProcedure.cc:40
void inet::ieee80211::RecipientAckProcedure::processTransmittedAck ( Ieee80211ACKFrame ack)
overridevirtual

Implements inet::ieee80211::IRecipientAckProcedure.

36 {
37  numSentAck++;
38 }
int numSentAck
Definition: RecipientAckProcedure.h:33

Member Data Documentation

int inet::ieee80211::RecipientAckProcedure::numReceivedAckableFrame = 0
protected

Referenced by processReceivedFrame().

int inet::ieee80211::RecipientAckProcedure::numSentAck = 0
protected

Referenced by processTransmittedAck().


The documentation for this class was generated from the following files: