author | Mitch Watrous |
Tue, 14 Aug 2012 09:12:05 -0700 | |
changeset 8974 | bfe1b44645d8 |
parent 8866 | a44fcd5f9c1d |
child 11022 | 89cb222b9e60 |
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 CSMA_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 CSMA_HELPER_H |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
|
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
23 |
#include <string> |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
24 |
|
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
25 |
#include "ns3/attribute.h" |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
26 |
#include "ns3/object-factory.h" |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
27 |
#include "ns3/net-device-container.h" |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
28 |
#include "ns3/node-container.h" |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
29 |
#include "ns3/csma-channel.h" |
3403
ac82ff1f6736
use NS_DEPRECATED for bug 232.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3381
diff
changeset
|
30 |
#include "ns3/deprecated.h" |
6834
036f9a0b9899
Rename internet-stack to internet, and organize module
Tom Henderson <tomh@tomh.org>
parents:
6273
diff
changeset
|
31 |
#include "ns3/trace-helper.h" |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
32 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
33 |
namespace ns3 { |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
|
2780
306f665014b6
add ascii and pcap tracing support to csma helper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
35 |
class Packet; |
306f665014b6
add ascii and pcap tracing support to csma helper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2705
diff
changeset
|
36 |
|
2704 | 37 |
/** |
38 |
* \brief build a set of CsmaNetDevice objects |
|
6026
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
39 |
* |
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
40 |
* Normally we eschew multiple inheritance, however, the classes |
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
41 |
* PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are |
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
42 |
* treated as "mixins". A mixin is a self-contained class that |
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
43 |
* encapsulates a general attribute or a set of functionality that |
38a97b815052
some words about mixins in helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6017
diff
changeset
|
44 |
* may be of interest to many other classes. |
2704 | 45 |
*/ |
6048
2f91f77ba14e
move back to mixins for helpers
Craig Dowell <craigdo@ee.washington.edu>
parents:
6028
diff
changeset
|
46 |
class CsmaHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
47 |
{ |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
public: |
5361
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
49 |
/** |
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
50 |
* Construct a CsmaHelper. |
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
51 |
*/ |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
CsmaHelper (); |
6057
1f5b78df0ec6
fix cygwin build break
Craig Dowell <craigdo@ee.washington.edu>
parents:
6053
diff
changeset
|
53 |
virtual ~CsmaHelper () {} |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
54 |
|
2704 | 55 |
/** |
56 |
* \param type the type of queue |
|
57 |
* \param n1 the name of the attribute to set on the queue |
|
58 |
* \param v1 the value of the attribute to set on the queue |
|
59 |
* \param n2 the name of the attribute to set on the queue |
|
60 |
* \param v2 the value of the attribute to set on the queue |
|
61 |
* \param n3 the name of the attribute to set on the queue |
|
62 |
* \param v3 the value of the attribute to set on the queue |
|
63 |
* \param n4 the name of the attribute to set on the queue |
|
64 |
* \param v4 the value of the attribute to set on the queue |
|
65 |
* |
|
66 |
* 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
|
67 |
* CsmaNetDevice created through CsmaHelper::Install. |
2704 | 68 |
*/ |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
69 |
void SetQueue (std::string type, |
3786
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
70 |
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
71 |
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
72 |
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), |
9f384deadb46
replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3403
diff
changeset
|
73 |
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
|
74 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
/** |
2704 | 76 |
* \param n1 the name of the attribute to set |
77 |
* \param v1 the value of the attribute to set |
|
78 |
* |
|
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
79 |
* Set these attributes on each ns3::CsmaNetDevice created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
80 |
* by CsmaHelper::Install |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
81 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
82 |
void SetDeviceAttribute (std::string n1, const AttributeValue &v1); |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
|
2704 | 84 |
/** |
85 |
* \param n1 the name of the attribute to set |
|
86 |
* \param v1 the value of the attribute to set |
|
87 |
* |
|
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
88 |
* Set these attributes on each ns3::CsmaChannel created |
2887
9a637e6daee0
Build -> Install
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2839
diff
changeset
|
89 |
* by CsmaHelper::Install |
2704 | 90 |
*/ |
3381
3cdd9d60f7c7
bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents:
2997
diff
changeset
|
91 |
void SetChannelAttribute (std::string n1, const AttributeValue &v1); |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
92 |
|
2805
cd246cf2edf3
add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2799
diff
changeset
|
93 |
/** |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
94 |
* This method creates an ns3::CsmaChannel with the attributes configured by |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
95 |
* CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
96 |
* configured by CsmaHelper::SetDeviceAttribute and then adds the device |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
97 |
* to the node and attaches the channel to the device. |
2704 | 98 |
* |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
99 |
* \param node The node to install the device in |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
100 |
* \returns A container holding the added net device. |
2704 | 101 |
*/ |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
102 |
NetDeviceContainer Install (Ptr<Node> node) const; |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
103 |
|
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
104 |
/** |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
105 |
* This method creates an ns3::CsmaChannel with the attributes configured by |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
106 |
* CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
107 |
* configured by CsmaHelper::SetDeviceAttribute and then adds the device |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
108 |
* to the node and attaches the channel to the device. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
109 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
110 |
* \param name The name of the node to install the device in |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
111 |
* \returns A container holding the added net device. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
112 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
113 |
NetDeviceContainer Install (std::string name) const; |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
114 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
115 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
116 |
* This method creates an ns3::CsmaNetDevice with the attributes configured by |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
117 |
* CsmaHelper::SetDeviceAttribute and then adds the device to the node and |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
118 |
* attaches the provided channel to the device. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
119 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
120 |
* \param node The node to install the device in |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
121 |
* \param channel The channel to attach to the device. |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
122 |
* \returns A container holding the added net device. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
123 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
124 |
NetDeviceContainer Install (Ptr<Node> node, Ptr<CsmaChannel> channel) const; |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
125 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
126 |
/** |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
127 |
* This method creates an ns3::CsmaNetDevice with the attributes configured by |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
128 |
* CsmaHelper::SetDeviceAttribute and then adds the device to the node and |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
129 |
* attaches the provided channel to the device. |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
130 |
* |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
131 |
* \param node The node to install the device in |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
132 |
* \param channelName The name of the channel to attach to the device. |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
133 |
* \returns A container holding the added net device. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
134 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
135 |
NetDeviceContainer Install (Ptr<Node> node, std::string channelName) const; |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
136 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
137 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
138 |
* This method creates an ns3::CsmaNetDevice with the attributes configured by |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
139 |
* CsmaHelper::SetDeviceAttribute and then adds the device to the node and |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
140 |
* attaches the provided channel to the device. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
141 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
142 |
* \param nodeName The name of the node to install the device in |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
143 |
* \param channel The channel to attach to the device. |
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
144 |
* \returns A container holding the added net device. |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
145 |
*/ |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
146 |
NetDeviceContainer Install (std::string nodeName, Ptr<CsmaChannel> channel) const; |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
147 |
|
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
148 |
/** |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
149 |
* This method creates an ns3::CsmaNetDevice with the attributes configured by |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
150 |
* CsmaHelper::SetDeviceAttribute and then adds the device to the node and |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
151 |
* attaches the provided channel to the device. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
152 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
153 |
* \param nodeName The name of the node to install the device in |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
154 |
* \param channelName The name of the channel to attach to the device. |
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
155 |
* \returns A container holding the added net device. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
156 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
157 |
NetDeviceContainer Install (std::string nodeName, std::string channelName) const; |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
158 |
|
2704 | 159 |
/** |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
160 |
* This method creates an ns3::CsmaChannel with the attributes configured by |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
161 |
* CsmaHelper::SetChannelAttribute. For each Ptr<node> in the provided |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
162 |
* container: it creates an ns3::CsmaNetDevice (with the attributes |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
163 |
* configured by CsmaHelper::SetDeviceAttribute); adds the device to the |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
164 |
* node; and attaches the channel to the device. |
2704 | 165 |
* |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
166 |
* \param c The NodeContainer holding the nodes to be changed. |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
167 |
* \returns A container holding the added net devices. |
2704 | 168 |
*/ |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
169 |
NetDeviceContainer Install (const NodeContainer &c) const; |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
170 |
|
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
171 |
/** |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
172 |
* For each Ptr<node> in the provided container, this method creates an |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
173 |
* ns3::CsmaNetDevice (with the attributes configured by |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
174 |
* CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
175 |
* the provided channel to the device. |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
176 |
* |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
177 |
* \param c The NodeContainer holding the nodes to be changed. |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
178 |
* \param channel The channel to attach to the devices. |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
179 |
* \returns A container holding the added net devices. |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
180 |
*/ |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
181 |
NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel) const; |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
182 |
|
3795
707acdf0f8b3
csma version of install star and example
Craig Dowell <craigdo@ee.washington.edu>
parents:
3786
diff
changeset
|
183 |
/** |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
184 |
* For each Ptr<node> in the provided container, this method creates an |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
185 |
* ns3::CsmaNetDevice (with the attributes configured by |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
186 |
* CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
187 |
* the provided channel to the device. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
188 |
* |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
189 |
* \param c The NodeContainer holding the nodes to be changed. |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
190 |
* \param channelName The name of the channel to attach to the devices. |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6096
diff
changeset
|
191 |
* \returns A container holding the added net devices. |
4140
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
192 |
*/ |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
193 |
NetDeviceContainer Install (const NodeContainer &c, std::string channelName) const; |
6bbf05bf4826
Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
194 |
|
8974
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
195 |
/** |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
196 |
* Assign a fixed random variable stream number to the random variables |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
197 |
* used by this model. Return the number of streams (possibly zero) that |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
198 |
* have been assigned. The Install() method should have previously been |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
199 |
* called by the user. |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
200 |
* |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
201 |
* \param c NetDeviceContainer of the set of net devices for which the |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
202 |
* CsmaNetDevice should be modified to use a fixed stream |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
203 |
* \param stream first stream index to use |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
204 |
* \return the number of stream indices assigned by this helper |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
205 |
*/ |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
206 |
int64_t AssignStreams (NetDeviceContainer c, int64_t stream); |
bfe1b44645d8
Replace src/csma usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8866
diff
changeset
|
207 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
208 |
private: |
5361
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
209 |
/* |
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
210 |
* \internal |
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
211 |
*/ |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
212 |
Ptr<NetDevice> InstallPriv (Ptr<Node> node, Ptr<CsmaChannel> channel) const; |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
3795
diff
changeset
|
213 |
|
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
214 |
/** |
6011
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
215 |
* \brief Enable pcap output on the indicated net device. |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
216 |
* \internal |
6009
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
217 |
* |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
218 |
* NetDevice-specific implementation mechanism for hooking the trace and |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
219 |
* writing to the trace file. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
220 |
* |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
221 |
* \param prefix Filename prefix to use for pcap files. |
e1b696a1ed28
redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents:
5776
diff
changeset
|
222 |
* \param nd Net device for which you want to enable tracing. |
6091
ab0d5e641fd7
fix thinko in fix for explicit pcap names
Craig Dowell <craigdo@ee.washington.edu>
parents:
6085
diff
changeset
|
223 |
* \param promiscuous If true capture all possible packets available at the device. |
6085
94b282f335d2
allow explicit filenames in pcap trace files
Craig Dowell <craigdo@ee.washington.edu>
parents:
6057
diff
changeset
|
224 |
* \param explicitFilename Treat the prefix as an explicit filename if true |
5361
e8989b44bffb
Doxygen and wscript messages point to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents:
4712
diff
changeset
|
225 |
*/ |
6091
ab0d5e641fd7
fix thinko in fix for explicit pcap names
Craig Dowell <craigdo@ee.washington.edu>
parents:
6085
diff
changeset
|
226 |
virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
227 |
|
6011
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
228 |
/** |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
229 |
* \brief Enable ascii trace output on the indicated net device. |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
230 |
* \internal |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
231 |
* |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
232 |
* NetDevice-specific implementation mechanism for hooking the trace and |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
233 |
* writing to the trace file. |
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
234 |
* |
6013 | 235 |
* \param stream The output stream object to use when logging ascii traces. |
236 |
* \param prefix Filename prefix to use for ascii trace files. |
|
6011
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
237 |
* \param nd Net device for which you want to enable tracing. |
8866
a44fcd5f9c1d
Fix easy doxygen warnings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
6852
diff
changeset
|
238 |
* \param explicitFilename Treat the prefix as an explicit filename if true |
6011
3fd7841b9c20
ascii trace additions
Craig Dowell <craigdo@ee.washington.edu>
parents:
6009
diff
changeset
|
239 |
*/ |
6096
96deefc231fa
plumb explicitFilename everywhere and update manual and tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
6091
diff
changeset
|
240 |
virtual void EnableAsciiInternal (Ptr<OutputStreamWrapper> stream, |
96deefc231fa
plumb explicitFilename everywhere and update manual and tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
6091
diff
changeset
|
241 |
std::string prefix, |
96deefc231fa
plumb explicitFilename everywhere and update manual and tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
6091
diff
changeset
|
242 |
Ptr<NetDevice> nd, |
96deefc231fa
plumb explicitFilename everywhere and update manual and tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
6091
diff
changeset
|
243 |
bool explicitFilename); |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4140
diff
changeset
|
244 |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
245 |
ObjectFactory m_queueFactory; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
246 |
ObjectFactory m_deviceFactory; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
247 |
ObjectFactory m_channelFactory; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
248 |
}; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
249 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
250 |
} // namespace ns3 |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
251 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
252 |
#endif /* CSMA_HELPER_H */ |