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"
29 namespace ns3 {
31 class WifiPsdu;
39 class WifiPpdu : public SimpleRefCount<WifiPpdu>
40 {
41 public:
50  WifiPpdu (Ptr<const WifiPsdu> psdu, WifiTxVector txVector, Time ppduDuration, uint16_t frequency);
52  virtual ~WifiPpdu ();
58  WifiTxVector GetTxVector (void) const;
63  Ptr<const WifiPsdu> GetPsdu (void) const;
68  bool IsTruncatedTx (void) const;
72  void SetTruncatedTx (void);
77  Time GetTxDuration () const;
83  void Print (std::ostream &os) const;
85 private:
95  uint16_t m_frequency;
96  uint16_t m_channelWidth;
97  uint8_t m_txPowerLevel;
98 };
107 std::ostream& operator<< (std::ostream& os, const WifiPpdu &ppdu);
109 } //namespace ns3
111 #endif /* WIFI_PPDU_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
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...
WifiPpdu(Ptr< const WifiPsdu > psdu, WifiTxVector txVector, Time ppduDuration, uint16_t frequency)
Create a single user PPDU storing a PSDU.
Definition: wifi-ppdu.cc:32
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:511
void SetTruncatedTx(void)
Indicate that the PPDU&#39;s transmission was aborted due to transmitter switch off.
Definition: wifi-ppdu.cc:523
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:90
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:592
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:91
HtSigHeader m_htSig
the HT-SIG PHY header
Definition: wifi-ppdu.h:88
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:39
bool IsTruncatedTx(void) const
Return true if the PPDU&#39;s transmission was aborted due to transmitter switch off. ...
Definition: wifi-ppdu.cc:517
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:97
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:94
Ptr< const WifiPsdu > m_psdu
the PSDU contained in this PPDU
Definition: wifi-ppdu.h:93
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:86
LSigHeader m_lSig
the L-SIG PHY header
Definition: wifi-ppdu.h:87
VhtSigHeader m_vhtSig
the VHT-SIG PHY header
Definition: wifi-ppdu.h:89
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: wifi-ppdu.h:96
Time GetTxDuration() const
Get the total transmission duration of the PPDU.
Definition: wifi-ppdu.cc:530
uint16_t m_frequency
the frequency used to transmit that PPDU in MHz
Definition: wifi-ppdu.h:95
A template-based reference counting class.
WifiModulationClass m_modulation
the modulation used for the transmission of this PPDU
Definition: wifi-ppdu.h:92