A Discrete-Event Network Simulator
API
ns3::MgtAssocResponseHeader Class Reference

Implement the header for management frames of type association and reassociation response. More...

#include "mgt-headers.h"

+ Inheritance diagram for ns3::MgtAssocResponseHeader:
+ Collaboration diagram for ns3::MgtAssocResponseHeader:

Public Member Functions

 ~MgtAssocResponseHeader () override=default
 
CapabilityInformationCapabilities ()
 
const CapabilityInformationCapabilities () const
 
uint16_t GetAssociationId () const
 Return the association ID. More...
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object. More...
 
StatusCode GetStatusCode ()
 Return the status code. More...
 
void SetAssociationId (uint16_t aid)
 Set the association ID. More...
 
void SetStatusCode (StatusCode code)
 Set the status code. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type. More...
 

Protected Member Functions

uint32_t DeserializeFromPerStaProfileImpl (Buffer::Iterator start, uint16_t length, const MgtAssocResponseHeader &frame)
 Deserialize this header from a Per-STA Profile subelement of a Multi-Link Element. More...
 
uint32_t DeserializeImpl (Buffer::Iterator start)
 
uint32_t GetSerializedSizeImpl () const
 
uint32_t GetSerializedSizeInPerStaProfileImpl (const MgtAssocResponseHeader &frame) const
 
void PrintImpl (std::ostream &os) const
 
void SerializeImpl (Buffer::Iterator start) const
 
void SerializeInPerStaProfileImpl (Buffer::Iterator start, const MgtAssocResponseHeader &frame) const
 Serialize this header into a Per-STA Profile subelement of a Multi-Link Element. More...
 

Private Attributes

uint16_t m_aid {0}
 AID. More...
 
CapabilityInformation m_capability
 Capability information. More...
 
StatusCode m_code
 Status code. More...
 

Friends

class MgtHeaderInPerStaProfile< MgtAssocResponseHeader, AssocResponseElems >
 
class WifiMgtHeader< MgtAssocResponseHeader, AssocResponseElems >
 

Detailed Description

Implement the header for management frames of type association and reassociation response.

Definition at line 332 of file mgt-headers.h.

Constructor & Destructor Documentation

◆ ~MgtAssocResponseHeader()

ns3::MgtAssocResponseHeader::~MgtAssocResponseHeader ( )
overridedefault

Member Function Documentation

◆ Capabilities() [1/2]

CapabilityInformation & ns3::MgtAssocResponseHeader::Capabilities ( )
Returns
a reference to the Capability information

Definition at line 474 of file mgt-headers.cc.

References m_capability.

Referenced by ns3::ApWifiMac::GetAssocResp().

+ Here is the caller graph for this function:

◆ Capabilities() [2/2]

const CapabilityInformation & ns3::MgtAssocResponseHeader::Capabilities ( ) const
Returns
a const reference to the Capability information

Definition at line 468 of file mgt-headers.cc.

References m_capability.

◆ DeserializeFromPerStaProfileImpl()

uint32_t ns3::MgtAssocResponseHeader::DeserializeFromPerStaProfileImpl ( Buffer::Iterator  start,
uint16_t  length,
const MgtAssocResponseHeader frame 
)
protected

Deserialize this header from a Per-STA Profile subelement of a Multi-Link Element.

Parameters
startan iterator which points to where the header should be read from
lengththe expected number of bytes to read
framethe frame containing the Multi-Link Element
Returns
the number of bytes read

Definition at line 573 of file mgt-headers.cc.

References ns3::CapabilityInformation::Deserialize(), ns3::StatusCode::Deserialize(), ns3::Buffer::Iterator::GetDistanceFrom(), m_aid, m_capability, m_code, NS_ASSERT_MSG, and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

◆ DeserializeImpl()

uint32_t ns3::MgtAssocResponseHeader::DeserializeImpl ( Buffer::Iterator  start)
protected

Parameters
startan iterator which points to where the header should read from.
Returns
the number of bytes read.

This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.

Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.

Definition at line 549 of file mgt-headers.cc.

References ns3::CapabilityInformation::Deserialize(), ns3::StatusCode::Deserialize(), ns3::Buffer::Iterator::GetDistanceFrom(), m_aid, m_capability, m_code, ns3::Buffer::Iterator::ReadLsbtohU16(), and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

◆ GetAssociationId()

uint16_t ns3::MgtAssocResponseHeader::GetAssociationId ( ) const

Return the association ID.

Returns
the association ID

Definition at line 486 of file mgt-headers.cc.

References m_aid.

Referenced by ns3::StaWifiMac::ReceiveAssocResp().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::MgtAssocResponseHeader::GetInstanceTypeId ( void  ) const
override

Get the most derived TypeId for this Object.

This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Returns
The TypeId associated to the most-derived type of this instance.

Definition at line 450 of file mgt-headers.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetSerializedSizeImpl()

uint32_t ns3::MgtAssocResponseHeader::GetSerializedSizeImpl ( ) const
protected

Returns
the expected size of the header.

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.

Definition at line 492 of file mgt-headers.cc.

References ns3::CapabilityInformation::GetSerializedSize(), ns3::StatusCode::GetSerializedSize(), m_capability, and m_code.

+ Here is the call graph for this function:

◆ GetSerializedSizeInPerStaProfileImpl()

uint32_t ns3::MgtAssocResponseHeader::GetSerializedSizeInPerStaProfileImpl ( const MgtAssocResponseHeader frame) const
protected
Parameters
framethe frame containing the Multi-Link Element
Returns
the number of bytes that are needed to serialize this header into a Per-STA Profile subelement of the Multi-Link Element

Definition at line 505 of file mgt-headers.cc.

References ns3::CapabilityInformation::GetSerializedSize(), ns3::StatusCode::GetSerializedSize(), m_capability, and m_code.

+ Here is the call graph for this function:

◆ GetStatusCode()

StatusCode ns3::MgtAssocResponseHeader::GetStatusCode ( )

Return the status code.

Returns
the status code

Definition at line 456 of file mgt-headers.cc.

References m_code.

Referenced by ns3::ApWifiMac::GetLinkIdStaAddrMap(), ns3::StaWifiMac::ReceiveAssocResp(), and ns3::ApWifiMac::SetAid().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::MgtAssocResponseHeader::GetTypeId ( void  )
static

Register this type.

Returns
The TypeId.

Definition at line 440 of file mgt-headers.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintImpl()

void ns3::MgtAssocResponseHeader::PrintImpl ( std::ostream &  os) const
protected

Parameters
osoutput stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5

Definition at line 518 of file mgt-headers.cc.

References m_aid, and m_code.

◆ SerializeImpl()

void ns3::MgtAssocResponseHeader::SerializeImpl ( Buffer::Iterator  start) const
protected

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

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.

Definition at line 526 of file mgt-headers.cc.

References m_aid, m_capability, m_code, ns3::CapabilityInformation::Serialize(), ns3::StatusCode::Serialize(), two-ray-to-three-gpp-ch-calibration::start, and ns3::Buffer::Iterator::WriteHtolsbU16().

+ Here is the call graph for this function:

◆ SerializeInPerStaProfileImpl()

void ns3::MgtAssocResponseHeader::SerializeInPerStaProfileImpl ( Buffer::Iterator  start,
const MgtAssocResponseHeader frame 
) const
protected

Serialize this header into a Per-STA Profile subelement of a Multi-Link Element.

Parameters
startan iterator which points to where the header should be written
framethe frame containing the Multi-Link Element

Definition at line 538 of file mgt-headers.cc.

References m_capability, m_code, ns3::CapabilityInformation::Serialize(), ns3::StatusCode::Serialize(), and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

◆ SetAssociationId()

void ns3::MgtAssocResponseHeader::SetAssociationId ( uint16_t  aid)

Set the association ID.

Parameters
aidthe association ID

Definition at line 480 of file mgt-headers.cc.

References m_aid.

Referenced by ns3::ApWifiMac::SetAid().

+ Here is the caller graph for this function:

◆ SetStatusCode()

void ns3::MgtAssocResponseHeader::SetStatusCode ( StatusCode  code)

Set the status code.

Parameters
codethe status code

Definition at line 462 of file mgt-headers.cc.

References m_code.

Referenced by ns3::ApWifiMac::GetAssocResp().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ MgtHeaderInPerStaProfile< MgtAssocResponseHeader, AssocResponseElems >

Definition at line 325 of file mgt-headers.h.

◆ WifiMgtHeader< MgtAssocResponseHeader, AssocResponseElems >

Definition at line 325 of file mgt-headers.h.

Member Data Documentation

◆ m_aid

uint16_t ns3::MgtAssocResponseHeader::m_aid {0}
private

◆ m_capability

◆ m_code


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