A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
erp-ofdm-ppdu.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2020 Orange Labs
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: Rediet <getachew.redieteab@orange.com>
19
* Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
20
*/
21
22
#include "ns3/wifi-psdu.h"
23
#include "
erp-ofdm-phy.h
"
24
#include "
erp-ofdm-ppdu.h
"
25
#include "ns3/log.h"
26
27
namespace
ns3
{
28
29
NS_LOG_COMPONENT_DEFINE
(
"ErpOfdmPpdu"
);
30
31
ErpOfdmPpdu::ErpOfdmPpdu
(
Ptr<const WifiPsdu>
psdu,
const
WifiTxVector
& txVector,
32
WifiPhyBand
band, uint64_t uid)
33
:
OfdmPpdu
(psdu, txVector, band, uid, true)
//instantiate LSigHeader of OfdmPpdu
34
{
35
NS_LOG_FUNCTION
(
this
<< psdu << txVector << band << uid);
36
}
37
38
ErpOfdmPpdu::~ErpOfdmPpdu
()
39
{
40
}
41
42
WifiTxVector
43
ErpOfdmPpdu::DoGetTxVector
(
void
)
const
44
{
45
WifiTxVector
txVector;
46
txVector.
SetPreambleType
(
m_preamble
);
47
NS_ASSERT
(
m_channelWidth
== 20);
48
txVector.
SetMode
(
ErpOfdmPhy::GetErpOfdmRate
(
m_lSig
.
GetRate
()));
49
txVector.
SetChannelWidth
(
m_channelWidth
);
50
return
txVector;
51
}
52
53
Ptr<WifiPpdu>
54
ErpOfdmPpdu::Copy
(
void
)
const
55
{
56
return
Create<ErpOfdmPpdu> (
GetPsdu
(),
GetTxVector
(),
m_band
,
m_uid
);
57
}
58
59
}
//namespace ns3
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition:
ofdm-ppdu.h:48
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:205
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition:
assert.h:67
erp-ofdm-ppdu.h
Declaration of ns3::ErpOfdmPpdu class.
ns3::ErpOfdmPpdu::DoGetTxVector
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition:
erp-ofdm-ppdu.cc:43
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiPpdu::GetTxVector
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
Definition:
wifi-ppdu.cc:63
ns3::OfdmPpdu::m_channelWidth
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition:
ofdm-ppdu.h:127
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition:
wifi-tx-vector.cc:226
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition:
wifi-tx-vector.h:71
ns3::ErpOfdmPpdu::ErpOfdmPpdu
ErpOfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band, uint64_t uid)
Create an ERP-OFDM PPDU.
Definition:
erp-ofdm-ppdu.cc:31
ns3::Ptr< const WifiPsdu >
ns3::ErpOfdmPhy::GetErpOfdmRate
static WifiMode GetErpOfdmRate(uint64_t rate)
Return a WifiMode for ERP-OFDM corresponding to the provided rate.
Definition:
erp-ofdm-phy.cc:123
ns3::OfdmPpdu::m_lSig
LSigHeader m_lSig
the L-SIG PHY header
Definition:
ofdm-ppdu.h:128
ns3::WifiTxVector::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
Definition:
wifi-tx-vector.cc:254
ns3::OfdmPpdu::m_band
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition:
ofdm-ppdu.h:126
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition:
log-macros-enabled.h:244
ns3::ErpOfdmPpdu::~ErpOfdmPpdu
virtual ~ErpOfdmPpdu()
Destructor for ErpOfdmPpdu.
Definition:
erp-ofdm-ppdu.cc:38
ns3::ErpOfdmPpdu::Copy
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition:
erp-ofdm-ppdu.cc:54
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition:
wifi-phy-band.h:33
ns3::WifiPpdu::m_uid
uint64_t m_uid
the unique ID of this PPDU
Definition:
wifi-ppdu.h:182
ns3::OfdmPpdu::LSigHeader::GetRate
uint64_t GetRate(uint16_t channelWidth=20) const
Return the RATE field of L-SIG (in bit/s).
Definition:
ofdm-ppdu.cc:173
ns3::WifiPpdu::GetPsdu
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition:
wifi-ppdu.cc:79
ns3::WifiPpdu::m_preamble
WifiPreamble m_preamble
the PHY preamble
Definition:
wifi-ppdu.h:179
ns3::WifiTxVector::SetPreambleType
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
Definition:
wifi-tx-vector.cc:248
erp-ofdm-phy.h
Declaration of ns3::ErpOfdmPhy class.
src
wifi
model
non-ht
erp-ofdm-ppdu.cc
Generated on Fri Oct 1 2021 17:03:46 for ns-3 by
1.8.20