23 #include "ns3/config.h" 24 #include "ns3/double.h" 25 #include "ns3/uinteger.h" 49 .SetGroupName (
"Wifi")
69 if (
mac && !
mac->IsAssociated ())
71 NS_LOG_DEBUG (
"This is not an associated STA: skip OBSS PD algorithm");
78 heConfiguration->GetAttribute (
"BssColor", bssColorAttribute);
79 uint8_t bssColor = bssColorAttribute.
Get ();
93 bool isObss = (bssColor != params.
bssColor);
103 NS_LOG_DEBUG (
"Frame is OBSS and RSSI is above OBSS-PD level");
ConstantObssPdAlgorithm()
#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.
static TypeId GetTypeId(void)
#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.
OBSS PD algorithm interfaceThis object provides the interface for all OBSS_PD algorithms and is desig...
uint8_t bssColor
BSS color.
void ReceiveHeSig(HePreambleParameters params)
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.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
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.
void ResetPhy(HePreambleParameters params)
Reset PHY to IDLE.
Ptr< WifiMac > GetMac(void) const
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Constant OBSS PD algorithmThis constant OBSS_PD algorithm is a simple OBSS_PD algorithm which evalute...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void ConnectWifiNetDevice(const Ptr< WifiNetDevice > device)
Connect the WifiNetDevice and setup eventual callbacks.
The Wifi MAC high model for a non-AP STA in a BSS.