A Discrete-Event Network Simulator
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 {
40 {
41  public:
48 
55  UdpServerHelper(uint16_t port);
56 
63  void SetAttribute(std::string name, const AttributeValue& value);
64 
75 
84 
85  private:
88 };
89 
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 
144 
145  private:
147 };
148 
162 {
163  public:
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 
209 
210  private:
212 };
213 
214 } // namespace ns3
215 
216 #endif /* UDP_CLIENT_SERVER_H */
a polymophic address class
Definition: address.h:101
holds a vector of ns3::Application pointers.
Hold a value for an Attribute.
Definition: attribute.h:70
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
ObjectFactory m_factory
Object factory.
ApplicationContainer Install(NodeContainer c)
UdpClientHelper()
Create UdpClientHelper which will make life easier for people trying to set up simulations with udp-c...
Create a server application which waits for input UDP packets and uses the information carried into t...
Ptr< UdpServer > m_server
The last created server application.
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Ptr< UdpServer > GetServer()
Return the last created server.
ApplicationContainer Install(NodeContainer c)
Create one UDP server application on each of the Nodes in the NodeContainer.
ObjectFactory m_factory
Object factory.
UdpServerHelper()
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-c...
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
ApplicationContainer Install(NodeContainer c)
UdpTraceClientHelper()
Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with ...
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
ObjectFactory m_factory
Object factory.
uint16_t port
Definition: dsdv-manet.cc:44
Every class exported by the ns3 library is enclosed in the ns3 namespace.