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

#include <QoSCtsPolicy.h>

Inheritance diagram for inet::ieee80211::QoSCtsPolicy:
inet::ieee80211::ModeSetListener inet::ieee80211::ICtsPolicy

Public Member Functions

virtual simtime_t computeCtsDurationField (Ieee80211RTSFrame *frame) const override
 
virtual bool isCtsNeeded (Ieee80211RTSFrame *rtsFrame) const override
 
- Public Member Functions inherited from inet::ieee80211::ICtsPolicy
virtual ~ICtsPolicy ()
 

Protected Member Functions

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

Protected Attributes

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

Member Function Documentation

simtime_t inet::ieee80211::QoSCtsPolicy::computeCtsDuration ( Ieee80211RTSFrame rtsFrame) const
protectedvirtual

Referenced by computeCtsDurationField().

36 {
38 }
virtual const simtime_t getDuration(int dataBitLength) const =0
IQoSRateSelection * rateSelection
Definition: QoSCtsPolicy.h:32
virtual const IIeee80211Mode * computeResponseCtsFrameMode(Ieee80211RTSFrame *rtsFrame)=0
const unsigned int LENGTH_CTS
Definition: Ieee80211Frame_m.h:42
simtime_t inet::ieee80211::QoSCtsPolicy::computeCtsDurationField ( Ieee80211RTSFrame frame) const
overridevirtual

Implements inet::ieee80211::ICtsPolicy.

47 {
48  simtime_t duration = rtsFrame->getDuration() - modeSet->getSifsTime() - computeCtsDuration(rtsFrame);
49  return duration < 0 ? 0 : duration;
50 }
Ieee80211ModeSet * modeSet
Definition: ModeSetListener.h:31
simtime_t getSifsTime() const
Definition: Ieee80211ModeSet.h:77
virtual simtime_t computeCtsDuration(Ieee80211RTSFrame *rtsFrame) const
Definition: QoSCtsPolicy.cc:35
void inet::ieee80211::QoSCtsPolicy::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

27 {
29  if (stage == INITSTAGE_LOCAL) {
30  rx = check_and_cast<IRx *>(getModuleByPath(par("rxModule")));
31  rateSelection = check_and_cast<IQoSRateSelection*>(getModuleByPath(par("rateSelectionModule")));
32  }
33 }
Abstract interface for rate selection.
Definition: IQoSRateSelection.h:36
Abstract interface for Rx processes.
Definition: IRx.h:45
IQoSRateSelection * rateSelection
Definition: QoSCtsPolicy.h:32
Local initializations.
Definition: InitStages.h:35
IRx * rx
Definition: QoSCtsPolicy.h:31
virtual void initialize(int stage) override
Definition: ModeSetListener.cc:25
bool inet::ieee80211::QoSCtsPolicy::isCtsNeeded ( Ieee80211RTSFrame rtsFrame) const
overridevirtual

Implements inet::ieee80211::ICtsPolicy.

58 {
59  return rx->isMediumFree();
60 }
virtual bool isMediumFree() const =0
IRx * rx
Definition: QoSCtsPolicy.h:31
virtual int inet::ieee80211::QoSCtsPolicy::numInitStages ( ) const
inlineoverrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

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

Member Data Documentation

IQoSRateSelection* inet::ieee80211::QoSCtsPolicy::rateSelection = nullptr
protected

Referenced by computeCtsDuration(), and initialize().

IRx* inet::ieee80211::QoSCtsPolicy::rx = nullptr
protected

Referenced by initialize(), and isCtsNeeded().


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