11#include "ns3/double.h"
12#include "ns3/eht-phy.h"
14#include "ns3/wifi-net-device.h"
15#include "ns3/wifi-phy.h"
16#include "ns3/wifi-utils.h"
31 .AddAttribute(
"ObssPdLevel",
32 "The current OBSS PD level (dBm).",
37 .AddAttribute(
"ObssPdLevelMin",
38 "Minimum value (dBm) of OBSS PD level.",
42 .AddAttribute(
"ObssPdLevelMax",
43 "Maximum value (dBm) of OBSS PD level.",
47 .AddAttribute(
"TxPowerRefSiso",
48 "The SISO reference TX power level (dBm).",
52 .AddAttribute(
"TxPowerRefMimo",
53 "The MIMO reference TX power level (dBm).",
57 .AddTraceSource(
"Reset",
58 "Trace CCA Reset event",
60 "ns3::ObssPdAlgorithm::ResetTracedCallback");
76 auto phy = device->GetPhy();
81 ehtPhy->SetObssPdAlgorithm(
this);
85 hePhy->SetObssPdAlgorithm(
this);
91 dBm_u txPowerMaxSiso = 0;
92 dBm_u txPowerMaxMimo = 0;
93 bool powerRestricted =
false;
97 uint8_t bssColor = heConfiguration->GetBssColor();
98 NS_LOG_DEBUG(
"My BSS color " << (uint16_t)bssColor <<
" received frame "
99 << (uint16_t)params.bssColor);
106 powerRestricted =
true;
108 m_resetEvent(bssColor, params.rssi, powerRestricted, txPowerMaxSiso, txPowerMaxMimo);
109 phy->ResetCca(powerRestricted, txPowerMaxSiso, txPowerMaxMimo);
This class can be used to hold variables of floating point type such as 'double' or 'float'.
A base class which provides memory management and object aggregation.
void DoDispose() override
Destructor implementation.
void ResetPhy(HeSigAParameters params)
Reset PHY to IDLE.
void SetObssPdLevel(dBm_u level)
dBm_u m_obssPdLevel
Current OBSS PD level.
static TypeId GetTypeId()
Get the type ID.
dBm_u m_txPowerRefSiso
SISO reference TX power level.
dBm_u GetObssPdLevel() const
dBm_u m_obssPdLevelMin
Minimum OBSS PD level.
Ptr< WifiNetDevice > m_device
Pointer to the WifiNetDevice.
virtual void ConnectWifiNetDevice(const Ptr< WifiNetDevice > device)
Connect the WifiNetDevice and setup eventual callbacks.
TracedCallback< uint8_t, double, bool, double, double > m_resetEvent
TracedCallback signature for PHY reset events.
dBm_u m_obssPdLevelMax
Maximum OBSS PD level.
dBm_u m_txPowerRefMimo
MIMO reference TX power level.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
@ WIFI_MOD_CLASS_EHT
EHT (Clause 36)
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeDoubleChecker()
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
double dBm_u
dBm weak type
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Parameters for received HE-SIG-A for OBSS_PD based SR.