21 #include "ns3/string.h"
23 #include "ns3/object-factory.h"
24 #include "ns3/simulator.h"
25 #include "ns3/wifi-mac-queue.h"
26 #include "ns3/mac-low.h"
27 #include "ns3/edca-txop-n.h"
28 #include "ns3/yans-wifi-phy.h"
38 virtual void DoRun (
void);
49 :
TestCase (
"Check the correctness of two-level aggregation operations")
59 m_phy = CreateObject<YansWifiPhy> ();
74 m_low = CreateObject<MacLow> ();
78 m_edca = CreateObject<EdcaTxopN> ();
103 Ptr<Packet> currentAggregatedPacket = Create<Packet> ();
124 WifiMacHeader::ADDR1,
132 bool result = (packet != 0);
145 m_factory.SetTypeId (
"ns3::MpduStandardAggregator");
153 result = (packet != 0);
164 m_factory.SetTypeId (
"ns3::MpduStandardAggregator");
173 result = (packet != 0);
175 Simulator::Destroy ();
Abstract class that concrete mpdu aggregators have to implement.
Simulation virtual time values and global simulation resolution.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< WifiRemoteStationManager > m_manager
Hold variables of type string.
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this EdcaTxopN is associated to.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
virtual void SetupPhy(Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
Ptr< MsduAggregator > m_msduAggregator
Ptr< Packet > PerformMsduAggregation(Ptr< const Packet > packet, WifiMacHeader *hdr, Time *tstamp, Ptr< Packet > currentAmpduPacket, uint16_t blockAckSize)
Perform MSDU aggregation for a given MPDU in an A-MPDU.
void SetLow(Ptr< MacLow > low)
Set MacLow associated with this EdcaTxopN.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Hold an unsigned integer type.
TwoLevelAggregationTest()
hold a list of per-remote-station state.
WifiAggregationTestSuite()
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetAccessCategory(enum AcIndex ac)
Set the access category of this EDCAF.
static WifiAggregationTestSuite g_wifiAggregationTestSuite
void Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction.
void SetPhy(Ptr< WifiPhy > phy)
Set up WifiPhy associated with this MacLow.
void SetMsduAggregator(Ptr< MsduAggregator > aggr)
Instantiate subclasses of ns3::Object.
void CompleteConfig(void)
Complete block ACK configuration.
Ptr< Packet > m_currentPacket
Current packet transmitted/to be transmitted.
virtual void ConfigureStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
Abstract class that concrete msdu aggregators have to implement.
WifiMacHeader m_currentHdr
Header of the current packet.
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > manager)
Set up WifiRemoteStationManager associated with this MacLow.
void SetMpduAggregator(Ptr< MpduAggregator > aggregator)
Set up MpduAggregator associated with this MacLow.
Ptr< MpduAggregator > m_mpduAggregator
Ptr< WifiMacQueue > GetEdcaQueue() const
Return the packet queue associated with this EdcaTxopN.