22 #include "ns3/double.h" 23 #include "ns3/uinteger.h" 39 .SetGroupName (
"Wifi")
40 .AddAttribute (
"ObssPdLevel",
41 "The current OBSS PD level.",
44 MakeDoubleChecker<double> (-101, -62))
45 .AddAttribute (
"ObssPdLevelMin",
46 "Minimum value (dBm) of OBSS PD level.",
49 MakeDoubleChecker<double> (-101, -62))
50 .AddAttribute (
"ObssPdLevelMax",
51 "Maximum value (dBm) of OBSS PD level.",
54 MakeDoubleChecker<double> (-101, -62))
55 .AddAttribute (
"TxPowerRefSiso",
56 "The SISO reference TX power level (dBm).",
59 MakeDoubleChecker<double> ())
60 .AddAttribute (
"TxPowerRefMimo",
61 "The MIMO reference TX power level (dBm).",
64 MakeDoubleChecker<double> ())
65 .AddTraceSource (
"Reset",
"Trace CCA Reset event",
67 "ns3::ObssPdAlgorithm::ResetTracedCallback")
89 double txPowerMaxSiso = 0;
90 double txPowerMaxMimo = 0;
91 bool powerRestricted =
false;
96 heConfiguration->GetAttribute (
"BssColor", bssColorAttribute);
97 uint8_t bssColor = bssColorAttribute.
Get ();
98 NS_LOG_DEBUG (
"My BSS color " << (uint16_t) bssColor <<
" received frame " << (uint16_t) params.
bssColor);
105 powerRestricted =
true;
108 phy->ResetCca (powerRestricted, txPowerMaxSiso, txPowerMaxMimo);
double m_txPowerRefSiso
SISO reference TX power level.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Ptr< HeConfiguration > GetHeConfiguration(void) const
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
double m_txPowerRefMimo
MIMO reference TX power level.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
static TypeId GetTypeId(void)
double m_obssPdLevelMin
Minimum OBSS PD level.
double m_obssPdLevelMax
Maximum OBSS PD level.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
uint8_t bssColor
BSS color.
double m_obssPdLevel
Current OBSS PD level.
Hold an unsigned integer type.
virtual void ConnectWifiNetDevice(const Ptr< WifiNetDevice > device)
Connect the WifiNetDevice and setup eventual callbacks.
Ptr< WifiPhy > GetPhy(void) const
Ptr< WifiNetDevice > m_device
Pointer to the WifiNetDevice.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double WToDbm(double w)
Convert from Watts to dBm.
virtual void DoDispose(void)
Destructor implementation.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void ResetPhy(HePreambleParameters params)
Reset PHY to IDLE.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
A base class which provides memory management and object aggregation.
TracedCallback< uint8_t, double, bool, double, double > m_resetEvent
This class can be used to hold variables of floating point type such as 'double' or 'float'...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.