A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
dsss-ppdu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Orange Labs
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Rediet <getachew.redieteab@orange.com>
7
* Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
8
* Sébastien Deronne <sebastien.deronne@gmail.com> (DsssSigHeader)
9
*/
10
11
#ifndef DSSS_PPDU_H
12
#define DSSS_PPDU_H
13
14
#include "ns3/wifi-ppdu.h"
15
16
/**
17
* \file
18
* \ingroup wifi
19
* Declaration of ns3::DsssPpdu class.
20
*/
21
22
namespace
ns3
23
{
24
25
class
WifiPsdu;
26
27
/**
28
* \brief DSSS (HR/DSSS) PPDU (11b)
29
* \ingroup wifi
30
*
31
* DsssPpdu stores a preamble, PHY headers and a PSDU of a PPDU with DSSS modulation.
32
*/
33
class
DsssPpdu
:
public
WifiPpdu
34
{
35
public
:
36
/**
37
* DSSS SIG PHY header.
38
* See section 16.2.2 in IEEE 802.11-2016.
39
*/
40
class
DsssSigHeader
41
{
42
public
:
43
DsssSigHeader
();
44
45
/**
46
* Fill the RATE field of L-SIG (in bit/s).
47
*
48
* \param rate the RATE field of L-SIG expressed in bit/s
49
*/
50
void
SetRate
(uint64_t rate);
51
/**
52
* Return the RATE field of L-SIG (in bit/s).
53
*
54
* \return the RATE field of L-SIG expressed in bit/s
55
*/
56
uint64_t
GetRate
()
const
;
57
/**
58
* Fill the LENGTH field of L-SIG (in bytes).
59
*
60
* \param length the LENGTH field of L-SIG expressed in bytes
61
*/
62
void
SetLength
(uint16_t length);
63
/**
64
* Return the LENGTH field of L-SIG (in bytes).
65
*
66
* \return the LENGTH field of L-SIG expressed in bytes
67
*/
68
uint16_t
GetLength
()
const
;
69
70
private
:
71
uint8_t
m_rate
;
///< RATE field
72
uint16_t
m_length
;
///< LENGTH field
73
};
// class DsssSigHeader
74
75
/**
76
* Create a DSSS (HR/DSSS) PPDU.
77
*
78
* \param psdu the PHY payload (PSDU)
79
* \param txVector the TXVECTOR that was used for this PPDU
80
* \param channel the operating channel of the PHY used to transmit this PPDU
81
* \param ppduDuration the transmission duration of this PPDU
82
* \param uid the unique ID of this PPDU
83
*/
84
DsssPpdu
(
Ptr<const WifiPsdu>
psdu,
85
const
WifiTxVector
& txVector,
86
const
WifiPhyOperatingChannel
& channel,
87
Time
ppduDuration,
88
uint64_t uid);
89
90
Time
GetTxDuration
()
const override
;
91
Ptr<WifiPpdu>
Copy
()
const override
;
92
93
private
:
94
WifiTxVector
DoGetTxVector
()
const override
;
95
96
/**
97
* Fill in the PHY headers.
98
*
99
* \param txVector the TXVECTOR that was used for this PPDU
100
* \param ppduDuration the transmission duration of this PPDU
101
*/
102
void
SetPhyHeaders
(
const
WifiTxVector
& txVector,
Time
ppduDuration);
103
104
/**
105
* Fill in the DSSS header.
106
*
107
* \param dsssSig the DSSS header to fill in
108
* \param txVector the TXVECTOR that was used for this PPDU
109
* \param ppduDuration the transmission duration of this PPDU
110
*/
111
void
SetDsssHeader
(
DsssSigHeader
& dsssSig,
112
const
WifiTxVector
& txVector,
113
Time
ppduDuration)
const
;
114
115
/**
116
* Fill in the TXVECTOR from DSSS header.
117
*
118
* \param txVector the TXVECTOR to fill in
119
* \param dsssSig the DSSS header
120
*/
121
virtual
void
SetTxVectorFromDsssHeader
(
WifiTxVector
& txVector,
122
const
DsssSigHeader
& dsssSig)
const
;
123
124
DsssSigHeader
m_dsssSig
;
//!< the DSSS SIG PHY header
125
};
// class DsssPpdu
126
127
}
// namespace ns3
128
129
#endif
/* DSSS_PPDU_H */
ns3::DsssPpdu::DsssSigHeader
DSSS SIG PHY header.
Definition
dsss-ppdu.h:41
ns3::DsssPpdu::DsssSigHeader::m_length
uint16_t m_length
LENGTH field.
Definition
dsss-ppdu.h:72
ns3::DsssPpdu::DsssSigHeader::SetLength
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition
dsss-ppdu.cc:144
ns3::DsssPpdu::DsssSigHeader::m_rate
uint8_t m_rate
RATE field.
Definition
dsss-ppdu.h:71
ns3::DsssPpdu::DsssSigHeader::DsssSigHeader
DsssSigHeader()
Definition
dsss-ppdu.cc:83
ns3::DsssPpdu::DsssSigHeader::GetRate
uint64_t GetRate() const
Return the RATE field of L-SIG (in bit/s).
Definition
dsss-ppdu.cc:119
ns3::DsssPpdu::DsssSigHeader::SetRate
void SetRate(uint64_t rate)
Fill the RATE field of L-SIG (in bit/s).
Definition
dsss-ppdu.cc:90
ns3::DsssPpdu::DsssSigHeader::GetLength
uint16_t GetLength() const
Return the LENGTH field of L-SIG (in bytes).
Definition
dsss-ppdu.cc:150
ns3::DsssPpdu
DSSS (HR/DSSS) PPDU (11b)
Definition
dsss-ppdu.h:34
ns3::DsssPpdu::GetTxDuration
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition
dsss-ppdu.cc:70
ns3::DsssPpdu::DoGetTxVector
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition
dsss-ppdu.cc:54
ns3::DsssPpdu::m_dsssSig
DsssSigHeader m_dsssSig
the DSSS SIG PHY header
Definition
dsss-ppdu.h:124
ns3::DsssPpdu::DsssPpdu
DsssPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, Time ppduDuration, uint64_t uid)
Create a DSSS (HR/DSSS) PPDU.
Definition
dsss-ppdu.cc:25
ns3::DsssPpdu::Copy
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition
dsss-ppdu.cc:78
ns3::DsssPpdu::SetTxVectorFromDsssHeader
virtual void SetTxVectorFromDsssHeader(WifiTxVector &txVector, const DsssSigHeader &dsssSig) const
Fill in the TXVECTOR from DSSS header.
Definition
dsss-ppdu.cc:64
ns3::DsssPpdu::SetPhyHeaders
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the PHY headers.
Definition
dsss-ppdu.cc:37
ns3::DsssPpdu::SetDsssHeader
void SetDsssHeader(DsssSigHeader &dsssSig, const WifiTxVector &txVector, Time ppduDuration) const
Fill in the DSSS header.
Definition
dsss-ppdu.cc:44
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::WifiPhyOperatingChannel
Class that keeps track of all information about the current PHY operating channel.
Definition
wifi-phy-operating-channel.h:62
ns3::WifiPpdu
WifiPpdu stores a preamble, a modulation class, PHY headers and a PSDU.
Definition
wifi-ppdu.h:47
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:101
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
non-ht
dsss-ppdu.h
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0