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

#include <BlockAckRecord.h>

Public Member Functions

 BlockAckRecord (MACAddress originatorAddress, Tid tid)
 
virtual ~BlockAckRecord ()
 
void blockAckPolicyFrameReceived (Ieee80211DataFrame *frame)
 
bool getAckState (SequenceNumber sequenceNumber, FragmentNumber fragmentNumber)
 
MACAddress getOriginatorAddress ()
 
Tid getTid ()
 

Protected Attributes

MACAddress originatorAddress = MACAddress::UNSPECIFIED_ADDRESS
 
Tid tid = -1
 
std::map< std::pair< SequenceNumber, FragmentNumber >, bool > acknowledgmentState
 

Constructor & Destructor Documentation

inet::ieee80211::BlockAckRecord::BlockAckRecord ( MACAddress  originatorAddress,
Tid  tid 
)
23  :
25  tid(tid)
26 {
27 }
Tid tid
Definition: BlockAckRecord.h:36
MACAddress originatorAddress
Definition: BlockAckRecord.h:35
virtual inet::ieee80211::BlockAckRecord::~BlockAckRecord ( )
inlinevirtual
41 { }

Member Function Documentation

void inet::ieee80211::BlockAckRecord::blockAckPolicyFrameReceived ( Ieee80211DataFrame frame)

Referenced by inet::ieee80211::RecipientBlockAckAgreement::blockAckPolicyFrameReceived().

30 {
31  SequenceNumber sequenceNumber = frame->getSequenceNumber();
32  FragmentNumber fragmentNumber = frame->getFragmentNumber();
33  acknowledgmentState[std::make_pair(sequenceNumber, fragmentNumber)] = true;
34 }
int16_t SequenceNumber
Definition: Ieee80211Defs.h:26
std::map< std::pair< SequenceNumber, FragmentNumber >, bool > acknowledgmentState
Definition: BlockAckRecord.h:37
int8_t FragmentNumber
Definition: Ieee80211Defs.h:27
bool inet::ieee80211::BlockAckRecord::getAckState ( SequenceNumber  sequenceNumber,
FragmentNumber  fragmentNumber 
)

Referenced by inet::ieee80211::RecipientBlockAckProcedure::buildBlockAck().

37 {
38  // The status of MPDUs that are considered “old” and prior to the sequence number
39  // range for which the receiver maintains status shall be reported as successfully
40  // received (i.e., the corresponding bit in the bitmap shall be set to 1).
41  auto it = acknowledgmentState.find(std::make_pair(sequenceNumber, fragmentNumber));
42  if (it != acknowledgmentState.end()) {
43  return true;
44  }
45  else if (acknowledgmentState.size() == 0) {
46  return true; // TODO: old?
47  }
48  else {
49  auto earliest = acknowledgmentState.begin();
50  return earliest->second > sequenceNumber; // old = true
51  }
52 }
std::map< std::pair< SequenceNumber, FragmentNumber >, bool > acknowledgmentState
Definition: BlockAckRecord.h:37
MACAddress inet::ieee80211::BlockAckRecord::getOriginatorAddress ( )
inline
Tid inet::ieee80211::BlockAckRecord::getTid ( )
inline

Member Data Documentation

std::map<std::pair<SequenceNumber, FragmentNumber>, bool> inet::ieee80211::BlockAckRecord::acknowledgmentState
protected
MACAddress inet::ieee80211::BlockAckRecord::originatorAddress = MACAddress::UNSPECIFIED_ADDRESS
protected
Tid inet::ieee80211::BlockAckRecord::tid = -1
protected

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