A Discrete-Event Network Simulator
API
dsss-ppdu.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Rediet <getachew.redieteab@orange.com>
18 * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
19 * Sébastien Deronne <sebastien.deronne@gmail.com> (DsssSigHeader)
20 */
21
22#ifndef DSSS_PPDU_H
23#define DSSS_PPDU_H
24
25#include "ns3/header.h"
26#include "ns3/wifi-ppdu.h"
27
34namespace ns3
35{
36
37class WifiPsdu;
38
45class DsssPpdu : public WifiPpdu
46{
47 public:
52 class DsssSigHeader : public Header
53 {
54 public:
56 ~DsssSigHeader() override;
57
62 static TypeId GetTypeId();
63
64 TypeId GetInstanceTypeId() const override;
65 void Print(std::ostream& os) const override;
66 uint32_t GetSerializedSize() const override;
67 void Serialize(Buffer::Iterator start) const override;
69
75 void SetRate(uint64_t rate);
81 uint64_t GetRate() const;
87 void SetLength(uint16_t length);
93 uint16_t GetLength() const;
94
95 private:
96 uint8_t m_rate;
97 uint16_t m_length;
98 }; // class DsssSigHeader
99
110 const WifiTxVector& txVector,
111 uint16_t txCenterFreq,
112 Time ppduDuration,
113 uint64_t uid);
117 ~DsssPpdu() override;
118
119 Time GetTxDuration() const override;
120 Ptr<WifiPpdu> Copy() const override;
121
122 private:
123 WifiTxVector DoGetTxVector() const override;
124
126}; // class DsssPpdu
127
128} // namespace ns3
129
130#endif /* DSSS_PPDU_H */
iterator in a Buffer instance
Definition: buffer.h:100
DSSS SIG PHY header.
Definition: dsss-ppdu.h:53
uint32_t GetSerializedSize() const override
Definition: dsss-ppdu.cc:111
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: dsss-ppdu.cc:99
uint16_t m_length
LENGTH field.
Definition: dsss-ppdu.h:97
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:171
void Print(std::ostream &os) const override
Definition: dsss-ppdu.cc:105
void Serialize(Buffer::Iterator start) const override
Definition: dsss-ppdu.cc:183
uint8_t m_rate
RATE field.
Definition: dsss-ppdu.h:96
uint64_t GetRate() const
Return the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:146
static TypeId GetTypeId()
Get the type ID.
Definition: dsss-ppdu.cc:89
void SetRate(uint64_t rate)
Fill the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:117
uint32_t Deserialize(Buffer::Iterator start) override
Definition: dsss-ppdu.cc:192
uint16_t GetLength() const
Return the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:177
DSSS (HR/DSSS) PPDU (11b)
Definition: dsss-ppdu.h:46
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition: dsss-ppdu.cc:63
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition: dsss-ppdu.cc:53
DsssSigHeader m_dsssSig
the DSSS SIG PHY header
Definition: dsss-ppdu.h:125
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition: dsss-ppdu.cc:73
~DsssPpdu() override
Destructor for DsssPpdu.
Definition: dsss-ppdu.cc:48
DsssPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint16_t txCenterFreq, Time ppduDuration, uint64_t uid)
Create a DSSS (HR/DSSS) PPDU.
Definition: dsss-ppdu.cc:35
Protocol header serialization and deserialization.
Definition: header.h:44
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:60
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition: wifi-ppdu.h:54
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1861