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
application-container.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
20
#ifndef APPLICATION_CONTAINER_H
21
#define APPLICATION_CONTAINER_H
22
23
#include "ns3/application.h"
24
#include "ns3/random-variable-stream.h"
25
26
#include <stdint.h>
27
#include <vector>
28
29
namespace
ns3
30
{
31
43
class
ApplicationContainer
44
{
45
public
:
49
ApplicationContainer
();
50
58
ApplicationContainer
(
Ptr<Application>
application);
59
67
ApplicationContainer
(std::string name);
68
70
typedef
std::vector<Ptr<Application>>::const_iterator
Iterator
;
71
91
Iterator
Begin
()
const
;
92
112
Iterator
End
()
const
;
113
134
uint32_t
GetN
()
const
;
135
157
Ptr<Application>
Get
(
uint32_t
i)
const
;
158
165
void
Add
(
ApplicationContainer
other);
166
172
void
Add
(
Ptr<Application>
application);
173
180
void
Add
(std::string name);
181
196
void
Start
(
Time
start)
const
;
197
209
void
StartWithJitter
(
Time
start,
Ptr<RandomVariableStream>
rv)
const
;
210
225
void
Stop
(
Time
stop)
const
;
226
227
private
:
228
std::vector<Ptr<Application>>
m_applications
;
229
};
230
231
}
// namespace ns3
232
233
#endif
/* APPLICATION_CONTAINER_H */
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition:
application-container.h:44
ns3::ApplicationContainer::m_applications
std::vector< Ptr< Application > > m_applications
Applications smart pointers.
Definition:
application-container.h:228
ns3::ApplicationContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first Application in the container.
Definition:
application-container.cc:46
ns3::ApplicationContainer::End
Iterator End() const
Get an iterator which indicates past-the-last Application in the container.
Definition:
application-container.cc:52
ns3::ApplicationContainer::Iterator
std::vector< Ptr< Application > >::const_iterator Iterator
Application container iterator.
Definition:
application-container.h:70
ns3::ApplicationContainer::Start
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
Definition:
application-container.cc:92
ns3::ApplicationContainer::StartWithJitter
void StartWithJitter(Time start, Ptr< RandomVariableStream > rv) const
Start all of the Applications in this container at the start time given as a parameter,...
Definition:
application-container.cc:102
ns3::ApplicationContainer::ApplicationContainer
ApplicationContainer()
Create an empty ApplicationContainer.
Definition:
application-container.cc:30
ns3::ApplicationContainer::Get
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
Definition:
application-container.cc:64
ns3::ApplicationContainer::Stop
void Stop(Time stop) const
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Definition:
application-container.cc:114
ns3::ApplicationContainer::GetN
uint32_t GetN() const
Get the number of Ptr<Application> stored in this container.
Definition:
application-container.cc:58
ns3::ApplicationContainer::Add
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
Definition:
application-container.cc:70
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
helper
application-container.h
Generated on Sun Jul 2 2023 18:21:57 for ns-3 by
1.9.6