Per-STA Profile Subelement of Multi-Link element. More...
#include "multi-link-element.h"
Public Member Functions | |
PerStaProfileSubelement (const PerStaProfileSubelement &perStaProfile) | |
Copy constructor performing a deep copy of the object. | |
PerStaProfileSubelement (Variant variant) | |
Constructor. | |
WifiInformationElementId | ElementId () const override |
Get the wifi information element ID. | |
AssocReqRefVariant | GetAssocRequest () const |
Get the (Re)Association Request frame body included in the STA Profile field of this Per-STA Profile subelement. | |
MgtAssocResponseHeader & | GetAssocResponse () const |
Get the (Re)Association Response frame body included in the STA Profile field of this Per-STA Profile subelement. | |
uint8_t | GetBssParamsChgCnt () const |
Get BSS Parameters Change Count subfield in the STA Info field. | |
uint8_t | GetLinkId () const |
Get the Link ID subfield in the STA Control field. | |
MgtProbeResponseHeader & | GetProbeResponse () const |
Get the Probe Response frame body included in the STA Profile field of this Per-STA Profile subelement. | |
uint8_t | GetStaInfoLength () const |
Get the size in bytes of the serialized STA Info Length subfield of the STA Info field. | |
Mac48Address | GetStaMacAddress () const |
Get the STA MAC Address subfield in the STA Info field, if present. | |
bool | HasAssocRequest () const |
Return true if an Association Request frame body is included in the STA Profile field of this Per-STA Profile subelement. | |
bool | HasAssocResponse () const |
Return true if a (Re)Association Response frame body is included in the STA Profile field of this Per-STA Profile subelement. | |
bool | HasBssParamsChgCnt () const |
bool | HasProbeResponse () const |
Return true if a Probe Response frame body is included in the STA Profile field of this Per-STA Profile subelement. | |
bool | HasReassocRequest () const |
Return true if a Reassociation Request frame body is included in the STA Profile field of this Per-STA Profile subelement. | |
bool | HasStaMacAddress () const |
Return true if the STA MAC Address subfield in the STA Info field is present. | |
bool | IsCompleteProfileSet () const |
PerStaProfileSubelement & | operator= (const PerStaProfileSubelement &perStaProfile) |
Copy assignment operator performing a deep copy of the object. | |
PerStaProfileSubelement & | operator= (PerStaProfileSubelement &&perStaProfile)=default |
Use default move assignment operator. | |
void | SetAssocRequest (const std::variant< MgtAssocRequestHeader, MgtReassocRequestHeader > &assoc) |
Include the given (Re)Association Request frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetAssocRequest (std::variant< MgtAssocRequestHeader, MgtReassocRequestHeader > &&assoc) |
Include the given (Re)Association Request frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetAssocResponse (const MgtAssocResponseHeader &assoc) |
Include the given (Re)Association Response frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetAssocResponse (MgtAssocResponseHeader &&assoc) |
Include the given (Re)Association Response frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetBssParamsChgCnt (uint8_t count) |
Set the BSS Parameters Change Count subfield in the STA Info field. | |
void | SetCompleteProfile () |
Set the Complete Profile flag in the STA Control field. | |
void | SetLinkId (uint8_t linkId) |
Set the Link ID subfield in the STA Control field. | |
void | SetProbeResponse (const MgtProbeResponseHeader &probeResp) |
Include the given Probe Response frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetProbeResponse (MgtProbeResponseHeader &&probeResp) |
Include the given Probe Response frame body in the STA Profile field of this Per-STA Profile subelement. | |
void | SetStaMacAddress (Mac48Address address) |
Set the STA MAC Address subfield in the STA Info field. | |
![]() | |
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. | |
virtual WifiInformationElementId | ElementIdExt () const |
Get the wifi information element ID extension. | |
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. | |
![]() | |
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 |
the mgt frame containing this Per-STA Profile | |
Private Member Functions | |
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) | |
uint16_t | DeserProbeReqMlePerSta (ns3::Buffer::Iterator start, uint16_t length) |
Deserialize information of Per-STA Profile Subelement in Probe Request Multi-link Element. | |
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. | |
void | SerializeInformationField (Buffer::Iterator start) const override |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) | |
Private Attributes | |
std::optional< uint8_t > | m_bssParamsChgCnt |
BSS Params Change Count (Basic MLE) | |
uint16_t | m_staControl |
STA Control field. | |
Mac48Address | m_staMacAddress |
STA MAC address. | |
std::variant< std::monostate, std::unique_ptr< MgtAssocRequestHeader >, std::unique_ptr< MgtReassocRequestHeader >, std::unique_ptr< MgtAssocResponseHeader >, std::unique_ptr< MgtProbeResponseHeader > > | m_staProfile |
STA Profile field, containing the frame body of a frame of the same type as the frame containing the Multi-Link Element. | |
Variant | m_variant |
Multi-Link element variant. | |
Per-STA Profile Subelement of Multi-Link element.
See Sec. 9.4.2.312.2.3 of 802.11be D1.5
The frame body of the management frame included in the Per-STA Profile field is stored as a (unique) pointer to the Header base class, because we cannot include mgt-headers.h here (otherwise, we would create a circular dependency).
TODO:
Definition at line 275 of file multi-link-element.h.
ns3::MultiLinkElement::PerStaProfileSubelement::PerStaProfileSubelement | ( | Variant | variant | ) |
Constructor.
variant | the Multi-Link element variant |
Definition at line 267 of file multi-link-element.cc.
ns3::MultiLinkElement::PerStaProfileSubelement::PerStaProfileSubelement | ( | const PerStaProfileSubelement & | perStaProfile | ) |
Copy constructor performing a deep copy of the object.
perStaProfile | the object to copy |
Definition at line 273 of file multi-link-element.cc.
References m_staProfile.
|
overrideprivatevirtual |
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 595 of file multi-link-element.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, ns3::MultiLinkElement::PROBE_REQUEST_VARIANT, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), and ns3::Buffer::Iterator::ReadU8().
|
private |
Deserialize information of Per-STA Profile Subelement in Probe Request Multi-link Element.
start | an iterator which points to where the information should be written |
length | the expected number of octets to read |
Definition at line 644 of file multi-link-element.cc.
References NS_ASSERT_MSG, NS_LOG_DEBUG, ns3::MultiLinkElement::PROBE_REQUEST_VARIANT, ns3::Buffer::Iterator::ReadLsbtohU16(), and ns3::Buffer::Iterator::ReadU8().
|
overridevirtual |
Get the wifi information element ID.
Implements ns3::WifiInformationElement.
Definition at line 516 of file multi-link-element.cc.
References ns3::MultiLinkElement::PER_STA_PROFILE_SUBELEMENT_ID.
AssocReqRefVariant ns3::MultiLinkElement::PerStaProfileSubelement::GetAssocRequest | ( | ) | const |
Get the (Re)Association Request frame body included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 433 of file multi-link-element.cc.
References NS_ABORT_UNLESS.
MgtAssocResponseHeader & ns3::MultiLinkElement::PerStaProfileSubelement::GetAssocResponse | ( | ) | const |
Get the (Re)Association Response frame body included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 462 of file multi-link-element.cc.
References NS_ABORT_IF.
uint8_t ns3::MultiLinkElement::PerStaProfileSubelement::GetBssParamsChgCnt | ( | ) | const |
Get BSS Parameters Change Count subfield in the STA Info field.
Definition at line 390 of file multi-link-element.cc.
References NS_ASSERT_MSG.
|
overrideprivatevirtual |
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 522 of file multi-link-element.cc.
References ns3::MultiLinkElement::m_containingFrame, and NS_ASSERT_MSG.
uint8_t ns3::MultiLinkElement::PerStaProfileSubelement::GetLinkId | ( | ) | const |
Get the Link ID subfield in the STA Control field.
Definition at line 336 of file multi-link-element.cc.
MgtProbeResponseHeader & ns3::MultiLinkElement::PerStaProfileSubelement::GetProbeResponse | ( | ) | const |
Get the Probe Response frame body included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 487 of file multi-link-element.cc.
References NS_ABORT_IF.
uint8_t ns3::MultiLinkElement::PerStaProfileSubelement::GetStaInfoLength | ( | ) | const |
Get the size in bytes of the serialized STA Info Length subfield of the STA Info field.
Definition at line 494 of file multi-link-element.cc.
References ns3::MultiLinkElement::PROBE_REQUEST_VARIANT.
Mac48Address ns3::MultiLinkElement::PerStaProfileSubelement::GetStaMacAddress | ( | ) | const |
Get the STA MAC Address subfield in the STA Info field, if present.
Definition at line 368 of file multi-link-element.cc.
References NS_ABORT_IF.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasAssocRequest | ( | ) | const |
Return true if an Association Request frame body is included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 421 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasAssocResponse | ( | ) | const |
Return true if a (Re)Association Response frame body is included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 456 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasBssParamsChgCnt | ( | ) | const |
Definition at line 384 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasProbeResponse | ( | ) | const |
Return true if a Probe Response frame body is included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 481 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasReassocRequest | ( | ) | const |
Return true if a Reassociation Request frame body is included in the STA Profile field of this Per-STA Profile subelement.
Definition at line 427 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::HasStaMacAddress | ( | ) | const |
Return true if the STA MAC Address subfield in the STA Info field is present.
Definition at line 362 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::IsCompleteProfileSet | ( | ) | const |
Definition at line 348 of file multi-link-element.cc.
MultiLinkElement::PerStaProfileSubelement & ns3::MultiLinkElement::PerStaProfileSubelement::operator= | ( | const PerStaProfileSubelement & | perStaProfile | ) |
Copy assignment operator performing a deep copy of the object.
perStaProfile | the object to copy-assign |
Definition at line 297 of file multi-link-element.cc.
References m_bssParamsChgCnt, m_staControl, m_staMacAddress, m_staProfile, and m_variant.
|
default |
Use default move assignment operator.
perStaProfile | the object to move-assign |
|
overrideprivatevirtual |
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 552 of file multi-link-element.cc.
References ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, ns3::MultiLinkElement::PROBE_REQUEST_VARIANT, and ns3::WriteTo().
void ns3::MultiLinkElement::PerStaProfileSubelement::SetAssocRequest | ( | const std::variant< MgtAssocRequestHeader, MgtReassocRequestHeader > & | assoc | ) |
Include the given (Re)Association Request frame body in the STA Profile field of this Per-STA Profile subelement.
assoc | the given (Re)Association Request frame body |
Definition at line 398 of file multi-link-element.cc.
Referenced by BasicMultiLinkElementTest::DoRun().
void ns3::MultiLinkElement::PerStaProfileSubelement::SetAssocRequest | ( | std::variant< MgtAssocRequestHeader, MgtReassocRequestHeader > && | assoc | ) |
Include the given (Re)Association Request frame body in the STA Profile field of this Per-STA Profile subelement.
assoc | the given (Re)Association Request frame body |
Definition at line 409 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetAssocResponse | ( | const MgtAssocResponseHeader & | assoc | ) |
Include the given (Re)Association Response frame body in the STA Profile field of this Per-STA Profile subelement.
assoc | the given (Re)Association Response frame body |
Definition at line 444 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetAssocResponse | ( | MgtAssocResponseHeader && | assoc | ) |
Include the given (Re)Association Response frame body in the STA Profile field of this Per-STA Profile subelement.
assoc | the given (Re)Association Response frame body |
Definition at line 450 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetBssParamsChgCnt | ( | uint8_t | count | ) |
Set the BSS Parameters Change Count subfield in the STA Info field.
count | BSS Parameters Change Count |
Definition at line 375 of file multi-link-element.cc.
References ns3::MultiLinkElement::BASIC_VARIANT, and NS_ABORT_MSG_IF.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetCompleteProfile | ( | ) |
Set the Complete Profile flag in the STA Control field.
Definition at line 342 of file multi-link-element.cc.
Referenced by BasicMultiLinkElementTest::DoRun().
void ns3::MultiLinkElement::PerStaProfileSubelement::SetLinkId | ( | uint8_t | linkId | ) |
Set the Link ID subfield in the STA Control field.
linkId | the Link ID value |
Definition at line 329 of file multi-link-element.cc.
Referenced by BasicMultiLinkElementTest::DoRun(), ns3::StaWifiMac::GetBasicMultiLinkElement(), ns3::ApWifiMac::GetMultiLinkElement(), and ns3::StaWifiMac::GetProbeReqMultiLinkElement().
void ns3::MultiLinkElement::PerStaProfileSubelement::SetProbeResponse | ( | const MgtProbeResponseHeader & | probeResp | ) |
Include the given Probe Response frame body in the STA Profile field of this Per-STA Profile subelement.
probeResp | the given Probe Response frame body |
Definition at line 469 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetProbeResponse | ( | MgtProbeResponseHeader && | probeResp | ) |
Include the given Probe Response frame body in the STA Profile field of this Per-STA Profile subelement.
probeResp | the given Probe Response frame body |
Definition at line 475 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetStaMacAddress | ( | Mac48Address | address | ) |
Set the STA MAC Address subfield in the STA Info field.
address | the MAC address to set |
Definition at line 354 of file multi-link-element.cc.
References ns3::MultiLinkElement::BASIC_VARIANT, and NS_ABORT_IF.
Referenced by BasicMultiLinkElementTest::DoRun().
|
private |
BSS Params Change Count (Basic MLE)
Definition at line 480 of file multi-link-element.h.
Referenced by operator=().
|
mutable |
the mgt frame containing this Per-STA Profile
Definition at line 460 of file multi-link-element.h.
|
private |
|
private |
|
private |
STA Profile field, containing the frame body of a frame of the same type as the frame containing the Multi-Link Element.
Definition at line 486 of file multi-link-element.h.
Referenced by PerStaProfileSubelement(), and operator=().
|
private |
Multi-Link element variant.
Definition at line 477 of file multi-link-element.h.
Referenced by operator=().