A Discrete-Event Network Simulator
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 
46 {
47  public:
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 
138  std::string prefix,
139  Ptr<NetDevice> nd,
140  bool explicitFilename) override;
141 
143 };
144 
145 } // namespace ns3
146 
147 #endif /* FD_NET_DEVICE_HELPER_H */
Base class providing common user-level ascii trace operations for helpers representing net devices.
Definition: trace-helper.h:729
Hold a value for an Attribute.
Definition: attribute.h:70
build a set of FdNetDevice objects Normally we eschew multiple inheritance, however,...
void SetAttribute(std::string n1, const AttributeValue &v1)
virtual NetDeviceContainer Install(Ptr< Node > node) const
This method creates a FdNetDevice and associates it to a node.
ObjectFactory m_deviceFactory
factory for the NetDevices
virtual Ptr< NetDevice > InstallPriv(Ptr< Node > node) const
This method creates an ns3::FdNetDevice and associates it to a node.
void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename) override
Enable pcap output on the indicated net device.
FdNetDeviceHelper()
Construct a FdNetDeviceHelper.
void SetTypeId(std::string type)
Set the TypeId of the Objects to be created by this helper.
void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ascii trace output on the indicated net device.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Base class providing common user-level pcap operations for helpers representing net devices.
Definition: trace-helper.h:624
Every class exported by the ns3 library is enclosed in the ns3 namespace.