24 #include "ns3/string.h"
25 #include "ns3/yans-wifi-helper.h"
26 #include "ns3/mobility-helper.h"
27 #include "ns3/wifi-net-device.h"
28 #include "ns3/adhoc-wifi-mac.h"
29 #include "ns3/ap-wifi-mac.h"
30 #include "ns3/propagation-loss-model.h"
31 #include "ns3/yans-error-rate-model.h"
32 #include "ns3/constant-position-mobility-model.h"
34 #include "ns3/pointer.h"
35 #include "ns3/rng-seed-manager.h"
36 #include "ns3/config.h"
37 #include "ns3/error-model.h"
38 #include "ns3/socket.h"
39 #include "ns3/packet-socket-server.h"
40 #include "ns3/packet-socket-client.h"
41 #include "ns3/packet-socket-helper.h"
42 #include "ns3/spectrum-wifi-helper.h"
43 #include "ns3/multi-model-spectrum-channel.h"
44 #include "ns3/wifi-spectrum-signal-parameters.h"
45 #include "ns3/yans-wifi-phy.h"
46 #include "ns3/mgt-headers.h"
47 #include "ns3/ht-configuration.h"
48 #include "ns3/wifi-ppdu.h"
49 #include "ns3/wifi-psdu.h"
50 #include "ns3/vht-phy.h"
51 #include "ns3/waypoint-mobility-model.h"
52 #include "ns3/frame-exchange-manager.h"
53 #include "ns3/wifi-default-protection-manager.h"
54 #include "ns3/wifi-default-ack-manager.h"
63 int64_t currentStream = stream;
68 rmac->GetAttribute (
"Txop", ptr);
72 rmac->GetAttribute (
"VO_Txop", ptr);
76 rmac->GetAttribute (
"VI_Txop", ptr);
80 rmac->GetAttribute (
"BE_Txop", ptr);
84 rmac->GetAttribute (
"BK_Txop", ptr);
101 void DoRun (
void)
override;
143 mac->SetDevice (dev);
144 mac->SetAddress (Mac48Address::Allocate ());
148 protectionManager->SetWifiMac (
mac);
149 fem->SetProtectionManager (protectionManager);
151 ackManager->SetWifiMac (
mac);
152 fem->SetAckManager (ackManager);
157 phy->SetErrorRateModel (error);
159 phy->SetDevice (dev);
179 channel->SetPropagationDelayModel (propDelay);
180 channel->SetPropagationLossModel (propLoss);
186 Simulator::Stop (
Seconds (10.0));
189 Simulator::Destroy ();
266 void DoRun (
void)
override;
294 :
TestCase (
"InterferenceHelperSequence")
319 mac->SetDevice (dev);
320 mac->SetAddress (Mac48Address::Allocate ());
324 protectionManager->SetWifiMac (
mac);
325 fem->SetProtectionManager (protectionManager);
327 ackManager->SetWifiMac (
mac);
328 fem->SetAckManager (ackManager);
333 phy->SetErrorRateModel (error);
335 phy->SetDevice (dev);
360 channel->SetPropagationDelayModel (propDelay);
361 channel->SetPropagationLossModel (propLoss);
368 propLoss->SetDefaultLoss (999);
370 Simulator::Schedule (
Seconds (1.0),
372 DynamicCast<WifiNetDevice> (senderB->
GetDevice (0)));
374 Simulator::Schedule (
Seconds (1.0000001),
376 DynamicCast<WifiNetDevice> (rxOnly->
GetDevice (0)));
378 Simulator::Schedule (
Seconds (5.0),
380 DynamicCast<WifiNetDevice> (senderA->
GetDevice (0)));
382 Simulator::Schedule (
Seconds (7.0),
384 DynamicCast<WifiNetDevice> (senderB->
GetDevice (0)));
386 Simulator::Stop (
Seconds (100.0));
389 Simulator::Destroy ();
448 void DoRun (
void)
override;
475 :
TestCase (
"Test case for DCF immediate access with broadcast frames")
509 RngSeedManager::SetSeed (1);
510 RngSeedManager::SetRun (40);
515 channel->SetPropagationDelayModel (propDelay);
516 channel->SetPropagationLossModel (propLoss);
518 Ptr<Node> txNode = CreateObject<Node> ();
521 txMac->SetDevice (txDev);
525 protectionManager->SetWifiMac (txMac);
526 fem->SetProtectionManager (protectionManager);
528 ackManager->SetWifiMac (txMac);
529 fem->SetAckManager (ackManager);
549 txMobility->SetPosition (Vector (0.0, 0.0, 0.0));
551 txMac->SetAddress (Mac48Address::Allocate ());
564 Simulator::Stop (
Seconds (2.0));
566 Simulator::Destroy ();
576 uint32_t expectedWait1 = 1408 + (1 * 9) + 16 + (2 * 9);
577 Time expectedSecondTransmissionTime = expectedFirstTransmissionTime +
MicroSeconds (expectedWait1);
602 void DoRun (
void)
override;
619 :
TestCase (
"Test case for Bug 730"),
655 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
661 mac.SetType (
"ns3::StaWifiMac",
668 mac.SetType (
"ns3::ApWifiMac",
678 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
679 positionAlloc->Add (Vector (1.0, 0.0, 0.0));
680 mobility.SetPositionAllocator (positionAlloc);
682 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
696 packetSocket.
Install (wifiStaNode);
701 client->SetRemote (socket);
703 client->SetStartTime (
Seconds (1));
704 client->SetStopTime (
Seconds (51.0));
707 server->SetLocal (socket);
709 server->SetStartTime (
Seconds (0.0));
710 server->SetStopTime (
Seconds (52.0));
714 Simulator::Schedule (
Seconds (10.0),
Config::Set,
"/NodeList/0/DeviceList/0/RemoteStationManager/FragmentationThreshold",
StringValue (
"800"));
716 Simulator::Stop (
Seconds (55));
719 Simulator::Destroy ();
722 NS_TEST_ASSERT_MSG_EQ (result,
true,
"packet reception unexpectedly stopped after adapting fragmentation threshold!");
739 void DoRun (
void)
override;
764 :
TestCase (
"Test case for fragmentation with QoS stations"),
810 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
815 mac.SetType (
"ns3::StaWifiMac",
822 mac.SetType (
"ns3::ApWifiMac",
832 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
833 positionAlloc->Add (Vector (1.0, 0.0, 0.0));
834 mobility.SetPositionAllocator (positionAlloc);
836 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
847 sta_mac->GetAttribute (
"BE_Txop", ptr);
852 socket.SetPhysicalAddress (ap_device->
GetAddress ());
853 socket.SetProtocol (1);
857 packetSocket.
Install (wifiStaNode);
863 client->SetRemote (socket);
865 client->SetStartTime (
Seconds (1));
866 client->SetStopTime (
Seconds (3.0));
869 server->SetLocal (socket);
871 server->SetStartTime (
Seconds (0.0));
872 server->SetStopTime (
Seconds (4.0));
876 Config::Set (
"/NodeList/0/DeviceList/0/RemoteStationManager/FragmentationThreshold",
StringValue (
"400"));
882 Simulator::Destroy ();
899 void DoRun (
void)
override;
913 :
TestCase (
"Test case for setting WifiPhy channel and frequency")
939 ssid =
Ssid (
"wifi-phy-configuration");
941 macSta.
SetType (
"ns3::StaWifiMac",
951 phySta = CreateObject<YansWifiPhy> ();
959 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
970 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
981 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
991 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
993 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1002 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1004 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1013 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1015 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1024 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1026 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1035 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1037 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1046 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1048 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1057 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1060 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1069 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1072 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1081 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1085 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1094 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1096 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1099 std::ostringstream path;
1100 path <<
"/NodeList/*/DeviceList/" << staDevice.
Get(0)->GetIfIndex () <<
"/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber";
1109 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1111 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1114 std::ostringstream path;
1115 path <<
"/NodeList/*/DeviceList/" << staDevice.
Get(0)->GetIfIndex () <<
"/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber";
1126 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1128 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1132 std::ostringstream path;
1133 path <<
"/NodeList/*/DeviceList/" << staDevice.
Get(0)->GetIfIndex () <<
"/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber";
1144 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1147 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1149 bool exceptionThrown =
false;
1154 catch (
const std::runtime_error&)
1156 exceptionThrown =
true;
1164 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1166 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1180 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1182 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1184 bool exceptionThrown =
false;
1189 catch (
const std::runtime_error&)
1191 exceptionThrown =
true;
1199 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1202 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1204 bool exceptionThrown =
false;
1209 catch (
const std::runtime_error&)
1211 exceptionThrown =
true;
1220 exceptionThrown =
false;
1225 catch (
const std::runtime_error&)
1227 exceptionThrown =
true;
1239 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
1244 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1251 staDevice =
wifi.Install (
phy, macSta, wifiStaNode.
Get (0));
1271 bool exceptionThrown =
false;
1276 catch (
const std::runtime_error&)
1278 exceptionThrown =
true;
1287 exceptionThrown =
false;
1292 catch (
const std::runtime_error&)
1294 exceptionThrown =
true;
1303 Simulator::Destroy ();
1320 void DoRun (
void)
override;
1335 :
TestCase (
"Test case for Bug 2222"),
1336 m_countInternalCollisions (0)
1358 RngSeedManager::SetSeed (1);
1359 RngSeedManager::SetRun (16);
1360 int64_t streamNumber = 100;
1370 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
1375 mac.SetType (
"ns3::AdhocWifiMac",
1379 wifiDevices =
wifi.Install (
phy,
mac, wifiNodes);
1382 wifi.AssignStreams (wifiDevices, streamNumber);
1387 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1388 positionAlloc->Add (Vector (10.0, 0.0, 0.0));
1389 mobility.SetPositionAllocator (positionAlloc);
1391 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1403 packetSocket.
Install (wifiNodes);
1406 clientLowPriority->SetAttribute (
"PacketSize",
UintegerValue (1460));
1407 clientLowPriority->SetAttribute (
"MaxPackets",
UintegerValue (1));
1408 clientLowPriority->SetAttribute (
"Priority",
UintegerValue (4));
1409 clientLowPriority->SetRemote (socket);
1411 clientLowPriority->SetStartTime (
Seconds (0.0));
1412 clientLowPriority->SetStopTime (
Seconds (1.0));
1415 clientHighPriority->SetAttribute (
"PacketSize",
UintegerValue (1460));
1416 clientHighPriority->SetAttribute (
"MaxPackets",
UintegerValue (1));
1417 clientHighPriority->SetAttribute (
"Priority",
UintegerValue (6));
1418 clientHighPriority->SetRemote (socket);
1420 clientHighPriority->SetStartTime (
Seconds (0.0));
1421 clientHighPriority->SetStopTime (
Seconds (1.0));
1424 server->SetLocal (socket);
1426 server->SetStartTime (
Seconds (0.0));
1427 server->SetStopTime (
Seconds (1.0));
1431 Simulator::Stop (
Seconds (1.0));
1433 Simulator::Destroy ();
1456 void DoRun (
void)
override;
1484 :
TestCase (
"Test case for Bug 2843"),
1499 double startingFreq = c->
Begin ()->fl;
1514 if (*it == tupleForCurrentTx)
1529 for (uint8_t i = 0; i < numPackets; i++)
1532 sourceDevice->Send (pkt, destination, 0);
1539 uint16_t channelWidth = 40;
1550 lossModel->SetFrequency (5.190e9);
1551 spectrumChannel->AddPropagationLossModel (lossModel);
1554 = CreateObject<ConstantSpeedPropagationDelayModel> ();
1555 spectrumChannel->SetPropagationDelayModel (delayModel);
1566 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
1572 mac.SetType (
"ns3::StaWifiMac");
1574 staDevice =
wifi.Install (spectrumPhy,
mac, wifiStaNode);
1576 mac.SetType (
"ns3::ApWifiMac");
1582 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1583 positionAlloc->Add (Vector (1.0, 0.0, 0.0));
1584 mobility.SetPositionAllocator (positionAlloc);
1586 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1596 Simulator::Stop (
Seconds (0.8));
1599 Simulator::Destroy ();
1632 void DoRun (
void)
override;
1657 :
TestCase (
"Test case for Bug 2831"),
1658 m_reassocReqCount (0),
1659 m_reassocRespCount (0),
1660 m_countOperationalChannelWidth20 (0),
1661 m_countOperationalChannelWidth40 (0)
1713 propDelay.
SetTypeId (
"ns3::ConstantSpeedPropagationDelayModel");
1716 channel->SetPropagationDelayModel (propagationDelay);
1717 channel->SetPropagationLossModel (propagationLoss);
1719 Ptr<Node> apNode = CreateObject<Node> ();
1724 mac.SetTypeId (
"ns3::ApWifiMac");
1727 apMac->SetDevice (apDev);
1728 apMac->SetAddress (Mac48Address::Allocate ());
1732 protectionManager->SetWifiMac (apMac);
1733 fem->SetProtectionManager (protectionManager);
1735 ackManager->SetWifiMac (apMac);
1736 fem->SetAckManager (ackManager);
1738 Ptr<Node> staNode = CreateObject<Node> ();
1742 mac.SetTypeId (
"ns3::StaWifiMac");
1744 staMac->SetDevice (staDev);
1745 staMac->SetAddress (Mac48Address::Allocate ());
1747 fem = staMac->GetFrameExchangeManager ();
1748 protectionManager = CreateObject<WifiDefaultProtectionManager> ();
1749 protectionManager->SetWifiMac (staMac);
1750 fem->SetProtectionManager (protectionManager);
1751 ackManager = CreateObject<WifiDefaultAckManager> ();
1752 ackManager->SetWifiMac (staMac);
1753 fem->SetAckManager (ackManager);
1756 apMobility->SetPosition (Vector (0.0, 0.0, 0.0));
1760 m_apPhy = CreateObject<YansWifiPhy> ();
1770 staMobility->SetPosition (Vector (1.0, 0.0, 0.0));
1773 m_staPhy = CreateObject<YansWifiPhy> ();
1785 manager.
SetTypeId (
"ns3::ConstantRateWifiManager");
1798 Simulator::Stop (
Seconds (3.0));
1800 Simulator::Destroy ();
1829 void DoRun (
void)
override;
1860 :
TestCase (
"Test case for StaWifiMac scanning capability")
1893 RngSeedManager::SetSeed (1);
1894 RngSeedManager::SetRun (1);
1895 int64_t streamNumber = 1;
1900 Ptr<Node> apNodeNearest = CreateObject<Node> ();
1901 Ptr<Node> staNode = CreateObject<Node> ();
1909 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager");
1913 mac.SetType (
"ns3::ApWifiMac",
1916 mac.SetType (
"ns3::ApWifiMac",
1917 "BeaconGeneration",
BooleanValue (nearestApBeaconGeneration));
1918 apDeviceNearest =
wifi.Install (
phy,
mac, apNodeNearest);
1921 mac.SetType (
"ns3::StaWifiMac",
1923 staDevice =
wifi.Install (
phy,
mac, staNode);
1926 wifi.AssignStreams (apDevice, streamNumber);
1927 wifi.AssignStreams (apDeviceNearest, streamNumber + 1);
1928 wifi.AssignStreams (staDevice, streamNumber + 2);
1932 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1933 positionAlloc->Add (Vector (10.0, 0.0, 0.0));
1934 positionAlloc->Add (Vector (5.0, 5.0, 0.0));
1935 positionAlloc->Add (Vector (6.0, 5.0, 0.0));
1936 mobility.SetPositionAllocator (positionAlloc);
1938 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1955 Mac48Address nearestApAddr = DynamicCast<WifiNetDevice> (nearestAp->
GetDevice (0))->GetMac ()->GetAddress ();
1959 Simulator::Stop (
Seconds (0.2));
1961 Simulator::Destroy ();
1969 Mac48Address nearestApAddr = DynamicCast<WifiNetDevice> (nearestAp->
GetDevice (0))->GetMac ()->GetAddress ();
1971 Simulator::Stop (
Seconds (0.2));
1973 Simulator::Destroy ();
1981 Mac48Address secondNearestApAddr = DynamicCast<WifiNetDevice> (
nodes.Get (1)->GetDevice (0))->GetMac ()->GetAddress ();
1985 Simulator::Stop (
Seconds (1.5));
1987 Simulator::Destroy ();
2021 void DoRun (
void)
override;
2076 :
TestCase (
"Test case for Bug 2470"),
2077 m_receivedNormalMpduCount (0),
2078 m_receivedAmpduCount (0),
2079 m_failedActionCount (0),
2080 m_addbaEstablishedCount (0),
2081 m_addbaPendingCount (0),
2082 m_addbaRejectedCount (0),
2083 m_addbaNoReplyCount (0),
2084 m_addbaResetCount (0)
2097 case OriginatorBlockAckAgreement::ESTABLISHED:
2100 case OriginatorBlockAckAgreement::PENDING:
2103 case OriginatorBlockAckAgreement::REJECTED:
2106 case OriginatorBlockAckAgreement::NO_REPLY:
2109 case OriginatorBlockAckAgreement::RESET:
2150 for (uint32_t i = 0; i < numPackets; i++)
2153 sourceDevice->Send (pkt, destination, 0);
2160 RngSeedManager::SetSeed (1);
2161 RngSeedManager::SetRun (1);
2162 int64_t streamNumber = 200;
2174 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
2180 phy.Set (
"PostReceptionErrorModel", apErrorModel);
2181 mac.SetType (
"ns3::ApWifiMac",
"EnableBeaconJitter",
BooleanValue (
false));
2185 phy.Set (
"PostReceptionErrorModel", staErrorModel);
2186 mac.SetType (
"ns3::StaWifiMac");
2187 staDevice =
wifi.Install (
phy,
mac, wifiStaNode);
2190 wifi.AssignStreams (apDevice, streamNumber);
2191 wifi.AssignStreams (staDevice, streamNumber);
2195 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
2196 positionAlloc->Add (Vector (1.0, 0.0, 0.0));
2197 mobility.SetPositionAllocator (positionAlloc);
2199 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
2212 Simulator::Stop (
Seconds (1.0));
2214 Simulator::Destroy ();
2225 std::list<uint32_t> blackList;
2227 blackList.push_back (8);
2228 blackList.push_back (9);
2229 blackList.push_back (10);
2230 blackList.push_back (11);
2231 blackList.push_back (12);
2232 blackList.push_back (13);
2233 staPem->SetList (blackList);
2264 blackList.push_back (4);
2265 blackList.push_back (5);
2266 blackList.push_back (6);
2267 apPem->SetList (blackList);
2307 void DoRun (
void)
override;
2314 void RunOne (
bool useAmpdu);
2342 :
TestCase (
"Test case for issue #40"),
2345 m_txMacFinalDataFailedCount (0)
2362 for (uint8_t i = 0; i < numPackets; i++)
2365 sourceDevice->Send (pkt, destination, 0);
2383 RngSeedManager::SetSeed (1);
2384 RngSeedManager::SetRun (1);
2385 int64_t streamNumber = 100;
2397 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
2401 mac.SetType (
"ns3::ApWifiMac");
2405 mac.SetType (
"ns3::StaWifiMac");
2406 staDevice =
wifi.Install (
phy,
mac, wifiStaNode);
2409 wifi.AssignStreams (apDevice, streamNumber);
2410 wifi.AssignStreams (staDevice, streamNumber);
2414 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
2415 positionAlloc->Add (Vector (10.0, 0.0, 0.0));
2416 mobility.SetPositionAllocator (positionAlloc);
2418 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
2421 mobility.SetMobilityModel(
"ns3::WaypointMobilityModel");
2438 ap_mac->GetAttribute (
"BE_Txop", ptr);
2455 Simulator::Stop (
Seconds (3.0));
2462 Simulator::Destroy ();
2493 void DoRun (
void)
override;
2516 :
TestCase (
"Test case for issue #169")
2529 for (uint8_t i = 0; i < numPackets; i++)
2533 sourceDevice->Send (packet, destination, 0);
2540 if (psdus.begin()->second->GetSize () >= 1000)
2549 RngSeedManager::SetSeed (1);
2550 RngSeedManager::SetRun (1);
2551 int64_t streamNumber = 100;
2563 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
2567 mac.SetType (
"ns3::ApWifiMac");
2571 mac.SetType (
"ns3::StaWifiMac");
2572 staDevice =
wifi.Install (
phy,
mac, wifiStaNode);
2575 wifi.AssignStreams (apDevice, streamNumber);
2576 wifi.AssignStreams (staDevice, streamNumber);
2580 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
2581 positionAlloc->Add (Vector (1.0, 0.0, 0.0));
2582 mobility.SetPositionAllocator (positionAlloc);
2584 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
2596 Simulator::Stop (
Seconds (2.0));
2599 Simulator::Destroy ();
2623 void DoRun (
void)
override;
2658 :
TestCase (
"Test case for use of channel bonding with Ideal rate manager")
2670 switch (channelWidth)
2693 sourceDevice->Send (packet, destination, 0);
2699 if (psduMap.begin ()->second->GetSize () >= 1000)
2714 RngSeedManager::SetSeed (1);
2715 RngSeedManager::SetRun (1);
2716 int64_t streamNumber = 100;
2728 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
2732 mac.SetType (
"ns3::ApWifiMac");
2736 mac.SetType (
"ns3::StaWifiMac");
2737 staDevice =
wifi.Install (
phy,
mac, wifiStaNode);
2740 wifi.AssignStreams (apDevice, streamNumber);
2741 wifi.AssignStreams (staDevice, streamNumber);
2745 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
2746 positionAlloc->Add (Vector (50.0, 0.0, 0.0));
2747 mobility.SetPositionAllocator (positionAlloc);
2749 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
2773 Simulator::Stop (
Seconds (3.2));
2776 Simulator::Destroy ();
2793 void DoRun (
void)
override;
2839 :
TestCase (
"Test case for use of imbalanced MIMO settings with Ideal rate manager")
2851 Config::Set (
"/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/MaxSupportedTxSpatialStreams",
UintegerValue (maxStreams));
2852 Config::Set (
"/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/MaxSupportedRxSpatialStreams",
UintegerValue (maxStreams));
2859 Config::Set (
"/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/MaxSupportedTxSpatialStreams",
UintegerValue (maxStreams));
2860 Config::Set (
"/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/MaxSupportedRxSpatialStreams",
UintegerValue (maxStreams));
2867 sourceDevice->Send (packet, destination, 0);
2873 if (psdus.begin ()->second->GetSize () >= 1000)
2894 RngSeedManager::SetSeed (1);
2895 RngSeedManager::SetRun (1);
2896 int64_t streamNumber = 100;
2908 wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
2912 mac.SetType (
"ns3::ApWifiMac");
2916 mac.SetType (
"ns3::StaWifiMac");
2917 staDevice =
wifi.Install (
phy,
mac, wifiStaNode);
2920 wifi.AssignStreams (apDevice, streamNumber);
2921 wifi.AssignStreams (staDevice, streamNumber);
2925 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
2926 positionAlloc->Add (Vector (40.0, 0.0, 0.0));
2927 mobility.SetPositionAllocator (positionAlloc);
2929 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
3060 Simulator::Stop (
Seconds (10.2));
3062 Simulator::Destroy ();
3087 bool CheckDataRate (
HeRu::RuType ruType, std::string mcs, uint8_t nss, uint16_t guardInterval, uint16_t expectedDataRate);
3088 void DoRun (
void)
override;
3092 :
TestCase (
"Check data rates for different RU types.")
3099 uint16_t approxWidth = HeRu::GetBandwidth (ruType);
3101 uint64_t dataRate = round (mode.
GetDataRate (approxWidth, guardInterval, nss) / 100000.0);
3103 if (
static_cast<uint16_t
> (dataRate) != expectedDataRate)
3105 std::cerr <<
"RU=" << ruType
3108 <<
" guardInterval=" << guardInterval
3109 <<
" expected=" << expectedDataRate <<
" x100kbps"
3110 <<
" computed=" <<
static_cast<uint16_t
> (dataRate) <<
" x100kbps"
3134 &&
CheckDataRate (HeRu::RU_26_TONE,
"HeMcs10", 4, 1600, 500)
3135 &&
CheckDataRate (HeRu::RU_26_TONE,
"HeMcs11", 4, 3200, 500);
3137 NS_TEST_EXPECT_MSG_EQ (retval,
true,
"26-tone RU data rate verification for different MCSs, GIs, and Nss's failed");
3142 &&
CheckDataRate ( HeRu::RU_106_TONE,
"HeMcs9", 1, 800, 500)
3143 &&
CheckDataRate ( HeRu::RU_242_TONE,
"HeMcs5", 1, 1600, 650)
3144 &&
CheckDataRate ( HeRu::RU_484_TONE,
"HeMcs3", 1, 1600, 650)
3145 &&
CheckDataRate ( HeRu::RU_996_TONE,
"HeMcs5", 1, 3200, 2450)
3146 &&
CheckDataRate (HeRu::RU_2x996_TONE,
"HeMcs3", 1, 3200, 2450);
3148 NS_TEST_EXPECT_MSG_EQ (retval,
true,
"Data rate verification for RUs above 52-tone RU (included) failed");
Make sure that when virtual collision occurs the wifi remote station manager is triggered and the ret...
uint32_t m_countInternalCollisions
count internal collisions
void TxDataFailedTrace(std::string context, Mac48Address adr)
Transmit data failed function.
virtual ~Bug2222TestCase()
void DoRun(void) override
Implementation to actually run this TestCase.
Make sure that the ADDBA handshake process is protected.
void RxErrorCallback(std::string context, Ptr< const Packet > p, double snr)
Callback when packet is dropped.
uint16_t m_addbaResetCount
Count number of times ADDBA state machine is in reset state.
virtual ~Bug2470TestCase()
void DoRun(void) override
Implementation to actually run this TestCase.
uint16_t m_addbaRejectedCount
Count number of times ADDBA state machine is in rejected state.
void AddbaStateChangedCallback(std::string context, Time t, Mac48Address recipient, uint8_t tid, OriginatorBlockAckAgreement::State state)
Callback when ADDBA state changed.
void RunSubtest(PointerValue apErrorModel, PointerValue staErrorModel)
Run subtest for this test suite.
uint16_t m_failedActionCount
Count failed ADDBA request/response.
uint16_t m_addbaEstablishedCount
Count number of times ADDBA state machine is in established state.
void RxCallback(std::string context, Ptr< const Packet > p, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId)
Callback when packet is received.
uint16_t m_receivedNormalMpduCount
Count received normal MPDU packets on STA.
uint16_t m_addbaNoReplyCount
Count number of times ADDBA state machine is in no_reply state.
uint16_t m_addbaPendingCount
Count number of times ADDBA state machine is in pending state.
void SendPacketBurst(uint32_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination) const
Triggers the arrival of a burst of 1000 Byte-long packets in the source device.
uint16_t m_receivedAmpduCount
Count received A-MPDU packets on STA.
Make sure that the channel width and the channel number can be changed at runtime.
uint16_t m_countOperationalChannelWidth20
count number of beacon frames announcing a 20 MHz operating channel width
uint16_t m_reassocReqCount
count number of reassociation requests
uint16_t m_countOperationalChannelWidth40
count number of beacon frames announcing a 40 MHz operating channel width
virtual ~Bug2831TestCase()
void DoRun(void) override
Implementation to actually run this TestCase.
uint16_t m_reassocRespCount
count number of reassociation responses
void RxCallback(std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
Callback triggered when a packet is received by the PHYs.
Ptr< YansWifiPhy > m_apPhy
AP PHY.
Ptr< YansWifiPhy > m_staPhy
STA PHY.
void ChangeSupportedChannelWidth(void)
Function called to change the supported channel width at runtime.
Make sure that the correct channel width and center frequency have been set for OFDM basic rate trans...
void SendPacketBurst(uint8_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination) const
Triggers the arrival of a burst of 1000 Byte-long packets in the source device.
void StoreDistinctTuple(std::string context, Ptr< SpectrumSignalParameters > txParams)
Stores the distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel,...
void DoRun(void) override
Implementation to actually run this TestCase.
std::vector< FreqWidthSubbandModulationTuple > m_distinctTuples
vector of distinct {starting frequency, channelWidth, Number of subbands in SpectrumModel,...
uint16_t m_channelWidth
channel width (in MHz)
std::tuple< double, uint16_t, uint32_t, WifiModulationClass > FreqWidthSubbandModulationTuple
A tuple of {starting frequency, channelWidth, Number of subbands in SpectrumModel,...
virtual ~Bug2843TestCase()
Make sure that when changing the fragmentation threshold during the simulation, the TCP transmission ...
virtual ~Bug730TestCase()
void Receive(std::string context, Ptr< const Packet > p, const Address &adr)
Receive function.
void DoRun(void) override
Implementation to actually run this TestCase.
uint32_t m_received
received
Data rate verification test for MCSs of different RU sizes.
void DoRun(void) override
Implementation to actually run this TestCase.
HeRuMcsDataRateTestCase()
bool CheckDataRate(HeRu::RuType ruType, std::string mcs, uint8_t nss, uint16_t guardInterval, uint16_t expectedDataRate)
Compare the data rate computed for the provided combination with standard defined one.
Make sure that Ideal rate manager properly selects MCS based on the configured channel width.
WifiMode m_txMode
Store the last selected mode to send data packet.
void DoRun(void) override
Implementation to actually run this TestCase.
IdealRateManagerChannelWidthTest()
void SendPacket(Ptr< NetDevice > sourceDevice, Address &destination)
Triggers the transmission of a 1000 Byte-long data packet from the source device.
virtual ~IdealRateManagerChannelWidthTest()
void CheckLastSelectedMode(WifiMode expectedMode)
Check if the selected WifiMode is correct.
void TxCallback(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback that indicates a PSDU is being transmitted.
void ChangeChannelWidth(uint16_t channelWidth)
Change the configured channel width for all nodes.
Test to validate that Ideal rate manager properly selects TXVECTOR in scenarios where MIMO is used.
void CheckLastSelectedNss(uint8_t expectedNss)
Check if the selected Nss is correct.
virtual ~IdealRateManagerMimoTest()
void TxCallback(std::string context, WifiConstPsduMap psdus, WifiTxVector txVector, double txPowerW)
Callback that indicates a PSDU is being transmitted.
void SetApMimoSettings(uint8_t antennas, uint8_t maxStreams)
Change the configured MIMO settings for AP node.
WifiTxVector m_txVector
Store the last TXVECTOR used to transmit Data.
void SetStaMimoSettings(uint8_t antennas, uint8_t maxStreams)
Change the configured MIMO settings for STA node.
void SendPacket(Ptr< NetDevice > sourceDevice, Address &destination)
Triggers the transmission of a 1000 Byte-long data packet from the source device.
void DoRun(void) override
Implementation to actually run this TestCase.
void CheckLastSelectedMode(WifiMode expectedMode)
Check if the selected WifiMode is correct.
IdealRateManagerMimoTest()
void SwitchCh(Ptr< WifiNetDevice > dev)
Switch channel function.
InterferenceHelperSequenceTest()
void DoRun(void) override
Implementation to actually run this TestCase.
void SendOnePacket(Ptr< WifiNetDevice > dev)
Send one packet function.
ObjectFactory m_manager
manager
ObjectFactory m_propDelay
propagation delay
Ptr< Node > CreateOne(Vector pos, Ptr< YansWifiChannel > channel)
Create one function.
Make sure that Ideal rate manager is able to handle non best-effort traffic.
void SendPackets(uint8_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination, uint8_t priority)
Triggers the transmission of a 1000 Byte-long data packet from the source device.
void TxCallback(std::string context, WifiConstPsduMap psdus, WifiTxVector txVector, double txPowerW)
Callback that indicates a PSDU is being transmitted.
virtual ~Issue169TestCase()
void DoRun(void) override
Implementation to actually run this TestCase.
Make sure that Ideal rate manager recovers when the station is moving away from the access point.
uint16_t m_txCount
Count number of transmitted data packets.
uint16_t m_txMacFinalDataFailedCount
Count number of unsuccessfully transmitted data packets.
void RunOne(bool useAmpdu)
Run one function.
uint16_t m_rxCount
Count number of successfully received data packets.
void RxSuccessCallback(std::string context, Ptr< const Packet > p)
Callback when packet is successfully received.
void DoRun(void) override
Implementation to actually run this TestCase.
virtual ~Issue40TestCase()
void TxFinalDataFailedCallback(std::string context, Mac48Address address)
Transmit final data failed function.
void SendPackets(uint8_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination)
Triggers the arrival of 1000 Byte-long packets in the source device.
Make sure that fragmentation works with QoS stations.
void DoRun(void) override
Implementation to actually run this TestCase.
uint32_t m_received
received packets
QosFragmentationTestCase()
virtual ~QosFragmentationTestCase()
uint32_t m_fragments
transmitted fragments
void Transmit(std::string context, Ptr< const Packet > p, double power)
Callback invoked when PHY transmits a packet.
void Receive(std::string context, Ptr< const Packet > p, const Address &adr)
Receive function.
Qos Utils Is Old Packet Test.
void DoRun(void) override
Implementation to actually run this TestCase.
QosUtilsIsOldPacketTest()
Set Channel Frequency Test.
void DoRun(void) override
Implementation to actually run this TestCase.
Ptr< YansWifiPhy > GetYansWifiPhyPtr(const NetDeviceContainer &nc) const
Get yans wifi phy function.
SetChannelFrequencyTest()
Make sure that Wifi STA is correctly associating to the best AP (i.e., nearest from STA).
void DoRun(void) override
Implementation to actually run this TestCase.
StaWifiMacScanningTestCase()
void TurnBeaconGenerationOn(Ptr< Node > apNode)
Turn beacon generation on the AP node.
Mac48Address m_associatedApBssid
Associated AP's bssid.
virtual ~StaWifiMacScanningTestCase()
void TurnApOff(Ptr< Node > apNode)
Turn the AP node off.
NodeContainer Setup(bool nearestApBeaconGeneration, bool staActiveProbe)
Setup test.
void AssocCallback(std::string context, Mac48Address bssid)
Callback function on STA assoc event.
void CreateOne(Vector pos, Ptr< YansWifiChannel > channel)
Create one function.
void RunOne(void)
Run one function.
void SendOnePacket(Ptr< WifiNetDevice > dev)
Send one packet function.
ObjectFactory m_manager
manager
ObjectFactory m_propDelay
propagation delay
void DoRun(void) override
Implementation to actually run this TestCase.
a polymophic address class
AttributeValue implementation for Boolean.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
RuType
The different HE Resource Unit (RU) types.
The HT Operation Information Element.
uint8_t GetStaChannelWidth(void) const
Return the STA channel width.
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Instantiate subclasses of ns3::Object.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
State
Represents the state for this agreement.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
an address for a packet socket
void SetProtocol(uint16_t protocol)
Set the protocol.
void SetPhysicalAddress(const Address address)
Set the destination address.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
Give ns3::PacketSocket powers to ns3::Node.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
Hold objects of type Ptr<T>.
calculate a propagation delay.
Smart pointer class similar to boost::intrusive_ptr.
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
base class for all MAC-level wifi objects.
indicates whether the socket has a priority set.
void SetPriority(uint8_t priority)
Set the tag's priority.
size_t GetNumBands() const
Bands::const_iterator Begin() const
Const Iterator to the model Bands container start.
Make it easy to create and manage PHY objects for the spectrum model.
void SetChannel(Ptr< SpectrumChannel > channel)
The IEEE 802.11 SSID Information Element.
AttributeValue implementation for Ssid.
Hold variables of type string.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
Handle packet fragmentation and retransmissions for data and management frames.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Hold an unsigned integer type.
Vector3D Vector
Vector alias typedef for compatibility with mobility models.
void AddWaypoint(const Waypoint &waypoint)
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
represent a single transmission mode
WifiModulationClass GetModulationClass() const
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Hold together all Wifi-related objects.
void SetMac(const Ptr< WifiMac > mac)
void SetHtConfiguration(Ptr< HtConfiguration > htConfiguration)
Ptr< WifiMac > GetMac(void) const
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Address GetAddress(void) const override
Address GetBroadcast(void) const override
Ptr< WifiPhy > GetPhy(void) const
void SetRemoteStationManager(const Ptr< WifiRemoteStationManager > manager)
uint32_t GetIfIndex(void) const override
void SetPhy(const Ptr< WifiPhy > phy)
void SetErrorRateModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
void Set(std::string name, const AttributeValue &v)
uint8_t GetChannelNumber(void) const
Return current channel number.
const WifiPhyOperatingChannel & GetOperatingChannel(void) const
Get a const reference to the operating channel.
virtual void SetChannelNumber(uint8_t id)
Set channel number.
virtual void ConfigureStandardAndBand(WifiPhyStandard standard, WifiPhyBand band)
Configure the PHY-level parameters for different Wi-Fi standard.
virtual void SetChannelWidth(uint16_t channelWidth)
If the operating channel for this object has not been set yet, the given channel width is saved and w...
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
void SetOperatingChannel(uint8_t number, uint16_t frequency, uint16_t width)
Set the operating channel according to the specified parameters.
uint16_t GetChannelWidth(void) const
uint16_t GetFrequency(void) const
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
bool IsSet(void) const
Return true if a valid channel has been set, false otherwise.
hold a list of per-remote-station state.
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.
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
uint16_t GetChannelWidth(void) const
manage and create wifi channel objects for the YANS model.
Make it easy to create and manage PHY objects for the YANS model.
void SetChannel(const Ptr< YansWifiChannel > channel)
Set the YansWifiChannel this YansWifiPhy is to be connected to.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
void Connect(std::string path, const CallbackBase &cb)
void Set(std::string path, const AttributeValue &value)
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_EXPECT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report if not.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
bool QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber)
This function checks if packet with sequence number seqNumber is an "old" packet.
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
@ WIFI_PHY_STANDARD_80211a
OFDM PHY (Clause 17)
@ WIFI_PHY_STANDARD_80211ax
HE PHY (clause 26)
@ WIFI_STANDARD_80211n_5GHZ
@ WIFI_STANDARD_80211ax_5GHZ
@ WIFI_STANDARD_80211n_2_4GHZ
@ WIFI_STANDARD_80211ax_2_4GHZ
@ WIFI_STANDARD_80211ax_6GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
@ WIFI_MOD_CLASS_OFDM
OFDM (Clause 17)
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
@ NORMAL_MPDU
The MPDU is not part of an A-MPDU.
void SendOnePacket(Ptr< LrWpanPhy > sender, Ptr< LrWpanPhy > receiver)
Send one packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
std::map< WifiSpectrumBand, double > RxPowerWattPerChannelBand
A map of the received power (Watts) for each band.
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...
MpduType type
type of MPDU
SignalNoiseDbm structure.
static void AssignWifiRandomStreams(Ptr< WifiMac > mac, int64_t stream)
static WifiTestSuite g_wifiTestSuite
the test suite