author | Tom Henderson <tomh@tomh.org> |
Sat, 30 May 2009 15:20:56 -0700 | |
changeset 4481 | 9250a25ee683 |
parent 4448 | 641b88d1e131 |
child 4712 | 74ed62336c36 |
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" |
2418
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 | 36 |
/** |
37 |
* \brief build a set of PointToPointNetDevice objects |
|
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 | 45 |
/** |
46 |
* \param type the type of queue |
|
47 |
* \param n1 the name of the attribute to set on the queue |
|
48 |
* \param v1 the value of the attribute to set on the queue |
|
49 |
* \param n2 the name of the attribute to set on the queue |
|
50 |
* \param v2 the value of the attribute to set on the queue |
|
51 |
* \param n3 the name of the attribute to set on the queue |
|
52 |
* \param v3 the value of the attribute to set on the queue |
|
53 |
* \param n4 the name of the attribute to set on the queue |
|
54 |
* \param v4 the value of the attribute to set on the queue |
|
55 |
* |
|
56 |
* 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
|
57 |
* PointToPointNetDevice created through PointToPointHelper::Install. |
2705 | 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, |
3786
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
60 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
61 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
62 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
63 |
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
|
64 |
|
2705 | 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 | 68 |
* |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
69 |
* Set these attributes on each ns3::PointToPointNetDevice created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
70 |
* by PointToPointHelper::Install |
2705 | 71 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
72 |
void SetDeviceAttribute (std::string name, const AttributeValue &value); |
2705 | 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 | 76 |
* |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
77 |
* Set these attribute on each ns3::PointToPointChannel created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
78 |
* by PointToPointHelper::Install |
2705 | 79 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
80 |
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
|
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 |
2839
b30d4ece2bbb
generate .pcap postfix for pcap filenames
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
89 |
* 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
|
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); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
95 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
96 |
/** |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
97 |
* \param filename filename prefix to use for pcap files. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
98 |
* \param nd Net device on which you want to enable tracing. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
99 |
* |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
100 |
* Enable pcap output on each input device which is of the |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
101 |
* ns3::PointToPointNetDevice type. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
102 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
103 |
static void EnablePcap (std::string filename, Ptr<NetDevice> nd); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
104 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
105 |
/** |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
106 |
* \param filename filename prefix to use for pcap files. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
107 |
* \param ndName Name of net device on which you want to enable tracing. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
108 |
* |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
109 |
* Enable pcap output on each input device which is of the |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
110 |
* ns3::PointToPointNetDevice type. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
111 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
112 |
static void EnablePcap (std::string filename, std::string ndName); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
113 |
|
2805
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 |
* \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
|
116 |
* \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
|
117 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
118 |
* 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
|
119 |
* ns3::PointToPointNetDevice type. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
120 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
121 |
static void EnablePcap (std::string filename, NetDeviceContainer d); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
122 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
123 |
|
2805
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 |
* \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
|
126 |
* \param n container of nodes. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
127 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
128 |
* 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
|
129 |
* 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
|
130 |
* input nodes. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
131 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
132 |
static void EnablePcap (std::string filename, NodeContainer n); |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
133 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
134 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
135 |
* \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
|
136 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
137 |
* 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
|
138 |
* ns3::PointToPointNetDevice type |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
139 |
*/ |
2996
a83b94e277d4
EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents:
2887
diff
changeset
|
140 |
static void EnablePcapAll (std::string filename); |
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
141 |
|
2805
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 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
144 |
* \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
|
145 |
* \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
|
146 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
147 |
* 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
|
148 |
* 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
|
149 |
* 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
|
150 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
151 |
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
|
152 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
153 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
154 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
155 |
* \param d device container |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
156 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
157 |
* 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
|
158 |
* 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
|
159 |
* 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
|
160 |
* stdc++ output stream. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
161 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
162 |
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
|
163 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
164 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
165 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
166 |
* \param n node container |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
167 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
168 |
* 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
|
169 |
* 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
|
170 |
* 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
|
171 |
* stdc++ output stream. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
172 |
*/ |
2789
47e92324cf4b
configure tracing post-topology construction, not before.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2786
diff
changeset
|
173 |
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
|
174 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
175 |
/** |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
176 |
* \param os output stream |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
177 |
* |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
178 |
* 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
|
179 |
* 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
|
180 |
* stdc++ output stream. |
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2802
diff
changeset
|
181 |
*/ |
2996
a83b94e277d4
EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents:
2887
diff
changeset
|
182 |
static void EnableAsciiAll (std::ostream &os); |
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
183 |
|
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
184 |
/** |
2705 | 185 |
* \param c a set of nodes |
186 |
* |
|
187 |
* 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
|
188 |
* attributes configured by PointToPointHelper::SetChannelAttribute, |
2705 | 189 |
* 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
|
190 |
* ns3::PointToPointNetDevice with the requested attributes, |
2705 | 191 |
* a queue for this ns3::NetDevice, and associate the resulting |
192 |
* ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel. |
|
193 |
*/ |
|
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
194 |
NetDeviceContainer Install (NodeContainer c); |
3793
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
195 |
|
2705 | 196 |
/** |
197 |
* \param a first node |
|
198 |
* \param b second node |
|
199 |
* |
|
200 |
* Saves you from having to construct a temporary NodeContainer. |
|
201 |
*/ |
|
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
202 |
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
|
203 |
|
3793
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
204 |
/** |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
205 |
* \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
|
206 |
* \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
|
207 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
208 |
* 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
|
209 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
210 |
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
|
211 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
212 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
213 |
* \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
|
214 |
* \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
|
215 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
216 |
* 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
|
217 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
218 |
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
|
219 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
220 |
/** |
4481 | 221 |
* \param aNode Name of first node |
222 |
* \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
|
223 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
224 |
* 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
|
225 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
226 |
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
|
227 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
228 |
/** |
3793
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
229 |
* \brief Make a star network topology. |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
230 |
* |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
231 |
* Given a pointer to a node that will become the hub of the star, and a |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
232 |
* NodeContainer containing pointers to the nodes that will become the |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
233 |
* spokes; we construct point to point net devices on the hub (corresponding |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
234 |
* to the spokes) and store them in the hubDevices NetDeviceContainer. We |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
235 |
* add a net device to each spoke node and store them in the spokeDevices |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
236 |
* NetDeviceContainer. A point-to-point channel is created for each spoke. |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
237 |
* |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
238 |
* The ordering of the devices in the hubDevices container is according to |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
239 |
* the order of the spokes container -- that is, hubDevices[0] will be the |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
240 |
* net device used on the hub that talks to spokes[0]. the container entry |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
241 |
* spokeDevices[0] will have the device that hubDevices[0] talks to -- those |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
242 |
* two devices are the ones that connect hub to spokes[0]. |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
243 |
* |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
244 |
* \param hub The central node of the star network |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
245 |
* \param spokes A NodeContainer of the nodes that will be the spoke (leaf) |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
246 |
* nodes |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
247 |
* \param hubDevices A NetDeviceContainer that will be filled with pointers |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
248 |
* to the point-to-point net devices created on the hub. |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
249 |
* \param spokeDevices A NetDeviceContainer that will be filled with pointers |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
250 |
* to the point-to-point net devices created on each of |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
251 |
* the spokes. |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
252 |
*/ |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
253 |
void InstallStar (Ptr<Node> hub, NodeContainer spokes, |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
254 |
NetDeviceContainer& hubDevices, NetDeviceContainer& spokeDevices); |
a5895f134543
make star topologies easier to create
Craig Dowell <craigdo@ee.washington.edu>
parents:
3403
diff
changeset
|
255 |
|
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
256 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
257 |
* \brief Make a star network topology. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
258 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
259 |
* Given a pointer to a node that will become the hub of the star, and a |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
260 |
* NodeContainer containing pointers to the nodes that will become the |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
261 |
* spokes; we construct point to point net devices on the hub (corresponding |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
262 |
* to the spokes) and store them in the hubDevices NetDeviceContainer. We |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
263 |
* add a net device to each spoke node and store them in the spokeDevices |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
264 |
* NetDeviceContainer. A point-to-point channel is created for each spoke. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
265 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
266 |
* The ordering of the devices in the hubDevices container is according to |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
267 |
* the order of the spokes container -- that is, hubDevices[0] will be the |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
268 |
* net device used on the hub that talks to spokes[0]. the container entry |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
269 |
* spokeDevices[0] will have the device that hubDevices[0] talks to -- those |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
270 |
* two devices are the ones that connect hub to spokes[0]. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
271 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
272 |
* \param hubName The name of the central node of the star network |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
273 |
* \param spokes A NodeContainer of the nodes that will be the spoke (leaf) |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
274 |
* nodes |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
275 |
* \param hubDevices A NetDeviceContainer that will be filled with pointers |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
276 |
* to the point-to-point net devices created on the hub. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
277 |
* \param spokeDevices A NetDeviceContainer that will be filled with pointers |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
278 |
* to the point-to-point net devices created on each of |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
279 |
* the spokes. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
280 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
281 |
void InstallStar (std::string hubName, NodeContainer spokes, |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
282 |
NetDeviceContainer& hubDevices, NetDeviceContainer& spokeDevices); |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3794
diff
changeset
|
283 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
284 |
private: |
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
285 |
void EnablePcap (Ptr<Node> node, Ptr<NetDevice> device, Ptr<Queue> queue); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
286 |
static void SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet); |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
287 |
|
2786
f261e50396ac
add ascii/pcap trace helpers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2706
diff
changeset
|
288 |
void EnableAscii (Ptr<Node> node, Ptr<NetDevice> device); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
289 |
static void AsciiRxEvent (std::ostream *os, std::string path, Ptr<const Packet> packet); |
2802
6beac0ec2c5d
Prepend ascii trace lines with action and time
Tom Henderson <tomh@tomh.org>
parents:
2789
diff
changeset
|
290 |
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
|
291 |
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
|
292 |
static void AsciiDropEvent (std::ostream *os, std::string path, Ptr<const Packet> packet); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
293 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
294 |
ObjectFactory m_queueFactory; |
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
295 |
ObjectFactory m_channelFactory; |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
296 |
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
|
297 |
}; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
298 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
299 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
300 |
} // namespace ns3 |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
301 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
302 |
#endif /* POINT_TO_POINT_HELPER_H */ |