24 #include "ns3/openflow-switch-net-device.h"
25 #include "ns3/openflow-interface.h"
27 #include "ns3/names.h"
50 NS_LOG_INFO (
"**** Install switch device on node " << node->GetId ());
52 NetDeviceContainer devs;
55 node->AddDevice (dev);
58 dev->SetController (controller);
63 dev->AddSwitchPort (*i);
72 NS_LOG_INFO (
"**** Install switch device on node " << node->GetId ());
74 NetDeviceContainer devs;
77 node->AddDevice (dev);
82 dev->AddSwitchPort (*i);
91 Ptr<Node> node = Names::Find<Node> (nodeName);
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
NetDeviceContainer Install(Ptr< Node > node, NetDeviceContainer c, Ptr< ns3::ofi::Controller > controller)
This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchH...
ObjectFactory m_deviceFactory
Object factory.
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Set an attribute on each ns3::OpenFlowSwitchNetDevice created by OpenFlowSwitchHelper::Install.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Every class exported by the ns3 library is enclosed in the ns3 namespace.