|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/double.h"
24 #include "ns3/wifi-net-device.h"
25 #include "ns3/wifi-phy.h"
27 #include "ns3/wifi-utils.h"
39 .SetGroupName (
"Wifi")
40 .AddAttribute (
"ObssPdLevel",
41 "The current OBSS PD level (dBm).",
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;
95 uint8_t bssColor = heConfiguration->GetBssColor ();
96 NS_LOG_DEBUG (
"My BSS color " << (uint16_t) bssColor <<
" received frame " << (uint16_t) params.
bssColor);
103 powerRestricted =
true;
106 phy->ResetCca (powerRestricted, txPowerMaxSiso, txPowerMaxMimo);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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 (dBm)
uint8_t bssColor
BSS color.
Ptr< WifiPhy > GetPhy(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double WToDbm(double w)
Convert from Watts to dBm.
Declaration of ns3::HePhy class and ns3::HeSigAParameters struct.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void DoDispose(void) override
Destructor implementation.
double m_obssPdLevel
Current OBSS PD level (dBm)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< WifiNetDevice > m_device
Pointer to the WifiNetDevice.
Ptr< HeConfiguration > GetHeConfiguration(void) const
A base class which provides memory management and object aggregation.
double m_txPowerRefSiso
SISO reference TX power level (dBm)
virtual void ConnectWifiNetDevice(const Ptr< WifiNetDevice > device)
Connect the WifiNetDevice and setup eventual callbacks.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
TracedCallback< uint8_t, double, bool, double, double > m_resetEvent
TracedCallback signature for PHY reset events.
#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 ",...
static TypeId GetTypeId(void)
Get the type ID.
double m_obssPdLevelMax
Maximum OBSS PD level (dBm)
Parameters for received HE-SIG-A for OBSS_PD based SR.
double m_obssPdLevelMin
Minimum OBSS PD level (dBm)
void ResetPhy(HeSigAParameters params)
Reset PHY to IDLE.