A Discrete-Event Network Simulator
API
uan-helper.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2008 University of Washington
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Leonard Tracy <lentracy@u.washington.edu>
19 */
20
21#ifndef UAN_HELPER_H
22#define UAN_HELPER_H
23
24#include <string>
25#include "ns3/attribute.h"
26#include "ns3/object-factory.h"
27#include "ns3/node-container.h"
28#include "ns3/net-device-container.h"
29#include "ns3/uan-net-device.h"
30
31namespace ns3 {
32
33class UanChannel;
34
41{
42public:
43 UanHelper ();
44 virtual ~UanHelper ();
45
70 void SetMac (std::string type,
71 std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
72 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
73 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
74 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
75 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
76 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
77 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
78 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
79
80
105 void SetPhy (std::string phyType,
106 std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
107 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
108 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
109 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
110 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
111 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
112 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
113 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
114
115
140 void SetTransducer (std::string type,
141 std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
142 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
143 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
144 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
145 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
146 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
147 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
148 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
158 static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid);
168 static void EnableAscii (std::ostream &os, NetDeviceContainer d);
178 static void EnableAscii (std::ostream &os, NodeContainer n);
186 static void EnableAsciiAll (std::ostream &os);
187
202
216
234
246 int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
247
248private:
253
254};
255
256
257} // end namespace ns3
258
259#endif /* UAN_HELPER_H */
Hold a value for an Attribute.
Definition: attribute.h:69
A class for an empty attribute value.
Definition: attribute.h:233
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
UAN configuration helper.
Definition: uan-helper.h:41
ObjectFactory m_device
The device.
Definition: uan-helper.h:249
void SetMac(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Set MAC attributes.
Definition: uan-helper.cc:95
ObjectFactory m_phy
The PHY layer.
Definition: uan-helper.h:251
ObjectFactory m_transducer
The transducer.
Definition: uan-helper.h:252
void SetPhy(std::string phyType, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Set PHY attributes.
Definition: uan-helper.cc:118
static void EnableAscii(std::ostream &os, uint32_t nodeid, uint32_t deviceid)
Enable ascii output on the specified deviceid within the specified nodeid if it is of type ns3::UanNe...
Definition: uan-helper.cc:166
ObjectFactory m_mac
The MAC layer.
Definition: uan-helper.h:250
NetDeviceContainer Install(NodeContainer c) const
This method creates a simple ns3::UanChannel (with a default ns3::UanNoiseModelDefault and ns3::UanPr...
Definition: uan-helper.cc:212
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: uan-helper.cc:259
static void EnableAsciiAll(std::ostream &os)
Enable ascii output on each device which is of the ns3::UanNetDevice type and dump that to the specif...
Definition: uan-helper.cc:206
UanHelper()
Default constructor.
Definition: uan-helper.cc:80
virtual ~UanHelper()
Destructor.
Definition: uan-helper.cc:88
void SetTransducer(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Set the transducer attributes.
Definition: uan-helper.cc:142
Every class exported by the ns3 library is enclosed in the ns3 namespace.
channel
Definition: third.py:92