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

#include <OriginatorMacDataService.h>

Inheritance diagram for inet::ieee80211::OriginatorMacDataService:
inet::ieee80211::IOriginatorMacDataService

Public Member Functions

virtual ~OriginatorMacDataService ()
 
virtual FragmentsextractFramesToTransmit (PendingQueue *pendingQueue) override
 

Protected Member Functions

virtual void initialize () override
 
virtual Ieee80211DataOrMgmtFrameassignSequenceNumber (Ieee80211DataOrMgmtFrame *frame)
 
virtual FragmentsfragmentIfNeeded (Ieee80211DataOrMgmtFrame *frame)
 

Protected Attributes

ISequenceNumberAssignmentsequenceNumberAssigment = nullptr
 
IFragmentationPolicyfragmentationPolicy = nullptr
 
IFragmentationfragmentation = nullptr
 

Additional Inherited Members

- Public Types inherited from inet::ieee80211::IOriginatorMacDataService
typedef std::vector< Ieee80211DataOrMgmtFrame * > Fragments
 

Constructor & Destructor Documentation

inet::ieee80211::OriginatorMacDataService::~OriginatorMacDataService ( )
virtual
76 {
78  delete fragmentation;
79 }
ISequenceNumberAssignment * sequenceNumberAssigment
Definition: OriginatorMacDataService.h:39
IFragmentation * fragmentation
Definition: OriginatorMacDataService.h:42

Member Function Documentation

Ieee80211DataOrMgmtFrame * inet::ieee80211::OriginatorMacDataService::assignSequenceNumber ( Ieee80211DataOrMgmtFrame frame)
protectedvirtual

Referenced by extractFramesToTransmit().

35 {
37  return frame;
38 }
ISequenceNumberAssignment * sequenceNumberAssigment
Definition: OriginatorMacDataService.h:39
virtual void assignSequenceNumber(Ieee80211DataOrMgmtFrame *frame)=0
OriginatorMacDataService::Fragments * inet::ieee80211::OriginatorMacDataService::extractFramesToTransmit ( PendingQueue pendingQueue)
overridevirtual

Implements inet::ieee80211::IOriginatorMacDataService.

51 {
52  if (pendingQueue->isEmpty())
53  return nullptr;
54  else {
55  // if (msduRateLimiting)
56  // txRateLimitingIfNeeded();
57  Ieee80211DataOrMgmtFrame *frame = pendingQueue->pop();
59  frame = assignSequenceNumber(frame);
60  // if (msduIntegrityAndProtection)
61  // frame = protectMsduIfNeeded(frame);
62  Fragments *fragments = nullptr;
64  fragments = fragmentIfNeeded(frame);
65  if (!fragments)
66  fragments = new Fragments({frame});
67  // if (mpduEncryptionAndIntegrity)
68  // fragments = encryptMpduIfNeeded(fragments);
69  // if (mpduHeaderPlusCrc)
70  // fragments = mpduCrcFooBarIfNeeded(fragments);
71  return fragments;
72  }
73 }
ISequenceNumberAssignment * sequenceNumberAssigment
Definition: OriginatorMacDataService.h:39
std::vector< Ieee80211DataOrMgmtFrame * > Fragments
Definition: IOriginatorMacDataService.h:29
virtual Ieee80211DataOrMgmtFrame * assignSequenceNumber(Ieee80211DataOrMgmtFrame *frame)
Definition: OriginatorMacDataService.cc:34
virtual Fragments * fragmentIfNeeded(Ieee80211DataOrMgmtFrame *frame)
Definition: OriginatorMacDataService.cc:40
IFragmentationPolicy * fragmentationPolicy
Definition: OriginatorMacDataService.h:41
OriginatorMacDataService::Fragments * inet::ieee80211::OriginatorMacDataService::fragmentIfNeeded ( Ieee80211DataOrMgmtFrame frame)
protectedvirtual

Referenced by extractFramesToTransmit().

41 {
42  auto fragmentSizes = fragmentationPolicy->computeFragmentSizes(frame);
43  if (fragmentSizes.size() != 0) {
44  auto fragmentFrames = fragmentation->fragmentFrame(frame, fragmentSizes);
45  return fragmentFrames;
46  }
47  return nullptr;
48 }
virtual std::vector< Ieee80211DataOrMgmtFrame * > * fragmentFrame(Ieee80211DataOrMgmtFrame *frame, const std::vector< int > &fragmentSizes)=0
virtual std::vector< int > computeFragmentSizes(Ieee80211DataOrMgmtFrame *frame)=0
IFragmentation * fragmentation
Definition: OriginatorMacDataService.h:42
IFragmentationPolicy * fragmentationPolicy
Definition: OriginatorMacDataService.h:41
void inet::ieee80211::OriginatorMacDataService::initialize ( )
overrideprotectedvirtual
28 {
29  sequenceNumberAssigment = new NonQoSSequenceNumberAssignment();
30  fragmentationPolicy = check_and_cast<IFragmentationPolicy*>(getSubmodule("fragmentationPolicy"));
31  fragmentation = new Fragmentation();
32 }
ISequenceNumberAssignment * sequenceNumberAssigment
Definition: OriginatorMacDataService.h:39
IFragmentation * fragmentation
Definition: OriginatorMacDataService.h:42
IFragmentationPolicy * fragmentationPolicy
Definition: OriginatorMacDataService.h:41

Member Data Documentation

IFragmentation* inet::ieee80211::OriginatorMacDataService::fragmentation = nullptr
protected
IFragmentationPolicy* inet::ieee80211::OriginatorMacDataService::fragmentationPolicy = nullptr
protected
ISequenceNumberAssignment* inet::ieee80211::OriginatorMacDataService::sequenceNumberAssigment = nullptr
protected

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