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:
40  static TypeId GetTypeId (void);
43 
50  void SetMaxAmpduSize (uint32_t maxSize);
57  uint32_t GetMaxAmpduSize (void) const;
68  bool Aggregate (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const;
75  void AggregateSingleMpdu (Ptr<const Packet> packet, Ptr<Packet> aggregatedPacket) const;
83  void AddHeaderAndPad (Ptr<Packet> packet, bool last, bool isSingleMpdu) const;
94  bool CanBeAggregated (uint32_t packetSize, Ptr<Packet> aggregatedPacket, uint8_t blockAckSize) const;
102  uint32_t CalculatePadding (Ptr<const Packet> packet) const;
103 
104 
105 private:
106  uint32_t m_maxAmpduLength;
107 };
108 
109 } //namespace ns3
110 
111 #endif /* MPDU_STANDARD_AGGREGATOR_H */
Abstract class that concrete mpdu aggregators have to implement.
void AggregateSingleMpdu(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket) const
void AddHeaderAndPad(Ptr< Packet > packet, bool last, bool isSingleMpdu) const
void SetMaxAmpduSize(uint32_t maxSize)
Sets the maximum A-MPDU size in bytes.
bool Aggregate(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket) const
uint32_t m_maxAmpduLength
Maximum length in bytes of A-MPDUs.
uint32_t CalculatePadding(Ptr< const Packet > packet) const
static TypeId GetTypeId(void)
Get the type ID.
uint32_t GetMaxAmpduSize(void) const
Returns the maximum A-MPDU size in bytes.
bool CanBeAggregated(uint32_t packetSize, Ptr< Packet > aggregatedPacket, uint8_t blockAckSize) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Standard MPDU aggregator.
static const uint32_t packetSize
a unique identifier for an interface.
Definition: type-id.h:58