1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 /* 3 * Copyright (c) 2018 University of Washington 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation; 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * 18 * Author: Sébastien Deronne <sebastien.deronne@gmail.com> 19 */ 20 21 #ifndef CONSTANT_OBSS_PD_ALGORITHM_H 22 #define CONSTANT_OBSS_PD_ALGORITHM_H 23 24 #include "obss-pd-algorithm.h" 25 26 namespace ns3 { 27 28 /** 29 * \brief Constant OBSS PD algorithm 30 * \ingroup wifi 31 * 32 * This constant OBSS_PD algorithm is a simple OBSS_PD algorithm which evaluates if a receiving 33 * signal should be accepted or rejected based on a constant threshold. 34 * 35 * Once a HE-SIG-A has been received by the PHY, the ReceiveHeSigA method is 36 * triggered. The algorithm then checks whether this is an OBSS frame by comparing its own BSS 37 * color with the BSS color of the received preamble. If this is an OBSS frame, it compares the 38 * received RSSI with its configured OBSS_PD level value. The PHY then gets reset to IDLE state 39 * in case the received RSSI is lower than that constant OBSS PD level value, and is informed 40 * about TX power restrictions that might be applied to the next transmission. 41 */ 42 class ConstantObssPdAlgorithm : public ObssPdAlgorithm 43 { 44 public: 45 ConstantObssPdAlgorithm (); 46 47 /** 48 * \brief Get the type ID. 49 * \return the object TypeId 50 */ 51 static TypeId GetTypeId (void); 52 53 void ConnectWifiNetDevice (const Ptr<WifiNetDevice> device) override; 54 void ReceiveHeSigA (HeSigAParameters params) override; 55 }; 56 57 } //namespace ns3 58 59 #endif /* CONSTANT_OBSS_PD_ALGORITHM_H */ 60