23#include "ns3/attribute-container.h"
24#include "ns3/boolean.h"
28#include "ns3/string.h"
29#include "ns3/uinteger.h"
51 using TidLinkMapValue =
59 .AddAttribute(
"EmlsrActivated",
60 "Whether EMLSR option is activated. If activated, EMLSR mode can be "
61 "enabled on the EMLSR links by an installed EMLSR Manager.",
67 .AddAttribute(
"TransitionTimeout",
68 "The Transition Timeout (not used by non-AP MLDs). "
69 "Possible values are 0us or 2^n us, with n=7..16.",
74 "TidToLinkMappingNegSupport",
75 "TID-to-Link Mapping Negotiation Support.",
87 "A list-of-TIDs-indexed map of the list of links where the TIDs are mapped to "
88 "for the downlink direction. "
89 "In case a string is used to set this attribute, the string shall contain the "
90 "(TID list, link list) pairs separated by a semicolon (;); in every pair, the "
91 "TID list and the link list are separated by a blank space, and the elements of "
92 "each list are separated by a comma (,) without spaces. "
93 "E.g., \"0,4 1,2,3; 1 0;2 0,1\" means that TIDs 0 and 4 are mapped on links "
94 "1, 2 and 3; TID 1 is mapped on link 0 and TID 2 is mapped on links 0 and 1. "
95 "An empty map indicates the default mapping, i.e., all TIDs are mapped to all "
96 "setup links. If the map contains the mapping for some TID(s), the mapping "
97 "corresponding to the missing TID(s) remains unchanged. "
98 "A non-AP MLD includes this mapping in the Association Request frame sent to "
99 "an AP MLD, unless the AP MLD advertises a negotiation support of 1 and this "
100 "mapping is such that TIDs are mapped to distinct link sets, in which case "
101 "the default mapping is included.",
103 MakeAttributeContainerAccessor<TidLinkMapValue, ';'>(
105 MakeAttributeContainerChecker<TidLinkMapValue, ';'>(
108 MakeAttributeContainerChecker<UintegerValue>(
109 MakeUintegerChecker<uint8_t>()),
110 MakeAttributeContainerChecker<UintegerValue>(
111 MakeUintegerChecker<uint8_t>()))))
113 "TidToLinkMappingUl",
114 "A list-of-TIDs-indexed map of the list of links where the TIDs are mapped to "
115 "for the uplink direction. "
116 "In case a string is used to set this attribute, the string shall contain the "
117 "(TID list, link list) pairs separated by a semicolon (;); in every pair, the "
118 "TID list and the link list are separated by a blank space, and the elements of "
119 "each list are separated by a comma (,) without spaces. "
120 "E.g., \"0,4 1,2,3; 1 0;2 0,1\" means that TIDs 0 and 4 are mapped on links "
121 "1, 2 and 3; TID 1 is mapped on link 0 and TID 2 is mapped on links 0 and 1. "
122 "An empty map indicates the default mapping, i.e., all TIDs are mapped to all "
123 "setup links. If the map contains the mapping for some TID(s), the mapping "
124 "corresponding to the missing TID(s) remains unchanged. "
125 "A non-AP MLD includes this mapping in the Association Request frame sent to "
126 "an AP MLD, unless the AP MLD advertises a negotiation support of 1 and this "
127 "mapping is such that TIDs are mapped to distinct link sets, in which case "
128 "the default mapping is included.",
130 MakeAttributeContainerAccessor<TidLinkMapValue, ';'>(
132 MakeAttributeContainerChecker<TidLinkMapValue, ';'>(
135 MakeAttributeContainerChecker<UintegerValue>(
136 MakeUintegerChecker<uint8_t>()),
137 MakeAttributeContainerChecker<UintegerValue>(
138 MakeUintegerChecker<uint8_t>()))));
149 for (
const auto& [tids, links] : linkMapping)
151 for (
auto tid : tids)
153 ret[tid] = std::set<uint8_t>(links.cbegin(), links.cend());
161 const std::map<std::list<uint8_t>, std::list<uint8_t>>& mapping)
166 for (
const auto& [tids, links] : mapping)
168 linkMapping.emplace(std::list<uint64_t>(tids.cbegin(), tids.cend()),
169 std::list<uint64_t>(links.cbegin(), links.cend()));
A container for one type of attribute.
AttributeValue implementation for Boolean.
static TypeId GetTypeId()
Get the type ID.
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.
std::map< std::list< uint64_t >, std::list< uint64_t > > m_linkMappingUl
TIDs-indexed Link Mapping for uplink.
~EhtConfiguration() override
Hold variables of type enum.
A base class which provides memory management and object aggregation.
Hold objects of type std::pair<A, B>.
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.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Ptr< AttributeChecker > MakePairChecker()
Make a PairChecker without abscissa and ordinate AttributeCheckers.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
#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.
@ WIFI_TID_TO_LINK_MAPPING_SAME_LINK_SET
@ WIFI_TID_TO_LINK_MAPPING_NOT_SUPPORTED
@ WIFI_TID_TO_LINK_MAPPING_ANY_LINK_SET
WifiDirection
Wifi direction.
std::map< uint8_t, std::set< uint8_t > > WifiTidLinkMapping
TID-indexed map of the link set to which the TID is mapped.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.