112 uint16_t mpduSeqNumber = mpdu->GetHeader ().GetSequenceNumber ();
129 NS_LOG_DEBUG (
"Transmitted MPDU beyond current transmit window. New starting sequence number: "
137 uint16_t mpduSeqNumber = mpdu->GetHeader ().GetSequenceNumber ();
160 uint16_t mpduSeqNumber = mpdu->GetHeader ().GetSequenceNumber ();
172 NS_LOG_DEBUG (
"Discarded MPDU within current transmit window. New starting sequence number: "
Maintains information for a block ack agreement.
uint16_t m_startingSeq
Starting sequence control.
uint16_t m_bufferSize
Buffer size.
static std::size_t GetDistance(uint16_t seqNumber, uint16_t startingSeqNumber)
Get the distance between the given starting sequence number and the given sequence number.
std::size_t GetWinSize(void) const
Get the window size.
void Advance(std::size_t count)
Advance the current winStart by the given number of positions.
uint16_t GetWinStart(void) const
Get the current winStart value.
void Init(uint16_t winStart, uint16_t winSize)
Initialize the window with the given starting sequence number and size.
std::vector< bool >::reference At(std::size_t distance)
Get a reference to the element in the window having the given distance from the current winStart.
bool IsRejected(void) const
Check if the current state of this agreement is REJECTED.
bool IsPending(void) const
Check if the current state of this agreement is PENDING.
void InitTxWindow(void)
Initialize the originator's transmit window by setting its size and starting sequence number equal to...
bool IsEstablished(void) const
Check if the current state of this agreement is ESTABLISHED.
void AdvanceTxWindow(void)
Advance the transmit window so that the starting sequence number is the nearest unacknowledged MPDU.
void NotifyAckedMpdu(Ptr< const WifiMacQueueItem > mpdu)
Record that the given MPDU has been acknowledged and advance the transmit window if possible.
void NotifyTransmittedMpdu(Ptr< const WifiMacQueueItem > mpdu)
Advance the transmit window so as to include the transmitted MPDU, if the latter is not an old packet...
BlockAckWindow m_txWindow
originator's transmit window
~OriginatorBlockAckAgreement()
uint16_t GetStartingSequence(void) const override
Return the starting sequence number of the transmit window, if a transmit window has been initialized...
OriginatorBlockAckAgreement(Mac48Address recipient, uint8_t tid)
Constructor.
void SetState(State state)
Set the current state.
bool IsReset(void) const
Check if the current state of this agreement is RESET.
void NotifyDiscardedMpdu(Ptr< const WifiMacQueueItem > mpdu)
Advance the transmit window beyond the MPDU that has been reported to be discarded.
State
Represents the state for this agreement.
std::size_t GetDistance(uint16_t seqNumber) const
Get the distance between the current starting sequence number and the given sequence number.
bool IsNoReply(void) const
Check if the current state of this agreement is NO_REPLY.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const uint16_t SEQNO_SPACE_HALF_SIZE
Size of the half the space of sequence numbers (used to determine old packets)