24 #include "ns3/double.h"
26 #include "ns3/wifi-net-device.h"
27 #include "ns3/wifi-phy.h"
28 #include "ns3/wifi-utils.h"
43 .AddAttribute(
"ObssPdLevel",
44 "The current OBSS PD level (dBm).",
48 MakeDoubleChecker<double>(-101, -62))
49 .AddAttribute(
"ObssPdLevelMin",
50 "Minimum value (dBm) of OBSS PD level.",
53 MakeDoubleChecker<double>(-101, -62))
54 .AddAttribute(
"ObssPdLevelMax",
55 "Maximum value (dBm) of OBSS PD level.",
58 MakeDoubleChecker<double>(-101, -62))
59 .AddAttribute(
"TxPowerRefSiso",
60 "The SISO reference TX power level (dBm).",
63 MakeDoubleChecker<double>())
64 .AddAttribute(
"TxPowerRefMimo",
65 "The MIMO reference TX power level (dBm).",
68 MakeDoubleChecker<double>())
69 .AddTraceSource(
"Reset",
70 "Trace CCA Reset event",
72 "ns3::ObssPdAlgorithm::ResetTracedCallback");
90 hePhy->SetObssPdAlgorithm(
this);
96 double txPowerMaxSiso = 0;
97 double txPowerMaxMimo = 0;
98 bool powerRestricted =
false;
102 uint8_t bssColor = heConfiguration->GetBssColor();
103 NS_LOG_DEBUG(
"My BSS color " << (uint16_t)bssColor <<
" received frame "
104 << (uint16_t)
params.bssColor);
111 powerRestricted =
true;
114 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,...
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#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_HE
HE (Clause 27)
Declaration of ns3::HePhy class and ns3::HeSigAParameters struct.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double WToDbm(double w)
Convert from Watts to dBm.
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.