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 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.
 
MgtProbeResponseHeaderGetProbeResponse () 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
 
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 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.
 
- 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 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 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.
 

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 275 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 267 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 273 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 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().

+ Here is the call graph for this function:

◆ DeserProbeReqMlePerSta()

uint16_t ns3::MultiLinkElement::PerStaProfileSubelement::DeserProbeReqMlePerSta ( ns3::Buffer::Iterator start,
uint16_t length )
private

Deserialize information of Per-STA Profile Subelement in Probe Request Multi-link Element.

Parameters
startan iterator which points to where the information should be written
lengththe expected number of octets to read
Returns
the number of octets 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().

+ 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 516 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 433 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 462 of file multi-link-element.cc.

References NS_ABORT_IF.

◆ GetBssParamsChgCnt()

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

Get BSS Parameters Change Count subfield in the STA Info field.

Returns
count value

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

References NS_ASSERT_MSG.

◆ 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 522 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 336 of file multi-link-element.cc.

◆ GetProbeResponse()

MgtProbeResponseHeader & ns3::MultiLinkElement::PerStaProfileSubelement::GetProbeResponse ( ) const

Get the Probe Response frame body included in the STA Profile field of this Per-STA Profile subelement.

Returns
the Probe Response frame body

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

References NS_ABORT_IF.

◆ 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 494 of file multi-link-element.cc.

References ns3::MultiLinkElement::PROBE_REQUEST_VARIANT.

◆ 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 368 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 421 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 456 of file multi-link-element.cc.

◆ HasBssParamsChgCnt()

bool ns3::MultiLinkElement::PerStaProfileSubelement::HasBssParamsChgCnt ( ) const
Returns
whether the BSS Parameters Change Count subfield in STA Info field is present

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

◆ HasProbeResponse()

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.

Returns
true if a Probe Response frame body is included

Definition at line 481 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 427 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 362 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 348 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 297 of file multi-link-element.cc.

References m_bssParamsChgCnt, 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 552 of file multi-link-element.cc.

References ns3::MultiLinkElement::m_containingFrame, NS_ASSERT_MSG, ns3::MultiLinkElement::PROBE_REQUEST_VARIANT, 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 398 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 409 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 444 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 450 of file multi-link-element.cc.

◆ SetBssParamsChgCnt()

void ns3::MultiLinkElement::PerStaProfileSubelement::SetBssParamsChgCnt ( uint8_t count)

Set the BSS Parameters Change Count subfield in the STA Info field.

Parameters
countBSS Parameters Change Count

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

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

◆ SetCompleteProfile()

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().

+ 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 329 of file multi-link-element.cc.

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

+ Here is the caller graph for this function:

◆ SetProbeResponse() [1/2]

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.

Parameters
probeRespthe given Probe Response frame body

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

◆ SetProbeResponse() [2/2]

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.

Parameters
probeRespthe given Probe Response frame body

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

◆ 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 354 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_bssParamsChgCnt

std::optional<uint8_t> ns3::MultiLinkElement::PerStaProfileSubelement::m_bssParamsChgCnt
private

BSS Params Change Count (Basic MLE)

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

Referenced by operator=().

◆ m_containingFrame

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

the mgt frame containing this Per-STA Profile

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

◆ m_staControl

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

STA Control field.

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

Referenced by operator=().

◆ m_staMacAddress

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

STA MAC address.

Definition at line 479 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>, std::unique_ptr<MgtProbeResponseHeader> > 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 486 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 477 of file multi-link-element.h.

Referenced by operator=().


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