A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
fd-net-device-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Alina Quereilhac <alina.quereilhac@inria.fr>
18
*
19
*/
20
21
#ifndef FD_NET_DEVICE_HELPER_H
22
#define FD_NET_DEVICE_HELPER_H
23
24
#include "ns3/attribute.h"
25
#include "ns3/fd-net-device.h"
26
#include "ns3/net-device-container.h"
27
#include "ns3/node-container.h"
28
#include "ns3/object-factory.h"
29
#include "ns3/trace-helper.h"
30
31
#include <string>
32
33
namespace
ns3
34
{
35
45
class
FdNetDeviceHelper
:
public
PcapHelperForDevice
,
public
AsciiTraceHelperForDevice
46
{
47
public
:
51
FdNetDeviceHelper
();
52
53
~FdNetDeviceHelper
()
override
54
{
55
}
56
62
void
SetTypeId
(std::string
type
);
63
71
void
SetAttribute
(std::string n1,
const
AttributeValue
& v1);
72
79
virtual
NetDeviceContainer
Install
(
Ptr<Node>
node)
const
;
80
87
virtual
NetDeviceContainer
Install
(std::string name)
const
;
88
98
virtual
NetDeviceContainer
Install
(
const
NodeContainer
& c)
const
;
99
100
protected
:
107
virtual
Ptr<NetDevice>
InstallPriv
(
Ptr<Node>
node)
const
;
108
109
private
:
121
void
EnablePcapInternal
(std::string prefix,
122
Ptr<NetDevice>
nd,
123
bool
promiscuous,
124
bool
explicitFilename)
override
;
125
137
void
EnableAsciiInternal
(
Ptr<OutputStreamWrapper>
stream,
138
std::string prefix,
139
Ptr<NetDevice>
nd,
140
bool
explicitFilename)
override
;
141
142
ObjectFactory
m_deviceFactory
;
143
};
144
145
}
// namespace ns3
146
147
#endif
/* FD_NET_DEVICE_HELPER_H */
ns3::AsciiTraceHelperForDevice
Base class providing common user-level ascii trace operations for helpers representing net devices.
Definition:
trace-helper.h:729
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:70
ns3::FdNetDeviceHelper
build a set of FdNetDevice objects Normally we eschew multiple inheritance, however,...
Definition:
fd-net-device-helper.h:46
ns3::FdNetDeviceHelper::SetAttribute
void SetAttribute(std::string n1, const AttributeValue &v1)
Definition:
fd-net-device-helper.cc:52
ns3::FdNetDeviceHelper::Install
virtual NetDeviceContainer Install(Ptr< Node > node) const
This method creates a FdNetDevice and associates it to a node.
Definition:
fd-net-device-helper.cc:185
ns3::FdNetDeviceHelper::m_deviceFactory
ObjectFactory m_deviceFactory
factory for the NetDevices
Definition:
fd-net-device-helper.h:142
ns3::FdNetDeviceHelper::InstallPriv
virtual Ptr< NetDevice > InstallPriv(Ptr< Node > node) const
This method creates an ns3::FdNetDevice and associates it to a node.
Definition:
fd-net-device-helper.cc:211
ns3::FdNetDeviceHelper::EnablePcapInternal
void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename) override
Enable pcap output on the indicated net device.
Definition:
fd-net-device-helper.cc:59
ns3::FdNetDeviceHelper::FdNetDeviceHelper
FdNetDeviceHelper()
Construct a FdNetDeviceHelper.
Definition:
fd-net-device-helper.cc:40
ns3::FdNetDeviceHelper::~FdNetDeviceHelper
~FdNetDeviceHelper() override
Definition:
fd-net-device-helper.h:53
ns3::FdNetDeviceHelper::SetTypeId
void SetTypeId(std::string type)
Set the TypeId of the Objects to be created by this helper.
Definition:
fd-net-device-helper.cc:46
ns3::FdNetDeviceHelper::EnableAsciiInternal
void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ascii trace output on the indicated net device.
Definition:
fd-net-device-helper.cc:102
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:43
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:40
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::PcapHelperForDevice
Base class providing common user-level pcap operations for helpers representing net devices.
Definition:
trace-helper.h:624
ns3::Ptr< Node >
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:704
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
fd-net-device
helper
fd-net-device-helper.h
Generated on Sun Mar 3 2024 17:10:57 for ns-3 by
1.9.1