A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
packet-burst.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7
*/
8
9
#ifndef PACKET_BURST_H
10
#define PACKET_BURST_H
11
12
#include "ns3/object.h"
13
14
#include <list>
15
#include <stdint.h>
16
17
namespace
ns3
18
{
19
20
class
Packet;
21
22
/**
23
* \brief this class implement a burst as a list of packets
24
*/
25
class
PacketBurst
:
public
Object
26
{
27
public
:
28
/**
29
* \brief Get the type ID.
30
* \return the object TypeId
31
*/
32
static
TypeId
GetTypeId
();
33
PacketBurst
();
34
~PacketBurst
()
override
;
35
/**
36
* \return a copy the packetBurst
37
*/
38
Ptr<PacketBurst>
Copy
()
const
;
39
/**
40
* \brief add a packet to the list of packet
41
* \param packet the packet to add
42
*/
43
void
AddPacket
(
Ptr<Packet>
packet);
44
/**
45
* \return the list of packet of this burst
46
*/
47
std::list<Ptr<Packet>>
GetPackets
()
const
;
48
/**
49
* \return the number of packet in the burst
50
*/
51
uint32_t
GetNPackets
()
const
;
52
/**
53
* \return the size of the burst in byte (the size of all packets)
54
*/
55
uint32_t
GetSize
()
const
;
56
57
/**
58
* \brief Returns an iterator to the begin of the burst
59
* \return iterator to the burst list start
60
*/
61
std::list<Ptr<Packet>>::const_iterator
Begin
()
const
;
62
/**
63
* \brief Returns an iterator to the end of the burst
64
* \return iterator to the burst list end
65
*/
66
std::list<Ptr<Packet>>::const_iterator
End
()
const
;
67
68
/**
69
* TracedCallback signature for Ptr<PacketBurst>
70
*
71
* \param [in] burst The PacketBurst
72
*/
73
typedef
void (*
TracedCallback
)(
Ptr<const PacketBurst>
burst);
74
75
private
:
76
void
DoDispose
()
override
;
77
std::list<Ptr<Packet>>
m_packets
;
//!< the list of packets in the burst
78
};
79
}
// namespace ns3
80
81
#endif
/* PACKET_BURST */
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::PacketBurst
this class implement a burst as a list of packets
Definition
packet-burst.h:26
ns3::PacketBurst::PacketBurst
PacketBurst()
Definition
packet-burst.cc:34
ns3::PacketBurst::~PacketBurst
~PacketBurst() override
Definition
packet-burst.cc:39
ns3::PacketBurst::End
std::list< Ptr< Packet > >::const_iterator End() const
Returns an iterator to the end of the burst.
Definition
packet-burst.cc:114
ns3::PacketBurst::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
packet-burst.cc:25
ns3::PacketBurst::m_packets
std::list< Ptr< Packet > > m_packets
the list of packets in the burst
Definition
packet-burst.h:77
ns3::PacketBurst::Begin
std::list< Ptr< Packet > >::const_iterator Begin() const
Returns an iterator to the begin of the burst.
Definition
packet-burst.cc:107
ns3::PacketBurst::Copy
Ptr< PacketBurst > Copy() const
Definition
packet-burst.cc:56
ns3::PacketBurst::GetNPackets
uint32_t GetNPackets() const
Definition
packet-burst.cc:87
ns3::PacketBurst::GetPackets
std::list< Ptr< Packet > > GetPackets() const
Definition
packet-burst.cc:80
ns3::PacketBurst::GetSize
uint32_t GetSize() const
Definition
packet-burst.cc:94
ns3::PacketBurst::DoDispose
void DoDispose() override
Destructor implementation.
Definition
packet-burst.cc:49
ns3::PacketBurst::AddPacket
void AddPacket(Ptr< Packet > packet)
add a packet to the list of packet
Definition
packet-burst.cc:70
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition
traced-callback.h:43
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
utils
packet-burst.h
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0