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

Received power (W) per spectrum band. More...

#include "wifi-phy-common.h"

Collaboration diagram for ns3::RxPowerWattPerChannelBand:

Classes

struct  BandLess
 Comparator for heterogeneous lookup of entries by band. More...

Public Types

using const_iterator = container_type::const_iterator
 const iterator type
using container_type = std::vector<value_type>
 backing container type
using iterator = container_type::iterator
 iterator type
using size_type = std::size_t
 size type
using value_type = std::pair<WifiSpectrumBandInfo, Watt_u>
 (band, power) entry

Public Member Functions

iterator begin ()
const_iterator begin () const
const_iterator cbegin () const
const_iterator cend () const
bool empty () const
iterator end ()
const_iterator end () const
iterator find (const WifiSpectrumBandInfo &band)
 Map-like find by band.
const_iterator find (const WifiSpectrumBandInfo &band) const
 Map-like find by band.
std::pair< iterator, bool > insert (value_type v)
 Map-like sorted insert.
size_type size () const

Private Attributes

container_type m_data
 storage, kept in sorted-by-band order

Detailed Description

Received power (W) per spectrum band.

Map from WifiSpectrumBandInfo to Watt_u, backed by a band-sorted std::vector to avoid a node allocation per inserted band. Lookups are O(log n) via binary search.

Definition at line 254 of file wifi-phy-common.h.

Member Typedef Documentation

◆ const_iterator

using ns3::RxPowerWattPerChannelBand::const_iterator = container_type::const_iterator

const iterator type

Definition at line 260 of file wifi-phy-common.h.

◆ container_type

backing container type

Definition at line 258 of file wifi-phy-common.h.

◆ iterator

using ns3::RxPowerWattPerChannelBand::iterator = container_type::iterator

iterator type

Definition at line 259 of file wifi-phy-common.h.

◆ size_type

size type

Definition at line 261 of file wifi-phy-common.h.

◆ value_type

(band, power) entry

Definition at line 257 of file wifi-phy-common.h.

Member Function Documentation

◆ begin() [1/2]

iterator ns3::RxPowerWattPerChannelBand::begin ( )
inline
Returns
an iterator to the first entry

Definition at line 264 of file wifi-phy-common.h.

References m_data.

Referenced by ns3::PhyEntity::StartReceivePreamble().

Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator ns3::RxPowerWattPerChannelBand::begin ( ) const
inline
Returns
a const iterator to the first entry

Definition at line 276 of file wifi-phy-common.h.

References m_data.

◆ cbegin()

const_iterator ns3::RxPowerWattPerChannelBand::cbegin ( ) const
inline
Returns
a const iterator to the first entry

Definition at line 288 of file wifi-phy-common.h.

References m_data.

Referenced by ns3::HePhy::StartReceiveMuPayload().

Here is the caller graph for this function:

◆ cend()

const_iterator ns3::RxPowerWattPerChannelBand::cend ( ) const
inline
Returns
a const iterator one past the last entry

Definition at line 294 of file wifi-phy-common.h.

References m_data.

Referenced by ns3::HePhy::StartReceiveMuPayload().

Here is the caller graph for this function:

◆ empty()

bool ns3::RxPowerWattPerChannelBand::empty ( ) const
inline
Returns
true if no entries are held

Definition at line 306 of file wifi-phy-common.h.

References m_data.

◆ end() [1/2]

iterator ns3::RxPowerWattPerChannelBand::end ( )
inline
Returns
an iterator one past the last entry

Definition at line 270 of file wifi-phy-common.h.

References m_data.

Referenced by ns3::HePhy::StartReceiveMuPayload(), ns3::PhyEntity::StartReceivePreamble(), and ns3::Event::UpdateRxPowerW().

Here is the caller graph for this function:

◆ end() [2/2]

const_iterator ns3::RxPowerWattPerChannelBand::end ( ) const
inline
Returns
a const iterator one past the last entry

Definition at line 282 of file wifi-phy-common.h.

References m_data.

◆ find() [1/2]

iterator ns3::RxPowerWattPerChannelBand::find ( const WifiSpectrumBandInfo & band)
inline

Map-like find by band.

Parameters
bandthe band to look up
Returns
iterator to the entry, or end() if not found

Definition at line 316 of file wifi-phy-common.h.

References m_data.

Referenced by SpectrumWifiPhyFilterTest::RxCallback(), and ns3::Event::UpdateRxPowerW().

Here is the caller graph for this function:

◆ find() [2/2]

const_iterator ns3::RxPowerWattPerChannelBand::find ( const WifiSpectrumBandInfo & band) const
inline

Map-like find by band.

Parameters
bandthe band to look up
Returns
const iterator to the entry, or cend() if not found

Definition at line 331 of file wifi-phy-common.h.

References m_data.

◆ insert()

std::pair< iterator, bool > ns3::RxPowerWattPerChannelBand::insert ( value_type v)
inline

Map-like sorted insert.

No-op if a value with the same key is already present.

Parameters
vthe (band, power) pair to insert
Returns
pair of iterator to the entry and bool indicating whether the insertion happened

Definition at line 346 of file wifi-phy-common.h.

References m_data, and v.

Referenced by ns3::YansWifiChannel::Receive(), and ns3::SpectrumWifiPhy::StartRx().

Here is the caller graph for this function:

◆ size()

size_type ns3::RxPowerWattPerChannelBand::size ( ) const
inline
Returns
the number of entries

Definition at line 300 of file wifi-phy-common.h.

References m_data.

Referenced by SpectrumWifiPhyFilterTest::RxCallback(), and ns3::Event::UpdateRxPowerW().

Here is the caller graph for this function:

Member Data Documentation

◆ m_data

container_type ns3::RxPowerWattPerChannelBand::m_data
private

storage, kept in sorted-by-band order

Definition at line 383 of file wifi-phy-common.h.

Referenced by begin(), begin(), cbegin(), cend(), empty(), end(), end(), find(), find(), insert(), and size().


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