A Discrete-Event Network Simulator
API
erp-ofdm-ppdu.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
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: Rediet <getachew.redieteab@orange.com>
18 * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
19 */
20
21#include "erp-ofdm-ppdu.h"
22
23#include "erp-ofdm-phy.h"
24
25#include "ns3/log.h"
26#include "ns3/wifi-psdu.h"
27
28namespace ns3
29{
30
31NS_LOG_COMPONENT_DEFINE("ErpOfdmPpdu");
32
34 const WifiTxVector& txVector,
35 uint16_t txCenterFreq,
36 WifiPhyBand band,
37 uint64_t uid)
38 : OfdmPpdu(psdu, txVector, txCenterFreq, band, uid, true) // instantiate LSigHeader of OfdmPpdu
39{
40 NS_LOG_FUNCTION(this << psdu << txVector << txCenterFreq << band << uid);
41}
42
44{
45}
46
49{
50 WifiTxVector txVector;
55 return txVector;
56}
57
60{
61 return Create<ErpOfdmPpdu>(GetPsdu(), GetTxVector(), m_txCenterFreq, m_band, m_uid);
62}
63
64} // namespace ns3
static WifiMode GetErpOfdmRate(uint64_t rate)
Return a WifiMode for ERP-OFDM corresponding to the provided rate.
Ptr< WifiPpdu > Copy() const override
Copy this instance.
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
ErpOfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, WifiPhyBand band, uint64_t uid)
Create an ERP-OFDM PPDU.
~ErpOfdmPpdu() override
Destructor for ErpOfdmPpdu.
uint64_t GetRate(uint16_t channelWidth=20) const
Return the RATE field of L-SIG (in bit/s).
Definition: ofdm-ppdu.cc:176
OFDM PPDU (11a)
Definition: ofdm-ppdu.h:48
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition: ofdm-ppdu.h:130
LSigHeader m_lSig
the L-SIG PHY header
Definition: ofdm-ppdu.h:132
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: ofdm-ppdu.h:131
uint16_t m_txCenterFreq
the center frequency (MHz) used for the transmission of this PPDU
Definition: wifi-ppdu.h:196
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:193
Ptr< const WifiPsdu > GetPsdu() const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:91
uint64_t m_uid
the unique ID of this PPDU
Definition: wifi-ppdu.h:197
WifiTxVector GetTxVector() const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:74
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
Declaration of ns3::ErpOfdmPhy class.
Declaration of ns3::ErpOfdmPpdu class.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
Every class exported by the ns3 library is enclosed in the ns3 namespace.