12#include "ns3/attribute-container.h"
13#include "ns3/boolean.h"
14#include "ns3/double.h"
16#include "ns3/integer.h"
19#include "ns3/string.h"
20#include "ns3/uinteger.h"
35 return os <<
"NOT_SUPPORTED";
37 return os <<
"SAME_LINK_SET";
39 return os <<
"ANY_LINK_SET";
41 return os <<
"UNKNOWN(" <<
static_cast<uint32_t>(negsupport) <<
")";
57 using TidLinkMapValue =
65 .AddAttribute(
"EmlsrActivated",
66 "Whether EMLSR option is activated. If activated, EMLSR mode can be "
67 "enabled on the EMLSR links by an installed EMLSR Manager.",
73 .AddAttribute(
"TransitionTimeout",
74 "The Transition Timeout (not used by non-AP MLDs). "
75 "Possible values are 0us or 2^n us, with n=7..16.",
81 "The duration of the MediumSyncDelay timer (must be a multiple of 32 us). "
82 "The value of this attribute is only used by AP MLDs with EMLSR activated.",
88 "Threshold (dBm) to be used instead of the normal CCA sensitivity for the primary "
89 "20 MHz channel if the MediumSyncDelay timer has a nonzero value. "
90 "The value of this attribute is only used by AP MLDs with EMLSR activated.",
96 "Maximum number of TXOPs that an EMLSR client is allowed to attempt to initiate "
97 "while the MediumSyncDelay timer is running (zero indicates no limit). "
98 "The value of this attribute is only used by AP MLDs with EMLSR activated.",
102 .AddAttribute(
"TidToLinkMappingNegSupport",
103 "TID-to-Link Mapping Negotiation Support.",
114 "TidToLinkMappingDl",
115 "A list-of-TIDs-indexed map of the list of links where the TIDs are mapped to "
116 "for the downlink direction. "
117 "In case a string is used to set this attribute, the string shall contain the "
118 "(TID list, link list) pairs separated by a semicolon (;); in every pair, the "
119 "TID list and the link list are separated by a blank space, and the elements of "
120 "each list are separated by a comma (,) without spaces. "
121 "E.g., \"0,4 1,2,3; 1 0;2 0,1\" means that TIDs 0 and 4 are mapped on links "
122 "1, 2 and 3; TID 1 is mapped on link 0 and TID 2 is mapped on links 0 and 1. "
123 "An empty map indicates the default mapping, i.e., all TIDs are mapped to all "
124 "setup links. If the map contains the mapping for some TID(s), the mapping "
125 "corresponding to the missing TID(s) remains unchanged. "
126 "A non-AP MLD includes this mapping in the Association Request frame sent to "
127 "an AP MLD, unless the AP MLD advertises a negotiation support of 1 and this "
128 "mapping is such that TIDs are mapped to distinct link sets, in which case "
129 "the default mapping is included.",
141 "TidToLinkMappingUl",
142 "A list-of-TIDs-indexed map of the list of links where the TIDs are mapped to "
143 "for the uplink direction. "
144 "In case a string is used to set this attribute, the string shall contain the "
145 "(TID list, link list) pairs separated by a semicolon (;); in every pair, the "
146 "TID list and the link list are separated by a blank space, and the elements of "
147 "each list are separated by a comma (,) without spaces. "
148 "E.g., \"0,4 1,2,3; 1 0;2 0,1\" means that TIDs 0 and 4 are mapped on links "
149 "1, 2 and 3; TID 1 is mapped on link 0 and TID 2 is mapped on links 0 and 1. "
150 "An empty map indicates the default mapping, i.e., all TIDs are mapped to all "
151 "setup links. If the map contains the mapping for some TID(s), the mapping "
152 "corresponding to the missing TID(s) remains unchanged. "
153 "A non-AP MLD includes this mapping in the Association Request frame sent to "
154 "an AP MLD, unless the AP MLD advertises a negotiation support of 1 and this "
155 "mapping is such that TIDs are mapped to distinct link sets, in which case "
156 "the default mapping is included.",
167 .AddAttribute(
"Per20CcaSensitivityThreshold",
168 "CCA threshold (dBm) for Per 20MHz check.",
182 for (
const auto& [tids, links] : linkMapping)
184 for (
auto tid : tids)
186 ret[tid] = std::set<uint8_t>(links.cbegin(), links.cend());
194 const std::map<std::list<uint8_t>, std::list<uint8_t>>& mapping)
199 for (
const auto& [tids, links] : mapping)
201 linkMapping.emplace(std::list<uint64_t>(tids.cbegin(), tids.cend()),
202 std::list<uint64_t>(links.cbegin(), links.cend()));
A container for one type of attribute.
AttributeValue implementation for Boolean.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
static TypeId GetTypeId()
Get the type ID.
Time m_mediumSyncDuration
duration of the MediumSyncDelay timer
bool m_emlsrActivated
whether EMLSR option is activated
WifiTidLinkMapping GetTidLinkMapping(WifiDirection dir) const
Time m_transitionTimeout
Transition timeout.
std::map< std::list< uint64_t >, std::list< uint64_t > > m_linkMappingDl
TIDs-indexed Link Mapping for downlink.
void SetTidLinkMapping(WifiDirection dir, const std::map< std::list< uint8_t >, std::list< uint8_t > > &mapping)
Set the TID-to-Link mapping for the given direction.
WifiTidToLinkMappingNegSupport m_tidLinkMappingSupport
TID-to-Link Mapping Negotiation Support.
uint8_t m_msdMaxNTxops
MediumSyncDelay max number of TXOPs.
std::map< std::list< uint64_t >, std::list< uint64_t > > m_linkMappingUl
TIDs-indexed Link Mapping for uplink.
~EhtConfiguration() override
dB_u m_per20CcaSensitivityThreshold
CCA threshold for Per 20MHz check.
int8_t m_msdOfdmEdThreshold
MediumSyncDelay OFDM ED threshold.
Hold variables of type enum.
Hold a signed integer type.
A base class which provides memory management and object aggregation.
AttributeValue implementation for Pair.
Hold variables of type string.
AttributeValue implementation for Time.
a unique identifier for an interface.
@ ATTR_GET
The attribute can be read.
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< AttributeChecker > MakeAttributeContainerChecker()
Make uninitialized AttributeContainerChecker using explicit types.
Ptr< const AttributeAccessor > MakeAttributeContainerAccessor(T1 a1)
Make AttributeContainerAccessor using explicit types.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeDoubleChecker()
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeIntegerChecker()
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< AttributeChecker > MakePairChecker()
Make a PairChecker without abscissa and ordinate AttributeCheckers.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static constexpr uint8_t DEFAULT_MSD_MAX_N_TXOPS
default MediumSyncDelay max number of TXOP attempts
WifiTidToLinkMappingNegSupport
TID-to-Link Mapping Negotiation Support.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
std::map< uint8_t, std::set< uint8_t > > WifiTidLinkMapping
TID-indexed map of the link set to which the TID is mapped.
WifiDirection
Wifi direction.
static constexpr int8_t DEFAULT_MSD_OFDM_ED_THRESH
default MediumSyncDelay timer OFDM ED threshold
static constexpr uint16_t DEFAULT_MSD_DURATION_USEC
default MediumSyncDelay timer duration (max PPDU TX time rounded to a multiple of 32 us)