src/helper/point-to-point-helper.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 31 Mar 2008 14:50:25 -0700
changeset 2833 f3474fd850b2
parent 2805 cd246cf2edf3
child 2834 1aab57845b07
permissions -rw-r--r--
add missing license headers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2833
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     2
/*
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     3
 * Copyright (c) 2008 INRIA
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     4
 * All rights reserved.
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     5
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     8
 * published by the Free Software Foundation;
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     9
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    13
 * GNU General Public License for more details.
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    14
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    15
 * You should have received a copy of the GNU General Public License
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    16
 * along with this program; if not, write to the Free Software
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    18
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    20
 */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
#ifndef POINT_TO_POINT_HELPER_H
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#define POINT_TO_POINT_HELPER_H
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include "ns3/object-factory.h"
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/net-device-container.h"
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include "ns3/node-container.h"
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include <string>
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
namespace ns3 {
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    31
class Queue;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    32
class NetDevice;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    33
class Node;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    34
class PcapWriter;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    35
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    36
/**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    37
 * \brief build a set of PointToPointNetDevice objects
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    38
 */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
class PointToPointHelper
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
{
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
public:
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
  // by default, create queues of type DropTailQueue.
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
  PointToPointHelper ();
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    45
  /**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    46
   * \param type the type of queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    47
   * \param n1 the name of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    48
   * \param v1 the value of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    49
   * \param n2 the name of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    50
   * \param v2 the value of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    51
   * \param n3 the name of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    52
   * \param v3 the value of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    53
   * \param n4 the name of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    54
   * \param v4 the value of the attribute to set on the queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    55
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    56
   * Set the type of queue to create and associated to each
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    57
   * PointToPointNetDevice created through PointToPointHelper::Build.
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    58
   */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
  void SetQueue (std::string type,
2433
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2418
diff changeset
    60
		 std::string n1 = "", Attribute v1 = Attribute (),
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2418
diff changeset
    61
		 std::string n2 = "", Attribute v2 = Attribute (),
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2418
diff changeset
    62
		 std::string n3 = "", Attribute v3 = Attribute (),
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2418
diff changeset
    63
		 std::string n4 = "", Attribute v4 = Attribute ());
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    65
  /**
2706
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    66
   * \param name the name of the attribute to set
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    67
   * \param value the value of the attribute to set
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    68
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    69
   * Set these parameters on each ns3::PointToPointNetDevice created
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    70
   * by PointToPointHelper::Build
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    71
   */
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
    72
  void SetDeviceParameter (std::string name, Attribute value);
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    73
  /**
2706
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    74
   * \param name the name of the attribute to set
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    75
   * \param value the value of the attribute to set
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    76
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    77
   * Set these parameters on each ns3::PointToPointChannel created
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    78
   * by PointToPointHelper::Build
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    79
   */
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
    80
  void SetChannelParameter (std::string name, Attribute value);
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    82
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    83
   * \param filename filename prefix to use for pcap files.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    84
   * \param nodeid the id of the node to generate pcap output for.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    85
   * \param deviceid the id of the device to generate pcap output for.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    86
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    87
   * Generate a pcap file which contains the link-level data observed
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    88
   * by the specified deviceid within the specified nodeid. The pcap
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    89
   * data is stored in the file prefix-nodeid-deviceid.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    90
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    91
   * This method should be invoked after the network topology has 
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    92
   * been fully constructed.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    93
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
    94
  static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    95
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    96
   * \param filename filename prefix to use for pcap files.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    97
   * \param d container of devices of type ns3::PointToPointNetDevice
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    98
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    99
   * Enable pcap output on each input device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   100
   * ns3::PointToPointNetDevice type.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   101
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   102
  static void EnablePcap (std::string filename, NetDeviceContainer d);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   103
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   104
   * \param filename filename prefix to use for pcap files.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   105
   * \param n container of nodes.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   106
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   107
   * Enable pcap output on each device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   108
   * ns3::PointToPointNetDevice type and which is located in one of the 
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   109
   * input nodes.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   110
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   111
  static void EnablePcap (std::string filename, NodeContainer n);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   112
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   113
   * \param filename filename prefix to use for pcap files.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   114
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   115
   * Enable pcap output on each device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   116
   * ns3::PointToPointNetDevice type
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   117
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   118
  static void EnablePcap (std::string filename);
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   119
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   120
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   121
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   122
   * \param nodeid the id of the node to generate ascii output for.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   123
   * \param deviceid the id of the device to generate ascii output for.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   124
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   125
   * Enable ascii output on the specified deviceid within the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   126
   * specified nodeid if it is of type ns3::PointToPointNetDevice and dump 
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   127
   * that to the specified stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   128
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   129
  static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   130
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   131
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   132
   * \param d device container
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   133
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   134
   * Enable ascii output on each device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   135
   * ns3::PointToPointNetDevice type and which is located in the input
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   136
   * device container and dump that to the specified
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   137
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   138
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   139
  static void EnableAscii (std::ostream &os, NetDeviceContainer d);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   140
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   141
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   142
   * \param n node container
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   143
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   144
   * Enable ascii output on each device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   145
   * ns3::PointToPointNetDevice type and which is located in one
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   146
   * of the input node and dump that to the specified
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   147
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   148
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   149
  static void EnableAscii (std::ostream &os, NodeContainer n);
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   150
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   151
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   152
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   153
   * Enable ascii output on each device which is of the
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   154
   * ns3::PointToPointNetDevice type and dump that to the specified
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   155
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   156
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   157
  static void EnableAscii (std::ostream &os);
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   158
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   159
  /**
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   160
   * \param c a set of nodes
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   161
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   162
   * This method creates a ns3::PointToPointChannel with the
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   163
   * attributes configured by PointToPointHelper::SetChannelParameter,
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   164
   * then, for each node in the input container, we create a 
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   165
   * ns3::PointToPointNetDevice with the requested parameters, 
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   166
   * a queue for this ns3::NetDevice, and associate the resulting 
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   167
   * ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel.
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   168
   */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   169
  NetDeviceContainer Build (NodeContainer c);
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   170
  /**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   171
   * \param a first node
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   172
   * \param b second node
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   173
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   174
   * Saves you from having to construct a temporary NodeContainer.
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   175
   */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   176
  NetDeviceContainer Build (Ptr<Node> a, Ptr<Node> b);
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   177
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   178
private:
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   179
  void EnablePcap (Ptr<Node> node, Ptr<NetDevice> device, Ptr<Queue> queue);
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   180
  void EnableAscii (Ptr<Node> node, Ptr<NetDevice> device);
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   181
  static void RxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   182
  static void EnqueueEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
2802
6beac0ec2c5d Prepend ascii trace lines with action and time
Tom Henderson <tomh@tomh.org>
parents: 2789
diff changeset
   183
  static void AsciiEnqueueEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
6beac0ec2c5d Prepend ascii trace lines with action and time
Tom Henderson <tomh@tomh.org>
parents: 2789
diff changeset
   184
  static void AsciiDequeueEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
6beac0ec2c5d Prepend ascii trace lines with action and time
Tom Henderson <tomh@tomh.org>
parents: 2789
diff changeset
   185
  static void AsciiDropEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
6beac0ec2c5d Prepend ascii trace lines with action and time
Tom Henderson <tomh@tomh.org>
parents: 2789
diff changeset
   186
  static void AsciiRxEvent (std::ostream *os, std::string path, Ptr<const Packet> packet);
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   187
  ObjectFactory m_queueFactory;
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
   188
  ObjectFactory m_channelFactory;
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
   189
  ObjectFactory m_deviceFactory;
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   190
};
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   191
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   192
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   193
} // namespace ns3
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   194
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   195
#endif /* POINT_TO_POINT_HELPER_H */