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

Implement the header for management frames of type beacon. More...

#include "mgt-headers.h"

Inheritance diagram for ns3::MgtBeaconHeader:
Collaboration diagram for ns3::MgtBeaconHeader:

Public Member Functions

 ~MgtBeaconHeader () override=default
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
uint64_t GetTimestamp () const

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.

Public Attributes

uint64_t m_beaconInterval {0}
 Beacon interval (microseconds).
CapabilityInformation m_capability
 Capability information.

Protected Member Functions

uint32_t DeserializeImpl (Buffer::Iterator start)
uint32_t GetSerializedSizeImpl () const
void SerializeImpl (Buffer::Iterator start) const

Private Attributes

uint64_t m_timestamp {0}
 Timestamp (microseconds).

Friends

class WifiMgtHeader< MgtBeaconHeader, BeaconElems >

Detailed Description

Implement the header for management frames of type beacon.

Introspection did not find any typical Config paths
No Attributes are defined for this type
No TraceSources are defined for this type
Group: Wifi
Size of this type is 1640 bytes (on a 64-bit architecture).


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

Constructor & Destructor Documentation

◆ ~MgtBeaconHeader()

ns3::MgtBeaconHeader::~MgtBeaconHeader ( )
overridedefault

Member Function Documentation

◆ DeserializeImpl()

uint32_t ns3::MgtBeaconHeader::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 166 of file mgt-headers.cc.

References ns3::Buffer::Iterator::GetDistanceFrom(), m_beaconInterval, m_capability, m_timestamp, ns3::Buffer::Iterator::ReadU16(), and ns3::Buffer::Iterator::ReadU64().

Here is the call graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::MgtBeaconHeader::GetInstanceTypeId ( ) const
override

Get the most derived TypeId for this Object.

This method is provided by ns3::Object::GetInstanceTypeId but classes which derive from ns3::ObjectBase directly have to implement it themselves. Typically, this method should simply return the output of GetTypeId().

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

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

References GetTypeId().

Here is the call graph for this function:

◆ GetSerializedSizeImpl()

uint32_t ns3::MgtBeaconHeader::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 147 of file mgt-headers.cc.

References m_capability.

◆ GetTimestamp()

uint64_t ns3::MgtBeaconHeader::GetTimestamp ( ) const
Returns
the time stamp

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

References m_timestamp.

Referenced by ns3::PowerSaveManager::NotifyReceivedBeacon().

Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::MgtBeaconHeader::GetTypeId ( )
static

Register this type.

Returns
The TypeId.

Definition at line 125 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:

◆ SerializeImpl()

void ns3::MgtBeaconHeader::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 156 of file mgt-headers.cc.

References m_beaconInterval, m_capability, ns3::Simulator::Now(), ns3::Buffer::Iterator::WriteU16(), and ns3::Buffer::Iterator::WriteU64().

Here is the call graph for this function:

◆ WifiMgtHeader< MgtBeaconHeader, BeaconElems >

friend class WifiMgtHeader< MgtBeaconHeader, BeaconElems >
friend

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

Member Data Documentation

◆ m_beaconInterval

uint64_t ns3::MgtBeaconHeader::m_beaconInterval {0}

◆ m_capability

CapabilityInformation ns3::MgtBeaconHeader::m_capability

◆ m_timestamp

uint64_t ns3::MgtBeaconHeader::m_timestamp {0}
private

Timestamp (microseconds).

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

Referenced by DeserializeImpl(), and GetTimestamp().


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