A Discrete-Event Network Simulator
API
dsss-ppdu.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 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
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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  * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
20  * S├ębastien Deronne <sebastien.deronne@gmail.com> (DsssSigHeader)
21  */
22 
23 #ifndef DSSS_PPDU_H
24 #define DSSS_PPDU_H
25 
26 #include "ns3/wifi-ppdu.h"
27 #include "ns3/header.h"
28 
35 namespace ns3 {
36 
37 class WifiPsdu;
38 
45 class DsssPpdu : public WifiPpdu
46 {
47 public:
48 
53  class DsssSigHeader : public Header
54  {
55  public:
56  DsssSigHeader ();
57  virtual ~DsssSigHeader ();
58 
63  static TypeId GetTypeId (void);
64 
65  TypeId GetInstanceTypeId (void) const override;
66  void Print (std::ostream &os) const override;
67  uint32_t GetSerializedSize (void) const override;
68  void Serialize (Buffer::Iterator start) const override;
69  uint32_t Deserialize (Buffer::Iterator start) override;
70 
76  void SetRate (uint64_t rate);
82  uint64_t GetRate (void) const;
88  void SetLength (uint16_t length);
94  uint16_t GetLength (void) const;
95 
96  private:
97  uint8_t m_rate;
98  uint16_t m_length;
99  }; //class DsssSigHeader
100 
109  DsssPpdu (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector, Time ppduDuration, uint64_t uid);
113  virtual ~DsssPpdu ();
114 
115  Time GetTxDuration (void) const override;
116  Ptr<WifiPpdu> Copy (void) const override;
117 
118 private:
119  WifiTxVector DoGetTxVector (void) const override;
120 
122 }; //class DsssPpdu
123 
124 } //namespace ns3
125 
126 #endif /* DSSS_PPDU_H */
ns3::DsssPpdu::GetTxDuration
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: dsss-ppdu.cc:57
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::DsssPpdu::DsssSigHeader::DsssSigHeader
DsssSigHeader()
Definition: dsss-ppdu.cc:71
ns3::DsssPpdu::DsssSigHeader::SetLength
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:166
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::DsssPpdu::DsssSigHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: dsss-ppdu.cc:82
ns3::DsssPpdu::DsssSigHeader::~DsssSigHeader
virtual ~DsssSigHeader()
Definition: dsss-ppdu.cc:77
ns3::WifiPpdu
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition: wifi-ppdu.h:52
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:71
ns3::DsssPpdu::DsssSigHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition: dsss-ppdu.cc:178
ns3::DsssPpdu::DsssSigHeader::m_rate
uint8_t m_rate
RATE field.
Definition: dsss-ppdu.h:97
ns3::DsssPpdu::DoGetTxVector
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: dsss-ppdu.cc:47
ns3::Ptr< const WifiPsdu >
visualizer.core.start
def start()
Definition: core.py:1855
ns3::DsssPpdu::Copy
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: dsss-ppdu.cc:66
ns3::DsssPpdu::DsssPpdu
DsssPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, Time ppduDuration, uint64_t uid)
Create a DSSS (HR/DSSS) PPDU.
Definition: dsss-ppdu.cc:33
ns3::DsssPpdu
DSSS (HR/DSSS) PPDU (11b)
Definition: dsss-ppdu.h:46
ns3::DsssPpdu::DsssSigHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const override
Definition: dsss-ppdu.cc:106
ns3::DsssPpdu::DsssSigHeader
DSSS SIG PHY header.
Definition: dsss-ppdu.h:54
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::Header
Protocol header serialization and deserialization.
Definition: header.h:43
ns3::DsssPpdu::DsssSigHeader::Print
void Print(std::ostream &os) const override
Definition: dsss-ppdu.cc:99
ns3::DsssPpdu::m_dsssSig
DsssSigHeader m_dsssSig
the DSSS SIG PHY header
Definition: dsss-ppdu.h:121
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::DsssPpdu::DsssSigHeader::m_length
uint16_t m_length
LENGTH field.
Definition: dsss-ppdu.h:98
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::DsssPpdu::DsssSigHeader::GetRate
uint64_t GetRate(void) const
Return the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:141
ns3::DsssPpdu::DsssSigHeader::SetRate
void SetRate(uint64_t rate)
Fill the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:112
ns3::DsssPpdu::~DsssPpdu
virtual ~DsssPpdu()
Destructor for DsssPpdu.
Definition: dsss-ppdu.cc:42
ns3::DsssPpdu::DsssSigHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: dsss-ppdu.cc:93
ns3::DsssPpdu::DsssSigHeader::GetLength
uint16_t GetLength(void) const
Return the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:172