|
155 |
YansWifiPhy::ConfigureStandard (enum WifiPhyStandard standard) |
155 |
YansWifiPhy::ConfigureStandard (enum WifiPhyStandard standard) |
156 |
{ |
156 |
{ |
157 |
NS_LOG_FUNCTION (this << standard); |
157 |
NS_LOG_FUNCTION (this << standard); |
|
|
158 |
m_standard = standard; |
158 |
switch (standard) { |
159 |
switch (standard) { |
159 |
case WIFI_PHY_STANDARD_80211a: |
160 |
case WIFI_PHY_STANDARD_80211a: |
160 |
Configure80211a (); |
161 |
Configure80211a (); |
|
380 |
double |
381 |
double |
381 |
YansWifiPhy::GetChannelFrequencyMhz() const |
382 |
YansWifiPhy::GetChannelFrequencyMhz() const |
382 |
{ |
383 |
{ |
383 |
return m_channelStartingFrequency + 5 * (GetChannelNumber() - 1); |
384 |
double channelFreq; |
|
|
385 |
switch (m_standard) { |
386 |
case WIFI_PHY_STANDARD_80211b: |
387 |
case WIFI_PHY_STANDARD_80211g: |
388 |
channelFreq = m_channelStartingFrequency + 5 * (GetChannelNumber() - 1); |
389 |
break; |
390 |
case WIFI_PHY_STANDARD_80211a: |
391 |
case WIFI_PHY_STANDARD_80211_10Mhz: |
392 |
case WIFI_PHY_STANDARD_80211_5Mhz: |
393 |
case WIFI_PHY_STANDARD_holland: |
394 |
case WIFI_PHY_STANDARD_80211p_CCH: |
395 |
case WIFI_PHY_STANDARD_80211p_SCH: |
396 |
channelFreq = m_channelStartingFrequency + 5 * GetChannelNumber(); |
397 |
break; |
398 |
default: |
399 |
NS_ASSERT (false); |
400 |
break; |
401 |
} |
402 |
|
403 |
return channelFreq; |
384 |
} |
404 |
} |
385 |
|
405 |
|
386 |
void |
406 |
void |