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

#include <RecipientAckPolicy.h>

Inheritance diagram for inet::ieee80211::RecipientAckPolicy:
inet::ieee80211::ModeSetListener inet::ieee80211::IRecipientAckPolicy

Public Member Functions

virtual bool isAckNeeded (Ieee80211DataOrMgmtFrame *frame) const override
 
virtual simtime_t computeAckDurationField (Ieee80211DataOrMgmtFrame *frame) const override
 
- Public Member Functions inherited from inet::ieee80211::IRecipientAckPolicy
virtual ~IRecipientAckPolicy ()
 

Protected Member Functions

virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
simtime_t computeAckDuration (Ieee80211DataOrMgmtFrame *dataOrMgmtFrame) const
 
- Protected Member Functions inherited from inet::ieee80211::ModeSetListener
virtual void receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
 

Protected Attributes

IRateSelectionrateSelection = nullptr
 
- Protected Attributes inherited from inet::ieee80211::ModeSetListener
Ieee80211ModeSetmodeSet = nullptr
 

Member Function Documentation

simtime_t inet::ieee80211::RecipientAckPolicy::computeAckDuration ( Ieee80211DataOrMgmtFrame dataOrMgmtFrame) const
protected

Referenced by computeAckDurationField().

35 {
37 }
const unsigned int LENGTH_ACK
Definition: Ieee80211Frame_m.h:43
virtual const simtime_t getDuration(int dataBitLength) const =0
IRateSelection * rateSelection
Definition: RecipientAckPolicy.h:31
virtual const IIeee80211Mode * computeResponseAckFrameMode(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame)=0
simtime_t inet::ieee80211::RecipientAckPolicy::computeAckDurationField ( Ieee80211DataOrMgmtFrame frame) const
overridevirtual

Implements inet::ieee80211::IRecipientAckPolicy.

63 {
64  if (frame->getMoreFragments()) {
65  simtime_t duration = ceil(frame->getDuration() - modeSet->getSifsTime() - computeAckDuration(frame));
66  return duration < 0 ? 0 : duration;
67  }
68  return 0;
69 }
virtual ::omnetpp::simtime_t getDuration() const
simtime_t computeAckDuration(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame) const
Definition: RecipientAckPolicy.cc:34
Ieee80211ModeSet * modeSet
Definition: ModeSetListener.h:31
virtual bool getMoreFragments() const
simtime_t getSifsTime() const
Definition: Ieee80211ModeSet.h:77
void inet::ieee80211::RecipientAckPolicy::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

27 {
29  if (stage == INITSTAGE_LOCAL) {
30  rateSelection = check_and_cast<IRateSelection*>(getModuleByPath(par("rateSelectionModule")));
31  }
32 }
Abstract interface for rate selection.
Definition: IRateSelection.h:36
Local initializations.
Definition: InitStages.h:35
virtual void initialize(int stage) override
Definition: ModeSetListener.cc:25
IRateSelection * rateSelection
Definition: RecipientAckPolicy.h:31
bool inet::ieee80211::RecipientAckPolicy::isAckNeeded ( Ieee80211DataOrMgmtFrame frame) const
overridevirtual

Implements inet::ieee80211::IRecipientAckPolicy.

45 {
46  // TODO: add mgmt NoAck check
47  return !frame->getReceiverAddress().isMulticast();
48 }
virtual MACAddress & getReceiverAddress()
bool isMulticast() const
Returns true if this is a multicast logical address (first byte&#39;s lsb is 1).
Definition: MACAddress.h:146
virtual int inet::ieee80211::RecipientAckPolicy::numInitStages ( ) const
inlineoverrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

34 { return NUM_INIT_STAGES; }
The number of initialization stages.
Definition: InitStages.h:116

Member Data Documentation

IRateSelection* inet::ieee80211::RecipientAckPolicy::rateSelection = nullptr
protected

Referenced by computeAckDuration(), and initialize().


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