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
35namespace ns3 {
36
37class WifiPsdu;
38
45class DsssPpdu : public WifiPpdu
46{
47public:
48
53 class DsssSigHeader : public Header
54 {
55 public:
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;
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
118private:
119 WifiTxVector DoGetTxVector (void) const override;
120
122}; //class DsssPpdu
123
124} //namespace ns3
125
126#endif /* DSSS_PPDU_H */
iterator in a Buffer instance
Definition: buffer.h:99
DSSS SIG PHY header.
Definition: dsss-ppdu.h:54
uint64_t GetRate(void) const
Return the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:141
uint16_t m_length
LENGTH field.
Definition: dsss-ppdu.h:98
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:166
void Print(std::ostream &os) const override
Definition: dsss-ppdu.cc:99
void Serialize(Buffer::Iterator start) const override
Definition: dsss-ppdu.cc:178
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: dsss-ppdu.cc:93
uint8_t m_rate
RATE field.
Definition: dsss-ppdu.h:97
uint32_t GetSerializedSize(void) const override
Definition: dsss-ppdu.cc:106
static TypeId GetTypeId(void)
Get the type ID.
Definition: dsss-ppdu.cc:82
uint16_t GetLength(void) const
Return the LENGTH field of L-SIG (in bytes).
Definition: dsss-ppdu.cc:172
void SetRate(uint64_t rate)
Fill the RATE field of L-SIG (in bit/s).
Definition: dsss-ppdu.cc:112
uint32_t Deserialize(Buffer::Iterator start) override
Definition: dsss-ppdu.cc:187
DSSS (HR/DSSS) PPDU (11b)
Definition: dsss-ppdu.h:46
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: dsss-ppdu.cc:66
DsssSigHeader m_dsssSig
the DSSS SIG PHY header
Definition: dsss-ppdu.h:121
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: dsss-ppdu.cc:47
virtual ~DsssPpdu()
Destructor for DsssPpdu.
Definition: dsss-ppdu.cc:42
DsssPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, Time ppduDuration, uint64_t uid)
Create a DSSS (HR/DSSS) PPDU.
Definition: dsss-ppdu.cc:33
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: dsss-ppdu.cc:57
Protocol header serialization and deserialization.
Definition: header.h:43
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition: wifi-ppdu.h:52
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:1853