22 #include "ns3/double.h"
23 #include "ns3/eht-phy.h"
25 #include "ns3/wifi-net-device.h"
26 #include "ns3/wifi-phy.h"
27 #include "ns3/wifi-utils.h"
42 .AddAttribute(
"ObssPdLevel",
43 "The current OBSS PD level (dBm).",
47 MakeDoubleChecker<double>(-101, -62))
48 .AddAttribute(
"ObssPdLevelMin",
49 "Minimum value (dBm) of OBSS PD level.",
52 MakeDoubleChecker<double>(-101, -62))
53 .AddAttribute(
"ObssPdLevelMax",
54 "Maximum value (dBm) of OBSS PD level.",
57 MakeDoubleChecker<double>(-101, -62))
58 .AddAttribute(
"TxPowerRefSiso",
59 "The SISO reference TX power level (dBm).",
62 MakeDoubleChecker<double>())
63 .AddAttribute(
"TxPowerRefMimo",
64 "The MIMO reference TX power level (dBm).",
67 MakeDoubleChecker<double>())
68 .AddTraceSource(
"Reset",
69 "Trace CCA Reset event",
71 "ns3::ObssPdAlgorithm::ResetTracedCallback");
92 ehtPhy->SetObssPdAlgorithm(
this);
96 hePhy->SetObssPdAlgorithm(
this);
102 double txPowerMaxSiso = 0;
103 double txPowerMaxMimo = 0;
104 bool powerRestricted =
false;
108 uint8_t bssColor = heConfiguration->GetBssColor();
109 NS_LOG_DEBUG(
"My BSS color " << (uint16_t)bssColor <<
" received frame "
110 << (uint16_t)
params.bssColor);
117 powerRestricted =
true;
120 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(double level)
double m_obssPdLevelMax
Maximum OBSS PD level (dBm)
static TypeId GetTypeId()
Get the type ID.
double m_txPowerRefSiso
SISO reference TX power level (dBm)
Ptr< WifiNetDevice > m_device
Pointer to the WifiNetDevice.
double m_obssPdLevel
Current OBSS PD level (dBm)
double m_obssPdLevelMin
Minimum OBSS PD level (dBm)
double m_txPowerRefMimo
MIMO reference TX power level (dBm)
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.
double GetObssPdLevel() const
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< HeConfiguration > GetHeConfiguration() const
Ptr< WifiPhy > GetPhy() const
Ptr< PhyEntity > GetPhyEntity(WifiModulationClass modulation) const
Get the supported PHY entity corresponding to the modulation class.
#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.
double WToDbm(double w)
Convert from Watts to dBm.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Parameters for received HE-SIG-A for OBSS_PD based SR.