A Discrete-Event Network Simulator
API
udp-client-server-helper.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  */
20 #ifndef UDP_CLIENT_SERVER_HELPER_H
21 #define UDP_CLIENT_SERVER_HELPER_H
22 
23 #include <stdint.h>
24 #include "ns3/application-container.h"
25 #include "ns3/node-container.h"
26 #include "ns3/object-factory.h"
27 #include "ns3/ipv4-address.h"
28 #include "ns3/udp-server.h"
29 #include "ns3/udp-client.h"
30 namespace ns3 {
38 {
39 public:
45  UdpServerHelper ();
46 
53  UdpServerHelper (uint16_t port);
54 
61  void SetAttribute (std::string name, const AttributeValue &value);
62 
73 
82 private:
85 };
86 
94 {
95 
96 public:
102  UdpClientHelper ();
103 
114  UdpClientHelper (Address ip, uint16_t port);
124  UdpClientHelper (Address addr);
125 
132  void SetAttribute (std::string name, const AttributeValue &value);
133 
142 
143 private:
145 };
159 {
160 public:
167 
178  UdpTraceClientHelper (Address ip, uint16_t port, std::string filename);
188  UdpTraceClientHelper (Address addr, std::string filename);
189 
196  void SetAttribute (std::string name, const AttributeValue &value);
197 
206 
207 private:
209 };
210 
211 } // namespace ns3
212 
213 #endif /* UDP_CLIENT_SERVER_H */
a polymophic address class
Definition: address.h:91
holds a vector of ns3::Application pointers.
Hold a value for an Attribute.
Definition: attribute.h:69
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
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(void)
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:45
Every class exported by the ns3 library is enclosed in the ns3 namespace.