merge
authorPavel Boyko <boyko@iitp.ru>
Thu Oct 01 13:59:43 2009 +0400 (4 months ago)
changeset 5335a2972c6648c7
parent 5334 92aafeab5e4f
parent 5332 06d798613d99
child 5337 adf71e696e17
merge
     1.1 --- a/src/applications/v4ping/v4ping.h	Thu Oct 01 13:59:26 2009 +0400
     1.2 +++ b/src/applications/v4ping/v4ping.h	Thu Oct 01 13:59:43 2009 +0400
     1.3 @@ -9,11 +9,20 @@
     1.4  
     1.5  class Socket;
     1.6  
     1.7 +/**
     1.8 + * \brief an application which sends one ICMP ECHO request, waits for a REPLYs
     1.9 + *        and reports the calculated RTT.
    1.10 + *
    1.11 + * Note: The RTT calculated is reported through a trace source.
    1.12 + */
    1.13  class V4Ping : public Application
    1.14  {
    1.15  public:
    1.16    static TypeId GetTypeId (void);
    1.17  
    1.18 +  /**
    1.19 +   * create a pinger applications
    1.20 +   */
    1.21    V4Ping ();
    1.22    virtual ~V4Ping ();
    1.23  
     2.1 --- a/src/helper/udp-echo-helper.h	Thu Oct 01 13:59:26 2009 +0400
     2.2 +++ b/src/helper/udp-echo-helper.h	Thu Oct 01 13:59:43 2009 +0400
     2.3 @@ -28,15 +28,49 @@
     2.4  
     2.5  namespace ns3 {
     2.6  
     2.7 +/**
     2.8 + * \brief create a server application which waits for input udp packets
     2.9 + *        and sends them back to the original sender.
    2.10 + */
    2.11  class UdpEchoServerHelper
    2.12  {
    2.13  public:
    2.14 +  /**
    2.15 +   * \param port the port the server will wait on for incoming packets
    2.16 +   */
    2.17    UdpEchoServerHelper (uint16_t port);
    2.18  
    2.19 +  /**
    2.20 +   * \param name the name of the attribute to set
    2.21 +   * \param value the value of the attribute to set
    2.22 +   *
    2.23 +   * Record an attribute to be set after the server application is created.
    2.24 +   */
    2.25    void SetAttribute (std::string name, const AttributeValue &value);
    2.26  
    2.27 +  /**
    2.28 +   * \param node the node
    2.29 +   *
    2.30 +   * Create a udp echo server application on the input node
    2.31 +   *
    2.32 +   * \returns the application created
    2.33 +   */
    2.34    ApplicationContainer Install (Ptr<Node> node) const;
    2.35 +  /**
    2.36 +   * \param nodeName the node
    2.37 +   *
    2.38 +   * Create a udp echo server application on the input node
    2.39 +   *
    2.40 +   * \returns the application created
    2.41 +   */
    2.42    ApplicationContainer Install (std::string nodeName) const;
    2.43 +  /**
    2.44 +   * \param c the nodes
    2.45 +   *
    2.46 +   * Create one udp echo server application on each of the input nodes
    2.47 +   *
    2.48 +   * \returns the applications created, one application per input node.
    2.49 +   */
    2.50    ApplicationContainer Install (NodeContainer c) const;
    2.51  
    2.52  private:
    2.53 @@ -45,11 +79,24 @@
    2.54    ObjectFactory m_factory;
    2.55  };
    2.56  
    2.57 +/**
    2.58 + * \brief create an application which sends a udp packet and waits for an echo of this packet
    2.59 + */
    2.60  class UdpEchoClientHelper
    2.61  {
    2.62  public:
    2.63 +  /**
    2.64 +   * \param ip ip address of the remote udp echo server
    2.65 +   * \param port port number of the remote udp echo server
    2.66 +   */
    2.67    UdpEchoClientHelper (Ipv4Address ip, uint16_t port);
    2.68  
    2.69 +  /**
    2.70 +   * \param name the name of the attribute to set
    2.71 +   * \param value the value of the attribute to set
    2.72 +   *
    2.73 +   * Record an attribute to be set after the client application is created.
    2.74 +   */
    2.75    void SetAttribute (std::string name, const AttributeValue &value);
    2.76  
    2.77    /**
    2.78 @@ -103,8 +150,29 @@
    2.79     */
    2.80    void SetFill (Ptr<Application> app, uint8_t *fill, uint32_t fillLength, uint32_t dataLength);
    2.81  
    2.82 +  /**
    2.83 +   * \param node the node
    2.84 +   *
    2.85 +   * Create a udp echo client application on the input node
    2.86 +   *
    2.87 +   * \returns the application created
    2.88 +   */
    2.89    ApplicationContainer Install (Ptr<Node> node) const;
    2.90 +  /**
    2.91 +   * \param nodeName the node
    2.92 +   *
    2.93 +   * Create a udp echo client application on the input node
    2.94 +   *
    2.95 +   * \returns the application created
    2.96 +   */
    2.97    ApplicationContainer Install (std::string nodeName) const;
    2.98 +  /**
    2.99 +   * \param c the nodes
   2.100 +   *
   2.101 +   * Create one udp echo client application on each of the input nodes
   2.102 +   *
   2.103 +   * \returns the applications created, one application per input node.
   2.104 +   */
   2.105    ApplicationContainer Install (NodeContainer c) const;
   2.106  
   2.107  private:
     3.1 --- a/src/helper/v4ping-helper.cc	Thu Oct 01 13:59:26 2009 +0400
     3.2 +++ b/src/helper/v4ping-helper.cc	Thu Oct 01 13:59:43 2009 +0400
     3.3 @@ -30,12 +30,6 @@
     3.4    m_factory.Set ("Remote", Ipv4AddressValue (remote));
     3.5  }
     3.6  
     3.7 -void 
     3.8 -V4PingHelper::SetAttribute (std::string name, const AttributeValue &value)
     3.9 -{
    3.10 -  m_factory.Set (name, value);
    3.11 -}
    3.12 -
    3.13  ApplicationContainer
    3.14  V4PingHelper::Install (Ptr<Node> node) const
    3.15  {
     4.1 --- a/src/helper/v4ping-helper.h	Thu Oct 01 13:59:26 2009 +0400
     4.2 +++ b/src/helper/v4ping-helper.h	Thu Oct 01 13:59:43 2009 +0400
     4.3 @@ -7,15 +7,40 @@
     4.4  
     4.5  namespace ns3 {
     4.6  
     4.7 +/**
     4.8 + * \brief create a pinger application and associate it to a node
     4.9 + *
    4.10 + * This class creates one or multiple instances of ns3::V4Ping and associates
    4.11 + * it/them to one/multiple node(s).
    4.12 + */
    4.13  class V4PingHelper
    4.14  {
    4.15  public:
    4.16 +  /**
    4.17 +   * \param remote the address which should be pinged
    4.18 +   */
    4.19    V4PingHelper (Ipv4Address remote);
    4.20  
    4.21 -  void SetAttribute (std::string name, const AttributeValue &value);
    4.22 -
    4.23 +  /**
    4.24 +   * \param nodes the list of nodes.
    4.25 +   *
    4.26 +   * Install a pinger application on each node in the input list of nodes.
    4.27 +   * \returns a list of pinger applications, one for each input node
    4.28 +   */
    4.29    ApplicationContainer Install (NodeContainer nodes) const;
    4.30 +  /**
    4.31 +   * \param node the node
    4.32 +   *
    4.33 +   * Install a pinger application on the input node
    4.34 +   * \returns the pinger application created.
    4.35 +   */
    4.36    ApplicationContainer Install (Ptr<Node> node) const;
    4.37 +  /**
    4.38 +   * \param nodeName the node
    4.39 +   *
    4.40 +   * Install a pinger application on the input node
    4.41 +   * \returns the pinger application created.
    4.42 +   */
    4.43    ApplicationContainer Install (std::string nodeName) const;
    4.44  
    4.45  private: