src/helper/point-to-point-helper.h
author Craig Dowell <craigdo@ee.washington.edu>
Thu, 03 Jul 2008 15:44:54 -0700
changeset 3381 3cdd9d60f7c7
parent 2997 caf9d364c6fc
child 3403 ac82ff1f6736
permissions -rw-r--r--
bug 232, references to Parameter obsolete
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
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     5
 * 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
     6
 * 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
     7
 * published by the Free Software Foundation;
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     8
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
     9
 * 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
    10
 * 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
    11
 * 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
    12
 * GNU General Public License for more details.
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    13
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    14
 * 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
    15
 * 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
    16
 * 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
    17
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    19
 */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
#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
    21
#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
    22
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#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
    24
#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
    25
#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
    26
#include <string>
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
namespace ns3 {
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    30
class Queue;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    31
class NetDevice;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    32
class Node;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    33
class PcapWriter;
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
    34
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    35
/**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    36
 * \brief build a set of PointToPointNetDevice objects
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    37
 */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
class PointToPointHelper
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
{
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
public:
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
  // 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
    42
  PointToPointHelper ();
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    44
  /**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    45
   * \param type the type of queue
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    46
   * \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
    47
   * \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
    48
   * \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
    49
   * \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
    50
   * \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
    51
   * \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
    52
   * \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
    53
   * \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
    54
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    55
   * Set the type of queue to create and associated to each
2887
9a637e6daee0 Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2839
diff changeset
    56
   * PointToPointNetDevice created through PointToPointHelper::Install.
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    57
   */
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
  void SetQueue (std::string type,
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2887
diff changeset
    59
		 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2887
diff changeset
    60
		 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2887
diff changeset
    61
		 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2887
diff changeset
    62
		 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ());
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    64
  /**
2706
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    65
   * \param name the name of the attribute to set
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    66
   * \param value the value of the attribute to set
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    67
   *
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
    68
   * Set these attributes on each ns3::PointToPointNetDevice created
2887
9a637e6daee0 Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2839
diff changeset
    69
   * by PointToPointHelper::Install
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    70
   */
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
    71
  void SetDeviceAttribute (std::string name, const AttributeValue &value);
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    72
  /**
2706
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    73
   * \param name the name of the attribute to set
1e5771a4796c fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2705
diff changeset
    74
   * \param value the value of the attribute to set
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    75
   *
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
    76
   * Set these attribute on each ns3::PointToPointChannel created
2887
9a637e6daee0 Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2839
diff changeset
    77
   * by PointToPointHelper::Install
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
    78
   */
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
    79
  void SetChannelAttribute (std::string name, const AttributeValue &value);
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    81
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    82
   * \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
    83
   * \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
    84
   * \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
    85
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    86
   * 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
    87
   * by the specified deviceid within the specified nodeid. The pcap
2839
b30d4ece2bbb generate .pcap postfix for pcap filenames
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2834
diff changeset
    88
   * data is stored in the file prefix-nodeid-deviceid.pcap.
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    89
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    90
   * 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
    91
   * been fully constructed.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    92
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
    93
  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
    94
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    95
   * \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
    96
   * \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
    97
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
    98
   * 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
    99
   * ns3::PointToPointNetDevice type.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   100
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   101
  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
   102
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   103
   * \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
   104
   * \param n container of nodes.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   105
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   106
   * 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
   107
   * 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
   108
   * input nodes.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   109
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   110
  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
   111
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   112
   * \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
   113
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   114
   * 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
   115
   * ns3::PointToPointNetDevice type
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   116
   */
2996
a83b94e277d4 EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents: 2887
diff changeset
   117
  static void EnablePcapAll (std::string filename);
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   118
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   119
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   120
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   121
   * \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
   122
   * \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
   123
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   124
   * 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
   125
   * 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
   126
   * 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
   127
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   128
  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
   129
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   130
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   131
   * \param d device container
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   132
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   133
   * 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
   134
   * 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
   135
   * 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
   136
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   137
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   138
  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
   139
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   140
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   141
   * \param n node container
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   142
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   143
   * 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
   144
   * 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
   145
   * 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
   146
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   147
   */
2789
47e92324cf4b configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2786
diff changeset
   148
  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
   149
  /**
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   150
   * \param os output stream
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   151
   *
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   152
   * 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
   153
   * 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
   154
   * stdc++ output stream.
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2802
diff changeset
   155
   */
2996
a83b94e277d4 EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents: 2887
diff changeset
   156
  static void EnableAsciiAll (std::ostream &os);
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   157
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   158
  /**
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   159
   * \param c a set of nodes
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   160
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   161
   * This method creates a ns3::PointToPointChannel with the
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
   162
   * attributes configured by PointToPointHelper::SetChannelAttribute,
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   163
   * then, for each node in the input container, we create a 
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 2997
diff changeset
   164
   * ns3::PointToPointNetDevice with the requested attributes, 
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   165
   * a queue for this ns3::NetDevice, and associate the resulting 
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   166
   * ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel.
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   167
   */
2887
9a637e6daee0 Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2839
diff changeset
   168
  NetDeviceContainer Install (NodeContainer c);
2705
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   169
  /**
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   170
   * \param a first node
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   171
   * \param b second node
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   172
   *
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   173
   * Saves you from having to construct a temporary NodeContainer.
a90b71c2afae doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   174
   */
2887
9a637e6daee0 Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2839
diff changeset
   175
  NetDeviceContainer Install (Ptr<Node> a, Ptr<Node> b);
2418
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   176
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   177
private:
2786
f261e50396ac add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2706
diff changeset
   178
  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
   179
  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
   180
  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
   181
  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
   182
  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
   183
  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
   184
  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
   185
  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
   186
  ObjectFactory m_queueFactory;
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
   187
  ObjectFactory m_channelFactory;
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2433
diff changeset
   188
  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
   189
};
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
} // namespace ns3
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   193
4ff45fa08781 an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   194
#endif /* POINT_TO_POINT_HELPER_H */