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/simulator.h"
30 #include "ns3/log.h"
31 
32 namespace ns3 {
33 
34 NS_LOG_COMPONENT_DEFINE ("DsssPhy");
35 
36 /*******************************************************
37  * HR/DSSS PHY (IEEE 802.11-2016, clause 16)
38  *******************************************************/
39 
40 /* *NS_CHECK_STYLE_OFF* */
42  { WIFI_PREAMBLE_LONG, { WIFI_PPDU_FIELD_PREAMBLE, //PHY preamble
43  WIFI_PPDU_FIELD_NON_HT_HEADER, //PHY header
45  { WIFI_PREAMBLE_SHORT, { WIFI_PPDU_FIELD_PREAMBLE, //Short PHY preamble
46  WIFI_PPDU_FIELD_NON_HT_HEADER, //Short PHY header
48 };
49 
51  // Unique name Code rate Constellation size
52  { "DsssRate1Mbps", { WIFI_CODE_RATE_UNDEFINED, 2 } },
53  { "DsssRate2Mbps", { WIFI_CODE_RATE_UNDEFINED, 4 } },
54  { "DsssRate5_5Mbps", { WIFI_CODE_RATE_UNDEFINED, 16 } },
55  { "DsssRate11Mbps", { WIFI_CODE_RATE_UNDEFINED, 256 } }
56 };
57 /* *NS_CHECK_STYLE_ON* */
58 
59 // DSSS rates in bits per second
60 static const std::array<uint64_t, 4> s_dsssRatesBpsList = {1000000, 2000000, 5500000, 11000000};
61 
62 const std::array<uint64_t, 4>& GetDsssRatesBpsList (void)
63 {
64  return s_dsssRatesBpsList;
65 };
66 
68 {
69  NS_LOG_FUNCTION (this);
70  for (const auto & rate : GetDsssRatesBpsList ())
71  {
72  WifiMode mode = GetDsssRate (rate);
73  NS_LOG_LOGIC ("Add " << mode << " to list");
74  m_modeList.emplace_back (mode);
75  }
76 }
77 
79 {
80  NS_LOG_FUNCTION (this);
81 }
82 
84 DsssPhy::GetSigMode (WifiPpduField field, const WifiTxVector& txVector) const
85 {
86  switch (field)
87  {
88  case WIFI_PPDU_FIELD_PREAMBLE: //consider header mode for preamble (useful for InterferenceHelper)
90  return GetHeaderMode (txVector);
91  default:
92  return PhyEntity::GetSigMode (field, txVector);
93  }
94 }
95 
97 DsssPhy::GetHeaderMode (const WifiTxVector& txVector) const
98 {
99  if (txVector.GetPreambleType () == WIFI_PREAMBLE_LONG
100  || txVector.GetMode () == GetDsssRate1Mbps ())
101  {
102  //Section 16.2.3 "PPDU field definitions" and Section 16.2.2.2 "Long PPDU format"; IEEE Std 802.11-2016
103  return GetDsssRate1Mbps ();
104  }
105  else
106  {
107  //Section 16.2.2.3 "Short PPDU format"; IEEE Std 802.11-2016
108  return GetDsssRate2Mbps ();
109  }
110 }
111 
114 {
115  return m_dsssPpduFormats;
116 }
117 
118 Time
119 DsssPhy::GetDuration (WifiPpduField field, const WifiTxVector& txVector) const
120 {
121  if (field == WIFI_PPDU_FIELD_PREAMBLE)
122  {
123  return GetPreambleDuration (txVector); //SYNC + SFD or shortSYNC + shortSFD
124  }
125  else if (field == WIFI_PPDU_FIELD_NON_HT_HEADER)
126  {
127  return GetHeaderDuration (txVector); //PHY header or short PHY header
128  }
129  else
130  {
131  return PhyEntity::GetDuration (field, txVector);
132  }
133 }
134 
135 Time
137 {
138  if (txVector.GetPreambleType () == WIFI_PREAMBLE_SHORT
139  && (txVector.GetMode ().GetDataRate (22) > 1000000))
140  {
141  //Section 16.2.2.3 "Short PPDU format" Figure 16-2 "Short PPDU format"; IEEE Std 802.11-2016
142  return MicroSeconds (72);
143  }
144  else
145  {
146  //Section 16.2.2.2 "Long PPDU format" Figure 16-1 "Long PPDU format"; IEEE Std 802.11-2016
147  return MicroSeconds (144);
148  }
149 }
150 
151 Time
153 {
154  if (txVector.GetPreambleType () == WIFI_PREAMBLE_SHORT
155  && (txVector.GetMode ().GetDataRate (22) > 1000000))
156  {
157  //Section 16.2.2.3 "Short PPDU format" and Figure 16-2 "Short PPDU format"; IEEE Std 802.11-2016
158  return MicroSeconds (24);
159  }
160  else
161  {
162  //Section 16.2.2.2 "Long PPDU format" and Figure 16-1 "Short PPDU format"; IEEE Std 802.11-2016
163  return MicroSeconds (48);
164  }
165 }
166 
167 Time
168 DsssPhy::GetPayloadDuration (uint32_t size, const WifiTxVector& txVector, WifiPhyBand /* band */, MpduType /* mpdutype */,
169  bool /* incFlag */, uint32_t & /* totalAmpduSize */, double & /* totalAmpduNumSymbols */,
170  uint16_t /* staId */) const
171 {
172  return MicroSeconds (lrint (ceil ((size * 8.0) / (txVector.GetMode ().GetDataRate (22) / 1.0e6))));
173 }
174 
176 DsssPhy::BuildPpdu (const WifiConstPsduMap & psdus, const WifiTxVector& txVector, Time ppduDuration)
177 {
178  NS_LOG_FUNCTION (this << psdus << txVector << ppduDuration);
179  return Create<DsssPpdu> (psdus.begin ()->second, txVector, ppduDuration,
180  ObtainNextUid (txVector));
181 }
182 
185 {
186  NS_LOG_FUNCTION (this << field << *event);
187  if (field == WIFI_PPDU_FIELD_NON_HT_HEADER)
188  {
189  return EndReceiveHeader (event); //PHY header or short PHY header
190  }
191  return PhyEntity::DoEndReceiveField (field, event);
192 }
193 
196 {
197  NS_LOG_FUNCTION (this << *event);
199  NS_LOG_DEBUG ("Long/Short PHY header: SNR(dB)=" << RatioToDb (snrPer.snr) << ", PER=" << snrPer.per);
200  PhyFieldRxStatus status (GetRandomValue () > snrPer.per);
201  if (status.isSuccess)
202  {
203  NS_LOG_DEBUG ("Received long/short PHY header");
204  if (!IsConfigSupported (event->GetPpdu ()))
205  {
206  status = PhyFieldRxStatus (false, UNSUPPORTED_SETTINGS, DROP);
207  }
208  }
209  else
210  {
211  NS_LOG_DEBUG ("Abort reception because long/short PHY header reception failed");
212  status.reason = L_SIG_FAILURE;
213  status.actionIfFailure = ABORT;
214  }
215  return status;
216 }
217 
220 {
221  const WifiTxVector& txVector = ppdu->GetTxVector ();
222  uint16_t centerFrequency = GetCenterFrequencyForChannelWidth (txVector);
223  uint16_t channelWidth = txVector.GetChannelWidth ();
224  NS_LOG_FUNCTION (this << centerFrequency << channelWidth << txPowerW);
225  NS_ABORT_MSG_IF (channelWidth != 22, "Invalid channel width for DSSS");
227  return v;
228 }
229 
230 void
232 {
233  for (const auto & rate : GetDsssRatesBpsList ())
234  {
235  GetDsssRate (rate);
236  }
237 }
238 
239 WifiMode
240 DsssPhy::GetDsssRate (uint64_t rate)
241 {
242  switch (rate)
243  {
244  case 1000000:
245  return GetDsssRate1Mbps ();
246  case 2000000:
247  return GetDsssRate2Mbps ();
248  case 5500000:
249  return GetDsssRate5_5Mbps ();
250  case 11000000:
251  return GetDsssRate11Mbps ();
252  default:
253  NS_ABORT_MSG ("Inexistent rate (" << rate << " bps) requested for HR/DSSS");
254  return WifiMode ();
255  }
256 }
257 
258 #define GET_DSSS_MODE(x, m) \
259 WifiMode \
260 DsssPhy::Get ## x (void) \
261 { \
262  static WifiMode mode = CreateDsssMode (#x, WIFI_MOD_CLASS_ ## m); \
263  return mode; \
264 } \
265 
266 // Clause 15 rates (DSSS)
267 GET_DSSS_MODE (DsssRate1Mbps, DSSS);
268 GET_DSSS_MODE (DsssRate2Mbps, DSSS);
269 // Clause 16 rates (HR/DSSS)
270 GET_DSSS_MODE (DsssRate5_5Mbps, HR_DSSS);
271 GET_DSSS_MODE (DsssRate11Mbps, HR_DSSS);
272 #undef GET_DSSS_MODE
273 
274 WifiMode
275 DsssPhy::CreateDsssMode (std::string uniqueName,
276  WifiModulationClass modClass)
277 {
278  // Check whether uniqueName is in lookup table
279  const auto it = m_dsssModulationLookupTable.find (uniqueName);
280  NS_ASSERT_MSG (it != m_dsssModulationLookupTable.end (), "DSSS or HR/DSSS mode cannot be created because it is not in the lookup table!");
281  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!");
282 
283  return WifiModeFactory::CreateWifiMode (uniqueName,
284  modClass,
285  true,
286  MakeBoundCallback (&GetCodeRate, uniqueName),
288  MakeBoundCallback (&GetDataRate, uniqueName, modClass), //PhyRate is equivalent to DataRate
289  MakeCallback (&GetDataRateFromTxVector), //PhyRate is equivalent to DataRate
290  MakeBoundCallback (&GetDataRate, uniqueName, modClass),
293 }
294 
296 DsssPhy::GetCodeRate (const std::string& name)
297 {
298  return m_dsssModulationLookupTable.at (name).first;
299 }
300 
301 uint16_t
302 DsssPhy::GetConstellationSize (const std::string& name)
303 {
304  return m_dsssModulationLookupTable.at (name).second;
305 }
306 
307 uint64_t
308 DsssPhy::GetDataRateFromTxVector (const WifiTxVector& txVector, uint16_t /* staId */)
309 {
310  WifiMode mode = txVector.GetMode ();
311  return DsssPhy::GetDataRate (mode.GetUniqueName (),
312  mode.GetModulationClass (),
313  22, 0, 1); //dummy values since unused
314 }
315 
316 uint64_t
317 DsssPhy::GetDataRate (const std::string& name, WifiModulationClass modClass, uint16_t /* channelWidth */, uint16_t /* guardInterval */, uint8_t /* nss */)
318 {
319  uint16_t constellationSize = GetConstellationSize (name);
320  uint16_t divisor = 0;
321  if (modClass == WIFI_MOD_CLASS_DSSS)
322  {
323  divisor = 11;
324  }
325  else if (modClass == WIFI_MOD_CLASS_HR_DSSS)
326  {
327  divisor = 8;
328  }
329  else
330  {
331  NS_FATAL_ERROR ("Incorrect modulation class, must specify either WIFI_MOD_CLASS_DSSS or WIFI_MOD_CLASS_HR_DSSS!");
332  }
333  uint16_t numberOfBitsPerSubcarrier = static_cast<uint16_t> (log2 (constellationSize));
334  uint64_t dataRate = ((11000000 / divisor) * numberOfBitsPerSubcarrier);
335  return dataRate;
336 }
337 
338 bool
339 DsssPhy::IsModeAllowed (uint16_t /* channelWidth */, uint8_t /* nss */)
340 {
341  return true;
342 }
343 
344 uint32_t
346 {
347  return 4095;
348 }
349 
350 } //namespace ns3
351 
352 namespace {
353 
357 static class ConstructorDsss
358 {
359 public:
361  {
363  ns3::Ptr<ns3::DsssPhy> phyEntity = ns3::Create<ns3::DsssPhy> ();
365  ns3::WifiPhy::AddStaticPhyEntity (ns3::WIFI_MOD_CLASS_DSSS, phyEntity); //use same entity when plain DSSS modes are used
366  }
368 
369 }
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802...
double snr
SNR in linear scale.
Definition: phy-entity.h:138
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:350
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
DsssPhy()
Constructor for HR/DSSS PHY.
Definition: dsss-phy.cc:67
PhyRxFailureAction actionIfFailure
action to perform in case of failure
Definition: phy-entity.h:115
const std::array< uint64_t, 4 > & GetDsssRatesBpsList(void)
Definition: dsss-phy.cc:62
Declaration of ns3::DsssPpdu class.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition: wifi-ppdu.h:38
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Definition: callback.h:1703
WifiPhyRxfailureReason reason
failure reason
Definition: phy-entity.h:114
static void InitializeModes(void)
Initialize all HR/DSSS modes.
Definition: dsss-phy.cc:231
static bool IsModeAllowed(uint16_t channelWidth, uint8_t nss)
Check whether the combination of <WifiMode, channel width, NSS> is allowed.
Definition: dsss-phy.cc:339
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
static WifiMode GetDsssRate5_5Mbps(void)
Return a WifiMode for HR/DSSS at 5.5 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:119
static uint16_t GetConstellationSize(const std::string &name)
Return the constellation size from the DSSS or HR/DSSS mode&#39;s unique name using ModulationLookupTable...
Definition: dsss-phy.cc:302
static Ptr< SpectrumValue > CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, double txPowerW, uint16_t guardBandwidth)
Create a transmit power spectral density corresponding to DSSS.
WifiMode GetHeaderMode(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:97
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:47
std::map< std::string, CodeRateConstellationSizePair > ModulationLookupTable
A modulation lookup table using unique name of modulation as key.
Definition: phy-entity.h:509
static WifiMode GetDsssRate11Mbps(void)
Return a WifiMode for HR/DSSS at 11 Mbps.
Time GetHeaderDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:152
MpduType
The type of an MPDU.
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...
HR/DSSS (Clause 16)
WifiPreamble GetPreambleType(void) const
SYNC + SFD fields for DSSS or ERP, shortSYNC + shortSFD fields for HR/DSSS or ERP, HT-GF-STF + HT-GF-LTF1 fields for HT-GF, L-STF + L-LTF fields otherwise.
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:184
SnrPer GetPhyHeaderSnrPer(WifiPpduField field, Ptr< Event > event) const
Obtain the SNR and PER of the PPDU field from the WifiPhy&#39;s InterferenceHelper class.
Definition: phy-entity.cc:250
Status of the reception of the PPDU field.
Definition: phy-entity.h:110
virtual bool IsConfigSupported(Ptr< const WifiPpdu > ppdu) const
Checks if the signaled configuration (excluding bandwidth) is supported by the PHY.
Definition: phy-entity.cc:901
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:168
Constructor class for DSSS modes.
Definition: dsss-phy.cc:357
static uint64_t GetDataRate(const std::string &name, WifiModulationClass modClass, uint16_t channelWidth, uint16_t guardInterval, uint8_t nss)
Return the data rate from the DSSS or HR/DSSS mode&#39;s unique name and the supplied parameters...
Definition: dsss-phy.cc:317
WifiPpduField
The type of PPDU field (grouped for convenience)
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:84
PhyFieldRxStatus EndReceiveHeader(Ptr< Event > event)
End receiving the header, perform DSSS-specific actions, and provide the status of the reception...
Definition: dsss-phy.cc:195
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:176
virtual uint64_t ObtainNextUid(const WifiTxVector &txVector)
Obtain the next UID for the PPDU to transmit.
Definition: phy-entity.cc:1015
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:1022
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:159
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
std::string GetUniqueName(void) const
Definition: wifi-mode.cc:122
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:136
const PpduFormats & GetPpduFormats(void) const override
Return the PPDU formats of the PHY.
Definition: dsss-phy.cc:113
uint16_t WifiCodeRate
These constants define the various convolutional coding rates used for the OFDM transmission modes in...
static WifiMode CreateWifiMode(std::string uniqueName, WifiModulationClass modClass, bool isMandatory, CodeRateCallback codeRateCallback, ConstellationSizeCallback constellationSizeCallback, PhyRateCallback phyRateCallback, PhyRateFromTxVectorCallback phyRateFromTxVectorCallback, DataRateCallback dataRateCallback, DataRateFromTxVectorCallback dataRateFromTxVectorCallback, ModeAllowedCallback isModeAllowedCallback)
Definition: wifi-mode.cc:242
abort reception of PPDU
Definition: phy-entity.h:103
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:141
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< SpectrumValue > GetTxPowerSpectralDensity(double txPowerW, Ptr< const WifiPpdu > ppdu) const override
Definition: dsss-phy.cc:219
static const std::array< uint64_t, 4 > s_dsssRatesBpsList
Definition: dsss-phy.cc:60
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:884
static WifiMode GetDsssRate(uint64_t rate)
Return a WifiMode for HR/DSSS corresponding to the provided rate.
Definition: dsss-phy.cc:240
drop PPDU and set CCA_BUSY
Definition: phy-entity.h:102
Time GetPreambleDuration(const WifiTxVector &txVector) const
Definition: dsss-phy.cc:136
static WifiCodeRate GetCodeRate(const std::string &name)
Return the WifiCodeRate from the DSSS or HR/DSSS mode&#39;s unique name using ModulationLookupTable.
Definition: dsss-phy.cc:296
double RatioToDb(double ratio)
Convert from ratio to dB.
Definition: wifi-utils.cc:53
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:210
#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
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:32
static uint64_t GetDataRateFromTxVector(const WifiTxVector &txVector, uint16_t staId)
Return the data rate corresponding to the supplied TXVECTOR.
Definition: dsss-phy.cc:308
static WifiMode GetDsssRate1Mbps(void)
Return a WifiMode for DSSS at 1 Mbps.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
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:275
std::map< WifiPreamble, std::vector< WifiPpduField > > PpduFormats
A map of PPDU field elements per preamble type.
Definition: phy-entity.h:499
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
const uint16_t WIFI_CODE_RATE_UNDEFINED
double GetRandomValue(void) const
Obtain a random value from the WifiPhy&#39;s generator.
Definition: phy-entity.cc:991
static const PpduFormats m_dsssPpduFormats
DSSS and HR/DSSS PPDU formats.
Definition: dsss-phy.h:208
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
uint16_t GetChannelWidth(void) const
GET_DSSS_MODE(DsssRate1Mbps, DSSS)
virtual uint32_t GetMaxPsduSize(void) const override
Get the maximum PSDU size in bytes (see Table 15-5 DSSS PHY characteristics of IEEE 802...
Definition: dsss-phy.cc:345
static class anonymous_namespace{dsss-phy.cc}::ConstructorDsss g_constructor_dsss
the constructor for DSSS modes
PHY header field for DSSS or ERP, short PHY header field for HR/DSSS or ERP, field not present for HT...
Declaration of ns3::DsssPhy class.
static WifiMode GetDsssRate2Mbps(void)
Return a WifiMode for DSSS at 2 Mbps.
virtual ~DsssPhy()
Destructor for HR/DSSS PHY.
Definition: dsss-phy.cc:78
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Definition: wifi-mode.cc:100
std::list< WifiMode > m_modeList
the list of supported modes
Definition: phy-entity.h:811
uint16_t GetGuardBandwidth(uint16_t currentChannelWidth) const
Definition: phy-entity.cc:1055
Ptr< WifiPpdu > BuildPpdu(const WifiConstPsduMap &psdus, const WifiTxVector &txVector, Time ppduDuration) override
Build amendment-specific PPDU.
Definition: dsss-phy.cc:176