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

#include <RtsPolicy.h>

Inheritance diagram for inet::ieee80211::RtsPolicy:
inet::ieee80211::ModeSetListener inet::ieee80211::IRtsPolicy

Public Member Functions

virtual bool isRtsNeeded (Ieee80211Frame *protectedFrame) const override
 
virtual simtime_t getCtsTimeout (Ieee80211RTSFrame *rtsFrame) const override
 
virtual int getRtsThreshold () const override
 
- Public Member Functions inherited from inet::ieee80211::IRtsPolicy
virtual ~IRtsPolicy ()
 

Protected Member Functions

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

Protected Attributes

int rtsThreshold = -1
 
simtime_t ctsTimeout = -1
 
IRateSelectionrateSelection = nullptr
 
- Protected Attributes inherited from inet::ieee80211::ModeSetListener
Ieee80211ModeSetmodeSet = nullptr
 

Member Function Documentation

simtime_t inet::ieee80211::RtsPolicy::getCtsTimeout ( Ieee80211RTSFrame rtsFrame) const
overridevirtual

Implements inet::ieee80211::IRtsPolicy.

62 {
64 }
simtime_t getSlotTime() const
Definition: Ieee80211ModeSet.h:78
virtual const IIeee80211Mode * computeResponseCtsFrameMode(Ieee80211RTSFrame *rtsFrame)=0
simtime_t ctsTimeout
Definition: RtsPolicy.h:32
Ieee80211ModeSet * modeSet
Definition: ModeSetListener.h:31
simtime_t getSifsTime() const
Definition: Ieee80211ModeSet.h:77
virtual const simtime_t getPhyRxStartDelay() const =0
IRateSelection * rateSelection
Definition: RtsPolicy.h:33
virtual int inet::ieee80211::RtsPolicy::getRtsThreshold ( ) const
inlineoverridevirtual

Implements inet::ieee80211::IRtsPolicy.

42 { return rtsThreshold; }
int rtsThreshold
Definition: RtsPolicy.h:31
void inet::ieee80211::RtsPolicy::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

26 {
28  if (stage == INITSTAGE_LOCAL) {
29  rateSelection = check_and_cast<IRateSelection*>(getModuleByPath(par("rateSelectionModule")));
30  rtsThreshold = par("rtsThreshold");
31  ctsTimeout = par("ctsTimeout");
32  }
33 }
Abstract interface for rate selection.
Definition: IRateSelection.h:36
simtime_t ctsTimeout
Definition: RtsPolicy.h:32
Local initializations.
Definition: InitStages.h:35
virtual void initialize(int stage) override
Definition: ModeSetListener.cc:25
int rtsThreshold
Definition: RtsPolicy.h:31
IRateSelection * rateSelection
Definition: RtsPolicy.h:33
bool inet::ieee80211::RtsPolicy::isRtsNeeded ( Ieee80211Frame protectedFrame) const
overridevirtual

Implements inet::ieee80211::IRtsPolicy.

47 {
48  if (dynamic_cast<Ieee80211DataOrMgmtFrame *>(protectedFrame))
49  return protectedFrame->getByteLength() >= rtsThreshold && !protectedFrame->getReceiverAddress().isMulticast();
50  else
51  return false;
52 }
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
int rtsThreshold
Definition: RtsPolicy.h:31
virtual int inet::ieee80211::RtsPolicy::numInitStages ( ) const
inlineoverrideprotectedvirtual

Reimplemented from inet::ieee80211::ModeSetListener.

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

Member Data Documentation

simtime_t inet::ieee80211::RtsPolicy::ctsTimeout = -1
protected

Referenced by getCtsTimeout(), and initialize().

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

Referenced by getCtsTimeout(), and initialize().

int inet::ieee80211::RtsPolicy::rtsThreshold = -1
protected

Referenced by initialize(), and isRtsNeeded().


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