author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 24 Mar 2008 11:49:58 -0700 | |
changeset 2705 | a90b71c2afae |
parent 2603 | 1308da4cb3bf |
child 2706 | 1e5771a4796c |
permissions | -rw-r--r-- |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
#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
|
2 |
#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
|
3 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
#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
|
5 |
#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
|
6 |
#include "ns3/node-container.h" |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
#include <string> |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
namespace ns3 { |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
|
2705 | 11 |
/** |
12 |
* \brief build a set of PointToPointNetDevice objects |
|
13 |
*/ |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
class PointToPointHelper |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
{ |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
public: |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
// 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
|
18 |
PointToPointHelper (); |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
|
2705 | 20 |
/** |
21 |
* \param type the type of queue |
|
22 |
* \param n1 the name of the attribute to set on the queue |
|
23 |
* \param v1 the value of the attribute to set on the queue |
|
24 |
* \param n2 the name of the attribute to set on the queue |
|
25 |
* \param v2 the value of the attribute to set on the queue |
|
26 |
* \param n3 the name of the attribute to set on the queue |
|
27 |
* \param v3 the value of the attribute to set on the queue |
|
28 |
* \param n4 the name of the attribute to set on the queue |
|
29 |
* \param v4 the value of the attribute to set on the queue |
|
30 |
* |
|
31 |
* Set the type of queue to create and associated to each |
|
32 |
* PointToPointNetDevice created through PointToPointHelper::Build. |
|
33 |
*/ |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
void SetQueue (std::string type, |
2433
3a98e1db7f80
PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2418
diff
changeset
|
35 |
std::string n1 = "", Attribute v1 = Attribute (), |
3a98e1db7f80
PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2418
diff
changeset
|
36 |
std::string n2 = "", Attribute v2 = Attribute (), |
3a98e1db7f80
PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2418
diff
changeset
|
37 |
std::string n3 = "", Attribute v3 = Attribute (), |
3a98e1db7f80
PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2418
diff
changeset
|
38 |
std::string n4 = "", Attribute v4 = Attribute ()); |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
39 |
|
2705 | 40 |
/** |
41 |
* \param n1 the name of the attribute to set |
|
42 |
* \param v1 the value of the attribute to set |
|
43 |
* |
|
44 |
* Set these parameters on each ns3::PointToPointNetDevice created |
|
45 |
* by PointToPointHelper::Build |
|
46 |
*/ |
|
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
47 |
void SetDeviceParameter (std::string name, Attribute value); |
2705 | 48 |
/** |
49 |
* \param n1 the name of the attribute to set |
|
50 |
* \param v1 the value of the attribute to set |
|
51 |
* |
|
52 |
* Set these parameters on each ns3::PointToPointChannel created |
|
53 |
* by PointToPointHelper::Build |
|
54 |
*/ |
|
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
55 |
void SetChannelParameter (std::string name, Attribute value); |
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
56 |
|
2705 | 57 |
/** |
58 |
* \param c a set of nodes |
|
59 |
* |
|
60 |
* This method creates a ns3::PointToPointChannel with the |
|
61 |
* attributes configured by PointToPointHelper::SetChannelParameter, |
|
62 |
* then, for each node in the input container, we create a |
|
63 |
* ns3::PointToPointNetDevice with the requested parameters, |
|
64 |
* a queue for this ns3::NetDevice, and associate the resulting |
|
65 |
* ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel. |
|
66 |
*/ |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
67 |
NetDeviceContainer Build (NodeContainer c); |
2705 | 68 |
/** |
69 |
* \param a first node |
|
70 |
* \param b second node |
|
71 |
* |
|
72 |
* Saves you from having to construct a temporary NodeContainer. |
|
73 |
*/ |
|
2418
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
74 |
NetDeviceContainer Build (Ptr<Node> a, Ptr<Node> b); |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
76 |
private: |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
77 |
ObjectFactory m_queueFactory; |
2603
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
78 |
ObjectFactory m_channelFactory; |
1308da4cb3bf
move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2433
diff
changeset
|
79 |
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
|
80 |
}; |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
81 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
82 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
} // namespace ns3 |
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
84 |
|
4ff45fa08781
an initial draft of helper classes. don't work yet.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
#endif /* POINT_TO_POINT_HELPER_H */ |