A Discrete-Event Network Simulator
API
ocb-test-suite.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Dalian University of Technology
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Junling Bu <linlinjavaer@gmail.com>
19  */
20 #include "ns3/test.h"
21 #include "ns3/rng-seed-manager.h"
22 #include "ns3/config.h"
23 #include "ns3/data-rate.h"
24 #include "ns3/vector.h"
25 #include "ns3/string.h"
26 #include "ns3/ssid.h"
27 #include "ns3/packet-socket-address.h"
28 #include "ns3/mobility-model.h"
29 #include "ns3/yans-wifi-helper.h"
30 #include "ns3/position-allocator.h"
31 #include "ns3/packet-socket-helper.h"
32 #include "ns3/mobility-helper.h"
33 #include "ns3/wifi-net-device.h"
34 #include "ns3/packet-socket-server.h"
35 #include "ns3/packet-socket-client.h"
36 #include <iostream>
37 
38 #include "ns3/ocb-wifi-mac.h"
39 #include "ns3/wifi-80211p-helper.h"
40 #include "ns3/wave-mac-helper.h"
41 
42 using namespace ns3;
43 // helper function to assign streams to random variables, to control
44 // randomness in the tests
45 static void
47 {
48  int64_t currentStream = stream;
49  Ptr<RegularWifiMac> rmac = DynamicCast<RegularWifiMac> (mac);
50  if (rmac)
51  {
52  PointerValue ptr;
53  rmac->GetAttribute ("DcaTxop", ptr);
54  Ptr<DcaTxop> dcaTxop = ptr.Get<DcaTxop> ();
55  currentStream += dcaTxop->AssignStreams (currentStream);
56 
57  rmac->GetAttribute ("VO_EdcaTxopN", ptr);
58  Ptr<EdcaTxopN> vo_edcaTxopN = ptr.Get<EdcaTxopN> ();
59  currentStream += vo_edcaTxopN->AssignStreams (currentStream);
60 
61  rmac->GetAttribute ("VI_EdcaTxopN", ptr);
62  Ptr<EdcaTxopN> vi_edcaTxopN = ptr.Get<EdcaTxopN> ();
63  currentStream += vi_edcaTxopN->AssignStreams (currentStream);
64 
65  rmac->GetAttribute ("BE_EdcaTxopN", ptr);
66  Ptr<EdcaTxopN> be_edcaTxopN = ptr.Get<EdcaTxopN> ();
67  currentStream += be_edcaTxopN->AssignStreams (currentStream);
68 
69  rmac->GetAttribute ("BK_EdcaTxopN", ptr);
70  Ptr<EdcaTxopN> bk_edcaTxopN = ptr.Get<EdcaTxopN> ();
71  currentStream += bk_edcaTxopN->AssignStreams (currentStream);
72  }
73 }
74 
76 {
77 public:
78  OcbWifiMacTestCase (void);
79  virtual ~OcbWifiMacTestCase (void);
80 private:
81  virtual void DoRun (void);
82 
83  void MacAssoc (std::string context,Mac48Address bssid);
84  void PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble);
85  void PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower);
86  Vector GetCurrentPosition (uint32_t i);
87  void AdvancePosition (Ptr<Node> node);
88 
89  void PreRandomConfiguration (void);
90  void ConfigureApStaMode (Ptr<Node> static_node, Ptr<Node> mobile_node);
91  void ConfigureAdhocMode (Ptr<Node> static_node, Ptr<Node> mobile_node);
92  void ConfigureOcbMode (Ptr<Node> static_node, Ptr<Node> mobile_node);
93  void PostDeviceConfiguration (Ptr<Node> static_node, Ptr<Node> mobile_node);
94 
96  Vector phytx_pos;
97 
99  Vector macassoc_pos;
100 
102  Vector phyrx_pos;
103 
104  // nodes.Get (0) is static node
105  // nodes.Get (1) is mobile node
107 };
108 
110  : TestCase ("Association time: Ap+Sta mode vs Adhoc mode vs Ocb mode")
111 {
112 }
113 
115 {
116 }
117 
118 // mobility is like walk on line with velocity 5 m/s
119 // We prefer to update 0.5m every 0.1s rather than 5m every 1s
120 void
122 {
124  Vector pos = mobility->GetPosition ();
125  pos.x -= 0.5;
126  if (pos.x < 1.0 )
127  {
128  pos.x = 1.0;
129  return;
130  }
131  mobility->SetPosition (pos);
132 
133  Simulator::Schedule (Seconds (0.1), &OcbWifiMacTestCase::AdvancePosition, this, node);
134 }
135 
136 // here are only two nodes, a stationary and a mobile one
137 // the i value of the first = 0; the i value of second = 1.
138 Vector
140 {
141  NS_ASSERT (i < 2);
142  Ptr<Node> node = nodes.Get (i);
144  Vector pos = mobility->GetPosition ();
145  return pos;
146 }
147 
148 void
149 OcbWifiMacTestCase::MacAssoc (std::string context,Mac48Address bssid)
150 {
151  if (macassoc_time == Time (0))
152  {
153  macassoc_time = Now ();
155  std::cout << "MacAssoc time = " << macassoc_time.GetNanoSeconds ()
156  << " position = " << macassoc_pos
157  << std::endl;
158  }
159 }
160 
161 // We want to get the time that sta receives the first beacon frame from AP
162 // it means that in this time this sta has ability to receive frame
163 void
164 OcbWifiMacTestCase::PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble)
165 {
166  if (phyrx_time == Time (0))
167  {
168  phyrx_time = Now ();
170  std::cout << "PhyRxOk time = " << phyrx_time.GetNanoSeconds ()
171  << " position = " << phyrx_pos
172  << std::endl;
173  }
174 }
175 
176 // We want to get the time that STA sends the first data packet successfully
177 void
178 OcbWifiMacTestCase::PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
179 {
180  WifiMacHeader h;
181  packet->PeekHeader (h);
182  if ((phytx_time == Time (0)) && h.IsData ())
183  {
184  phytx_time = Now ();
186  std::cout << "PhyTx data time = " << phytx_time.GetNanoSeconds ()
187  << " position = " << phytx_pos
188  << std::endl;
189  }
190 }
191 
192 void
194 {
195  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
196  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
197  wifiPhy.SetChannel (wifiChannel.Create ());
198 
199  Ssid ssid = Ssid ("wifi-default");
200  WifiMacHelper wifiStaMac;
201  wifiStaMac.SetType ("ns3::StaWifiMac", "Ssid", SsidValue (ssid));
202  WifiMacHelper wifiApMac;
203  wifiApMac.SetType ("ns3::ApWifiMac","Ssid", SsidValue (ssid));
204 
207  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
208  "DataMode", StringValue ("OfdmRate6MbpsBW10MHz"),
209  "ControlMode",StringValue ("OfdmRate6MbpsBW10MHz"));
210  wifi.Install (wifiPhy, wifiStaMac, mobile_node);
211  wifi.Install (wifiPhy, wifiApMac, static_node);
212 }
213 
214 void
216 {
217  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
218  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
219  wifiPhy.SetChannel (wifiChannel.Create ());
220 
221  WifiMacHelper wifiMac;
222  wifiMac.SetType ("ns3::AdhocWifiMac");
223 
226  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
227  "DataMode", StringValue ("OfdmRate6MbpsBW10MHz"),
228  "ControlMode",StringValue ("OfdmRate6MbpsBW10MHz"));
229  wifi.Install (wifiPhy, wifiMac, mobile_node);
230  wifi.Install (wifiPhy, wifiMac, static_node);
231 }
232 
233 void
235 {
236  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
237  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
238  wifiPhy.SetChannel (wifiChannel.Create ());
239 
240  NqosWaveMacHelper wifi80211pMac = NqosWaveMacHelper::Default ();
241 
242  Wifi80211pHelper wifi80211p = Wifi80211pHelper::Default ();
243  wifi80211p.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
244  "DataMode", StringValue ("OfdmRate6MbpsBW10MHz"),
245  "ControlMode",StringValue ("OfdmRate6MbpsBW10MHz"));
246  wifi80211p.Install (wifiPhy, wifi80211pMac, mobile_node);
247  wifi80211p.Install (wifiPhy, wifi80211pMac, static_node);
248 }
249 
250 void
252 {
253  Ptr<WifiNetDevice> static_device = DynamicCast<WifiNetDevice> (static_node->GetDevice (0));
254  Ptr<WifiNetDevice> mobile_device = DynamicCast<WifiNetDevice> (mobile_node->GetDevice (0));
255 
256  // Fix the stream assignment to the Dcf Txop objects (backoffs)
257  // The below stream assignment will result in the DcaTxop object
258  // using a backoff value of zero for this test when the
259  // DcaTxop::EndTxNoAck() calls to StartBackoffNow()
260  AssignWifiRandomStreams (static_device->GetMac (), 21);
261  AssignWifiRandomStreams (mobile_device->GetMac (), 22);
262 
263  // setup mobility
264  // the initial position of static node is at 0,
265  // and the initial position of mobile node is 350.
267  mobility.Install (mobile_node);
268  mobility.Install (static_node);
269  Ptr<MobilityModel> mm = mobile_node->GetObject<MobilityModel> ();
270  Vector possta = mm->GetPosition ();
271  possta.x = 350;
272  mm->SetPosition (possta);
273  Simulator::Schedule (Seconds (1.0), &OcbWifiMacTestCase::AdvancePosition, this, mobile_node);
274 
275  PacketSocketAddress socket;
276  socket.SetSingleDevice (mobile_device->GetIfIndex ());
277  socket.SetPhysicalAddress (static_device->GetAddress ());
278  socket.SetProtocol (1);
279 
280  // give packet socket powers to nodes.
281  PacketSocketHelper packetSocket;
282  packetSocket.Install (static_node);
283  packetSocket.Install (mobile_node);
284 
285  Ptr<PacketSocketClient> client = CreateObject<PacketSocketClient> ();
286  client->SetRemote (socket);
287  mobile_node->AddApplication (client);
288  client->SetStartTime (Seconds (0.5));
289  client->SetStopTime (Seconds (70.0));
290 
291  Ptr<PacketSocketServer> server = CreateObject<PacketSocketServer> ();
292  server->SetLocal (socket);
293  static_node->AddApplication (server);
294  server->SetStartTime (Seconds (0.0));
295  server->SetStopTime (Seconds (70.5));
296 
298  phytx_pos = macassoc_pos = phyrx_pos = Vector ();
299 
300  Config::Connect ("/NodeList/1/DeviceList/*/Mac/Assoc", MakeCallback (&OcbWifiMacTestCase::MacAssoc, this));
301  Config::Connect ("/NodeList/1/DeviceList/*/Phy/State/RxOk", MakeCallback (&OcbWifiMacTestCase::PhyRxOkTrace, this));
302  Config::Connect ("/NodeList/1/DeviceList/*/Phy/State/Tx", MakeCallback (&OcbWifiMacTestCase::PhyTxTrace, this));
303 }
304 
318 void
320 {
321  std::cout << "test time point for Ap-Sta mode" << std::endl;
323  nodes = NodeContainer ();
324  nodes.Create (2);
325  Ptr<Node> static_node = nodes.Get (0);
326  Ptr<Node> mobile_node = nodes.Get (1);
327  ConfigureApStaMode (static_node, mobile_node);
328  PostDeviceConfiguration (static_node, mobile_node);
329  Simulator::Stop (Seconds (71.0));
330  Simulator::Run ();
331  Simulator::Destroy ();
332  NS_TEST_ASSERT_MSG_LT (phyrx_time, macassoc_time, "In Sta mode with AP, you cannot associate until receive beacon or AssocResponse frame" );
333  NS_TEST_ASSERT_MSG_LT (macassoc_time, phytx_time, "In Sta mode with AP, you cannot send data packet until associate" );
334  NS_TEST_ASSERT_MSG_GT ((phyrx_pos.x - macassoc_pos.x), 0.0, "");
335  //actually macassoc_pos.x - phytx_pos.x is greater than 0
336  //however associate switch to send is so fast with less than 100ms
337  //and in our mobility model that every 0.1s update position,
338  //so turn out to be that macassoc_pos.x - phytx_pos.x is equal to 0
339  //NS_TEST_ASSERT_MSG_GT ((macassoc_pos.x - phytx_pos.x), 0.0, "");
340 
341  std::cout << "test time point for Adhoc mode" << std::endl;
343  nodes = NodeContainer ();
344  nodes.Create (2);
345  static_node = nodes.Get (0);
346  mobile_node = nodes.Get (1);
347  ConfigureAdhocMode (static_node, mobile_node);
348  PostDeviceConfiguration (static_node, mobile_node);
349  Simulator::Stop (Seconds (71.0));
350  Simulator::Run ();
351  Simulator::Destroy ();
352  // below test assert will fail, because AdhocWifiMac has not implement state machine.
353  // if someone takes a look at the output in adhoc mode and in Ocb mode
354  // he will find these two outputs are almost same.
355  //NS_TEST_ASSERT_MSG_LT (phyrx_time, macassoc_time, "In Adhoc mode, you cannot associate until receive beacon or AssocResponse frame" );
356  //NS_TEST_ASSERT_MSG_LT (macassoc_time, phytx_time, "In Adhoc mode, you cannot send data packet until associate" );
357  //NS_TEST_ASSERT_MSG_GT ((phyrx_pos.x - macassoc_pos.x), 0.0, "");
358  // below test assert result refer to Ap-Sta mode
359  //NS_TEST_ASSERT_MSG_GT ((macassoc_pos.x - phytx_pos.x), 0.0, "");
360 
361  std::cout << "test time point for Ocb mode" << std::endl;
363  nodes = NodeContainer ();
364  nodes.Create (2);
365  static_node = nodes.Get (0);
366  mobile_node = nodes.Get (1);
367  ConfigureOcbMode (static_node, mobile_node);
368  PostDeviceConfiguration (static_node, mobile_node);
369  Simulator::Stop (Seconds (71.0));
370  Simulator::Run ();
371  Simulator::Destroy ();
372  NS_TEST_ASSERT_MSG_EQ (macassoc_time.GetNanoSeconds (), 0, "In Ocb mode, there is no associate state machine" );
373  NS_TEST_ASSERT_MSG_LT (phytx_time, phyrx_time, "before mobile node receives frames from far static node, it can send data packet directly" );
374  NS_TEST_ASSERT_MSG_EQ (macassoc_pos.x, 0.0, "");
375  NS_TEST_ASSERT_MSG_GT ((phytx_pos.x - phyrx_pos.x), 0.0, "");
376 }
377 void
379 {
380  // Assign a seed and run number, and later fix the assignment of streams to
381  // WiFi random variables, so that the first backoff used is zero slots
382  RngSeedManager::SetSeed (1);
383  RngSeedManager::SetRun (17);
384  // the WiFi random variables is set in PostDeviceConfiguration method.
385 }
386 
387 class OcbTestSuite : public TestSuite
388 {
389 public:
390  OcbTestSuite ();
391 };
392 
394  : TestSuite ("wifi-80211p-ocb", UNIT)
395 {
396  // TestDuration for TestCase can be QUICK, EXTENSIVE or TAKES_FOREVER
397  AddTestCase (new OcbWifiMacTestCase, TestCase::QUICK);
398 }
399 
400 // Do not forget to allocate an instance of this TestSuite
402 
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Definition: node.cc:157
helps to create wifi 802.11p objects of WifiNetDevice class
void SetStopTime(Time stop)
Specify application stop time.
Definition: application.cc:75
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Ptr< T > Get(void) const
Definition: pointer.h:194
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
void SetLocal(PacketSocketAddress addr)
set the local address and protocol to be used
static void AdvancePosition(Ptr< Node > node)
Definition: wifi-ap.cc:100
void MacAssoc(std::string context, Mac48Address bssid)
Ptr< YansWifiChannel > Create(void) const
void SetRemoteStationManager(std::string type, 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())
Definition: wifi-helper.cc:683
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:462
Hold variables of type string.
Definition: string.h:41
Make it easy to create and manage PHY objects for the yans model.
A suite of tests to run.
Definition: test.h:1333
virtual Address GetAddress(void) const
an address for a packet socket
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
Vector GetPosition(void) const
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
void ConfigureOcbMode(Ptr< Node > static_node, Ptr< Node > mobile_node)
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:719
encapsulates test code
Definition: test.h:1147
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Definition: dca-txop.cc:306
static OcbTestSuite ocbTestSuite
void PhyTxTrace(std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
helps to create WifiNetDevice objects
Definition: wifi-helper.h:231
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
Give ns3::PacketSocket powers to ns3::Node.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const
Definition: wifi-helper.cc:712
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
Keep track of the current position and velocity of an object.
void SetChannel(Ptr< YansWifiChannel > channel)
This queue contains packets for a particular access class.
Definition: edca-txop-n.h:86
tuple mobility
Definition: third.py:101
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:298
Vector3D Vector
Definition: vector.h:166
#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.
Definition: test.h:161
virtual ~OcbWifiMacTestCase(void)
virtual void SetStandard(enum WifiPhyStandard standard)
Definition: wifi-helper.cc:706
Vector GetCurrentPosition(uint32_t i)
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:142
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
void PhyRxOkTrace(std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, enum WifiPreamble preamble)
Definition: wifi-ap.cc:53
void PhyRxOkTrace(std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, enum WifiPreamble preamble)
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
tuple mac
Definition: third.py:92
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:835
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:278
void AdvancePosition(Ptr< Node > node)
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &macHelper, NodeContainer c) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetPhysicalAddress(const Address address)
Set the destination address.
keep track of a set of node pointers.
Hold objects of type Ptr.
Definition: pointer.h:36
void PhyTxTrace(std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
Definition: wifi-ap.cc:69
void PostDeviceConfiguration(Ptr< Node > static_node, Ptr< Node > mobile_node)
virtual void DoRun(void)
static-node:0 <-— mobile-node:1
an EUI-48 address
Definition: mac48-address.h:43
tuple ssid
Definition: third.py:93
manage and create wifi channel objects for the yans model.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:229
create MAC layers for a ns3::WifiNetDevice.
void SetPosition(const Vector &position)
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:38
virtual void SetType(std::string type, 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(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:353
static void AssignWifiRandomStreams(Ptr< WifiMac > mac, int64_t stream)
Helper class used to assign positions and mobility models to nodes.
void ConfigureApStaMode(Ptr< Node > static_node, Ptr< Node > mobile_node)
bool IsData(void) const
Return true if the Type is DATA.
void SetRemote(PacketSocketAddress addr)
set the remote address and protocol to be used
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:895
AttributeValue implementation for Ssid.
Definition: ssid.h:95
void SetProtocol(uint16_t protocol)
Set the protocol.
NodeContainer nodes
Ptr< WifiMac > GetMac(void) const
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:340
tuple wifi
Definition: third.py:89
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void PreRandomConfiguration(void)
handle packet fragmentation and retransmissions.
Definition: dca-txop.h:67
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
Definition: test.h:990
void ConfigureAdhocMode(Ptr< Node > static_node, Ptr< Node > mobile_node)
void SetStartTime(Time start)
Specify application start time.
Definition: application.cc:69
#define NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report and abort if not.
Definition: test.h:804
Implements the IEEE 802.11 MAC header.