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-export.h"
15
#include "ns3/wifi-ppdu.h"
16
17
/**
18
* @file
19
* @ingroup wifi
20
* Declaration of ns3::DsssPpdu class.
21
*/
22
23
namespace
ns3
24
{
25
26
class
WifiPsdu
;
27
28
/**
29
* @brief DSSS (HR/DSSS) PPDU (11b)
30
* @ingroup wifi
31
*
32
* DsssPpdu stores a preamble, PHY headers and a PSDU of a PPDU with DSSS modulation.
33
*/
34
class
WIFI_EXPORT
DsssPpdu
:
public
WifiPpdu
35
{
36
public
:
37
/**
38
* DSSS SIG PHY header.
39
* See section 16.2.2 in IEEE 802.11-2016.
40
*/
41
class
WIFI_EXPORT
DsssSigHeader
42
{
43
public
:
44
DsssSigHeader
();
45
46
/**
47
* Fill the RATE field of L-SIG (in bit/s).
48
*
49
* @param rate the RATE field of L-SIG expressed in bit/s
50
*/
51
void
SetRate
(uint64_t rate);
52
/**
53
* Return the RATE field of L-SIG (in bit/s).
54
*
55
* @return the RATE field of L-SIG expressed in bit/s
56
*/
57
uint64_t
GetRate
()
const
;
58
/**
59
* Fill the LENGTH field of L-SIG (in bytes).
60
*
61
* @param length the LENGTH field of L-SIG expressed in bytes
62
*/
63
void
SetLength
(uint16_t length);
64
/**
65
* Return the LENGTH field of L-SIG (in bytes).
66
*
67
* @return the LENGTH field of L-SIG expressed in bytes
68
*/
69
uint16_t
GetLength
()
const
;
70
71
private
:
72
uint8_t
m_rate
;
///< RATE field
73
uint16_t
m_length
;
///< LENGTH field
74
75
// end of class DsssSigHeader
76
};
77
78
/**
79
* Create a DSSS (HR/DSSS) PPDU.
80
*
81
* @param psdu the PHY payload (PSDU)
82
* @param txVector the TXVECTOR that was used for this PPDU
83
* @param channel the operating channel of the PHY used to transmit this PPDU
84
* @param ppduDuration the transmission duration of this PPDU
85
* @param uid the unique ID of this PPDU
86
*/
87
DsssPpdu
(
Ptr<const WifiPsdu>
psdu,
88
const
WifiTxVector
& txVector,
89
const
WifiPhyOperatingChannel
& channel,
90
Time
ppduDuration,
91
uint64_t uid);
92
93
Time
GetTxDuration
()
const override
;
94
Ptr<WifiPpdu>
Copy
()
const override
;
95
96
private
:
97
WifiTxVector
DoGetTxVector
()
const override
;
98
99
/**
100
* Fill in the PHY headers.
101
*
102
* @param txVector the TXVECTOR that was used for this PPDU
103
* @param ppduDuration the transmission duration of this PPDU
104
*/
105
void
SetPhyHeaders
(
const
WifiTxVector
& txVector,
Time
ppduDuration);
106
107
/**
108
* Fill in the DSSS header.
109
*
110
* @param dsssSig the DSSS header to fill in
111
* @param txVector the TXVECTOR that was used for this PPDU
112
* @param ppduDuration the transmission duration of this PPDU
113
*/
114
void
SetDsssHeader
(
DsssSigHeader
& dsssSig,
115
const
WifiTxVector
& txVector,
116
Time
ppduDuration)
const
;
117
118
/**
119
* Fill in the TXVECTOR from DSSS header.
120
*
121
* @param txVector the TXVECTOR to fill in
122
* @param dsssSig the DSSS header
123
*/
124
virtual
void
SetTxVectorFromDsssHeader
(
WifiTxVector
& txVector,
125
const
DsssSigHeader
& dsssSig)
const
;
126
127
DsssSigHeader
m_dsssSig
;
//!< the DSSS SIG PHY header
128
};
129
130
}
// namespace ns3
131
132
#endif
/* DSSS_PPDU_H */
ns3::DsssPpdu::DsssSigHeader
DSSS SIG PHY header.
Definition
dsss-ppdu.h:42
ns3::DsssPpdu::DsssSigHeader::m_length
uint16_t m_length
LENGTH field.
Definition
dsss-ppdu.h:73
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:72
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::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:127
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
ptr.h:70
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:95
ns3::WifiPhyOperatingChannel
Class that keeps track of all information about the current PHY operating channel.
Definition
wifi-phy-operating-channel.h:63
ns3::WifiPpdu::WifiPpdu
WifiPpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, const WifiPhyOperatingChannel &channel, uint64_t uid=UINT64_MAX)
Create a PPDU storing a PSDU.
Definition
wifi-ppdu.cc:64
ns3::WifiPsdu
WifiPsdu stores an MPDU, S-MPDU or A-MPDU, by keeping header(s) and payload(s) separate for each cons...
Definition
wifi-psdu.h:34
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:99
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
non-ht
dsss-ppdu.h
Generated on
for ns-3 by
1.16.1