A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
wifi
model
msdu-aggregator.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 MIRKO BANCHI
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: Mirko Banchi <mk.banchi@gmail.com>
19
*/
20
21
#ifndef MSDU_AGGREGATOR_H
22
#define MSDU_AGGREGATOR_H
23
24
#include "ns3/object.h"
25
26
namespace
ns3
{
27
28
class
AmsduSubframeHeader;
29
class
WifiMacHeader;
30
class
Packet;
31
36
class
MsduAggregator
:
public
Object
37
{
38
public
:
40
typedef
std::list<std::pair<Ptr<Packet>,
AmsduSubframeHeader
> >
DeaggregatedMsdus
;
42
typedef
std::list<std::pair<Ptr<Packet>,
AmsduSubframeHeader
> >::const_iterator
DeaggregatedMsdusCI
;
43
48
static
TypeId
GetTypeId
(
void
);
49
50
MsduAggregator
();
51
virtual
~MsduAggregator
();
52
59
void
SetMaxAmsduSize
(uint16_t maxSize);
66
uint16_t
GetMaxAmsduSize
(
void
)
const
;
67
79
bool
Aggregate
(
Ptr<const Packet>
packet,
Ptr<Packet>
aggregatedPacket,
80
Mac48Address
src,
Mac48Address
dest)
const
;
81
87
static
DeaggregatedMsdus
Deaggregate
(
Ptr<Packet>
aggregatedPacket);
88
89
90
private
:
100
uint8_t
CalculatePadding
(
Ptr<const Packet>
packet)
const
;
101
102
uint16_t
m_maxAmsduLength
;
103
};
104
105
}
//namespace ns3
106
107
#endif
/* MSDU_AGGREGATOR_H */
ns3::MsduAggregator::GetMaxAmsduSize
uint16_t GetMaxAmsduSize(void) const
Returns the maximum A-MSDU size in bytes.
Definition:
msdu-aggregator.cc:58
ns3::Ptr< const Packet >
ns3::MsduAggregator::DeaggregatedMsdusCI
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > >::const_iterator DeaggregatedMsdusCI
DeaggregatedMsdusCI typedef.
Definition:
msdu-aggregator.h:42
ns3::MsduAggregator::Deaggregate
static DeaggregatedMsdus Deaggregate(Ptr< Packet > aggregatedPacket)
Definition:
msdu-aggregator.cc:100
ns3::MsduAggregator::MsduAggregator
MsduAggregator()
Definition:
msdu-aggregator.cc:43
ns3::MsduAggregator::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
msdu-aggregator.cc:33
ns3::MsduAggregator::DeaggregatedMsdus
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > > DeaggregatedMsdus
DeaggregatedMsdus typedef.
Definition:
msdu-aggregator.h:40
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:43
ns3::AmsduSubframeHeader
Introspection did not find any typical Config paths.
Definition:
amsdu-subframe-header.h:32
ns3::MsduAggregator::~MsduAggregator
virtual ~MsduAggregator()
Definition:
msdu-aggregator.cc:47
ns3::MsduAggregator::CalculatePadding
uint8_t CalculatePadding(Ptr< const Packet > packet) const
Calculates how much padding must be added to the end of aggregated packet, after that a new packet is...
Definition:
msdu-aggregator.cc:94
ns3::MsduAggregator
Aggregator used to construct A-MSDUs.
Definition:
msdu-aggregator.h:36
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::MsduAggregator::Aggregate
bool Aggregate(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket, Mac48Address src, Mac48Address dest) const
Adds packet to aggregatedPacket.
Definition:
msdu-aggregator.cc:64
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::MsduAggregator::m_maxAmsduLength
uint16_t m_maxAmsduLength
maximum AMSDU length
Definition:
msdu-aggregator.h:102
ns3::MsduAggregator::SetMaxAmsduSize
void SetMaxAmsduSize(uint16_t maxSize)
Sets the maximum A-MSDU size in bytes.
Definition:
msdu-aggregator.cc:52
Generated on Wed Nov 7 2018 10:02:14 for ns-3 by
1.8.14