The Multi-Link element. More...
#include "multi-link-element.h"
Classes | |
class | PerStaProfileSubelement |
Per-STA Profile Subelement of Multi-Link element. More... | |
Public Types | |
using | ContainingFrame |
Typedef for structure holding a reference to the containing frame. | |
enum | SubElementId : uint8_t { PER_STA_PROFILE_SUBELEMENT_ID = 0 } |
SubElement IDs. More... | |
enum | Variant : uint8_t { BASIC_VARIANT = 0 , PROBE_REQUEST_VARIANT , UNSET } |
Multi-Link element variants. More... | |
Public Member Functions | |
MultiLinkElement (ContainingFrame frame={}) | |
Construct a Multi-Link Element with no variant set. | |
MultiLinkElement (Variant variant, ContainingFrame frame={}) | |
Constructor. | |
void | AddPerStaProfileSubelement () |
Add a Per-STA Profile Subelement in the Link Info field. | |
uint16_t | DeserializeInformationField (Buffer::Iterator start, uint16_t length) override |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) | |
WifiInformationElementId | ElementId () const override |
Get the wifi information element ID. | |
WifiInformationElementId | ElementIdExt () const override |
Get the wifi information element ID extension. | |
std::optional< uint8_t > | GetApMldId () const |
Get the AP MLD ID subfield of Common Info field (if present). | |
uint8_t | GetBssParamsChangeCount () const |
Return the BSS Parameters Change Count subfield in the Common Info field. | |
CommonInfoBasicMle & | GetCommonInfoBasic () |
const CommonInfoBasicMle & | GetCommonInfoBasic () const |
Time | GetEmlsrPaddingDelay () const |
Get the EMLSR Padding Delay subfield of the EML Capabilities subfield in the Common Info field. | |
Time | GetEmlsrTransitionDelay () const |
Get the EMLSR Transition Delay subfield of the EML Capabilities subfield in the Common Info field. | |
uint16_t | GetInformationFieldSize () const override |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets. | |
uint8_t | GetLinkIdInfo () const |
Return the Link ID Info subfield in the Common Info field. | |
Mac48Address | GetMldMacAddress () const |
Return the MLD MAC Address subfield in the Common Info field. | |
std::size_t | GetNPerStaProfileSubelements () const |
Return the number of Per-STA Profile Subelement in the Link Info field. | |
PerStaProfileSubelement & | GetPerStaProfile (std::size_t i) |
Get a reference to the i-th Per-STA Profile Subelement in the Link Info field. | |
const PerStaProfileSubelement & | GetPerStaProfile (std::size_t i) const |
Get a reference to the i-th Per-STA Profile Subelement in the Link Info field. | |
Time | GetTransitionTimeout () const |
Get the Transition Timeout subfield of the EML Capabilities subfield in the Common Info field. | |
Variant | GetVariant () const |
Get the Multi-Link element variant. | |
bool | HasBssParamsChangeCount () const |
Return true if the BSS Parameters Change Count subfield in the Common Info field is present and false otherwise. | |
bool | HasEmlCapabilities () const |
Return true if the EML Capabilities subfield in the Common Info field is present and false otherwise. | |
bool | HasLinkIdInfo () const |
Return true if the Link ID Info subfield in the Common Info field is present and false otherwise. | |
bool | IsEmlsrSupported () const |
Return true if the EMLSR Support subfield of the EML Capabilities subfield in the Common Info field is set to 1 and false otherwise. | |
void | SerializeInformationField (Buffer::Iterator start) const override |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) | |
void | SetApMldId (uint8_t id) |
Set the AP MLD ID subfield of Common Info field. | |
void | SetBssParamsChangeCount (uint8_t count) |
Set the BSS Parameters Change Count subfield in the Common Info field. | |
void | SetEmlsrPaddingDelay (Time delay) |
Set the EMLSR Padding Delay subfield of the EML Capabilities subfield in the Common Info field. | |
void | SetEmlsrSupported (bool supported) |
Set the EMLSR Support subfield of the EML Capabilities subfield in the Common Info field to 1 if EMLSR mode is supported and set it to 0 otherwise. | |
void | SetEmlsrTransitionDelay (Time delay) |
Set the EMLSR Transition Delay subfield of the EML Capabilities subfield in the Common Info field. | |
void | SetLinkIdInfo (uint8_t linkIdInfo) |
Set the Link ID Info subfield in the Common Info field. | |
void | SetMldMacAddress (Mac48Address address) |
Set the MLD MAC Address subfield in the Common Info field. | |
void | SetTransitionTimeout (Time timeout) |
Set the Transition Timeout subfield of the EML Capabilities subfield in the Common Info field. | |
Public Member Functions inherited from ns3::WifiInformationElement | |
virtual | ~WifiInformationElement () |
Buffer::Iterator | Deserialize (Buffer::Iterator i) |
Deserialize entire IE (which may possibly be fragmented into multiple elements), which must be present. | |
Buffer::Iterator | DeserializeIfPresent (Buffer::Iterator i) |
Deserialize entire IE (which may possibly be fragmented into multiple elements) if it is present. | |
uint16_t | GetSerializedSize () const |
Get the size of the serialized IE including Element ID and length fields (for every element this IE is possibly fragmented into). | |
virtual bool | operator== (const WifiInformationElement &a) const |
Compare two IEs for equality by ID & Length, and then through memcmp of serialised version. | |
virtual void | Print (std::ostream &os) const |
Generate human-readable form of IE. | |
Buffer::Iterator | Serialize (Buffer::Iterator i) const |
Serialize entire IE including Element ID and length fields. | |
Public Member Functions inherited from ns3::SimpleRefCount< WifiInformationElement > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Attributes | |
ContainingFrame | m_containingFrame |
reference to the mgt frame containing this MLE | |
Private Types | |
using | CommonInfo |
Typedef for structure holding a Common Info field. | |
Private Member Functions | |
void | SetVariant (Variant variant) |
Set the variant of this Multi-Link Element. | |
Private Attributes | |
CommonInfo | m_commonInfo |
Common Info field. | |
std::vector< PerStaProfileSubelement > | m_perStaProfileSubelements |
Per-STA Profile Subelements. | |
The Multi-Link element.
The 802.11be Multi-Link element (see Sec.9.4.2.312 of 802.11be D5.0)
TODO:
Definition at line 44 of file multi-link-element.h.
|
private |
Typedef for structure holding a Common Info field.
Definition at line 524 of file multi-link-element.h.
Typedef for structure holding a reference to the containing frame.
Definition at line 76 of file multi-link-element.h.
ns3::MultiLinkElement::MultiLinkElement | ( | ContainingFrame | frame = {} | ) |
Construct a Multi-Link Element with no variant set.
frame | the management frame containing this Multi-Link Element |
Definition at line 22 of file multi-link-element.cc.
ns3::MultiLinkElement::MultiLinkElement | ( | Variant | variant, |
ContainingFrame | frame = {} ) |
Constructor.
variant | the Multi-Link element variant (cannot be UNSET) |
frame | the management frame containing this Multi-Link Element |
Definition at line 28 of file multi-link-element.cc.
References NS_ASSERT, SetVariant(), and UNSET.
void ns3::MultiLinkElement::AddPerStaProfileSubelement | ( | ) |
Add a Per-STA Profile Subelement in the Link Info field.
Definition at line 680 of file multi-link-element.cc.
References GetVariant(), m_perStaProfileSubelements, NS_ABORT_IF, and UNSET.
Referenced by DeserializeInformationField(), ns3::StaWifiMac::GetBasicMultiLinkElement(), BasicMultiLinkElementTest::GetMultiLinkElement(), ns3::ApWifiMac::GetMultiLinkElement(), and ns3::StaWifiMac::GetProbeReqMultiLinkElement().
|
overridevirtual |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
length | the expected number of bytes to read |
Implements ns3::WifiInformationElement.
Definition at line 763 of file multi-link-element.cc.
References AddPerStaProfileSubelement(), ns3::Buffer::Iterator::GetDistanceFrom(), GetNPerStaProfileSubelements(), GetPerStaProfile(), m_commonInfo, m_containingFrame, ns3::Buffer::Iterator::Next(), NS_ABORT_MSG, ns3::Buffer::Iterator::PeekU8(), PER_STA_PROFILE_SUBELEMENT_ID, ns3::Buffer::Iterator::ReadLsbtohU16(), and SetVariant().
|
overridevirtual |
Get the wifi information element ID.
Implements ns3::WifiInformationElement.
Definition at line 36 of file multi-link-element.cc.
References IE_EXTENSION.
|
overridevirtual |
Get the wifi information element ID extension.
Reimplemented from ns3::WifiInformationElement.
Definition at line 42 of file multi-link-element.cc.
References IE_EXT_MULTI_LINK_ELEMENT.
std::optional< uint8_t > ns3::MultiLinkElement::GetApMldId | ( | ) | const |
Get the AP MLD ID subfield of Common Info field (if present).
Valid variants are Basic and Probe Request.
Definition at line 252 of file multi-link-element.cc.
References BASIC_VARIANT, GetVariant(), m_commonInfo, NS_LOG_DEBUG, and PROBE_REQUEST_VARIANT.
uint8_t ns3::MultiLinkElement::GetBssParamsChangeCount | ( | ) | const |
Return the BSS Parameters Change Count subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element and the BSS Parameters Change Count subfield is present.
Definition at line 127 of file multi-link-element.cc.
References m_commonInfo.
CommonInfoBasicMle & ns3::MultiLinkElement::GetCommonInfoBasic | ( | ) |
Definition at line 73 of file multi-link-element.cc.
References m_commonInfo.
Referenced by ns3::StaWifiMac::GetBasicMultiLinkElement(), BasicMultiLinkElementTest::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
const CommonInfoBasicMle & ns3::MultiLinkElement::GetCommonInfoBasic | ( | ) | const |
Definition at line 79 of file multi-link-element.cc.
References m_commonInfo.
Time ns3::MultiLinkElement::GetEmlsrPaddingDelay | ( | ) | const |
Get the EMLSR Padding Delay subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element and the EML Capabilities subfield is present.
Definition at line 207 of file multi-link-element.cc.
References ns3::CommonInfoBasicMle::DecodeEmlsrPaddingDelay(), m_commonInfo, and NS_ASSERT.
Time ns3::MultiLinkElement::GetEmlsrTransitionDelay | ( | ) | const |
Get the EMLSR Transition Delay subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element and the EML Capabilities subfield is present.
Definition at line 215 of file multi-link-element.cc.
References ns3::CommonInfoBasicMle::DecodeEmlsrTransitionDelay(), m_commonInfo, and NS_ASSERT.
|
overridevirtual |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets.
This is the value that will appear in the second octet of the entire IE - the length field - if the IE is not fragmented)
Implements ns3::WifiInformationElement.
Definition at line 706 of file multi-link-element.cc.
References m_commonInfo, m_containingFrame, m_perStaProfileSubelements, and NS_ABORT_MSG.
uint8_t ns3::MultiLinkElement::GetLinkIdInfo | ( | ) | const |
Return the Link ID Info subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element and the Link ID Info subfield is present.
Definition at line 109 of file multi-link-element.cc.
References m_commonInfo.
Mac48Address ns3::MultiLinkElement::GetMldMacAddress | ( | ) | const |
Return the MLD MAC Address subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
Definition at line 91 of file multi-link-element.cc.
References m_commonInfo.
std::size_t ns3::MultiLinkElement::GetNPerStaProfileSubelements | ( | ) | const |
Return the number of Per-STA Profile Subelement in the Link Info field.
Definition at line 688 of file multi-link-element.cc.
References m_perStaProfileSubelements.
Referenced by DeserializeInformationField(), ns3::StaWifiMac::GetBasicMultiLinkElement(), ns3::ApWifiMac::GetMultiLinkElement(), and ns3::StaWifiMac::GetProbeReqMultiLinkElement().
MultiLinkElement::PerStaProfileSubelement & ns3::MultiLinkElement::GetPerStaProfile | ( | std::size_t | i | ) |
Get a reference to the i-th Per-STA Profile Subelement in the Link Info field.
i | the index of the Per-STA Profile Subelement in the Link Info field |
Definition at line 694 of file multi-link-element.cc.
References m_perStaProfileSubelements.
Referenced by DeserializeInformationField(), ns3::StaWifiMac::GetBasicMultiLinkElement(), BasicMultiLinkElementTest::GetMultiLinkElement(), ns3::ApWifiMac::GetMultiLinkElement(), and ns3::StaWifiMac::GetProbeReqMultiLinkElement().
const MultiLinkElement::PerStaProfileSubelement & ns3::MultiLinkElement::GetPerStaProfile | ( | std::size_t | i | ) | const |
Get a reference to the i-th Per-STA Profile Subelement in the Link Info field.
i | the index of the Per-STA Profile Subelement in the Link Info field |
Definition at line 700 of file multi-link-element.cc.
References m_perStaProfileSubelements.
Time ns3::MultiLinkElement::GetTransitionTimeout | ( | ) | const |
Get the Transition Timeout subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element and the EML Capabilities subfield is present.
Definition at line 223 of file multi-link-element.cc.
References m_commonInfo, ns3::MicroSeconds(), and NS_ASSERT.
MultiLinkElement::Variant ns3::MultiLinkElement::GetVariant | ( | ) | const |
Get the Multi-Link element variant.
Definition at line 48 of file multi-link-element.cc.
References m_commonInfo.
Referenced by AddPerStaProfileSubelement(), GetApMldId(), ns3::ApWifiMac::GetMultiLinkElement(), SerializeInformationField(), SetApMldId(), and SetVariant().
bool ns3::MultiLinkElement::HasBssParamsChangeCount | ( | ) | const |
Return true if the BSS Parameters Change Count subfield in the Common Info field is present and false otherwise.
Make sure that this is a Basic Multi-Link Element.
Definition at line 121 of file multi-link-element.cc.
References m_commonInfo.
bool ns3::MultiLinkElement::HasEmlCapabilities | ( | ) | const |
Return true if the EML Capabilities subfield in the Common Info field is present and false otherwise.
Make sure that this is a Basic Multi-Link Element.
Definition at line 195 of file multi-link-element.cc.
References m_commonInfo.
bool ns3::MultiLinkElement::HasLinkIdInfo | ( | ) | const |
Return true if the Link ID Info subfield in the Common Info field is present and false otherwise.
Make sure that this is a Basic Multi-Link Element.
Definition at line 103 of file multi-link-element.cc.
References m_commonInfo.
bool ns3::MultiLinkElement::IsEmlsrSupported | ( | ) | const |
Return true if the EMLSR Support subfield of the EML Capabilities subfield in the Common Info field is set to 1 and false otherwise.
Make sure that this is a Basic Multi-Link Element and the EML Capabilities subfield is present.
Definition at line 201 of file multi-link-element.cc.
References m_commonInfo.
|
overridevirtual |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
Implements ns3::WifiInformationElement.
Definition at line 736 of file multi-link-element.cc.
References GetVariant(), m_commonInfo, m_perStaProfileSubelements, and NS_ABORT_MSG.
void ns3::MultiLinkElement::SetApMldId | ( | uint8_t | id | ) |
Set the AP MLD ID subfield of Common Info field.
Valid variants are Basic and Probe Request.
id | AP MLD ID |
Definition at line 235 of file multi-link-element.cc.
References BASIC_VARIANT, GetVariant(), m_commonInfo, NS_ABORT_MSG, and PROBE_REQUEST_VARIANT.
Referenced by ns3::StaWifiMac::GetProbeReqMultiLinkElement().
void ns3::MultiLinkElement::SetBssParamsChangeCount | ( | uint8_t | count | ) |
Set the BSS Parameters Change Count subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
count | the BSS Parameters Change Count |
Definition at line 115 of file multi-link-element.cc.
References m_commonInfo.
Referenced by BasicMultiLinkElementTest::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
void ns3::MultiLinkElement::SetEmlsrPaddingDelay | ( | Time | delay | ) |
Set the EMLSR Padding Delay subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
delay | the EMLSR Padding delay (0us, 32us, 64us, 128us or 256us) |
Definition at line 144 of file multi-link-element.cc.
References ns3::CommonInfoBasicMle::EmlCapabilities::emlsrPaddingDelay, ns3::CommonInfoBasicMle::EncodeEmlsrPaddingDelay(), and m_commonInfo.
Referenced by ns3::StaWifiMac::GetBasicMultiLinkElement(), and BasicMultiLinkElementTest::GetMultiLinkElement().
void ns3::MultiLinkElement::SetEmlsrSupported | ( | bool | supported | ) |
Set the EMLSR Support subfield of the EML Capabilities subfield in the Common Info field to 1 if EMLSR mode is supported and set it to 0 otherwise.
Make sure that this is a Basic Multi-Link Element.
supported | whether EMLSR mode is supported |
Definition at line 133 of file multi-link-element.cc.
References ns3::CommonInfoBasicMle::EmlCapabilities::emlsrSupport, and m_commonInfo.
Referenced by ns3::StaWifiMac::GetBasicMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
void ns3::MultiLinkElement::SetEmlsrTransitionDelay | ( | Time | delay | ) |
Set the EMLSR Transition Delay subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
delay | the EMLSR Transition delay (0us, 16us, 32us, 64us, 128us or 256us) |
Definition at line 155 of file multi-link-element.cc.
References ns3::CommonInfoBasicMle::EmlCapabilities::emlsrTransitionDelay, ns3::CommonInfoBasicMle::EncodeEmlsrTransitionDelay(), and m_commonInfo.
Referenced by ns3::StaWifiMac::GetBasicMultiLinkElement(), and BasicMultiLinkElementTest::GetMultiLinkElement().
void ns3::MultiLinkElement::SetLinkIdInfo | ( | uint8_t | linkIdInfo | ) |
Set the Link ID Info subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
linkIdInfo | the link ID information |
Definition at line 97 of file multi-link-element.cc.
References m_commonInfo.
Referenced by BasicMultiLinkElementTest::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
void ns3::MultiLinkElement::SetMldMacAddress | ( | Mac48Address | address | ) |
Set the MLD MAC Address subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
address | the MLD MAC address |
Definition at line 85 of file multi-link-element.cc.
References m_commonInfo.
Referenced by ns3::StaWifiMac::GetBasicMultiLinkElement(), BasicMultiLinkElementTest::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
void ns3::MultiLinkElement::SetTransitionTimeout | ( | Time | timeout | ) |
Set the Transition Timeout subfield of the EML Capabilities subfield in the Common Info field.
Make sure that this is a Basic Multi-Link Element.
timeout | the Transition Timeout (0us or 2^n us, with n=7..16) |
Definition at line 166 of file multi-link-element.cc.
References ns3::Time::As(), ns3::Time::GetMicroSeconds(), m_commonInfo, NS_ABORT_MSG_IF, timeout, and ns3::Time::US.
Referenced by BasicMultiLinkElementTest::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
|
private |
Set the variant of this Multi-Link Element.
variant | the variant of this Multi-Link Element |
Definition at line 54 of file multi-link-element.cc.
References BASIC_VARIANT, GetVariant(), m_commonInfo, NS_ABORT_MSG, NS_ABORT_MSG_IF, PROBE_REQUEST_VARIANT, and UNSET.
Referenced by MultiLinkElement(), and DeserializeInformationField().
|
private |
Common Info field.
Definition at line 529 of file multi-link-element.h.
Referenced by DeserializeInformationField(), GetApMldId(), GetBssParamsChangeCount(), GetCommonInfoBasic(), GetCommonInfoBasic(), GetEmlsrPaddingDelay(), GetEmlsrTransitionDelay(), GetInformationFieldSize(), GetLinkIdInfo(), GetMldMacAddress(), GetTransitionTimeout(), GetVariant(), HasBssParamsChangeCount(), HasEmlCapabilities(), HasLinkIdInfo(), IsEmlsrSupported(), SerializeInformationField(), SetApMldId(), SetBssParamsChangeCount(), SetEmlsrPaddingDelay(), SetEmlsrSupported(), SetEmlsrTransitionDelay(), SetLinkIdInfo(), SetMldMacAddress(), SetTransitionTimeout(), and SetVariant().
|
mutable |
reference to the mgt frame containing this MLE
Definition at line 261 of file multi-link-element.h.
Referenced by DeserializeInformationField(), ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField(), GetInformationFieldSize(), ns3::MultiLinkElement::PerStaProfileSubelement::GetInformationFieldSize(), and ns3::MultiLinkElement::PerStaProfileSubelement::SerializeInformationField().
|
private |
Per-STA Profile Subelements.
Definition at line 535 of file multi-link-element.h.
Referenced by AddPerStaProfileSubelement(), GetInformationFieldSize(), GetNPerStaProfileSubelements(), GetPerStaProfile(), GetPerStaProfile(), and SerializeInformationField().