A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::MultiLinkElement::PerStaProfileSubelement Class Reference

Per-STA Profile Subelement of Multi-Link element. More...

#include "multi-link-element.h"

+ Inheritance diagram for ns3::MultiLinkElement::PerStaProfileSubelement:
+ Collaboration diagram for ns3::MultiLinkElement::PerStaProfileSubelement:

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.
 
MgtAssocResponseHeaderGetAssocResponse () 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
 
PerStaProfileSubelementoperator= (const PerStaProfileSubelement &perStaProfile)
 Copy assignment operator performing a deep copy of the object.
 
PerStaProfileSubelementoperator= (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.
 
SimpleRefCountoperator= (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.
 

Detailed Description

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:

  • complete the implementation of STA Control and STA Info subfields

Definition at line 419 of file multi-link-element.h.

Constructor & Destructor Documentation

◆ PerStaProfileSubelement() [1/2]

ns3::MultiLinkElement::PerStaProfileSubelement::PerStaProfileSubelement ( Variant  variant)

Constructor.

Parameters
variantthe Multi-Link element variant

Definition at line 507 of file multi-link-element.cc.

◆ PerStaProfileSubelement() [2/2]

ns3::MultiLinkElement::PerStaProfileSubelement::PerStaProfileSubelement ( const PerStaProfileSubelement perStaProfile)

Copy constructor performing a deep copy of the object.

Parameters
perStaProfilethe object to copy

Definition at line 513 of file multi-link-element.cc.

References m_staProfile.

Member Function Documentation

◆ DeserializeInformationField()

uint16_t ns3::MultiLinkElement::PerStaProfileSubelement::DeserializeInformationField ( Buffer::Iterator  start,
uint16_t  length 
)
overrideprivatevirtual

Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan iterator which points to where the information should be written.
lengththe expected number of bytes to read
Returns
the number of bytes read

Implements ns3::WifiInformationElement.

Definition at line 765 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().

+ Here is the call graph for this function:

◆ ElementId()

WifiInformationElementId ns3::MultiLinkElement::PerStaProfileSubelement::ElementId ( ) const
overridevirtual

Get the wifi information element ID.

Returns
the wifi information element ID

Implements ns3::WifiInformationElement.

Definition at line 697 of file multi-link-element.cc.

References ns3::MultiLinkElement::PER_STA_PROFILE_SUBELEMENT_ID.

◆ GetAssocRequest()

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.

Returns
the (Re)Association Request frame body

Definition at line 648 of file multi-link-element.cc.

References NS_ABORT_UNLESS.

◆ GetAssocResponse()

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.

Returns
the (Re)Association Response frame body

Definition at line 677 of file multi-link-element.cc.

References NS_ABORT_IF.

◆ GetInformationFieldSize()

uint16_t ns3::MultiLinkElement::PerStaProfileSubelement::GetInformationFieldSize ( ) const
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)

Returns
the length of serialized information

Implements ns3::WifiInformationElement.

Definition at line 703 of file multi-link-element.cc.

References ns3::MultiLinkElement::m_containingFrame, and NS_ASSERT_MSG.

◆ GetLinkId()

uint8_t ns3::MultiLinkElement::PerStaProfileSubelement::GetLinkId ( ) const

Get the Link ID subfield in the STA Control field.

Returns
the Link ID subfield in the STA Control field

Definition at line 574 of file multi-link-element.cc.

◆ GetStaInfoLength()

uint8_t ns3::MultiLinkElement::PerStaProfileSubelement::GetStaInfoLength ( ) const

Get the size in bytes of the serialized STA Info Length subfield of the STA Info field.

Returns
the size in bytes of the serialized STA Info Length subfield

Definition at line 684 of file multi-link-element.cc.

◆ GetStaMacAddress()

Mac48Address ns3::MultiLinkElement::PerStaProfileSubelement::GetStaMacAddress ( ) const

Get the STA MAC Address subfield in the STA Info field, if present.

Returns
the STA MAC Address subfield in the STA Info field, if present

Definition at line 606 of file multi-link-element.cc.

References NS_ABORT_IF.

◆ HasAssocRequest()

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.

Returns
true if an Association Request frame body is included

Definition at line 636 of file multi-link-element.cc.

◆ HasAssocResponse()

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.

Returns
true if a (Re)Association Response frame body is included

Definition at line 671 of file multi-link-element.cc.

◆ HasReassocRequest()

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.

Returns
true if a Reassociation Request frame body is included

Definition at line 642 of file multi-link-element.cc.

◆ HasStaMacAddress()

bool ns3::MultiLinkElement::PerStaProfileSubelement::HasStaMacAddress ( ) const

Return true if the STA MAC Address subfield in the STA Info field is present.

Returns
true if the STA MAC Address subfield in the STA Info field is present

Definition at line 600 of file multi-link-element.cc.

◆ IsCompleteProfileSet()

bool ns3::MultiLinkElement::PerStaProfileSubelement::IsCompleteProfileSet ( ) const
Returns
whether the Complete Profile flag in the STA Control field is set

Definition at line 586 of file multi-link-element.cc.

◆ operator=() [1/2]

MultiLinkElement::PerStaProfileSubelement & ns3::MultiLinkElement::PerStaProfileSubelement::operator= ( const PerStaProfileSubelement perStaProfile)

Copy assignment operator performing a deep copy of the object.

Parameters
perStaProfilethe object to copy-assign
Returns
a reference to this object

Definition at line 536 of file multi-link-element.cc.

References m_staControl, m_staMacAddress, m_staProfile, and m_variant.

◆ operator=() [2/2]

PerStaProfileSubelement & ns3::MultiLinkElement::PerStaProfileSubelement::operator= ( PerStaProfileSubelement &&  perStaProfile)
default

Use default move assignment operator.

Parameters
perStaProfilethe object to move-assign
Returns
a reference to this object

◆ SerializeInformationField()

void ns3::MultiLinkElement::PerStaProfileSubelement::SerializeInformationField ( Buffer::Iterator  start) const
overrideprivatevirtual

Serialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan iterator which points to where the information should be written.

Implements ns3::WifiInformationElement.

Definition at line 733 of file multi-link-element.cc.

References ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, and ns3::WriteTo().

+ Here is the call graph for this function:

◆ SetAssocRequest() [1/2]

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.

Parameters
assocthe given (Re)Association Request frame body

Definition at line 613 of file multi-link-element.cc.

Referenced by BasicMultiLinkElementTest::DoRun().

+ Here is the caller graph for this function:

◆ SetAssocRequest() [2/2]

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.

Parameters
assocthe given (Re)Association Request frame body

Definition at line 624 of file multi-link-element.cc.

◆ SetAssocResponse() [1/2]

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.

Parameters
assocthe given (Re)Association Response frame body

Definition at line 659 of file multi-link-element.cc.

◆ SetAssocResponse() [2/2]

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.

Parameters
assocthe given (Re)Association Response frame body

Definition at line 665 of file multi-link-element.cc.

◆ SetCompleteProfile()

void ns3::MultiLinkElement::PerStaProfileSubelement::SetCompleteProfile ( )

Set the Complete Profile flag in the STA Control field.

Definition at line 580 of file multi-link-element.cc.

Referenced by BasicMultiLinkElementTest::DoRun().

+ Here is the caller graph for this function:

◆ SetLinkId()

void ns3::MultiLinkElement::PerStaProfileSubelement::SetLinkId ( uint8_t  linkId)

Set the Link ID subfield in the STA Control field.

Parameters
linkIdthe Link ID value

Definition at line 567 of file multi-link-element.cc.

Referenced by BasicMultiLinkElementTest::DoRun(), ns3::StaWifiMac::GetMultiLinkElement(), and ns3::ApWifiMac::GetMultiLinkElement().

+ Here is the caller graph for this function:

◆ SetStaMacAddress()

void ns3::MultiLinkElement::PerStaProfileSubelement::SetStaMacAddress ( Mac48Address  address)

Set the STA MAC Address subfield in the STA Info field.

Parameters
addressthe MAC address to set

Definition at line 592 of file multi-link-element.cc.

References ns3::MultiLinkElement::BASIC_VARIANT, and NS_ABORT_IF.

Referenced by BasicMultiLinkElementTest::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_containingFrame

ContainingFrame ns3::MultiLinkElement::PerStaProfileSubelement::m_containingFrame
mutable

the mgt frame containing this Per-STA Profile

Definition at line 558 of file multi-link-element.h.

◆ m_staControl

uint16_t ns3::MultiLinkElement::PerStaProfileSubelement::m_staControl
private

STA Control field.

Definition at line 566 of file multi-link-element.h.

Referenced by operator=().

◆ m_staMacAddress

Mac48Address ns3::MultiLinkElement::PerStaProfileSubelement::m_staMacAddress
private

STA MAC address.

Definition at line 567 of file multi-link-element.h.

Referenced by operator=().

◆ m_staProfile

std::variant<std::monostate, std::unique_ptr<MgtAssocRequestHeader>, std::unique_ptr<MgtReassocRequestHeader>, std::unique_ptr<MgtAssocResponseHeader> > ns3::MultiLinkElement::PerStaProfileSubelement::m_staProfile
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 572 of file multi-link-element.h.

Referenced by PerStaProfileSubelement(), and operator=().

◆ m_variant

Variant ns3::MultiLinkElement::PerStaProfileSubelement::m_variant
private

Multi-Link element variant.

Definition at line 565 of file multi-link-element.h.

Referenced by operator=().


The documentation for this class was generated from the following files: