A Discrete-Event Network Simulator
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2019 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
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  */
21 #ifndef WIFI_PPDU_H
22 #define WIFI_PPDU_H
24 #include <list>
25 #include "ns3/nstime.h"
26 #include "wifi-tx-vector.h"
27 #include "wifi-phy-header.h"
28 #include "wifi-phy-band.h"
30 namespace ns3 {
32 class WifiPsdu;
40 class WifiPpdu : public SimpleRefCount<WifiPpdu>
41 {
42 public:
51  WifiPpdu (Ptr<const WifiPsdu> psdu, WifiTxVector txVector, Time ppduDuration, WifiPhyBand band);
53  virtual ~WifiPpdu ();
59  WifiTxVector GetTxVector (void) const;
64  Ptr<const WifiPsdu> GetPsdu (void) const;
69  bool IsTruncatedTx (void) const;
73  void SetTruncatedTx (void);
78  Time GetTxDuration () const;
84  void Print (std::ostream &os) const;
86 private:
97  uint16_t m_channelWidth;
98  uint8_t m_txPowerLevel;
99 };
108 std::ostream& operator<< (std::ostream& os, const WifiPpdu &ppdu);
110 } //namespace ns3
112 #endif /* WIFI_PPDU_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:328
void SetTruncatedTx(void)
Indicate that the PPDU&#39;s transmission was aborted due to transmitter switch off.
Definition: wifi-ppdu.cc:340
Implements the IEEE 802.11ac PHY header (VHT-SIG-A1/A2/B).
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:132
HeSigHeader m_heSig
the HE-SIG PHY header
Definition: wifi-ppdu.h:91
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:32
void Print(std::ostream &os) const
Print the PPDU contents.
Definition: wifi-ppdu.cc:409
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:92
HtSigHeader m_htSig
the HT-SIG PHY header
Definition: wifi-ppdu.h:89
Implements the IEEE 802.11 OFDM and ERP OFDM L-SIG PHY header.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition: wifi-ppdu.h:40
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition: wifi-ppdu.h:96
bool IsTruncatedTx(void) const
Return true if the PPDU&#39;s transmission was aborted due to transmitter switch off. ...
Definition: wifi-ppdu.cc:334
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual ~WifiPpdu()
Definition: wifi-ppdu.cc:127
uint8_t m_txPowerLevel
the transmission power level (used only for TX and initializing the returned WifiTxVector) ...
Definition: wifi-ppdu.h:98
Implements the IEEE 802.11n PHY header (HT-SIG1/2).
bool m_truncatedTx
flag indicating whether the frame&#39;s transmission was aborted due to transmitter switch off ...
Definition: wifi-ppdu.h:95
Identifies the PHY band.
Definition: wifi-phy-band.h:30
Ptr< const WifiPsdu > m_psdu
the PSDU contained in this PPDU
Definition: wifi-ppdu.h:94
Implements the IEEE 802.11ax HE-SIG PHY header (HE-SIG-A1/A2/B)
This enumeration defines the modulation classes per (Table 9-4 "Modulation classes"; IEEE 802...
Definition: wifi-mode.h:36
Implements the IEEE 802.11 DSSS SIG PHY header.
DsssSigHeader m_dsssSig
the DSSS SIG PHY header
Definition: wifi-ppdu.h:87
LSigHeader m_lSig
the L-SIG PHY header
Definition: wifi-ppdu.h:88
VhtSigHeader m_vhtSig
the VHT-SIG PHY header
Definition: wifi-ppdu.h:90
WifiPpdu(Ptr< const WifiPsdu > psdu, WifiTxVector txVector, Time ppduDuration, WifiPhyBand band)
Create a single user PPDU storing a PSDU.
Definition: wifi-ppdu.cc:32
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: wifi-ppdu.h:97
Time GetTxDuration() const
Get the total transmission duration of the PPDU.
Definition: wifi-ppdu.cc:347
A template-based reference counting class.
WifiModulationClass m_modulation
the modulation used for the transmission of this PPDU
Definition: wifi-ppdu.h:93