A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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);
39 
40  virtual void SetMaxAmpduSize (uint32_t maxSize);
41  virtual uint32_t GetMaxAmpduSize (void) const;
52  virtual bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
56  virtual void AggregateVhtSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket);
60  virtual void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool vhtSingleMpdu);
71  virtual bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize);
78  virtual uint32_t CalculatePadding (Ptr<const Packet> packet);
79 
80 
81 private:
82  uint32_t m_maxAmpduLength;
83 };
84 
85 } //namespace ns3
86 
87 #endif /* MPDU_STANDARD_AGGREGATOR_H */
Abstract class that concrete mpdu aggregators have to implement.
virtual void SetMaxAmpduSize(uint32_t maxSize)
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 uint32_t GetMaxAmpduSize(void) const
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...
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