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

#include <PrimitiveFrameSequences.h>

Inheritance diagram for inet::ieee80211::RtsFs:
inet::ieee80211::IFrameSequence

Public Member Functions

virtual void startSequence (FrameSequenceContext *context, int firstStep) override
 
virtual IFrameSequenceStepprepareStep (FrameSequenceContext *context) override
 
virtual bool completeStep (FrameSequenceContext *context) override
 
virtual std::string getHistory () override
 
- Public Member Functions inherited from inet::ieee80211::IFrameSequence
virtual ~IFrameSequence ()
 

Protected Attributes

int firstStep = -1
 
int step = -1
 

Member Function Documentation

bool inet::ieee80211::RtsFs::completeStep ( FrameSequenceContext context)
overridevirtual

Implements inet::ieee80211::IFrameSequence.

65 {
66  switch (step) {
67  case 0:
68  step++;
69  return true;
70  default:
71  throw cRuntimeError("Unknown step");
72  }
73 }
int step
Definition: PrimitiveFrameSequences.h:110
virtual std::string inet::ieee80211::RtsFs::getHistory ( )
inlineoverridevirtual

Implements inet::ieee80211::IFrameSequence.

117 { return "TODO"; } // TODO: completeStep = true?
IFrameSequenceStep * inet::ieee80211::RtsFs::prepareStep ( FrameSequenceContext context)
overridevirtual

Implements inet::ieee80211::IFrameSequence.

50 {
51  switch (step) {
52  case 0: {
53  auto dataOrMgmtFrame = check_and_cast<Ieee80211DataOrMgmtFrame *>(context->getInProgressFrames()->getFrameToTransmit());
54  auto rtsFrame = context->getRtsProcedure()->buildRtsFrame(dataOrMgmtFrame);
55  return new RtsTransmitStep(dataOrMgmtFrame, rtsFrame, context->getIfs());
56  }
57  case 1:
58  return nullptr;
59  default:
60  throw cRuntimeError("Unknown step");
61  }
62 }
virtual IRtsProcedure * getRtsProcedure() const
Definition: FrameSequenceContext.h:88
Class generated from inet/linklayer/ieee80211/mac/Ieee80211Frame.msg:166 by nedtool.
Definition: Ieee80211Frame_m.h:438
virtual simtime_t getIfs() const
Definition: FrameSequenceContext.cc:34
virtual Ieee80211DataOrMgmtFrame * getFrameToTransmit()
Definition: InProgressFrames.cc:52
int step
Definition: PrimitiveFrameSequences.h:110
virtual InProgressFrames * getInProgressFrames() const
Definition: FrameSequenceContext.h:87
Definition: FrameSequenceStep.h:46
virtual Ieee80211RTSFrame * buildRtsFrame(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame) const =0
void inet::ieee80211::RtsFs::startSequence ( FrameSequenceContext context,
int  firstStep 
)
overridevirtual

Implements inet::ieee80211::IFrameSequence.

44 {
45  this->firstStep = firstStep;
46  step = 0;
47 }
int firstStep
Definition: PrimitiveFrameSequences.h:109
int step
Definition: PrimitiveFrameSequences.h:110

Member Data Documentation

int inet::ieee80211::RtsFs::firstStep = -1
protected
int inet::ieee80211::RtsFs::step = -1
protected

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