A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
19
namespace
ns3
20
{
21
22
class
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
*/
39
struct
WifiMacQueueElem
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
*/
53
WifiMacQueueElem
(
Ptr<WifiMpdu>
item);
54
55
~WifiMacQueueElem
();
56
};
57
58
}
// namespace ns3
59
60
#endif
/* WIFI_MAC_QUEUE_ELEM_H */
ns3::Callback
Callback template class.
Definition
callback.h:422
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition
qos-utils.h:62
ns3::AC_UNDEF
@ AC_UNDEF
Total number of ACs.
Definition
qos-utils.h:76
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
qos-utils.h
ns3::WifiMacQueueElem
Type of elements stored in a WifiMacQueue container.
Definition
wifi-mac-queue-elem.h:40
ns3::WifiMacQueueElem::expired
bool expired
whether this MPDU has been marked as expired
Definition
wifi-mac-queue-elem.h:45
ns3::WifiMacQueueElem::mpdu
Ptr< WifiMpdu > mpdu
MPDU stored by this element.
Definition
wifi-mac-queue-elem.h:41
ns3::WifiMacQueueElem::WifiMacQueueElem
WifiMacQueueElem(Ptr< WifiMpdu > item)
Constructor.
Definition
wifi-mac-queue-elem.cc:16
ns3::WifiMacQueueElem::deleter
Callback< void, Ptr< WifiMpdu > > deleter
reset the iterator stored by the MPDU
Definition
wifi-mac-queue-elem.h:47
ns3::WifiMacQueueElem::ac
AcIndex ac
the Access Category associated with the queue storing this element (set by WifiMacQueue)
Definition
wifi-mac-queue-elem.h:43
ns3::WifiMacQueueElem::inflights
std::map< uint8_t, Ptr< WifiMpdu > > inflights
map of MPDUs in-flight on each link
Definition
wifi-mac-queue-elem.h:46
ns3::WifiMacQueueElem::expiryTime
Time expiryTime
expiry time of the MPDU (set by WifiMacQueue)
Definition
wifi-mac-queue-elem.h:42
ns3::WifiMacQueueElem::~WifiMacQueueElem
~WifiMacQueueElem()
Definition
wifi-mac-queue-elem.cc:24
src
wifi
model
wifi-mac-queue-elem.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0