View | Details | Raw Unified | Return to bug 2412
Collapse All | Expand All

(-)a/src/mesh/helper/mesh-helper.cc (-2 / +8 lines)
 Lines 95-105    Link Here 
95
          uint32_t channel = 0;
95
          uint32_t channel = 0;
96
          if (m_spreadChannelPolicy == ZERO_CHANNEL)
96
          if (m_spreadChannelPolicy == ZERO_CHANNEL)
97
            {
97
            {
98
              channel = 0;
98
              // XXX this variable is used as a channel number; can't be zero
99
              //channel = 0;
100
              // mesh by default uses 802.11a
101
              channel = 36;
99
            }
102
            }
100
          if (m_spreadChannelPolicy == SPREAD_CHANNELS)
103
          if (m_spreadChannelPolicy == SPREAD_CHANNELS)
101
            {
104
            {
102
              channel = i * 5;
105
              // XXX this variable is used as a channel number; can't be zero
106
              //channel = i * 5;
107
              // mesh by default uses 802.11a
108
              channel = 36 + i * 4;
103
            }
109
            }
104
          Ptr<WifiNetDevice> iface = CreateInterface (phyHelper, node, channel);
110
          Ptr<WifiNetDevice> iface = CreateInterface (phyHelper, node, channel);
105
          mp->AddInterface (iface);
111
          mp->AddInterface (iface);
(-)a/src/wifi/model/wifi-phy.h (-12 / +8 lines)
 Lines 550-567    Link Here 
550
  virtual WifiMode GetMcs (uint8_t mcs) const = 0;
550
  virtual WifiMode GetMcs (uint8_t mcs) const = 0;
551
551
552
  /**
552
  /**
553
   * \brief Set channel number.
553
   * \brief Set channel number.  If channels are bonded together, this sets
554
   *
554
   * the channel number of the lowest of the bonded channels.
555
   * Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)
556
   *
557
   * where Starting channel frequency is standard-dependent, see SetStandard()
558
   * as defined in (Section 18.3.8.4.2 "Channel numbering"; IEEE Std 802.11-2012).
559
   *
555
   *
560
   * \param id the channel number
556
   * \param id the channel number
561
   */
557
   */
562
  virtual void SetChannelNumber (uint16_t id) = 0;
558
  virtual void SetChannelNumber (uint16_t id) = 0;
563
  /**
559
  /**
564
   * Return current channel number.
560
   * Return current channel number.  If channels are bonded together, this
561
   * returns the channel number of the lowest of the bonded channels.
565
   *
562
   *
566
   * \return the current channel number
563
   * \return the current channel number
567
   */
564
   */
 Lines 1210-1220    Link Here 
1210
  virtual int64_t AssignStreams (int64_t stream) = 0;
1207
  virtual int64_t AssignStreams (int64_t stream) = 0;
1211
1208
1212
  /**
1209
  /**
1213
   * \param freq the operating frequency on this node.
1210
   * If multiple channels are bonded together, this method returns the
1214
   */
1211
   * center frequncy of the lowest bonded channel
1215
  virtual void SetFrequency (uint32_t freq) = 0;
1212
   *
1216
  /**
1213
   * \return the center frequency (MHz) of the currently configured channel
1217
   * \return the operating frequency on this node
1218
   */
1214
   */
1219
  virtual uint32_t GetFrequency (void) const = 0;
1215
  virtual uint32_t GetFrequency (void) const = 0;
1220
  /**
1216
  /**
(-)a/src/wifi/model/yans-wifi-phy.cc (-46 / +132 lines)
 Lines 47-52    Link Here 
47
47
48
NS_OBJECT_ENSURE_REGISTERED (YansWifiPhy);
48
NS_OBJECT_ENSURE_REGISTERED (YansWifiPhy);
49
49
50
// XXX refactor to use C++-11 initialization list once bug 2270 patched
51
std::map<uint32_t, double>
52
YansWifiPhy::CreateChannelMap ()
53
{
54
  std::map<uint32_t, double> m;
55
  m[8] = 5040; m[12] = 5060; m[16] = 5080;
56
  m[36] = 5180; m[38] = 5190; m[40] = 5200; m[42] = 5210; m[44] = 5220;
57
  m[46] = 5230; m[48] = 5240; m[50] = 5250; m[52] = 5260; m[54] = 5270;
58
  m[56] = 5280; m[58] = 5290; m[60] = 5300; m[62] = 5310; m[64] = 5320;
59
  m[100] = 5500; m[102] = 5510; m[104] = 5520; m[106] = 5530; m[108] = 5540;
60
  m[110] = 5550; m[112] = 5560; m[114] = 5570; m[116] = 5580; m[118] = 5590;
61
  m[120] = 5600; m[122] = 5610; m[124] = 5620; m[126] = 5630; m[128] = 5640;
62
  m[132] = 5660; m[134] = 5670; m[136] = 5680; m[138] = 5690; m[140] = 5700;
63
  m[142] = 5710; m[144] = 5720; 
64
  m[149] = 5745; m[151] = 5755; m[153] = 5765; m[155] = 5775; m[157] = 5785;
65
  m[159] = 5795; m[161] = 5805; m[165] = 5825;
66
  m[184] = 4920; m[188] = 4940; m[192] = 4960; m[196] = 4980;
67
  // 802.11p
68
  m[175] = 5875; m[181] = 5905;
69
  return m;
70
}
71
std::map<uint32_t, double> YansWifiPhy::m_channelMap =  YansWifiPhy::CreateChannelMap ();
72
73
// XXX refactor to use C++-11 initialization list once bug 2270 patched
74
std::map<uint32_t, double>
75
YansWifiPhy::CreateChannelMap10Mhz ()
76
{
77
  std::map<uint32_t, double> m;
78
  m[7] = 5035; m[9] = 5045; m[11] = 5055; m[183] = 4915; m[185] = 4925;
79
  m[187] = 4935; m[189] = 4945;
80
  // 802.11p
81
  m[172] = 5860; m[174] = 5870; m[176] = 5880; m[178] = 5890;
82
  m[180] = 5900; m[182] = 5910; m[184] = 5920;
83
  return m;
84
}
85
std::map<uint32_t, double> YansWifiPhy::m_channelMap10Mhz =  YansWifiPhy::CreateChannelMap10Mhz ();
86
50
TypeId
87
TypeId
51
YansWifiPhy::GetTypeId (void)
88
YansWifiPhy::GetTypeId (void)
52
{
89
{
 Lines 126-135    Link Here 
126
                                         &YansWifiPhy::GetChannelNumber),
163
                                         &YansWifiPhy::GetChannelNumber),
127
                   MakeUintegerChecker<uint16_t> ())
164
                   MakeUintegerChecker<uint16_t> ())
128
    .AddAttribute ("Frequency",
165
    .AddAttribute ("Frequency",
129
                   "The operating frequency.",
166
                   "The center frequency of the currently configured channel, in MHz",
130
                   UintegerValue (2407),
167
                   TypeId::ATTR_GET,
131
                   MakeUintegerAccessor (&YansWifiPhy::GetFrequency,
168
                   UintegerValue (2412), // This value is ignored since there is no setter
132
                                         &YansWifiPhy::SetFrequency),
169
                   MakeUintegerAccessor (&YansWifiPhy::GetFrequency),
133
                   MakeUintegerChecker<uint32_t> ())
170
                   MakeUintegerChecker<uint32_t> ())
134
    .AddAttribute ("TxAntennas",
171
    .AddAttribute ("TxAntennas",
135
                   "The number of supported Tx antennas.",
172
                   "The number of supported Tx antennas.",
 Lines 192-198    Link Here 
192
    m_channelNumber (1),
229
    m_channelNumber (1),
193
    m_endRxEvent (),
230
    m_endRxEvent (),
194
    m_endPlcpRxEvent (),
231
    m_endPlcpRxEvent (),
195
    m_channelStartingFrequency (0),
232
    m_channelCenterFrequency (0),
233
    m_standard (WIFI_PHY_STANDARD_80211a),
196
    m_mpdusNum (0),
234
    m_mpdusNum (0),
197
    m_plcpSuccess (false),
235
    m_plcpSuccess (false),
198
    m_txMpduReferenceNumber (0xffffffff),
236
    m_txMpduReferenceNumber (0xffffffff),
 Lines 252-263    Link Here 
252
      ConfigureHolland ();
290
      ConfigureHolland ();
253
      break;
291
      break;
254
    case WIFI_PHY_STANDARD_80211n_2_4GHZ:
292
    case WIFI_PHY_STANDARD_80211n_2_4GHZ:
255
      m_channelStartingFrequency = 2407;
293
      Configure80211n_2_4Ghz ();
256
      Configure80211n ();
257
      break;
294
      break;
258
    case WIFI_PHY_STANDARD_80211n_5GHZ:
295
    case WIFI_PHY_STANDARD_80211n_5GHZ:
259
      m_channelStartingFrequency = 5e3;
296
      Configure80211n_5Ghz ();
260
      Configure80211n ();
261
      break;
297
      break;
262
    case WIFI_PHY_STANDARD_80211ac:
298
    case WIFI_PHY_STANDARD_80211ac:
263
      Configure80211ac ();
299
      Configure80211ac ();
 Lines 266-271    Link Here 
266
      NS_ASSERT (false);
302
      NS_ASSERT (false);
267
      break;
303
      break;
268
    }
304
    }
305
  m_standard = standard;
269
}
306
}
270
307
271
void
308
void
 Lines 493-504    Link Here 
493
  return m_channelSwitchDelay;
530
  return m_channelSwitchDelay;
494
}
531
}
495
532
496
double
497
YansWifiPhy::GetChannelFrequencyMhz () const
498
{
499
  return m_channelStartingFrequency + 5 * GetChannelNumber ();
500
}
501
502
void
533
void
503
YansWifiPhy::SetSleepMode (void)
534
YansWifiPhy::SetSleepMode (void)
504
{
535
{
 Lines 820-826    Link Here 
820
  struct mpduInfo aMpdu;
851
  struct mpduInfo aMpdu;
821
  aMpdu.type = mpdutype;
852
  aMpdu.type = mpdutype;
822
  aMpdu.mpduRefNumber = m_txMpduReferenceNumber;
853
  aMpdu.mpduRefNumber = m_txMpduReferenceNumber;
823
  NotifyMonitorSniffTx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, preamble, txVector, aMpdu);
854
  NotifyMonitorSniffTx (packet, (uint16_t)GetFrequency (), GetChannelNumber (), dataRate500KbpsUnits, preamble, txVector, aMpdu);
824
  m_state->SwitchToTx (txDuration, packet, GetPowerDbm (txVector.GetTxPowerLevel ()), txVector, preamble);
855
  m_state->SwitchToTx (txDuration, packet, GetPowerDbm (txVector.GetTxPowerLevel ()), txVector, preamble);
825
  m_channel->Send (this, packet, GetPowerDbm (txVector.GetTxPowerLevel ()) + m_txGainDb, txVector, preamble, mpdutype, txDuration);
856
  m_channel->Send (this, packet, GetPowerDbm (txVector.GetTxPowerLevel ()) + m_txGainDb, txVector, preamble, mpdutype, txDuration);
826
}
857
}
 Lines 872-879    Link Here 
872
YansWifiPhy::Configure80211a (void)
903
YansWifiPhy::Configure80211a (void)
873
{
904
{
874
  NS_LOG_FUNCTION (this);
905
  NS_LOG_FUNCTION (this);
875
  m_channelStartingFrequency = 5e3; //5.000 GHz
906
  m_channelCenterFrequency = 5180; //MHz
876
  SetChannelWidth (20); //20 MHz
907
  m_channelNumber = 36;
908
  SetChannelWidth (20); //MHz
877
909
878
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ());
910
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ());
879
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate9Mbps ());
911
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate9Mbps ());
 Lines 889-896    Link Here 
889
YansWifiPhy::Configure80211b (void)
921
YansWifiPhy::Configure80211b (void)
890
{
922
{
891
  NS_LOG_FUNCTION (this);
923
  NS_LOG_FUNCTION (this);
892
  m_channelStartingFrequency = 2407; //2.407 GHz
924
  m_channelCenterFrequency = 2412; //MHz
893
  SetChannelWidth (22); //22 MHz
925
  m_channelNumber = 1;
926
  SetChannelWidth (22); //MHz
894
927
895
  m_deviceRateSet.push_back (WifiPhy::GetDsssRate1Mbps ());
928
  m_deviceRateSet.push_back (WifiPhy::GetDsssRate1Mbps ());
896
  m_deviceRateSet.push_back (WifiPhy::GetDsssRate2Mbps ());
929
  m_deviceRateSet.push_back (WifiPhy::GetDsssRate2Mbps ());
 Lines 919-926    Link Here 
919
YansWifiPhy::Configure80211_10Mhz (void)
952
YansWifiPhy::Configure80211_10Mhz (void)
920
{
953
{
921
  NS_LOG_FUNCTION (this);
954
  NS_LOG_FUNCTION (this);
922
  m_channelStartingFrequency = 5e3; //5.000 GHz, suppose 802.11a
955
  m_channelCenterFrequency = 5035; //MHz
923
  SetChannelWidth (10); //10 MHz
956
  m_channelNumber = 7;
957
  SetChannelWidth (10); //MHz
924
958
925
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate3MbpsBW10MHz ());
959
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate3MbpsBW10MHz ());
926
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate4_5MbpsBW10MHz ());
960
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate4_5MbpsBW10MHz ());
 Lines 936-943    Link Here 
936
YansWifiPhy::Configure80211_5Mhz (void)
970
YansWifiPhy::Configure80211_5Mhz (void)
937
{
971
{
938
  NS_LOG_FUNCTION (this);
972
  NS_LOG_FUNCTION (this);
939
  m_channelStartingFrequency = 5e3; //5.000 GHz, suppose 802.11a
973
  m_channelCenterFrequency = 5180; //MHz
940
  SetChannelWidth (5); //5 MHz
974
  m_channelNumber = 36;
975
  SetChannelWidth (5); //MHz
941
976
942
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate1_5MbpsBW5MHz ());
977
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate1_5MbpsBW5MHz ());
943
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate2_25MbpsBW5MHz ());
978
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate2_25MbpsBW5MHz ());
 Lines 953-960    Link Here 
953
YansWifiPhy::ConfigureHolland (void)
988
YansWifiPhy::ConfigureHolland (void)
954
{
989
{
955
  NS_LOG_FUNCTION (this);
990
  NS_LOG_FUNCTION (this);
956
  m_channelStartingFrequency = 5e3; //5.000 GHz
991
  m_channelCenterFrequency = 5180; //MHz
957
  SetChannelWidth (20); //20 MHz
992
  m_channelNumber = 36;
993
  SetChannelWidth (20); //MHz
958
994
959
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ());
995
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ());
960
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate12Mbps ());
996
  m_deviceRateSet.push_back (WifiPhy::GetOfdmRate12Mbps ());
 Lines 1033-1061    Link Here 
1033
}
1069
}
1034
1070
1035
void
1071
void
1036
YansWifiPhy::Configure80211n (void)
1072
YansWifiPhy::Configure80211n_2_4Ghz (void)
1037
{
1073
{
1038
  NS_LOG_FUNCTION (this);
1074
  NS_LOG_FUNCTION (this);
1039
  if (m_channelStartingFrequency >= 2400 && m_channelStartingFrequency <= 2500) //at 2.4 GHz
1075
  Configure80211b ();
1040
    {
1076
  Configure80211g ();
1041
      Configure80211b ();
1077
  m_channelCenterFrequency = 2412; //MHz
1042
      Configure80211g ();
1078
  m_channelNumber = 1;
1043
    }
1044
  if (m_channelStartingFrequency >= 5000 && m_channelStartingFrequency <= 6000) //at 5 GHz
1045
    {
1046
      Configure80211a ();
1047
    }
1048
  SetChannelWidth (20); //20 MHz
1079
  SetChannelWidth (20); //20 MHz
1049
  m_bssMembershipSelectorSet.push_back (HT_PHY);
1080
  m_bssMembershipSelectorSet.push_back (HT_PHY);
1050
  ConfigureHtDeviceMcsSet ();
1081
  ConfigureHtDeviceMcsSet ();
1051
}
1082
}
1052
1083
1053
void
1084
void
1085
YansWifiPhy::Configure80211n_5Ghz (void)
1086
{
1087
  NS_LOG_FUNCTION (this);
1088
  Configure80211a ();
1089
  m_channelCenterFrequency = 5180; //MHz
1090
  m_channelNumber = 36;
1091
  SetChannelWidth (20); //MHz
1092
  m_bssMembershipSelectorSet.push_back (HT_PHY);
1093
  ConfigureHtDeviceMcsSet ();
1094
}
1095
1096
void
1054
YansWifiPhy::Configure80211ac (void)
1097
YansWifiPhy::Configure80211ac (void)
1055
{
1098
{
1056
  NS_LOG_FUNCTION (this);
1099
  NS_LOG_FUNCTION (this);
1057
  m_channelStartingFrequency = 5e3; //5.000 GHz
1100
  Configure80211n_5Ghz ();
1058
  Configure80211n ();
1101
  m_channelCenterFrequency = 5210; //MHz
1102
  m_channelNumber = 42;
1059
  SetChannelWidth (80); //80 MHz
1103
  SetChannelWidth (80); //80 MHz
1060
1104
1061
  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs0 ());
1105
  m_deviceMcsSet.push_back (WifiPhy::GetVhtMcs0 ());
 Lines 1202-1208    Link Here 
1202
          struct mpduInfo aMpdu;
1246
          struct mpduInfo aMpdu;
1203
          aMpdu.type = mpdutype;
1247
          aMpdu.type = mpdutype;
1204
          aMpdu.mpduRefNumber = m_rxMpduReferenceNumber;
1248
          aMpdu.mpduRefNumber = m_rxMpduReferenceNumber;
1205
          NotifyMonitorSniffRx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, event->GetPreambleType (), event->GetTxVector (), aMpdu, signalNoise);
1249
          NotifyMonitorSniffRx (packet, (uint16_t)GetFrequency (), GetChannelNumber (), dataRate500KbpsUnits, event->GetPreambleType (), event->GetTxVector (), aMpdu, signalNoise);
1206
          m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetTxVector (), event->GetPreambleType ());
1250
          m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetTxVector (), event->GetPreambleType ());
1207
        }
1251
        }
1208
      else
1252
      else
 Lines 1232-1243    Link Here 
1232
}
1276
}
1233
1277
1234
void
1278
void
1235
YansWifiPhy::SetFrequency (uint32_t freq)
1236
{
1237
  m_channelStartingFrequency = freq;
1238
}
1239
1240
void
1241
YansWifiPhy::SetNumberOfTransmitAntennas (uint32_t tx)
1279
YansWifiPhy::SetNumberOfTransmitAntennas (uint32_t tx)
1242
{
1280
{
1243
  m_numberOfTransmitters = tx;
1281
  m_numberOfTransmitters = tx;
 Lines 1283-1289    Link Here 
1283
uint32_t
1321
uint32_t
1284
YansWifiPhy::GetFrequency (void) const
1322
YansWifiPhy::GetFrequency (void) const
1285
{
1323
{
1286
  return m_channelStartingFrequency;
1324
  double frequency;
1325
  switch (m_standard)
1326
    {
1327
    case WIFI_PHY_STANDARD_80211b:
1328
    case WIFI_PHY_STANDARD_80211g:
1329
    case WIFI_PHY_STANDARD_80211n_2_4GHZ:
1330
      NS_ASSERT_MSG (m_channelNumber >= 1 && m_channelNumber <= 14, "Invalid channel number " << m_channelNumber);
1331
      if (m_channelNumber < 14)
1332
        {
1333
          return (2407 + 5 * m_channelNumber);
1334
        }
1335
      else
1336
        {
1337
          return 2484; // channel 14
1338
        }
1339
      NS_ASSERT (false);
1340
      break;
1341
    case WIFI_PHY_STANDARD_80211a:
1342
    case WIFI_PHY_STANDARD_80211n_5GHZ:
1343
    case WIFI_PHY_STANDARD_80211ac:
1344
    case WIFI_PHY_STANDARD_holland:
1345
      NS_ASSERT_MSG (m_channelNumber >= 7 && m_channelNumber <= 196, "Invalid channel number " << m_channelNumber);
1346
      frequency = m_channelMap [m_channelNumber];
1347
      NS_ASSERT (frequency); // not found in map
1348
      return (frequency);
1349
      break;
1350
    case WIFI_PHY_STANDARD_80211_10MHZ:
1351
      // 10 MHz channels are defined in some regions; 
1352
      frequency = m_channelMap10Mhz [m_channelNumber];
1353
      if (frequency == 0)
1354
        {
1355
          // Users may instead choose a 20/40/80/160 MHz channel number;
1356
          // in this case, reuse those center frequencies
1357
          frequency = m_channelMap [m_channelNumber];
1358
        }
1359
      NS_ASSERT (frequency); // not found in map
1360
      return frequency;
1361
      break;
1362
    case WIFI_PHY_STANDARD_80211_5MHZ:
1363
      // Since no standard channel numbers exist for 5MHz channels, we
1364
      // reuse the 20/40/80/160 channel center frequencies here
1365
      frequency = m_channelMap [m_channelNumber];
1366
      NS_ASSERT (frequency); // not found in map
1367
      break;
1368
    default:
1369
      NS_ASSERT_MSG (false, "Standard " << m_standard << " not found");
1370
      break;
1371
    }
1372
  return 0;
1287
}
1373
}
1288
1374
1289
uint32_t
1375
uint32_t
(-)a/src/wifi/model/yans-wifi-phy.h (-26 / +21 lines)
 Lines 24-29    Link Here 
24
#define YANS_WIFI_PHY_H
24
#define YANS_WIFI_PHY_H
25
25
26
#include <stdint.h>
26
#include <stdint.h>
27
#include <map>
27
#include "ns3/callback.h"
28
#include "ns3/callback.h"
28
#include "ns3/event-id.h"
29
#include "ns3/event-id.h"
29
#include "ns3/packet.h"
30
#include "ns3/packet.h"
 Lines 77-104    Link Here 
77
   * \param channel the YansWifiChannel this YansWifiPhy is to be connected to
78
   * \param channel the YansWifiChannel this YansWifiPhy is to be connected to
78
   */
79
   */
79
  void SetChannel (Ptr<YansWifiChannel> channel);
80
  void SetChannel (Ptr<YansWifiChannel> channel);
80
  /**
81
  // Inherited
81
   * Set the current channel number.
82
   *
83
   * \param id the channel number
84
   */
85
  void SetChannelNumber (uint16_t id);
82
  void SetChannelNumber (uint16_t id);
86
  /**
83
  // Inherited
87
   * Return the current channel number.
88
   *
89
   * \return the current channel number
90
   */
91
  uint16_t GetChannelNumber (void) const;
84
  uint16_t GetChannelNumber (void) const;
92
  /**
85
  /**
93
   * \return the required time for channel switch operation of this WifiPhy
86
   * \return the required time for channel switch operation of this WifiPhy
94
   */
87
   */
95
  Time GetChannelSwitchDelay (void) const;
88
  Time GetChannelSwitchDelay (void) const;
96
  /**
97
   * Return current center channel frequency in MHz.
98
   *
99
   * \return the current center channel frequency in MHz
100
   */
101
  double GetChannelFrequencyMhz () const;
102
89
103
  /**
90
  /**
104
   * Starting receiving the plcp of a packet (i.e. the first bit of the preamble has arrived).
91
   * Starting receiving the plcp of a packet (i.e. the first bit of the preamble has arrived).
 Lines 314-326    Link Here 
314
   */
301
   */
315
  int64_t AssignStreams (int64_t stream);
302
  int64_t AssignStreams (int64_t stream);
316
303
317
  /**
304
  // Inherited
318
   * \param freq the operating frequency on this node (2.4 GHz or 5GHz).
319
   */
320
  virtual void SetFrequency (uint32_t freq);
321
  /**
322
   * \return the operating frequency on this node
323
   */
324
  virtual uint32_t GetFrequency (void) const;
305
  virtual uint32_t GetFrequency (void) const;
325
  /**
306
  /**
326
   * \param tx the number of transmitters on this node.
307
   * \param tx the number of transmitters on this node.
 Lines 456-464    Link Here 
456
  void ConfigureHolland (void);
437
  void ConfigureHolland (void);
457
  /**
438
  /**
458
   * Configure YansWifiPhy with appropriate channel frequency and
439
   * Configure YansWifiPhy with appropriate channel frequency and
459
   * supported rates for 802.11n standard.
440
   * supported rates for 802.11n standard at 2.4 GHz.
460
   */
441
   */
461
  void Configure80211n (void);
442
  void Configure80211n_2_4Ghz (void);
443
  /**
444
   * Configure YansWifiPhy with appropriate channel frequency and
445
   * supported rates for 802.11n standard at 5 GHz.
446
   */
447
  void Configure80211n_5Ghz (void);
462
  /**
448
  /**
463
   * Configure YansWifiPhy with appropriate channel frequency and
449
   * Configure YansWifiPhy with appropriate channel frequency and
464
   * supported rates for 802.11ac standard.
450
   * supported rates for 802.11ac standard.
 Lines 561-568    Link Here 
561
  EventId m_endRxEvent;
547
  EventId m_endRxEvent;
562
  EventId m_endPlcpRxEvent;
548
  EventId m_endPlcpRxEvent;
563
549
550
  // XXX refactor to use C++-11 initialization list once bug 2270 patched
551
  static std::map<uint32_t, double> CreateChannelMap ();
552
  static std::map<uint32_t, double> m_channelMap;
553
  
554
  // XXX refactor to use C++-11 initialization list once bug 2270 patched
555
  static std::map<uint32_t, double> CreateChannelMap10Mhz ();
556
  static std::map<uint32_t, double> m_channelMap10Mhz;
557
564
  Ptr<UniformRandomVariable> m_random;  //!< Provides uniform random variables.
558
  Ptr<UniformRandomVariable> m_random;  //!< Provides uniform random variables.
565
  double m_channelStartingFrequency;    //!< Standard-dependent center frequency of 0-th channel in MHz
559
  double m_channelCenterFrequency;    //!< Standard-dependent center frequency of configured channel in MHz
560
  enum WifiPhyStandard m_standard; //!< Standard configured for this PHY
566
  Ptr<WifiPhyStateHelper> m_state;      //!< Pointer to WifiPhyStateHelper
561
  Ptr<WifiPhyStateHelper> m_state;      //!< Pointer to WifiPhyStateHelper
567
  InterferenceHelper m_interference;    //!< Pointer to InterferenceHelper
562
  InterferenceHelper m_interference;    //!< Pointer to InterferenceHelper
568
  Time m_channelSwitchDelay;            //!< Time required to switch between channel
563
  Time m_channelSwitchDelay;            //!< Time required to switch between channel

Return to bug 2412