equal
deleted
inserted
replaced
31 #include "ns3/constant-position-mobility-model.h" |
31 #include "ns3/constant-position-mobility-model.h" |
32 #include "ns3/node.h" |
32 #include "ns3/node.h" |
33 #include "ns3/simulator.h" |
33 #include "ns3/simulator.h" |
34 #include "ns3/test.h" |
34 #include "ns3/test.h" |
35 #include "ns3/object-factory.h" |
35 #include "ns3/object-factory.h" |
|
36 #include "dca-txop.h" |
|
37 #include "ns3/pointer.h" |
36 |
38 |
37 namespace ns3 { |
39 namespace ns3 { |
38 |
40 |
39 class WifiTest : public Test |
41 class WifiTest : public Test |
40 { |
42 { |
67 WifiTest::CreateOne (Vector pos, Ptr<YansWifiChannel> channel) |
69 WifiTest::CreateOne (Vector pos, Ptr<YansWifiChannel> channel) |
68 { |
70 { |
69 Ptr<Node> node = CreateObject<Node> (); |
71 Ptr<Node> node = CreateObject<Node> (); |
70 Ptr<WifiNetDevice> dev = CreateObject<WifiNetDevice> (); |
72 Ptr<WifiNetDevice> dev = CreateObject<WifiNetDevice> (); |
71 |
73 |
|
74 Ptr<DcaTxop> queue = CreateObject<DcaTxop> (); |
72 Ptr<WifiMac> mac = m_mac.Create<WifiMac> (); |
75 Ptr<WifiMac> mac = m_mac.Create<WifiMac> (); |
|
76 mac->SetAttribute("DcaTxop", PointerValue (queue)); |
73 Ptr<ConstantPositionMobilityModel> mobility = CreateObject<ConstantPositionMobilityModel> (); |
77 Ptr<ConstantPositionMobilityModel> mobility = CreateObject<ConstantPositionMobilityModel> (); |
74 Ptr<YansWifiPhy> phy = CreateObject<YansWifiPhy> (); |
78 Ptr<YansWifiPhy> phy = CreateObject<YansWifiPhy> (); |
75 Ptr<ErrorRateModel> error = CreateObject<YansErrorRateModel> (); |
79 Ptr<ErrorRateModel> error = CreateObject<YansErrorRateModel> (); |
76 phy->SetErrorRateModel (error); |
80 phy->SetErrorRateModel (error); |
77 phy->SetChannel (channel); |
81 phy->SetChannel (channel); |