src/helper/v4ping-helper.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 16 Apr 2010 07:52:54 +0200
changeset 6207 a6ee8748aee7
parent 5716 b87e042f25e4
child 6273 8d70de29d514
permissions -rw-r--r--
update RELEASE_NOTES
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
#ifndef V4PING_HELPER_H
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
#define V4PING_HELPER_H
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
#include "node-container.h"
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
#include "application-container.h"
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
#include "ns3/object-factory.h"
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
namespace ns3 {
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    10
/**
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    11
 * \brief create a pinger application and associate it to a node
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    12
 *
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    13
 * This class creates one or multiple instances of ns3::V4Ping and associates
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    14
 * it/them to one/multiple node(s).
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    15
 */
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
class V4PingHelper
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    17
{
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    18
public:
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    19
  /**
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    20
   * Create a V4PingHelper which is used to make life easier for people wanting
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    21
   * to use ping Applications.
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    22
   *
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    23
   * \param remote The address which should be pinged
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    24
   */
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    25
  V4PingHelper (Ipv4Address remote);
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    26
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    27
  /**
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    28
   * Install a pinger application on each Node in the provided NodeContainer.
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    29
   *
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    30
   * \param nodes The NodeContainer containing all of the nodes to get a V4Ping
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    31
   *              application.
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    32
   *
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    33
   * \returns A list of pinger applications, one for each input node
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    34
   */
3848
affd0834debc address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents: 3821
diff changeset
    35
  ApplicationContainer Install (NodeContainer nodes) const;
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    36
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    37
  /**
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    38
   * Install a pinger application on the provided Node.  The Node is specified
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    39
   * directly by a Ptr<Node>
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    40
   *
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    41
   * \param node The node to install the V4PingApplication on.
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    42
   *
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    43
   * \returns An ApplicationContainer holding the pinger application created.
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    44
   */
3848
affd0834debc address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents: 3821
diff changeset
    45
  ApplicationContainer Install (Ptr<Node> node) const;
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    46
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    47
  /**
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    48
   * Install a pinger application on the provided Node.  The Node is specified
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    49
   * by a string that must have previosly been associated with a Node using the
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    50
   * Object Name Service.
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    51
   *
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    52
   * \param nodeName The node to install the V4PingApplication on.
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    53
   *
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    54
   * \returns An ApplicationContainer holding the pinger application created.
5330
2187778d6f54 bug 648: doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4140
diff changeset
    55
   */
4140
6bbf05bf4826 Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents: 3848
diff changeset
    56
  ApplicationContainer Install (std::string nodeName) const;
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    57
5716
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    58
  /**
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    59
   * \brief Configure ping applications attribute 
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    60
   * \param name   attribute's name
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    61
   * \param value  attribute's value
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    62
   */
b87e042f25e4 [aodv] Fix aodv.cc example & helpers
Pavel Boyko <boyko@iitp.ru>
parents: 5363
diff changeset
    63
  void SetAttribute (std::string name, const AttributeValue &value);
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    64
private:
5363
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    65
  /**
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    66
   * \internal
7134a7d9337a Doxygen-o-matic
Craig Dowell <craigdo@ee.washington.edu>
parents: 5330
diff changeset
    67
   */
3848
affd0834debc address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents: 3821
diff changeset
    68
  Ptr<Application> InstallPriv (Ptr<Node> node) const;
3821
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    69
  ObjectFactory m_factory;
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    70
};
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    71
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    72
} // namespace ns3
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    73
9ea825f066a2 Apply icmp-application patch frm lacage
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    74
#endif /* V4PING_HELPER_H */