A Discrete-Event Network Simulator
API
mpdu-standard-aggregator.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013
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: Ghada Badawy <gbadawy@gmail.com>
19  */
20 
21 #ifndef MPDU_STANDARD_AGGREGATOR_H
22 #define MPDU_STANDARD_AGGREGATOR_H
23 
24 #include "mpdu-aggregator.h"
25 
26 namespace ns3 {
27 
34 {
35 public:
36  static TypeId GetTypeId (void);
49  virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
53  virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
57  virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu);
68  virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize);
75  virtual uint32_t CalculatePadding (Ptr<const Packet> packet);
76 
77 
78 private:
79  uint32_t m_maxAmpduLength;
80 };
81 
82 } //namespace ns3
83 
84 #endif /* MPDU_STANDARD_AGGREGATOR_H */
Abstract class that concrete mpdu aggregators have to implement.
virtual bool Aggregate(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket)
uint32_t m_maxAmpduLength
Maximum length in bytes of A-MPDUs.
virtual void AggregateVhtSingleMpdu(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket)
This method performs a VHT single MPDU aggregation.
virtual void AddHeaderAndPad(Ptr< Packet > packet, bool last, bool vhtSingleMpdu)
Adds A-MPDU subframe header and padding to each MPDU that is part of an A-MPDU before it is sent...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Standard MPDU aggregator.
virtual uint32_t CalculatePadding(Ptr< const Packet > packet)
virtual bool CanBeAggregated(uint32_t packetSize, Ptr< Packet > aggregatedPacket, uint8_t blockAckSize)
static const uint32_t packetSize
a unique identifier for an interface.
Definition: type-id.h:58