A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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-phy-operating-channel.h"
27
#include "ns3/wifi-psdu.h"
28
29
namespace
ns3
30
{
31
32
NS_LOG_COMPONENT_DEFINE
(
"ErpOfdmPpdu"
);
33
34
ErpOfdmPpdu::ErpOfdmPpdu
(
Ptr<const WifiPsdu>
psdu,
35
const
WifiTxVector
& txVector,
36
const
WifiPhyOperatingChannel
&
channel
,
37
uint64_t uid)
38
:
OfdmPpdu
(psdu, txVector,
channel
, uid, true)
// add LSigHeader of OfdmPpdu
39
{
40
NS_LOG_FUNCTION
(
this
<< psdu << txVector <<
channel
<< uid);
41
}
42
43
void
44
ErpOfdmPpdu::SetTxVectorFromLSigHeader
(
WifiTxVector
& txVector,
const
LSigHeader
& lSig)
const
45
{
46
txVector.
SetMode
(
ErpOfdmPhy::GetErpOfdmRate
(lSig.
GetRate
()));
47
txVector.
SetChannelWidth
(20);
48
}
49
50
Ptr<WifiPpdu>
51
ErpOfdmPpdu::Copy
()
const
52
{
53
return
Ptr<WifiPpdu>
(
new
ErpOfdmPpdu
(*
this
),
false
);
54
}
55
56
}
// namespace ns3
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:134
ns3::ErpOfdmPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition:
erp-ofdm-ppdu.cc:51
ns3::ErpOfdmPpdu::SetTxVectorFromLSigHeader
void SetTxVectorFromLSigHeader(WifiTxVector &txVector, const LSigHeader &lSig) const override
Fill in the TXVECTOR from L-SIG header.
Definition:
erp-ofdm-ppdu.cc:44
ns3::ErpOfdmPpdu::ErpOfdmPpdu
ErpOfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid)
Create an ERP-OFDM PPDU.
Definition:
erp-ofdm-ppdu.cc:34
ns3::OfdmPpdu::LSigHeader
OFDM and ERP OFDM L-SIG PHY header.
Definition:
ofdm-ppdu.h:54
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:158
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition:
ofdm-ppdu.h:47
ns3::Ptr< const WifiPsdu >
ns3::WifiPhyOperatingChannel
Class that keeps track of all information about the current PHY operating channel.
Definition:
wifi-phy-operating-channel.h:47
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:111
ns3::WifiTxVector::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
Definition:
wifi-tx-vector.cc:312
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition:
wifi-tx-vector.cc:284
erp-ofdm-phy.h
Declaration of ns3::ErpOfdmPhy class.
erp-ofdm-ppdu.h
Declaration of ns3::ErpOfdmPpdu class.
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
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:240
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
third.channel
channel
Definition:
third.py:88
src
wifi
model
non-ht
erp-ofdm-ppdu.cc
Generated on Sun Mar 3 2024 17:11:11 for ns-3 by
1.9.1