author | Craig Dowell <craigdo@ee.washington.edu> |
Mon, 04 Jan 2010 10:35:32 -0800 | |
changeset 6009 | e1b696a1ed28 |
parent 5776 | aae948449722 |
child 6013 | fa3ab7f34eb2 |
permissions | -rw-r--r-- |
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" |
3403
ac82ff1f6736
use NS_DEPRECATED for bug 232.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3381
diff
changeset
|
26 |
#include "ns3/deprecated.h" |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
27 |
#include "pcap-user-helper.h" |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
28 |
#include <string> |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
namespace ns3 { |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
|
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
32 |
class Queue; |
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
33 |
class NetDevice; |
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
34 |
class Node; |
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
35 |
class PcapWriter; |
4712 | 36 |
class AsciiWriter; |
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
37 |
|
2705 | 38 |
/** |
5363 | 39 |
* \brief Build a set of PointToPointNetDevice objects |
2705 | 40 |
*/ |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
41 |
class PointToPointHelper : public PcapUserHelper |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
42 |
{ |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
43 |
public: |
5363 | 44 |
/** |
45 |
* Create a PointToPointHelper to make life easier when creating point to |
|
46 |
* point networks. |
|
47 |
*/ |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
PointToPointHelper (); |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
49 |
|
2705 | 50 |
/** |
5363 | 51 |
* Each point to point net device must have a queue to pass packets through. |
52 |
* This method allows one to set the type of the queue that is automatically |
|
53 |
* created when the device is created and attached to a node. |
|
54 |
* |
|
2705 | 55 |
* \param type the type of queue |
56 |
* \param n1 the name of the attribute to set on the queue |
|
57 |
* \param v1 the value of the attribute to set on the queue |
|
58 |
* \param n2 the name of the attribute to set on the queue |
|
59 |
* \param v2 the value of the attribute to set on the queue |
|
60 |
* \param n3 the name of the attribute to set on the queue |
|
61 |
* \param v3 the value of the attribute to set on the queue |
|
62 |
* \param n4 the name of the attribute to set on the queue |
|
63 |
* \param v4 the value of the attribute to set on the queue |
|
64 |
* |
|
65 |
* 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
|
66 |
* PointToPointNetDevice created through PointToPointHelper::Install. |
2705 | 67 |
*/ |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
68 |
void SetQueue (std::string type, |
3786
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
69 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
70 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
71 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
72 |
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
|
73 |
|
2705 | 74 |
/** |
5363 | 75 |
* Set an attribute value to be propagated to each NetDevice created by the |
76 |
* helper. |
|
77 |
* |
|
2706
1e5771a4796c
fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
78 |
* \param name the name of the attribute to set |
1e5771a4796c
fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
79 |
* \param value the value of the attribute to set |
2705 | 80 |
* |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
81 |
* Set these attributes on each ns3::PointToPointNetDevice created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
82 |
* by PointToPointHelper::Install |
2705 | 83 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
84 |
void SetDeviceAttribute (std::string name, const AttributeValue &value); |
5363 | 85 |
|
2705 | 86 |
/** |
5363 | 87 |
* Set an attribute value to be propagated to each Channel created by the |
88 |
* helper. |
|
89 |
* |
|
2706
1e5771a4796c
fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
90 |
* \param name the name of the attribute to set |
1e5771a4796c
fix dox warnings.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
91 |
* \param value the value of the attribute to set |
2705 | 92 |
* |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
93 |
* Set these attribute on each ns3::PointToPointChannel created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
94 |
* by PointToPointHelper::Install |
2705 | 95 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
96 |
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
|
97 |
|
2805
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 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
100 |
* \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
|
101 |
* \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
|
102 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
103 |
* 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
|
104 |
* 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
|
105 |
* 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
|
106 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
107 |
static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
108 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
109 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
110 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
111 |
* \param d device container |
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 |
* 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
|
114 |
* 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
|
115 |
* 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
|
116 |
* stdc++ output stream. |
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 EnableAscii (std::ostream &os, NetDeviceContainer d); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
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 n node container |
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 each device which is of the |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
125 |
* 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
|
126 |
* 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
|
127 |
* 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, NodeContainer n); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
130 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
131 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
132 |
* \param os output stream |
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 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 |
*/ |
2996
a83b94e277d4
EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents:
2887
diff
changeset
|
138 |
static void EnableAsciiAll (std::ostream &os); |
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
139 |
|
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
140 |
/** |
2705 | 141 |
* \param c a set of nodes |
142 |
* |
|
143 |
* 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
|
144 |
* attributes configured by PointToPointHelper::SetChannelAttribute, |
2705 | 145 |
* 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
|
146 |
* ns3::PointToPointNetDevice with the requested attributes, |
2705 | 147 |
* a queue for this ns3::NetDevice, and associate the resulting |
148 |
* ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel. |
|
149 |
*/ |
|
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
150 |
NetDeviceContainer Install (NodeContainer c); |
3793
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
151 |
|
2705 | 152 |
/** |
153 |
* \param a first node |
|
154 |
* \param b second node |
|
155 |
* |
|
156 |
* Saves you from having to construct a temporary NodeContainer. |
|
157 |
*/ |
|
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
158 |
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
|
159 |
|
3793
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
160 |
/** |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
161 |
* \param a first node |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
162 |
* \param bName name of second node |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
163 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
164 |
* Saves you from having to construct a temporary NodeContainer. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
165 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
166 |
NetDeviceContainer Install (Ptr<Node> a, std::string bName); |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
167 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
168 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
169 |
* \param aName Name of first node |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
170 |
* \param b second node |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
171 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
172 |
* Saves you from having to construct a temporary NodeContainer. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
173 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
174 |
NetDeviceContainer Install (std::string aName, Ptr<Node> b); |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
175 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
176 |
/** |
4481 | 177 |
* \param aNode Name of first node |
178 |
* \param bNode Name of second node |
|
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
179 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
180 |
* Saves you from having to construct a temporary NodeContainer. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
181 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
182 |
NetDeviceContainer Install (std::string aNode, std::string bNode); |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
183 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
184 |
private: |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
185 |
/** |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
186 |
* \brief Enable pcap output the indicated net device. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
187 |
* |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
188 |
* NetDevice-specific implementation mechanism for hooking the trace and |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
189 |
* writing to the trace file. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
190 |
* |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
191 |
* \param prefix Filename prefix to use for pcap files. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
192 |
* \param nd Net device for which you want to enable tracing. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
193 |
* \param promiscuous If true capture all possible packets available at the device. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
194 |
*/ |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
195 |
virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
196 |
|
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
197 |
void EnableAscii (Ptr<Node> node, Ptr<NetDevice> device); |
4712 | 198 |
static void AsciiRxEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet); |
199 |
static void AsciiEnqueueEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet); |
|
200 |
static void AsciiDequeueEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet); |
|
201 |
static void AsciiDropEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet); |
|
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
202 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
203 |
ObjectFactory m_queueFactory; |
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
204 |
ObjectFactory m_channelFactory; |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
205 |
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
|
206 |
}; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
207 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
208 |
} // namespace ns3 |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
209 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
210 |
#endif /* POINT_TO_POINT_HELPER_H */ |