122 bool mgmtFrame =
false;
123 bool mgmtFrameWithNoAck =
false;
125 if (dynamic_cast<Ieee80211ManagementFrame*>(dataOrMgmtFrame)) {
127 mgmtFrameWithNoAck =
false;
130 bool individuallyAddressedDataWithNormalAck =
false;
131 bool individuallyAddressedDataWithNoAckOrBlockAck =
false;
132 if (
auto dataFrame = dynamic_cast<Ieee80211DataFrame*>(dataOrMgmtFrame)) {
133 individuallyAddressedDataWithNormalAck = !groupAddressed && dataFrame->getAckPolicy() ==
AckPolicy::NORMAL_ACK;
136 if (mgmtFrame || nonQoSData || individuallyAddressedDataWithNormalAck) {
146 simtime_t pendingFrameDuration = pendingFrameMode->
getDuration(pendingFrame->getBitLength());
157 if (individuallyAddressedDataWithNoAckOrBlockAck || mgmtFrameWithNoAck || groupAddressed) {
161 simtime_t duration = 0;
164 simtime_t pendingFrameDuration = pendingFrameMode->
getDuration(pendingFrame->getBitLength());
175 throw cRuntimeError(
"Unknown frame");
virtual MACAddress & getReceiverAddress()
virtual bool isFinalFragment(Ieee80211Frame *frame) const
Definition: TxopProcedure.cc:102
virtual short getType() const
Definition: Ieee80211Frame_m.h:140
virtual const IIeee80211Mode * computeMode(Ieee80211Frame *frame, TxopProcedure *txopProcedure)=0
Definition: Ieee80211Frame_m.h:142
const unsigned int LENGTH_ACK
Definition: Ieee80211Frame_m.h:43
IQoSRateSelection * rateSelection
Definition: SingleProtectionMechanism.h:40
virtual const simtime_t getDuration(int dataBitLength) const =0
Definition: Ieee80211Frame_m.h:139
static void setFrameMode(Ieee80211Frame *frame, const IIeee80211Mode *mode)
Definition: RateSelection.cc:169
Ieee80211ModeSet * modeSet
Definition: ModeSetListener.h:31
virtual const IIeee80211Mode * computeResponseAckFrameMode(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame)=0
bool isMulticast() const
Returns true if this is a multicast logical address (first byte's lsb is 1).
Definition: MACAddress.h:146
simtime_t getSifsTime() const
Definition: Ieee80211ModeSet.h:77
Definition: Ieee80211Frame_m.h:116
virtual bool isAckNeeded(Ieee80211DataOrMgmtFrame *frame) const =0