A Discrete-Event Network Simulator
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
18namespace ns3
19{
20
21NS_LOG_COMPONENT_DEFINE("ErpOfdmPpdu");
22
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
32void
34{
36 txVector.SetChannelWidth(20);
37}
38
41{
42 return Ptr<WifiPpdu>(new ErpOfdmPpdu(*this), false);
43}
44
45} // 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.
void SetTxVectorFromLSigHeader(WifiTxVector &txVector, const LSigHeader &lSig) const override
Fill in the TXVECTOR from L-SIG header.
ErpOfdmPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid)
Create an ERP-OFDM PPDU.
OFDM and ERP OFDM L-SIG PHY header.
Definition ofdm-ppdu.h:43
uint64_t GetRate(MHz_u channelWidth=20) const
Return the RATE field of L-SIG (in bit/s).
Definition ofdm-ppdu.cc:147
OFDM PPDU (11a)
Definition ofdm-ppdu.h:36
Smart pointer class similar to boost::intrusive_ptr.
Class that keeps track of all information about the current PHY operating channel.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Declaration of ns3::ErpOfdmPhy class.
Declaration of ns3::ErpOfdmPpdu class.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.