A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
obss-pd-algorithm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 University of Washington
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#ifndef OBSS_PD_ALGORITHM_H
10#define OBSS_PD_ALGORITHM_H
11
12#include "he-configuration.h"
13
14#include "ns3/object.h"
15#include "ns3/traced-callback.h"
16#include "ns3/wifi-units.h"
17
18namespace ns3
19{
20
21struct HeSigAParameters;
22
23class WifiNetDevice;
24
25/**
26 * \brief OBSS PD algorithm interface
27 * \ingroup wifi
28 *
29 * This object provides the interface for all OBSS_PD algorithms
30 * and is designed to be subclassed.
31 *
32 * OBSS_PD stands for Overlapping Basic Service Set Preamble-Detection.
33 * OBSS_PD is an 802.11ax feature that allows a STA, under specific
34 * conditions, to ignore an inter-BSS PPDU.
35 */
36class ObssPdAlgorithm : public Object
37{
38 public:
39 /**
40 * \brief Get the type ID.
41 * \return the object TypeId
42 */
43 static TypeId GetTypeId();
44
45 /**
46 * Connect the WifiNetDevice and setup eventual callbacks.
47 *
48 * \param device the WifiNetDevice
49 */
50 virtual void ConnectWifiNetDevice(const Ptr<WifiNetDevice> device);
51
52 /**
53 * Reset PHY to IDLE.
54 * \param params HeSigAParameters causing PHY reset
55 */
56 void ResetPhy(HeSigAParameters params);
57
58 /**
59 * \param params the HE-SIG-A parameters
60 *
61 * Evaluate the receipt of HE-SIG-A.
62 */
63 virtual void ReceiveHeSigA(HeSigAParameters params) = 0;
64
65 /**
66 * TracedCallback signature for OBSS_PD reset events.
67 *
68 * \param [in] bssColor The BSS color of frame triggering the reset
69 * \param [in] rssiDbm The RSSI (dBm) of frame triggering the reset
70 * \param [in] powerRestricted Whether a TX power restriction is triggered
71 * \param [in] txPowerMaxDbmSiso The SISO TX power restricted level (dBm)
72 * \param [in] txPowerMaxDbmMimo The MIMO TX power restricted level (dBm)
73 */
74 typedef void (*ResetTracedCallback)(uint8_t bssColor,
75 double rssiDbm,
76 bool powerRestricted,
77 double txPowerMaxDbmSiso,
78 double txPowerMaxDbmMimo);
79
80 /**
81 * \param level the current OBSS PD level
82 */
83 void SetObssPdLevel(dBm_u level);
84 /**
85 * \return the current OBSS PD level
86 */
87 dBm_u GetObssPdLevel() const;
88
89 protected:
90 void DoDispose() override;
91
92 Ptr<WifiNetDevice> m_device; ///< Pointer to the WifiNetDevice
93
94 private:
95 dBm_u m_obssPdLevel; ///< Current OBSS PD level
96 dBm_u m_obssPdLevelMin; ///< Minimum OBSS PD level
97 dBm_u m_obssPdLevelMax; ///< Maximum OBSS PD level
98 dBm_u m_txPowerRefSiso; ///< SISO reference TX power level
99 dBm_u m_txPowerRefMimo; ///< MIMO reference TX power level
100
101 /**
102 * TracedCallback signature for PHY reset events.
103 */
105};
106
107} // namespace ns3
108
109#endif /* OBSS_PD_ALGORITHM_H */
A base class which provides memory management and object aggregation.
Definition object.h:78
OBSS PD algorithm interface.
void DoDispose() override
Destructor implementation.
void ResetPhy(HeSigAParameters params)
Reset PHY to IDLE.
virtual void ReceiveHeSigA(HeSigAParameters params)=0
void SetObssPdLevel(dBm_u level)
dBm_u m_obssPdLevel
Current OBSS PD level.
static TypeId GetTypeId()
Get the type ID.
dBm_u m_txPowerRefSiso
SISO reference TX power level.
dBm_u m_obssPdLevelMin
Minimum OBSS PD level.
Ptr< WifiNetDevice > m_device
Pointer to the WifiNetDevice.
void(* ResetTracedCallback)(uint8_t bssColor, double rssiDbm, bool powerRestricted, double txPowerMaxDbmSiso, double txPowerMaxDbmMimo)
TracedCallback signature for OBSS_PD reset events.
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.
dBm_u m_obssPdLevelMax
Maximum OBSS PD level.
dBm_u m_txPowerRefMimo
MIMO reference TX power level.
Smart pointer class similar to boost::intrusive_ptr.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters for received HE-SIG-A for OBSS_PD based SR.
Definition he-phy.h:44