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 | GetLinkId () const |
Get the Link ID subfield in the STA Control field. | |
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 | 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 | 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 | SetStaMacAddress (Mac48Address address) |
Set the STA MAC Address subfield in the STA 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. | |
virtual WifiInformationElementId | ElementId () const =0 |
Get the wifi information element ID. | |
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. | |
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 |
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 | 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 | |
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 > > | 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 423 of file multi-link-element.h.
ns3::MultiLinkElement::PerStaProfileSubelement::PerStaProfileSubelement | ( | Variant | variant | ) |
Constructor.
variant | the Multi-Link element variant |
Definition at line 497 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 503 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 755 of file multi-link-element.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), and ns3::Buffer::Iterator::ReadU8().
|
overridevirtual |
Get the wifi information element ID.
Implements ns3::WifiInformationElement.
Definition at line 687 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 638 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 667 of file multi-link-element.cc.
References NS_ABORT_IF.
|
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 693 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 564 of file multi-link-element.cc.
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 674 of file multi-link-element.cc.
Mac48Address ns3::MultiLinkElement::PerStaProfileSubelement::GetStaMacAddress | ( | ) | const |
Get the STA MAC Address subfield in the STA Info field, if present.
Definition at line 596 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 626 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 661 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 632 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 590 of file multi-link-element.cc.
bool ns3::MultiLinkElement::PerStaProfileSubelement::IsCompleteProfileSet | ( | ) | const |
Definition at line 576 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 526 of file multi-link-element.cc.
References 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 723 of file multi-link-element.cc.
References ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, 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 603 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 614 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 649 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 655 of file multi-link-element.cc.
void ns3::MultiLinkElement::PerStaProfileSubelement::SetCompleteProfile | ( | ) |
Set the Complete Profile flag in the STA Control field.
Definition at line 570 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 557 of file multi-link-element.cc.
Referenced by BasicMultiLinkElementTest::DoRun(), ns3::StaWifiMac::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().
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 582 of file multi-link-element.cc.
References ns3::MultiLinkElement::BASIC_VARIANT, and NS_ABORT_IF.
Referenced by BasicMultiLinkElementTest::DoRun().
|
mutable |
the mgt frame containing this Per-STA Profile
Definition at line 562 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 576 of file multi-link-element.h.
Referenced by PerStaProfileSubelement(), and operator=().
|
private |
Multi-Link element variant.
Definition at line 569 of file multi-link-element.h.
Referenced by operator=().