A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
network
utils
packet-burst.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008 INRIA
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: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
*/
20
21
#ifndef PACKET_BURST_H
22
#define PACKET_BURST_H
23
24
#include <stdint.h>
25
#include <list>
26
#include "ns3/object.h"
27
28
namespace
ns3
{
29
30
class
Packet;
31
35
class
PacketBurst
:
public
Object
36
{
37
public
:
42
static
TypeId
GetTypeId
(
void
);
43
PacketBurst
(
void
);
44
virtual
~PacketBurst
(
void
);
48
Ptr<PacketBurst>
Copy
(
void
)
const
;
53
void
AddPacket
(
Ptr<Packet>
packet);
57
std::list<Ptr<Packet> >
GetPackets
(
void
)
const
;
61
uint32_t
GetNPackets
(
void
)
const
;
65
uint32_t
GetSize
(
void
)
const
;
66
71
std::list<Ptr<Packet> >::const_iterator
Begin
(
void
)
const
;
76
std::list<Ptr<Packet> >::const_iterator
End
(
void
)
const
;
77
83
typedef
void (*
TracedCallback
)(
Ptr<const PacketBurst>
burst);
84
85
86
private
:
87
void
DoDispose
(
void
);
88
std::list<Ptr<Packet> >
m_packets
;
89
};
90
}
// namespace ns3
91
92
#endif
/* PACKET_BURST */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::PacketBurst::m_packets
std::list< Ptr< Packet > > m_packets
the list of packets in the burst
Definition:
packet-burst.h:88
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition:
traced-callback.h:62
ns3::PacketBurst::GetPackets
std::list< Ptr< Packet > > GetPackets(void) const
Definition:
packet-burst.cc:92
ns3::PacketBurst::GetNPackets
uint32_t GetNPackets(void) const
Definition:
packet-burst.cc:99
ns3::PacketBurst::End
std::list< Ptr< Packet > >::const_iterator End(void) const
Returns an iterator to the end of the burst.
Definition:
packet-burst.cc:127
ns3::PacketBurst::DoDispose
void DoDispose(void)
Destructor implementation.
Definition:
packet-burst.cc:61
ns3::PacketBurst::AddPacket
void AddPacket(Ptr< Packet > packet)
add a packet to the list of packet
Definition:
packet-burst.cc:82
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::PacketBurst::~PacketBurst
virtual ~PacketBurst(void)
Definition:
packet-burst.cc:49
ns3::PacketBurst::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
packet-burst.cc:34
ns3::PacketBurst::PacketBurst
PacketBurst(void)
Definition:
packet-burst.cc:44
ns3::PacketBurst::Begin
std::list< Ptr< Packet > >::const_iterator Begin(void) const
Returns an iterator to the begin of the burst.
Definition:
packet-burst.cc:120
ns3::PacketBurst::Copy
Ptr< PacketBurst > Copy(void) const
Definition:
packet-burst.cc:67
ns3::PacketBurst
this class implement a burst as a list of packets
Definition:
packet-burst.h:35
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::PacketBurst::GetSize
uint32_t GetSize(void) const
Definition:
packet-burst.cc:106
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:07 for ns-3 by
1.8.14