22 #include "ns3/string.h"    23 #include "ns3/qos-utils.h"    24 #include "ns3/ctrl-headers.h"    25 #include "ns3/packet.h"    26 #include "ns3/wifi-net-device.h"    27 #include "ns3/ap-wifi-mac.h"    28 #include "ns3/wifi-mac-header.h"    29 #include "ns3/mobility-helper.h"    30 #include "ns3/yans-wifi-helper.h"    31 #include "ns3/packet-socket-server.h"    32 #include "ns3/packet-socket-client.h"    33 #include "ns3/packet-socket-helper.h"    34 #include "ns3/config.h"    35 #include "ns3/pointer.h"    82   virtual void DoRun (
void);
    87   : 
TestCase (
"Check correct order of buffering when startSequence < endSeq")
   103   std::list<uint16_t> m_buffer;
   104   std::list<uint16_t>::iterator i,j;
   105   m_buffer.push_back (0);
   106   m_buffer.push_back (16);
   107   m_buffer.push_back (56000);
   109   uint16_t endSeq = 4000;
   111   uint16_t receivedSeq = 4001 * 16;
   114   for (i = m_buffer.begin (); i != m_buffer.end (); i++)
   122   m_buffer.insert (i, receivedSeq);
   124   receivedSeq = 3999 * 16;
   127   for (i = m_buffer.begin (); i != m_buffer.end (); i++)
   135   m_buffer.insert (i, receivedSeq);
   137   for (i = m_buffer.begin (), j = 
m_expectedBuffer.begin (); i != m_buffer.end (); i++, j++)
   179   virtual void DoRun (
void);
   184   : 
TestCase (
"Check correct order of buffering when startSequence > endSeq")
   201   std::list<uint16_t> m_buffer;
   202   std::list<uint16_t>::iterator i,j;
   203   m_buffer.push_back (256);
   204   m_buffer.push_back (64000);
   205   m_buffer.push_back (16);
   207   uint16_t endSeq = 10;
   209   uint16_t receivedSeq = 15 * 16;
   212   for (i = m_buffer.begin (); i != m_buffer.end (); i++)
   220   m_buffer.insert (i, receivedSeq);
   222   receivedSeq = 15 * 16 + 1;
   225   for (i = m_buffer.begin (); i != m_buffer.end (); i++)
   233   m_buffer.insert (i, receivedSeq);
   235   receivedSeq = 4050 * 16;
   238   for (i = m_buffer.begin (); i != m_buffer.end (); i++)
   246   m_buffer.insert (i, receivedSeq);
   248   for (i = m_buffer.begin (), j = 
m_expectedBuffer.begin (); i != m_buffer.end (); i++, j++)
   266   virtual void DoRun ();
   271   : 
TestCase (
"Check the correctness of block ack compressed bitmap")
   283   for (uint16_t i = 179; i < 220; i++)
   287   for (uint16_t i = 225; i <= 242; i++)
   303   for (uint16_t i = 4090; i != 10; i = (i + 1) % 4096)
   307   for (uint16_t i = 22; i < 25; i++)
   350   virtual void DoRun (
void);
   384   if (duration > 
m_max)
   391   : 
TestCase (
"Test case for Block Ack Policy with aggregation disabled"),
   456   wifi.SetRemoteStationManager (
"ns3::IdealWifiManager");
   460   mac.SetType (
"ns3::StaWifiMac",
   470   mac.SetType (
"ns3::ApWifiMac",
   481   positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
   482   positionAlloc->
Add (Vector (1.0, 0.0, 0.0));
   483   mobility.SetPositionAllocator (positionAlloc);
   485   mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
   503   packetSocket.
Install (wifiStaNode);
   528   Simulator::Destroy ();
 uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node. 
void SetStopTime(Time stop)
Specify application stop time. 
Simulation virtual time values and global simulation resolution. 
std::list< uint16_t > m_expectedBuffer
expected test buffer 
  AttributeValue implementation for Boolean. 
void SetLocal(PacketSocketAddress addr)
set the local address and protocol to be used 
void Trace(Time startTime, Time duration)
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
Make it easy to create and manage PHY objects for the yans model. 
uint32_t m_received
received packets 
an address for a packet socket 
BlockAckAggregationDisabledTest()
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not. 
void Transmit(std::string context, Ptr< const Packet > p, double power)
Callback invoked when PHY transmits a packet. 
Keeps the maximum duration among all TXOPs. 
helps to create WifiNetDevice objects 
Give ns3::PacketSocket powers to ns3::Node. 
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice. 
uint16_t m_nBar
transmitted BlockAckReq frames 
Address GetAddress(void) const
a polymophic address class 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~BlockAckAggregationDisabledTest()
  AttributeValue implementation for Time. 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
Hold an unsigned integer type. 
virtual ~PacketBufferingCaseA()
holds a vector of ns3::NetDevice pointers 
uint16_t m_txTotal
transmitted data packets 
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer. 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
uint16_t m_nBa
received BlockAck frames 
void Connect(std::string path, const CallbackBase &cb)
virtual ~PacketBufferingCaseB()
virtual void DoRun(void)
Implementation to actually run this TestCase. 
OFDM PHY for the 5 GHz band (Clause 17) 
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. 
Test for Block Ack Policy with aggregation disabled. 
manage and create wifi channel objects for the yans model. 
create MAC layers for a ns3::WifiNetDevice. 
The IEEE 802.11 SSID Information Element. 
Helper class used to assign positions and mobility models to nodes. 
Ptr< WifiMac > GetMac(void) const
void SetRemote(PacketSocketAddress addr)
set the remote address and protocol to be used 
uint32_t QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence)
Next function is useful to correctly sort buffered packets under block ack. 
Time Seconds(double value)
Construct a Time in the indicated unit. 
  AttributeValue implementation for Ssid. 
void SetProtocol(uint16_t protocol)
Set the protocol. 
void Add(Vector v)
Add a position to the list of positions. 
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index. 
void L7Receive(std::string context, Ptr< const Packet > p, const Address &adr)
Function to trace packets received by the server application. 
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node. 
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit. 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
void Receive(std::string context, Ptr< const Packet > p)
Callback invoked when PHY receives a packet. 
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
static BlockAckTestSuite g_blockAckTestSuite
the test suite 
std::list< uint16_t > m_expectedBuffer
expected test buffer 
void SetStartTime(Time start)
Specify application start time.