A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
udp-client-server-helper.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: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
18
*/
19
#ifndef UDP_CLIENT_SERVER_HELPER_H
20
#define UDP_CLIENT_SERVER_HELPER_H
21
22
#include "ns3/application-container.h"
23
#include "ns3/ipv4-address.h"
24
#include "ns3/node-container.h"
25
#include "ns3/object-factory.h"
26
#include "ns3/udp-client.h"
27
#include "ns3/udp-server.h"
28
29
#include <stdint.h>
30
31
namespace
ns3
32
{
39
class
UdpServerHelper
40
{
41
public
:
47
UdpServerHelper
();
48
55
UdpServerHelper
(uint16_t
port
);
56
63
void
SetAttribute
(std::string name,
const
AttributeValue
& value);
64
74
ApplicationContainer
Install
(
NodeContainer
c);
75
83
Ptr<UdpServer>
GetServer
();
84
85
private
:
86
ObjectFactory
m_factory
;
87
Ptr<UdpServer>
m_server
;
88
};
89
96
class
UdpClientHelper
97
{
98
public
:
104
UdpClientHelper
();
105
116
UdpClientHelper
(
Address
ip, uint16_t
port
);
126
UdpClientHelper
(
Address
addr);
127
134
void
SetAttribute
(std::string name,
const
AttributeValue
& value);
135
143
ApplicationContainer
Install
(
NodeContainer
c);
144
145
private
:
146
ObjectFactory
m_factory
;
147
};
148
161
class
UdpTraceClientHelper
162
{
163
public
:
169
UdpTraceClientHelper
();
170
181
UdpTraceClientHelper
(
Address
ip, uint16_t
port
, std::string filename);
191
UdpTraceClientHelper
(
Address
addr, std::string filename);
192
199
void
SetAttribute
(std::string name,
const
AttributeValue
& value);
200
208
ApplicationContainer
Install
(
NodeContainer
c);
209
210
private
:
211
ObjectFactory
m_factory
;
212
};
213
214
}
// namespace ns3
215
216
#endif
/* UDP_CLIENT_SERVER_H */
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition:
application-container.h:44
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:70
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:40
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::UdpClientHelper
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Definition:
udp-client-server-helper.h:97
ns3::UdpClientHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Definition:
udp-client-server-helper.cc:87
ns3::UdpClientHelper::m_factory
ObjectFactory m_factory
Object factory.
Definition:
udp-client-server-helper.h:146
ns3::UdpClientHelper::Install
ApplicationContainer Install(NodeContainer c)
Definition:
udp-client-server-helper.cc:93
ns3::UdpClientHelper::UdpClientHelper
UdpClientHelper()
Create UdpClientHelper which will make life easier for people trying to set up simulations with udp-c...
Definition:
udp-client-server-helper.cc:68
ns3::UdpServerHelper
Create a server application which waits for input UDP packets and uses the information carried into t...
Definition:
udp-client-server-helper.h:40
ns3::UdpServerHelper::m_server
Ptr< UdpServer > m_server
The last created server application.
Definition:
udp-client-server-helper.h:87
ns3::UdpServerHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Definition:
udp-client-server-helper.cc:42
ns3::UdpServerHelper::GetServer
Ptr< UdpServer > GetServer()
Return the last created server.
Definition:
udp-client-server-helper.cc:63
ns3::UdpServerHelper::Install
ApplicationContainer Install(NodeContainer c)
Create one UDP server application on each of the Nodes in the NodeContainer.
Definition:
udp-client-server-helper.cc:48
ns3::UdpServerHelper::m_factory
ObjectFactory m_factory
Object factory.
Definition:
udp-client-server-helper.h:86
ns3::UdpServerHelper::UdpServerHelper
UdpServerHelper()
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-c...
Definition:
udp-client-server-helper.cc:30
ns3::UdpTraceClientHelper
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
Definition:
udp-client-server-helper.h:162
ns3::UdpTraceClientHelper::Install
ApplicationContainer Install(NodeContainer c)
Definition:
udp-client-server-helper.cc:133
ns3::UdpTraceClientHelper::UdpTraceClientHelper
UdpTraceClientHelper()
Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with ...
Definition:
udp-client-server-helper.cc:106
ns3::UdpTraceClientHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Definition:
udp-client-server-helper.cc:127
ns3::UdpTraceClientHelper::m_factory
ObjectFactory m_factory
Object factory.
Definition:
udp-client-server-helper.h:211
port
uint16_t port
Definition:
dsdv-manet.cc:44
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
applications
helper
udp-client-server-helper.h
Generated on Sun Mar 3 2024 17:10:53 for ns-3 by
1.9.1