85 |
85 |
86 WifiHelper wifi = WifiHelper::Default (); |
86 WifiHelper wifi = WifiHelper::Default (); |
87 wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ); |
87 wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ); |
88 HtWifiMacHelper mac = HtWifiMacHelper::Default (); |
88 HtWifiMacHelper mac = HtWifiMacHelper::Default (); |
89 |
89 |
90 Ssid ssid = Ssid ("ns380211n"); |
90 StringValue DataRate = HtWifiMacHelper::DataRateForMcs (i); |
91 |
|
92 std::stringstream sstmp; |
|
93 std::string strtmp, dataRate; |
|
94 StringValue DataRate; |
|
95 |
|
96 sstmp << i; |
|
97 sstmp >> strtmp; |
|
98 dataRate = "HtMcs" + strtmp; |
|
99 DataRate = StringValue (dataRate); |
|
100 |
|
101 wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", DataRate, |
91 wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", DataRate, |
102 "ControlMode", DataRate); |
92 "ControlMode", DataRate); |
|
93 |
|
94 Ssid ssid = Ssid ("ns3-80211n"); |
|
95 |
103 mac.SetType ("ns3::StaWifiMac", |
96 mac.SetType ("ns3::StaWifiMac", |
104 "Ssid", SsidValue (ssid), |
97 "Ssid", SsidValue (ssid), |
105 "ActiveProbing", BooleanValue (false)); |
98 "ActiveProbing", BooleanValue (false)); |
106 |
99 |
107 NetDeviceContainer staDevice; |
100 NetDeviceContainer staDevice; |