A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dsss-phy.cc
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 * Authors: Rediet <getachew.redieteab@orange.com>
18 * Sébastien Deronne <sebastien.deronne@gmail.com> (for logic ported from wifi-phy)
19 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr> (for logic ported from wifi-phy)
20 */
21
22#include "dsss-phy.h"
23
24#include "dsss-ppdu.h"
25
26#include "ns3/interference-helper.h"
27#include "ns3/log.h"
28#include "ns3/simulator.h"
29#include "ns3/wifi-phy.h" //only used for static mode constructor
30#include "ns3/wifi-psdu.h"
31#include "ns3/wifi-utils.h"
32
33#include <array>
34
35#undef NS_LOG_APPEND_CONTEXT
36#define NS_LOG_APPEND_CONTEXT WIFI_PHY_NS_LOG_APPEND_CONTEXT(m_wifiPhy)
37
38namespace ns3
39{
40
42
43/*******************************************************
44 * HR/DSSS PHY (IEEE 802.11-2016, clause 16)
45 *******************************************************/
46
47// clang-format off
48
53 { WIFI_PREAMBLE_SHORT, { WIFI_PPDU_FIELD_PREAMBLE, // Short PHY preamble
54 WIFI_PPDU_FIELD_NON_HT_HEADER, // Short PHY header
56};
57
59 // Unique name Code rate Constellation size
60 { "DsssRate1Mbps", { WIFI_CODE_RATE_UNDEFINED, 2 } },
61 { "DsssRate2Mbps", { WIFI_CODE_RATE_UNDEFINED, 4 } },
62 { "DsssRate5_5Mbps", { WIFI_CODE_RATE_UNDEFINED, 16 } },
63 { "DsssRate11Mbps", { WIFI_CODE_RATE_UNDEFINED, 256 } },
64};
65
66// clang-format on
67
68/// DSSS rates in bits per second
69static const std::array<uint64_t, 4> s_dsssRatesBpsList = {1000000, 2000000, 5500000, 11000000};
70
71/**
72 * Get the array of possible DSSS rates.
73 *
74 * \return the DSSS rates in bits per second
75 */
76const std::array<uint64_t, 4>&
78{
79 return s_dsssRatesBpsList;
80}
81
83{
84 NS_LOG_FUNCTION(this);
85 for (const auto& rate : GetDsssRatesBpsList())
86 {
87 WifiMode mode = GetDsssRate(rate);
88 NS_LOG_LOGIC("Add " << mode << " to list");
89 m_modeList.emplace_back(mode);
90 }
91}
92
94{
95 NS_LOG_FUNCTION(this);
96}
97
99DsssPhy::GetSigMode(WifiPpduField field, const WifiTxVector& txVector) const
100{
101 switch (field)
102 {
103 case WIFI_PPDU_FIELD_PREAMBLE: // consider header mode for preamble (useful for
104 // InterferenceHelper)
106 return GetHeaderMode(txVector);
107 default:
108 return PhyEntity::GetSigMode(field, txVector);
109 }
110}
111
114{
115 if (txVector.GetPreambleType() == WIFI_PREAMBLE_LONG ||
116 txVector.GetMode() == GetDsssRate1Mbps())
117 {
118 // Section 16.2.3 "PPDU field definitions" and Section 16.2.2.2 "Long PPDU format"; IEEE Std
119 // 802.11-2016
120 return GetDsssRate1Mbps();
121 }
122 else
123 {
124 // Section 16.2.2.3 "Short PPDU format"; IEEE Std 802.11-2016
125 return GetDsssRate2Mbps();
126 }
127}
128
131{
132 return m_dsssPpduFormats;
133}
134
135Time
137{
138 if (field == WIFI_PPDU_FIELD_PREAMBLE)
139 {
140 return GetPreambleDuration(txVector); // SYNC + SFD or shortSYNC + shortSFD
141 }
142 else if (field == WIFI_PPDU_FIELD_NON_HT_HEADER)
143 {
144 return GetHeaderDuration(txVector); // PHY header or short PHY header
145 }
146 else
147 {
148 return PhyEntity::GetDuration(field, txVector);
149 }
150}
151
152Time
154{
155 if (txVector.GetPreambleType() == WIFI_PREAMBLE_SHORT &&
156 (txVector.GetMode().GetDataRate(22) > 1000000))
157 {
158 // Section 16.2.2.3 "Short PPDU format" Figure 16-2 "Short PPDU format"; IEEE Std
159 // 802.11-2016
160 return MicroSeconds(72);
161 }
162 else
163 {
164 // Section 16.2.2.2 "Long PPDU format" Figure 16-1 "Long PPDU format"; IEEE Std 802.11-2016
165 return MicroSeconds(144);
166 }
167}
168
169Time
171{
172 if (txVector.GetPreambleType() == WIFI_PREAMBLE_SHORT &&
173 (txVector.GetMode().GetDataRate(22) > 1000000))
174 {
175 // Section 16.2.2.3 "Short PPDU format" and Figure 16-2 "Short PPDU format"; IEEE Std
176 // 802.11-2016
177 return MicroSeconds(24);
178 }
179 else
180 {
181 // Section 16.2.2.2 "Long PPDU format" and Figure 16-1 "Short PPDU format"; IEEE Std
182 // 802.11-2016
183 return MicroSeconds(48);
184 }
185}
186
187Time
189 const WifiTxVector& txVector,
190 WifiPhyBand /* band */,
191 MpduType /* mpdutype */,
192 bool /* incFlag */,
193 uint32_t& /* totalAmpduSize */,
194 double& /* totalAmpduNumSymbols */,
195 uint16_t /* staId */) const
196{
197 return MicroSeconds(lrint(ceil((size * 8.0) / (txVector.GetMode().GetDataRate(22) / 1.0e6))));
198}
199
201DsssPhy::BuildPpdu(const WifiConstPsduMap& psdus, const WifiTxVector& txVector, Time ppduDuration)
202{
203 NS_LOG_FUNCTION(this << psdus << txVector << ppduDuration);
204 return Create<DsssPpdu>(psdus.begin()->second,
205 txVector,
207 ppduDuration,
208 ObtainNextUid(txVector));
209}
210
213{
214 NS_LOG_FUNCTION(this << field << *event);
216 {
217 return EndReceiveHeader(event); // PHY header or short PHY header
218 }
219 return PhyEntity::DoEndReceiveField(field, event);
220}
221
224{
225 NS_LOG_FUNCTION(this << *event);
227 NS_LOG_DEBUG("Long/Short PHY header: SNR(dB)=" << RatioToDb(snrPer.snr)
228 << ", PER=" << snrPer.per);
229 PhyFieldRxStatus status(GetRandomValue() > snrPer.per);
230 if (status.isSuccess)
231 {
232 NS_LOG_DEBUG("Received long/short PHY header");
233 if (!IsConfigSupported(event->GetPpdu()))
234 {
236 }
237 }
238 else
239 {
240 NS_LOG_DEBUG("Abort reception because long/short PHY header reception failed");
241 status.reason = L_SIG_FAILURE;
242 status.actionIfFailure = ABORT;
243 }
244 return status;
245}
246
247uint16_t
249{
250 if (m_wifiPhy->GetChannelWidth() > 20)
251 {
252 /*
253 * This is a workaround necessary with HE-capable PHYs,
254 * since their DSSS entity will reuse its RxSpectrumModel.
255 * Without this hack, SpectrumWifiPhy::GetBand will crash.
256 * FIXME: see issue #402 for a better solution.
257 */
258 return 20;
259 }
260 return PhyEntity::GetRxChannelWidth(txVector);
261}
262
263uint16_t
265{
266 return ppdu ? GetRxChannelWidth(ppdu->GetTxVector()) : 22;
267}
268
271{
272 const auto& txVector = ppdu->GetTxVector();
273 uint16_t centerFrequency = GetCenterFrequencyForChannelWidth(txVector);
274 uint16_t channelWidth = txVector.GetChannelWidth();
275 NS_LOG_FUNCTION(this << centerFrequency << channelWidth << txPowerW);
276 NS_ABORT_MSG_IF(channelWidth != 22, "Invalid channel width for DSSS");
279 txPowerW,
280 GetGuardBandwidth(channelWidth));
281 return v;
282}
283
284void
286{
287 for (const auto& rate : GetDsssRatesBpsList())
288 {
289 GetDsssRate(rate);
290 }
291}
292
295{
296 switch (rate)
297 {
298 case 1000000:
299 return GetDsssRate1Mbps();
300 case 2000000:
301 return GetDsssRate2Mbps();
302 case 5500000:
303 return GetDsssRate5_5Mbps();
304 case 11000000:
305 return GetDsssRate11Mbps();
306 default:
307 NS_ABORT_MSG("Inexistent rate (" << rate << " bps) requested for HR/DSSS");
308 return WifiMode();
309 }
310}
311
312#define GET_DSSS_MODE(x, m) \
313 WifiMode DsssPhy::Get##x() \
314 { \
315 static WifiMode mode = CreateDsssMode(#x, WIFI_MOD_CLASS_##m); \
316 return mode; \
317 }
318
319// Clause 15 rates (DSSS)
320GET_DSSS_MODE(DsssRate1Mbps, DSSS)
321GET_DSSS_MODE(DsssRate2Mbps, DSSS)
322// Clause 16 rates (HR/DSSS)
323GET_DSSS_MODE(DsssRate5_5Mbps, HR_DSSS)
324GET_DSSS_MODE(DsssRate11Mbps, HR_DSSS)
325#undef GET_DSSS_MODE
326
327WifiMode
328DsssPhy::CreateDsssMode(std::string uniqueName, WifiModulationClass modClass)
329{
330 // Check whether uniqueName is in lookup table
331 const auto it = m_dsssModulationLookupTable.find(uniqueName);
333 "DSSS or HR/DSSS mode cannot be created because it is not in the lookup table!");
335 modClass == WIFI_MOD_CLASS_DSSS || modClass == WIFI_MOD_CLASS_HR_DSSS,
336 "DSSS or HR/DSSS mode must be either WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS!");
337
339 uniqueName,
340 modClass,
341 true,
342 MakeBoundCallback(&GetCodeRate, uniqueName),
344 MakeCallback(&GetDataRateFromTxVector), // PhyRate is equivalent to DataRate
347}
348
350DsssPhy::GetCodeRate(const std::string& name)
351{
352 return m_dsssModulationLookupTable.at(name).first;
353}
354
355uint16_t
356DsssPhy::GetConstellationSize(const std::string& name)
357{
358 return m_dsssModulationLookupTable.at(name).second;
359}
360
361uint64_t
362DsssPhy::GetDataRateFromTxVector(const WifiTxVector& txVector, uint16_t /* staId */)
363{
364 WifiMode mode = txVector.GetMode();
366}
367
368uint64_t
369DsssPhy::GetDataRate(const std::string& name, WifiModulationClass modClass)
370{
371 uint16_t constellationSize = GetConstellationSize(name);
372 uint16_t divisor = 0;
373 if (modClass == WIFI_MOD_CLASS_DSSS)
374 {
375 divisor = 11;
376 }
377 else if (modClass == WIFI_MOD_CLASS_HR_DSSS)
378 {
379 divisor = 8;
380 }
381 else
382 {
383 NS_FATAL_ERROR("Incorrect modulation class, must specify either WIFI_MOD_CLASS_DSSS or "
384 "WIFI_MOD_CLASS_HR_DSSS!");
385 }
386 auto numberOfBitsPerSubcarrier = static_cast<uint16_t>(log2(constellationSize));
387 uint64_t dataRate = ((11000000 / divisor) * numberOfBitsPerSubcarrier);
388 return dataRate;
389}
390
391bool
393{
394 return true;
395}
396
399{
400 return 4095;
401}
402
403} // namespace ns3
404
405namespace
406{
407
408/**
409 * Constructor class for DSSS modes
410 */
412{
413 public:
415 {
417 ns3::Ptr<ns3::DsssPhy> phyEntity = ns3::Create<ns3::DsssPhy>();
421 phyEntity); // use same entity when plain DSSS modes are used
422 }
423} g_constructor_dsss; ///< the constructor for DSSS modes
424
425} // namespace
Constructor class for DSSS modes.
Definition: dsss-phy.cc:412
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:212
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:356
static const PpduFormats m_dsssPpduFormats
DSSS and HR/DSSS PPDU formats.
Definition: dsss-phy.h:208
PhyFieldRxStatus EndReceiveHeader(Ptr< Event > event)
End receiving the header, perform DSSS-specific actions, and provide the status of the reception.
Definition: dsss-phy.cc:223
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:328
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:350
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:211
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
Definition: dsss-phy.cc:362
uint16_t GetMeasurementChannelWidth(const Ptr< const WifiPpdu > ppdu) const override
Return the channel width used to measure the RSSI.
Definition: dsss-phy.cc:264
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu) const override
Definition: dsss-phy.cc:270
~DsssPhy() override
Destructor for HR/DSSS PHY.
Definition: dsss-phy.cc:93
static WifiMode GetDsssRate5_5Mbps()
Return a WifiMode for HR/DSSS at 5.5 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:99
uint16_t GetRxChannelWidth(const WifiTxVector &txVector) const override
Return the channel width used in the reception spectrum model.
Definition: dsss-phy.cc:248
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:369
static bool IsAllowed(const WifiTxVector &txVector)
Check whether the combination in TXVECTOR is allowed.
Definition: dsss-phy.cc:392
Time GetHeaderDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:170
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:188
DsssPhy()
Constructor for HR/DSSS PHY.
Definition: dsss-phy.cc:82
static WifiMode GetDsssRate(uint64_t rate)
Return a WifiMode for HR/DSSS corresponding to the provided rate.
Definition: dsss-phy.cc:294
const PpduFormats & GetPpduFormats() const override
Return the PPDU formats of the PHY.
Definition: dsss-phy.cc:130
uint32_t GetMaxPsduSize() const override
Get the maximum PSDU size in bytes.
Definition: dsss-phy.cc:398
Time GetPreambleDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:153
static WifiMode GetDsssRate1Mbps()
Return a WifiMode for DSSS at 1 Mbps.
WifiMode GetHeaderMode(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:113
static void InitializeModes()
Initialize all HR/DSSS modes.
Definition: dsss-phy.cc:285
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition: dsss-phy.cc:201
static WifiMode GetDsssRate11Mbps()
Return a WifiMode for HR/DSSS at 11 Mbps.
static WifiMode GetDsssRate2Mbps()
Return a WifiMode for DSSS at 2 Mbps.
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:136
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:193
virtual uint64_t ObtainNextUid(const WifiTxVector &txVector)
Obtain the next UID for the PPDU to transmit.
Definition: phy-entity.cc:1289
Ptr< WifiPhy > m_wifiPhy
Pointer to the owning WifiPhy.
Definition: phy-entity.h:981
std::map< std::string, CodeRateConstellationSizePair > ModulationLookupTable
A modulation lookup table using unique name of modulation as key.
Definition: phy-entity.h:571
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition: phy-entity.h:561
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:153
virtual uint16_t GetRxChannelWidth(const WifiTxVector &txVector) const
Return the channel width used in the reception spectrum model.
Definition: phy-entity.cc:1222
uint16_t GetGuardBandwidth(uint16_t currentChannelWidth) const
Definition: phy-entity.cc:1351
std::list< WifiMode > m_modeList
the list of supported modes
Definition: phy-entity.h:985
double GetRandomValue() const
Obtain a random value from the WifiPhy's generator.
Definition: phy-entity.cc:1185
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:271
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:1302
virtual bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Definition: phy-entity.cc:1095
@ DROP
drop PPDU and set CCA_BUSY
Definition: phy-entity.h:103
@ ABORT
abort reception of PPDU
Definition: phy-entity.h:104
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:388
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, DataRateCallback dataRateCallback, AllowedCallback isAllowedCallback)
Definition: wifi-mode.cc:270
represent a single transmission mode
Definition: wifi-mode.h:51
std::string GetUniqueName() const
Definition: wifi-mode.cc:148
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:185
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Definition: wifi-mode.cc:122
uint16_t GetChannelWidth() const
Definition: wifi-phy.cc:1073
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:775
const WifiPhyOperatingChannel & GetOperatingChannel() const
Get a const reference to the operating channel.
Definition: wifi-phy.cc:1055
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() const
#define GET_DSSS_MODE(x, m)
Definition: dsss-phy.cc:312
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:86
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:49
#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:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#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:765
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
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
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.
double RatioToDb(double ratio)
Convert from ratio to dB.
Definition: wifi-utils.cc:52
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:704
static const std::array< uint64_t, 4 > s_dsssRatesBpsList
DSSS rates in bits per second.
Definition: dsss-phy.cc:69
WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
@ WIFI_CODE_RATE_UNDEFINED
undefined coding rate
const std::array< uint64_t, 4 > & GetDsssRatesBpsList()
Get the array of possible DSSS rates.
Definition: dsss-phy.cc:77
Status of the reception of the PPDU field.
Definition: phy-entity.h:112
WifiPhyRxfailureReason reason
failure reason
Definition: phy-entity.h:114
PhyRxFailureAction actionIfFailure
action to perform in case of failure
Definition: phy-entity.h:115
bool isSuccess
outcome (true if success) of the reception
Definition: phy-entity.h:113
A struct for both SNR and PER.
Definition: phy-entity.h:147
double snr
SNR in linear scale.
Definition: phy-entity.h:148