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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18 */
19
20#ifndef OBSS_PD_ALGORITHM_H
21#define OBSS_PD_ALGORITHM_H
22
23#include "he-configuration.h"
24
25#include "ns3/object.h"
26#include "ns3/traced-callback.h"
27
28namespace ns3
29{
30
31struct HeSigAParameters;
32
33class WifiNetDevice;
34
35/**
36 * \brief OBSS PD algorithm interface
37 * \ingroup wifi
38 *
39 * This object provides the interface for all OBSS_PD algorithms
40 * and is designed to be subclassed.
41 *
42 * OBSS_PD stands for Overlapping Basic Service Set Preamble-Detection.
43 * OBSS_PD is an 802.11ax feature that allows a STA, under specific
44 * conditions, to ignore an inter-BSS PPDU.
45 */
46class ObssPdAlgorithm : public Object
47{
48 public:
49 /**
50 * \brief Get the type ID.
51 * \return the object TypeId
52 */
53 static TypeId GetTypeId();
54
55 /**
56 * Connect the WifiNetDevice and setup eventual callbacks.
57 *
58 * \param device the WifiNetDevice
59 */
60 virtual void ConnectWifiNetDevice(const Ptr<WifiNetDevice> device);
61
62 /**
63 * Reset PHY to IDLE.
64 * \param params HeSigAParameters causing PHY reset
65 */
66 void ResetPhy(HeSigAParameters params);
67
68 /**
69 * \param params the HE-SIG-A parameters
70 *
71 * Evaluate the receipt of HE-SIG-A.
72 */
73 virtual void ReceiveHeSigA(HeSigAParameters params) = 0;
74
75 /**
76 * TracedCallback signature for OBSS_PD reset events.
77 *
78 * \param [in] bssColor The BSS color of frame triggering the reset
79 * \param [in] rssiDbm The RSSI (dBm) of frame triggering the reset
80 * \param [in] powerRestricted Whether a TX power restriction is triggered
81 * \param [in] txPowerMaxDbmSiso The SISO TX power restricted level (dBm)
82 * \param [in] txPowerMaxDbmMimo The MIMO TX power restricted level (dBm)
83 */
84 typedef void (*ResetTracedCallback)(uint8_t bssColor,
85 double rssiDbm,
86 bool powerRestricted,
87 double txPowerMaxDbmSiso,
88 double txPowerMaxDbmMimo);
89
90 /**
91 * \param level the current OBSS PD level in dBm
92 */
93 void SetObssPdLevel(double level);
94 /**
95 * \return the current OBSS PD level in dBm.
96 */
97 double GetObssPdLevel() const;
98
99 protected:
100 void DoDispose() override;
101
102 Ptr<WifiNetDevice> m_device; ///< Pointer to the WifiNetDevice
103
104 private:
105 double m_obssPdLevel; ///< Current OBSS PD level (dBm)
106 double m_obssPdLevelMin; ///< Minimum OBSS PD level (dBm)
107 double m_obssPdLevelMax; ///< Maximum OBSS PD level (dBm)
108 double m_txPowerRefSiso; ///< SISO reference TX power level (dBm)
109 double m_txPowerRefMimo; ///< MIMO reference TX power level (dBm)
110
111 /**
112 * TracedCallback signature for PHY reset events.
113 */
115};
116
117} // namespace ns3
118
119#endif /* OBSS_PD_ALGORITHM_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
OBSS PD algorithm interface.
void DoDispose() override
Destructor implementation.
void ResetPhy(HeSigAParameters params)
Reset PHY to IDLE.
void SetObssPdLevel(double level)
virtual void ReceiveHeSigA(HeSigAParameters params)=0
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)
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.
double GetObssPdLevel() const
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
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:54