A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
erp-ofdm-ppdu.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Orange Labs
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Rediet <getachew.redieteab@orange.com>
7
* Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
8
*/
9
10
#include "
erp-ofdm-ppdu.h
"
11
12
#include "
erp-ofdm-phy.h
"
13
14
#include "ns3/log.h"
15
#include "ns3/wifi-phy-operating-channel.h"
16
#include "ns3/wifi-psdu.h"
17
18
namespace
ns3
19
{
20
21
NS_LOG_COMPONENT_DEFINE
(
"ErpOfdmPpdu"
);
22
23
ErpOfdmPpdu::ErpOfdmPpdu
(
Ptr<const WifiPsdu>
psdu,
24
const
WifiTxVector
& txVector,
25
const
WifiPhyOperatingChannel
& channel,
26
uint64_t uid)
27
:
OfdmPpdu
(psdu, txVector, channel, uid, true)
// add LSigHeader of OfdmPpdu
28
{
29
NS_LOG_FUNCTION
(
this
<< psdu << txVector << channel << uid);
30
}
31
32
void
33
ErpOfdmPpdu::SetTxVectorFromLSigHeader
(
WifiTxVector
& txVector,
const
LSigHeader
& lSig)
const
34
{
35
txVector.
SetMode
(
ErpOfdmPhy::GetErpOfdmRate
(lSig.
GetRate
()));
36
txVector.
SetChannelWidth
(20);
37
}
38
39
Ptr<WifiPpdu>
40
ErpOfdmPpdu::Copy
()
const
41
{
42
return
Ptr<WifiPpdu>
(
new
ErpOfdmPpdu
(*
this
),
false
);
43
}
44
45
}
// 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:126
ns3::ErpOfdmPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition
erp-ofdm-ppdu.cc:40
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:33
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:23
ns3::OfdmPpdu::LSigHeader
OFDM and ERP OFDM L-SIG PHY header.
Definition
ofdm-ppdu.h:43
ns3::OfdmPpdu::LSigHeader::GetRate
uint64_t GetRate(MHz_u channelWidth=20) const
Return the RATE field of L-SIG (in bit/s).
Definition
ofdm-ppdu.cc:147
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition
ofdm-ppdu.h:36
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::WifiPhyOperatingChannel
Class that keeps track of all information about the current PHY operating channel.
Definition
wifi-phy-operating-channel.h:62
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:101
ns3::WifiTxVector::SetChannelWidth
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
Definition
wifi-tx-vector.cc:301
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition
wifi-tx-vector.cc:273
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:191
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:229
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
non-ht
erp-ofdm-ppdu.cc
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0