A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-mac-queue-elem.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#ifndef WIFI_MAC_QUEUE_ELEM_H
10#define WIFI_MAC_QUEUE_ELEM_H
11
12#include "qos-utils.h"
13
14#include "ns3/callback.h"
15#include "ns3/nstime.h"
16
17#include <map>
18
19namespace ns3
20{
21
22class WifiMpdu;
23
24/**
25 * \ingroup wifi
26 * Type of elements stored in a WifiMacQueue container.
27 *
28 * Such elements can be accessed by the WifiMacQueue (via iterators) and
29 * by the WifiMpdu itself (via the iterator it stores).
30 *
31 * Data frames transmitted by an 11be MLD must include link addresses as (RA, TA)
32 * which are different than the MLD addresses seen by the upper layer. In order
33 * to keep the original version of the data frame, we create an alias when a data
34 * frame is sent over a link. Aliases are stored in the map of in-flight MPDUs, which
35 * is indexed by the ID of the link over which the alias is in-flight.
36 * For consistency, also data frame transmitted by non-MLDs have an alias, which is
37 * simply a pointer to the original version of the data frame.
38 */
40{
41 Ptr<WifiMpdu> mpdu; ///< MPDU stored by this element
42 Time expiryTime{0}; ///< expiry time of the MPDU (set by WifiMacQueue)
43 AcIndex ac{AC_UNDEF}; ///< the Access Category associated with the queue
44 ///< storing this element (set by WifiMacQueue)
45 bool expired{false}; ///< whether this MPDU has been marked as expired
46 std::map<uint8_t, Ptr<WifiMpdu>> inflights; ///< map of MPDUs in-flight on each link
47 Callback<void, Ptr<WifiMpdu>> deleter; ///< reset the iterator stored by the MPDU
48
49 /**
50 * Constructor.
51 * \param item the MPDU stored by this queue element
52 */
54
56};
57
58} // namespace ns3
59
60#endif /* WIFI_MAC_QUEUE_ELEM_H */
Callback template class.
Definition callback.h:422
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition qos-utils.h:62
@ AC_UNDEF
Total number of ACs.
Definition qos-utils.h:76
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Type of elements stored in a WifiMacQueue container.
bool expired
whether this MPDU has been marked as expired
Ptr< WifiMpdu > mpdu
MPDU stored by this element.
WifiMacQueueElem(Ptr< WifiMpdu > item)
Constructor.
Callback< void, Ptr< WifiMpdu > > deleter
reset the iterator stored by the MPDU
AcIndex ac
the Access Category associated with the queue storing this element (set by WifiMacQueue)
std::map< uint8_t, Ptr< WifiMpdu > > inflights
map of MPDUs in-flight on each link
Time expiryTime
expiry time of the MPDU (set by WifiMacQueue)