A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
emu-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
19
#ifndef EMU_HELPER_H
20
#define EMU_HELPER_H
21
22
#include <string>
23
#include <ostream>
24
25
#include "ns3/attribute.h"
26
#include "ns3/object-factory.h"
27
#include "ns3/net-device-container.h"
28
#include "ns3/node-container.h"
29
#include "ns3/emu-net-device.h"
30
31
#include "ns3/trace-helper.h"
32
33
namespace
ns3 {
34
35
class
Packet;
36
46
class
EmuHelper
:
public
PcapHelperForDevice
,
public
AsciiTraceHelperForDevice
47
{
48
public
:
49
/*
50
* Construct an EmuHelper() which is used to make installing and configuring
51
* Emulated Net Devices easier.
52
*/
53
EmuHelper
();
54
69
void
SetQueue
(std::string type,
70
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
71
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
72
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
73
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
());
74
82
void
SetAttribute
(std::string n1,
const
AttributeValue
&v1);
83
91
NetDeviceContainer
Install
(
Ptr<Node>
node)
const
;
92
100
NetDeviceContainer
Install
(std::string nodeName)
const
;
101
110
NetDeviceContainer
Install
(
const
NodeContainer
&c)
const
;
111
112
private
:
113
/*
114
* \internal
115
*/
116
Ptr<NetDevice>
InstallPriv
(
Ptr<Node>
node)
const
;
117
129
virtual
void
EnablePcapInternal
(std::string prefix,
Ptr<NetDevice>
nd,
bool
promiscuous,
bool
explicitFilename);
130
143
virtual
void
EnableAsciiInternal
(
Ptr<OutputStreamWrapper>
stream,
144
std::string prefix,
145
Ptr<NetDevice>
nd,
146
bool
explicitFilename);
147
148
ObjectFactory
m_queueFactory
;
149
ObjectFactory
m_deviceFactory
;
150
};
151
152
153
}
// namespace ns3
154
155
#endif
/* EMU_HELPER_H */
ns3::AsciiTraceHelperForDevice
Base class providing common user-level ascii trace operations for helpers representing net devices...
Definition:
trace-helper.h:480
ns3::EmuHelper::EnableAsciiInternal
virtual void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)
Enable ascii trace output on the indicated net device.
Definition:
emu-helper.cc:106
ns3::Ptr< Node >
ns3::EmuHelper::InstallPriv
Ptr< NetDevice > InstallPriv(Ptr< Node > node) const
Definition:
emu-helper.cc:233
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:56
ns3::EmuHelper
build a set of EmuNetDevice objects
Definition:
emu-helper.h:46
ns3::PcapHelperForDevice
Base class providing common user-level pcap operations for helpers representing net devices...
Definition:
trace-helper.h:390
ns3::EmuHelper::SetAttribute
void SetAttribute(std::string n1, const AttributeValue &v1)
Definition:
emu-helper.cc:61
ns3::EmuHelper::EmuHelper
EmuHelper()
Definition:
emu-helper.cc:37
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition:
attribute.h:222
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:41
ns3::EmuHelper::m_deviceFactory
ObjectFactory m_deviceFactory
Definition:
emu-helper.h:149
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
ns3::ObjectFactory
instantiate subclasses of ns3::Object.
Definition:
object-factory.h:39
ns3::EmuHelper::EnablePcapInternal
virtual void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename)
Enable pcap output the indicated net device.
Definition:
emu-helper.cc:68
ns3::EmuHelper::Install
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::EmuNetDevice with the attributes configured by EmuHelper::SetDeviceAttrib...
Definition:
emu-helper.cc:207
ns3::EmuHelper::SetQueue
void SetQueue(std::string type, 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())
Definition:
emu-helper.cc:45
ns3::EmuHelper::m_queueFactory
ObjectFactory m_queueFactory
Definition:
emu-helper.h:148
src
emu
helper
emu-helper.h
Generated on Sat Apr 19 2014 14:06:54 for ns-3 by
1.8.6