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
udp-client-server-helper.cc
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
20
#include "
udp-client-server-helper.h
"
21
22
#include <ns3/string.h>
23
#include <ns3/uinteger.h>
24
25
namespace
ns3
26
{
27
28
UdpServerHelper::UdpServerHelper
()
29
:
ApplicationHelper
(
UdpServer
::GetTypeId())
30
{
31
}
32
33
UdpServerHelper::UdpServerHelper
(uint16_t
port
)
34
:
UdpServerHelper
()
35
{
36
SetAttribute
(
"Port"
,
UintegerValue
(
port
));
37
}
38
39
UdpClientHelper::UdpClientHelper
()
40
:
ApplicationHelper
(
UdpClient
::GetTypeId())
41
{
42
}
43
44
UdpClientHelper::UdpClientHelper
(
const
Address
& address)
45
:
UdpClientHelper
()
46
{
47
SetAttribute
(
"RemoteAddress"
,
AddressValue
(address));
48
}
49
50
UdpClientHelper::UdpClientHelper
(
const
Address
& address, uint16_t
port
)
51
:
UdpClientHelper
(address)
52
{
53
SetAttribute
(
"RemotePort"
,
UintegerValue
(
port
));
54
}
55
56
UdpTraceClientHelper::UdpTraceClientHelper
()
57
:
ApplicationHelper
(
UdpTraceClient
::GetTypeId())
58
{
59
}
60
61
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
const
std::string& filename)
62
:
UdpTraceClientHelper
()
63
{
64
SetAttribute
(
"RemoteAddress"
,
AddressValue
(address));
65
SetAttribute
(
"TraceFilename"
,
StringValue
(filename));
66
}
67
68
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
69
uint16_t
port
,
70
const
std::string& filename)
71
:
UdpTraceClientHelper
(address, filename)
72
{
73
SetAttribute
(
"RemotePort"
,
UintegerValue
(
port
));
74
}
75
76
}
// namespace ns3
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::AddressValue
AttributeValue implementation for Address.
Definition:
address.h:286
ns3::ApplicationHelper
A helper to make it easier to instantiate an application on a set of nodes.
Definition:
application-helper.h:39
ns3::ApplicationHelper::SetAttribute
void SetAttribute(const std::string &name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Definition:
application-helper.cc:52
ns3::StringValue
Hold variables of type string.
Definition:
string.h:56
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:64
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:39
ns3::UdpClient
A Udp client.
Definition:
udp-client.h:45
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:39
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:28
ns3::UdpServer
A UDP server, receives UDP packets from a remote host.
Definition:
udp-server.h:50
ns3::UdpTraceClientHelper
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
Definition:
udp-client-server-helper.h:109
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:56
ns3::UdpTraceClient
A trace based streamer.
Definition:
udp-trace-client.h:64
ns3::UintegerValue
Hold an unsigned integer type.
Definition:
uinteger.h:45
port
uint16_t port
Definition:
dsdv-manet.cc:44
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
udp-client-server-helper.h
src
applications
helper
udp-client-server-helper.cc
Generated on Tue May 28 2024 23:34:07 for ns-3 by
1.9.6