A Discrete-Event Network Simulator
API
dsss-phy.cc
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 * Authors: Rediet <getachew.redieteab@orange.com>
19 * S├ębastien Deronne <sebastien.deronne@gmail.com> (for logic ported from wifi-phy)
20 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr> (for logic ported from wifi-phy)
21 */
22
23#include <array>
24#include "dsss-phy.h"
25#include "dsss-ppdu.h"
26#include "ns3/wifi-psdu.h"
27#include "ns3/wifi-phy.h" //only used for static mode constructor
28#include "ns3/wifi-utils.h"
29#include "ns3/interference-helper.h"
30#include "ns3/simulator.h"
31#include "ns3/log.h"
32
33namespace ns3 {
34
35NS_LOG_COMPONENT_DEFINE ("DsssPhy");
36
37/*******************************************************
38 * HR/DSSS PHY (IEEE 802.11-2016, clause 16)
39 *******************************************************/
40
41/* *NS_CHECK_STYLE_OFF* */
46 { WIFI_PREAMBLE_SHORT, { WIFI_PPDU_FIELD_PREAMBLE, //Short PHY preamble
47 WIFI_PPDU_FIELD_NON_HT_HEADER, //Short PHY header
49};
50
52 // Unique name Code rate Constellation size
53 { "DsssRate1Mbps", { WIFI_CODE_RATE_UNDEFINED, 2 } },
54 { "DsssRate2Mbps", { WIFI_CODE_RATE_UNDEFINED, 4 } },
55 { "DsssRate5_5Mbps", { WIFI_CODE_RATE_UNDEFINED, 16 } },
56 { "DsssRate11Mbps", { WIFI_CODE_RATE_UNDEFINED, 256 } }
57};
58/* *NS_CHECK_STYLE_ON* */
59
61static const std::array<uint64_t, 4> s_dsssRatesBpsList = {1000000, 2000000, 5500000, 11000000};
62
68const std::array<uint64_t, 4>& GetDsssRatesBpsList (void)
69{
70 return s_dsssRatesBpsList;
71};
72
74{
75 NS_LOG_FUNCTION (this);
76 for (const auto & rate : GetDsssRatesBpsList ())
77 {
78 WifiMode mode = GetDsssRate (rate);
79 NS_LOG_LOGIC ("Add " << mode << " to list");
80 m_modeList.emplace_back (mode);
81 }
82}
83
85{
86 NS_LOG_FUNCTION (this);
87}
88
90DsssPhy::GetSigMode (WifiPpduField field, const WifiTxVector& txVector) const
91{
92 switch (field)
93 {
94 case WIFI_PPDU_FIELD_PREAMBLE: //consider header mode for preamble (useful for InterferenceHelper)
96 return GetHeaderMode (txVector);
97 default:
98 return PhyEntity::GetSigMode (field, txVector);
99 }
100}
101
104{
105 if (txVector.GetPreambleType () == WIFI_PREAMBLE_LONG
106 || txVector.GetMode () == GetDsssRate1Mbps ())
107 {
108 //Section 16.2.3 "PPDU field definitions" and Section 16.2.2.2 "Long PPDU format"; IEEE Std 802.11-2016
109 return GetDsssRate1Mbps ();
110 }
111 else
112 {
113 //Section 16.2.2.3 "Short PPDU format"; IEEE Std 802.11-2016
114 return GetDsssRate2Mbps ();
115 }
116}
117
120{
121 return m_dsssPpduFormats;
122}
123
124Time
125DsssPhy::GetDuration (WifiPpduField field, const WifiTxVector& txVector) const
126{
127 if (field == WIFI_PPDU_FIELD_PREAMBLE)
128 {
129 return GetPreambleDuration (txVector); //SYNC + SFD or shortSYNC + shortSFD
130 }
131 else if (field == WIFI_PPDU_FIELD_NON_HT_HEADER)
132 {
133 return GetHeaderDuration (txVector); //PHY header or short PHY header
134 }
135 else
136 {
137 return PhyEntity::GetDuration (field, txVector);
138 }
139}
140
141Time
143{
144 if (txVector.GetPreambleType () == WIFI_PREAMBLE_SHORT
145 && (txVector.GetMode ().GetDataRate (22) > 1000000))
146 {
147 //Section 16.2.2.3 "Short PPDU format" Figure 16-2 "Short PPDU format"; IEEE Std 802.11-2016
148 return MicroSeconds (72);
149 }
150 else
151 {
152 //Section 16.2.2.2 "Long PPDU format" Figure 16-1 "Long PPDU format"; IEEE Std 802.11-2016
153 return MicroSeconds (144);
154 }
155}
156
157Time
159{
160 if (txVector.GetPreambleType () == WIFI_PREAMBLE_SHORT
161 && (txVector.GetMode ().GetDataRate (22) > 1000000))
162 {
163 //Section 16.2.2.3 "Short PPDU format" and Figure 16-2 "Short PPDU format"; IEEE Std 802.11-2016
164 return MicroSeconds (24);
165 }
166 else
167 {
168 //Section 16.2.2.2 "Long PPDU format" and Figure 16-1 "Short PPDU format"; IEEE Std 802.11-2016
169 return MicroSeconds (48);
170 }
171}
172
173Time
174DsssPhy::GetPayloadDuration (uint32_t size, const WifiTxVector& txVector, WifiPhyBand /* band */, MpduType /* mpdutype */,
175 bool /* incFlag */, uint32_t & /* totalAmpduSize */, double & /* totalAmpduNumSymbols */,
176 uint16_t /* staId */) const
177{
178 return MicroSeconds (lrint (ceil ((size * 8.0) / (txVector.GetMode ().GetDataRate (22) / 1.0e6))));
179}
180
182DsssPhy::BuildPpdu (const WifiConstPsduMap & psdus, const WifiTxVector& txVector, Time ppduDuration)
183{
184 NS_LOG_FUNCTION (this << psdus << txVector << ppduDuration);
185 return Create<DsssPpdu> (psdus.begin ()->second, txVector,
187 ppduDuration, ObtainNextUid (txVector));
188}
189
192{
193 NS_LOG_FUNCTION (this << field << *event);
195 {
196 return EndReceiveHeader (event); //PHY header or short PHY header
197 }
198 return PhyEntity::DoEndReceiveField (field, event);
199}
200
203{
204 NS_LOG_FUNCTION (this << *event);
206 NS_LOG_DEBUG ("Long/Short PHY header: SNR(dB)=" << RatioToDb (snrPer.snr) << ", PER=" << snrPer.per);
207 PhyFieldRxStatus status (GetRandomValue () > snrPer.per);
208 if (status.isSuccess)
209 {
210 NS_LOG_DEBUG ("Received long/short PHY header");
211 if (!IsConfigSupported (event->GetPpdu ()))
212 {
213 status = PhyFieldRxStatus (false, UNSUPPORTED_SETTINGS, DROP);
214 }
215 }
216 else
217 {
218 NS_LOG_DEBUG ("Abort reception because long/short PHY header reception failed");
219 status.reason = L_SIG_FAILURE;
220 status.actionIfFailure = ABORT;
221 }
222 return status;
223}
224
225uint16_t
227{
228 if (m_wifiPhy->GetChannelWidth () > 20)
229 {
230 /*
231 * This is a workaround necessary with HE-capable PHYs,
232 * since their DSSS entity will reuse its RxSpectrumModel.
233 * Without this hack, SpectrumWifiPhy::GetBand will crash.
234 * FIXME: see issue #402 for a better solution.
235 */
236 return 20;
237 }
238 return PhyEntity::GetRxChannelWidth (txVector);
239}
240
241uint16_t
243{
244 return ppdu ? GetRxChannelWidth (ppdu->GetTxVector ()) : 22;
245}
246
248DsssPhy::GetTxPowerSpectralDensity (double txPowerW, Ptr<const WifiPpdu> /* ppdu */, const WifiTxVector& txVector) const
249{
250 uint16_t centerFrequency = GetCenterFrequencyForChannelWidth (txVector);
251 uint16_t channelWidth = txVector.GetChannelWidth ();
252 NS_LOG_FUNCTION (this << centerFrequency << channelWidth << txPowerW);
253 NS_ABORT_MSG_IF (channelWidth != 22, "Invalid channel width for DSSS");
255 return v;
256}
257
258void
260{
261 for (const auto & rate : GetDsssRatesBpsList ())
262 {
263 GetDsssRate (rate);
264 }
265}
266
268DsssPhy::GetDsssRate (uint64_t rate)
269{
270 switch (rate)
271 {
272 case 1000000:
273 return GetDsssRate1Mbps ();
274 case 2000000:
275 return GetDsssRate2Mbps ();
276 case 5500000:
277 return GetDsssRate5_5Mbps ();
278 case 11000000:
279 return GetDsssRate11Mbps ();
280 default:
281 NS_ABORT_MSG ("Inexistent rate (" << rate << " bps) requested for HR/DSSS");
282 return WifiMode ();
283 }
284}
285
286#define GET_DSSS_MODE(x, m) \
287WifiMode \
288DsssPhy::Get ## x (void) \
289{ \
290 static WifiMode mode = CreateDsssMode (#x, WIFI_MOD_CLASS_ ## m); \
291 return mode; \
292}; \
293
294// Clause 15 rates (DSSS)
295GET_DSSS_MODE (DsssRate1Mbps, DSSS)
296GET_DSSS_MODE (DsssRate2Mbps, DSSS)
297// Clause 16 rates (HR/DSSS)
298GET_DSSS_MODE (DsssRate5_5Mbps, HR_DSSS)
299GET_DSSS_MODE (DsssRate11Mbps, HR_DSSS)
300#undef GET_DSSS_MODE
301
302WifiMode
303DsssPhy::CreateDsssMode (std::string uniqueName,
304 WifiModulationClass modClass)
305{
306 // Check whether uniqueName is in lookup table
307 const auto it = m_dsssModulationLookupTable.find (uniqueName);
308 NS_ASSERT_MSG (it != m_dsssModulationLookupTable.end (), "DSSS or HR/DSSS mode cannot be created because it is not in the lookup table!");
309 NS_ASSERT_MSG (modClass == WIFI_MOD_CLASS_DSSS || modClass == WIFI_MOD_CLASS_HR_DSSS, "DSSS or HR/DSSS mode must be either WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS!");
310
311 return WifiModeFactory::CreateWifiMode (uniqueName,
312 modClass,
313 true,
314 MakeBoundCallback (&GetCodeRate, uniqueName),
316 MakeCallback (&GetDataRateFromTxVector), //PhyRate is equivalent to DataRate
319}
320
322DsssPhy::GetCodeRate (const std::string& name)
323{
324 return m_dsssModulationLookupTable.at (name).first;
325}
326
327uint16_t
328DsssPhy::GetConstellationSize (const std::string& name)
329{
330 return m_dsssModulationLookupTable.at (name).second;
331}
332
333uint64_t
334DsssPhy::GetDataRateFromTxVector (const WifiTxVector& txVector, uint16_t /* staId */)
335{
336 WifiMode mode = txVector.GetMode ();
337 return DsssPhy::GetDataRate (mode.GetUniqueName (),
338 mode.GetModulationClass ());
339}
340
341uint64_t
342DsssPhy::GetDataRate (const std::string& name, WifiModulationClass modClass)
343{
344 uint16_t constellationSize = GetConstellationSize (name);
345 uint16_t divisor = 0;
346 if (modClass == WIFI_MOD_CLASS_DSSS)
347 {
348 divisor = 11;
349 }
350 else if (modClass == WIFI_MOD_CLASS_HR_DSSS)
351 {
352 divisor = 8;
353 }
354 else
355 {
356 NS_FATAL_ERROR ("Incorrect modulation class, must specify either WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS!");
357 }
358 uint16_t numberOfBitsPerSubcarrier = static_cast<uint16_t> (log2 (constellationSize));
359 uint64_t dataRate = ((11000000 / divisor) * numberOfBitsPerSubcarrier);
360 return dataRate;
361}
362
363bool
364DsssPhy::IsAllowed (const WifiTxVector& /*txVector*/)
365{
366 return true;
367}
368
371{
372 return 4095;
373}
374
375} //namespace ns3
376
377namespace {
378
382static class ConstructorDsss
383{
384public:
386 {
388 ns3::Ptr<ns3::DsssPhy> phyEntity = ns3::Create<ns3::DsssPhy> ();
390 ns3::WifiPhy::AddStaticPhyEntity (ns3::WIFI_MOD_CLASS_DSSS, phyEntity); //use same entity when plain DSSS modes are used
391 }
393
394}
Constructor class for DSSS modes.
Definition: dsss-phy.cc:383
uint32_t GetMaxPsduSize(void) const override
Get the maximum PSDU size in bytes.
Definition: dsss-phy.cc:370
PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event) override
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
Definition: dsss-phy.cc:191
static uint16_t GetConstellationSize(const std::string &name)
Return the constellation size from the DSSS or HR/DSSS mode's unique name using ModulationLookupTable...
Definition: dsss-phy.cc:328
static const PpduFormats m_dsssPpduFormats
DSSS and HR/DSSS PPDU formats.
Definition: dsss-phy.h:197
PhyFieldRxStatus EndReceiveHeader(Ptr< Event > event)
End receiving the header, perform DSSS-specific actions, and provide the status of the reception.
Definition: dsss-phy.cc:202
static WifiMode CreateDsssMode(std::string uniqueName, WifiModulationClass modClass)
Create a DSSS or HR/DSSS mode from a unique name, the unique name must already be contained inside Mo...
Definition: dsss-phy.cc:303
static WifiMode GetDsssRate2Mbps(void)
Return a WifiMode for DSSS at 2 Mbps.
static WifiCodeRate GetCodeRate(const std::string &name)
Return the WifiCodeRate from the DSSS or HR/DSSS mode's unique name using ModulationLookupTable.
Definition: dsss-phy.cc:322
static WifiMode GetDsssRate5_5Mbps(void)
Return a WifiMode for HR/DSSS at 5.5 Mbps.
static const ModulationLookupTable m_dsssModulationLookupTable
lookup table to retrieve code rate and constellation size corresponding to a unique name of modulatio...
Definition: dsss-phy.h:199
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
Definition: dsss-phy.cc:334
uint16_t GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
Definition: dsss-phy.cc:242
const PpduFormats & GetPpduFormats(void) const override
Return the PPDU formats of the PHY.
Definition: dsss-phy.cc:119
static WifiMode GetDsssRate1Mbps(void)
Return a WifiMode for DSSS at 1 Mbps.
WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const override
Get the WifiMode for the SIG field specified by the PPDU field.
Definition: dsss-phy.cc:90
uint16_t GetRxChannelWidth(const WifiTxVector &txVector) const override
Return the channel width used in the reception spectrum model.
Definition: dsss-phy.cc:226
static uint64_t GetDataRate(const std::string &name, WifiModulationClass modClass)
Return the data rate from the DSSS or HR/DSSS mode's unique name and the supplied parameters.
Definition: dsss-phy.cc:342
virtual ~DsssPhy()
Destructor for HR/DSSS PHY.
Definition: dsss-phy.cc:84
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition: dsss-phy.cc:364
Time GetHeaderDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:158
Time GetPayloadDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, MpduType mpdutype, bool incFlag, uint32_t &totalAmpduSize, double &totalAmpduNumSymbols, uint16_t staId) const override
Definition: dsss-phy.cc:174
DsssPhy()
Constructor for HR/DSSS PHY.
Definition: dsss-phy.cc:73
static WifiMode GetDsssRate(uint64_t rate)
Return a WifiMode for HR/DSSS corresponding to the provided rate.
Definition: dsss-phy.cc:268
static void InitializeModes(void)
Initialize all HR/DSSS modes.
Definition: dsss-phy.cc:259
Time GetPreambleDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:142
WifiMode GetHeaderMode(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:103
static WifiMode GetDsssRate11Mbps(void)
Return a WifiMode for HR/DSSS at 11 Mbps.
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector) const override
Definition: dsss-phy.cc:248
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition: dsss-phy.cc:182
Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const override
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Definition: dsss-phy.cc:125
virtual Time GetDuration(WifiPpduField field, const WifiTxVector &txVector) const
Get the duration of the PPDU field (or group of fields) used by this entity for the given transmissio...
Definition: phy-entity.cc:178
virtual uint64_t ObtainNextUid(const WifiTxVector &txVector)
Obtain the next UID for the PPDU to transmit.
Definition: phy-entity.cc:1114
Ptr< WifiPhy > m_wifiPhy
Pointer to the owning WifiPhy.
Definition: phy-entity.h:884
std::map< std::string, CodeRateConstellationSizePair > ModulationLookupTable
A modulation lookup table using unique name of modulation as key.
Definition: phy-entity.h:499
double GetRandomValue(void) const
Obtain a random value from the WifiPhy's generator.
Definition: phy-entity.cc:1019
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition: phy-entity.h:489
virtual WifiMode GetSigMode(WifiPpduField field, const WifiTxVector &txVector) const
Get the WifiMode for the SIG field specified by the PPDU field.
Definition: phy-entity.cc:142
virtual uint16_t GetRxChannelWidth(const WifiTxVector &txVector) const
Return the channel width used in the reception spectrum model.
Definition: phy-entity.cc:1054
uint16_t GetGuardBandwidth(uint16_t currentChannelWidth) const
Definition: phy-entity.cc:1161
std::list< WifiMode > m_modeList
the list of supported modes
Definition: phy-entity.h:887
SnrPer GetPhyHeaderSnrPer(WifiPpduField field, Ptr< Event > event) const
Obtain the SNR and PER of the PPDU field from the WifiPhy's InterferenceHelper class.
Definition: phy-entity.cc:253
uint16_t GetCenterFrequencyForChannelWidth(const WifiTxVector &txVector) const
Get the center frequency of the channel corresponding the current TxVector rather than that of the su...
Definition: phy-entity.cc:1121
virtual bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Definition: phy-entity.cc:920
@ DROP
drop PPDU and set CCA_BUSY
Definition: phy-entity.h:104
@ ABORT
abort reception of PPDU
Definition: phy-entity.h:105
virtual PhyFieldRxStatus DoEndReceiveField(WifiPpduField field, Ptr< Event > event)
End receiving a given field, perform amendment-specific actions, and provide the status of the recept...
Definition: phy-entity.cc:353
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, AllowedCallback isAllowedCallback)
Definition: wifi-mode.cc:260
represent a single transmission mode
Definition: wifi-mode.h:48
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:177
std::string GetUniqueName(void) const
Definition: wifi-mode.cc:140
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Definition: wifi-mode.cc:114
const WifiPhyOperatingChannel & GetOperatingChannel(void) const
Get a const reference to the operating channel.
Definition: wifi-phy.cc:951
static void AddStaticPhyEntity(WifiModulationClass modulation, Ptr< PhyEntity > phyEntity)
Add the PHY entity to the map of implemented PHY entities for the given modulation class.
Definition: wifi-phy.cc:692
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:969
uint16_t GetPrimaryChannelCenterFrequency(uint16_t primaryChannelWidth) const
Get the center frequency of the primary channel of the given width.
static Ptr< SpectrumValue > CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to DSSS.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
WifiPreamble GetPreambleType(void) const
uint16_t GetChannelWidth(void) const
#define GET_DSSS_MODE(x, m)
Definition: dsss-phy.cc:286
Declaration of ns3::DsssPhy class.
Declaration of ns3::DsssPpdu class.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:88
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:206
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:274
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:290
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs... bargs)
Make Callbacks with varying number of bound arguments.
Definition: callback.h:714
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1261
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
WifiPpduField
The type of PPDU field (grouped for convenience)
MpduType
The type of an MPDU.
@ UNSUPPORTED_SETTINGS
@ L_SIG_FAILURE
@ WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_SHORT
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
@ WIFI_MOD_CLASS_DSSS
DSSS (Clause 15)
@ WIFI_PPDU_FIELD_NON_HT_HEADER
PHY header field for DSSS or ERP, short PHY header field for HR/DSSS or ERP, field not present for HT...
@ WIFI_PPDU_FIELD_PREAMBLE
SYNC + SFD fields for DSSS or ERP, shortSYNC + shortSFD fields for HR/DSSS or ERP,...
@ WIFI_PPDU_FIELD_DATA
data field
static class anonymous_namespace{dsss-phy.cc}::ConstructorDsss g_constructor_dsss
the constructor for DSSS modes
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const uint16_t WIFI_CODE_RATE_UNDEFINED
undefined coding rate
double RatioToDb(double ratio)
Convert from ratio to dB.
Definition: wifi-utils.cc:49
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:661
static const std::array< uint64_t, 4 > s_dsssRatesBpsList
DSSS rates in bits per second.
Definition: dsss-phy.cc:61
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
const std::array< uint64_t, 4 > & GetDsssRatesBpsList(void)
Get the array of possible DSSS rates.
Definition: dsss-phy.cc:68
Status of the reception of the PPDU field.
Definition: phy-entity.h:113
WifiPhyRxfailureReason reason
failure reason
Definition: phy-entity.h:116
PhyRxFailureAction actionIfFailure
action to perform in case of failure
Definition: phy-entity.h:117
bool isSuccess
outcome (true if success) of the reception
Definition: phy-entity.h:115
A struct for both SNR and PER.
Definition: phy-entity.h:139
double snr
SNR in linear scale.
Definition: phy-entity.h:140