build a set of SimpleNetDevice objects More...
#include "simple-net-device-helper.h"
Collaboration diagram for ns3::SimpleNetDeviceHelper:Public Member Functions | |
| SimpleNetDeviceHelper () | |
| Construct a SimpleNetDeviceHelper. More... | |
| virtual | ~SimpleNetDeviceHelper () |
| NetDeviceContainer | Install (Ptr< Node > node) const |
| This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::SetChannelAttribute, an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the channel to the device. More... | |
| NetDeviceContainer | Install (Ptr< Node > node, Ptr< SimpleChannel > channel) const |
| This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the provided channel to the device. More... | |
| NetDeviceContainer | Install (const NodeContainer &c) const |
| This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::SetChannelAttribute. More... | |
| NetDeviceContainer | Install (const NodeContainer &c, Ptr< SimpleChannel > channel) const |
| For each Ptr<node> in the provided container, this method creates an ns3::SimpleNetDevice (with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute); adds the device to the node; and attaches the provided channel to the device. More... | |
| void | SetChannel (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()) |
| Each net device must have a channel to pass packets through. More... | |
| void | SetChannelAttribute (std::string n1, const AttributeValue &v1) |
| void | SetDeviceAttribute (std::string n1, const AttributeValue &v1) |
| void | SetNetDevicePointToPointMode (bool pointToPointMode) |
| SimpleNetDevice is Broadcast capable and ARP needing. More... | |
| 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()) |
| Each net device must have a queue to pass packets through. More... | |
Private Member Functions | |
| Ptr< NetDevice > | InstallPriv (Ptr< Node > node, Ptr< SimpleChannel > channel) const |
| This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the provided channel to the device. More... | |
Private Attributes | |
| ObjectFactory | m_channelFactory |
| Channel factory. More... | |
| ObjectFactory | m_deviceFactory |
| NetDevice factory. More... | |
| bool | m_pointToPointMode |
| Install PointToPoint SimpleNetDevice or Broadcast ones. More... | |
| ObjectFactory | m_queueFactory |
| Queue factory. More... | |
build a set of SimpleNetDevice objects
Definition at line 36 of file simple-net-device-helper.h.
| ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper | ( | ) |
Construct a SimpleNetDeviceHelper.
Definition at line 43 of file simple-net-device-helper.cc.
References m_channelFactory, m_deviceFactory, m_pointToPointMode, m_queueFactory, and ns3::ObjectFactory::SetTypeId().
Here is the call graph for this function:
|
inlinevirtual |
Definition at line 43 of file simple-net-device-helper.h.
| NetDeviceContainer ns3::SimpleNetDeviceHelper::Install | ( | Ptr< Node > | node | ) | const |
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::SetChannelAttribute, an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the channel to the device.
| node | The node to install the device in |
Definition at line 100 of file simple-net-device-helper.cc.
References third::channel, ns3::ObjectFactory::Create(), and m_channelFactory.
Referenced by ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), RadvdTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), Ipv6DadTest::DoRun(), DhcpTestCase::DoRun(), Ipv6ForwardingTest::DoRun(), Ipv4StaticRoutingSlash32TestCase::DoRun(), Ipv6RawSocketImplTest::DoRun(), Ipv4RawSocketImplTest::DoRun(), TcFlowControlTestCase::DoRun(), Ipv4FragmentationTest::DoRun(), BulkSendSeqTsSizeTestCase::DoRun(), UdpSocketImplTest::DoRun(), IcmpTimeExceedTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), Udp6SocketImplTest::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), Ipv4GlobalRoutingSlash32TestCase::DoRun(), and Install().
Here is the call graph for this function:
Here is the caller graph for this function:| NetDeviceContainer ns3::SimpleNetDeviceHelper::Install | ( | Ptr< Node > | node, |
| Ptr< SimpleChannel > | channel | ||
| ) | const |
This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the provided channel to the device.
| node | The node to install the device in |
| channel | The channel to attach to the device. |
Definition at line 107 of file simple-net-device-helper.cc.
References third::channel, and InstallPriv().
Here is the call graph for this function:| NetDeviceContainer ns3::SimpleNetDeviceHelper::Install | ( | const NodeContainer & | c | ) | const |
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::SetChannelAttribute.
For each Ptr<node> in the provided container: it creates an ns3::SimpleNetDevice (with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute); adds the device to the node; and attaches the channel to the device.
| c | The NodeContainer holding the nodes to be changed. |
Definition at line 113 of file simple-net-device-helper.cc.
References third::channel, ns3::ObjectFactory::Create(), Install(), and m_channelFactory.
Here is the call graph for this function:| NetDeviceContainer ns3::SimpleNetDeviceHelper::Install | ( | const NodeContainer & | c, |
| Ptr< SimpleChannel > | channel | ||
| ) | const |
For each Ptr<node> in the provided container, this method creates an ns3::SimpleNetDevice (with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute); adds the device to the node; and attaches the provided channel to the device.
| c | The NodeContainer holding the nodes to be changed. |
| channel | The channel to attach to the devices. |
Definition at line 121 of file simple-net-device-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Begin(), third::channel, ns3::NodeContainer::End(), and InstallPriv().
Here is the call graph for this function:
|
private |
This method creates an ns3::SimpleNetDevice with the attributes configured by SimpleNetDeviceHelper::SetDeviceAttribute and then adds the device to the node and attaches the provided channel to the device.
| node | The node to install the device in |
| channel | The channel to attach to the device. |
Definition at line 134 of file simple-net-device-helper.cc.
References ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), third::channel, ns3::ObjectFactory::Create(), m_deviceFactory, m_pointToPointMode, m_queueFactory, and NS_ASSERT_MSG.
Referenced by Install().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SimpleNetDeviceHelper::SetChannel | ( | 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 () |
||
| ) |
Each net device must have a channel to pass packets through.
This method allows one to set the type of the channel that is automatically created when the device is created and attached to a node.
| type | the type of queue |
| n1 | the name of the attribute to set on the queue |
| v1 | the value of the attribute to set on the queue |
| n2 | the name of the attribute to set on the queue |
| v2 | the value of the attribute to set on the queue |
| n3 | the name of the attribute to set on the queue |
| v3 | the value of the attribute to set on the queue |
| n4 | the name of the attribute to set on the queue |
| v4 | the value of the attribute to set on the queue |
Set the type of channel to create and associated to each SimpleNetDevice created through SimpleNetDeviceHelper::Install.
Definition at line 68 of file simple-net-device-helper.cc.
References m_channelFactory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Here is the call graph for this function:| void ns3::SimpleNetDeviceHelper::SetChannelAttribute | ( | std::string | n1, |
| const AttributeValue & | v1 | ||
| ) |
| n1 | the name of the attribute to set |
| v1 | the value of the attribute to set |
Set these attributes on each ns3::CsmaChannel created by SimpleNetDeviceHelper::Install
Definition at line 88 of file simple-net-device-helper.cc.
References m_channelFactory, and ns3::ObjectFactory::Set().
Referenced by ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), RadvdTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), DhcpTestCase::DoRun(), and BulkSendSeqTsSizeTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SimpleNetDeviceHelper::SetDeviceAttribute | ( | std::string | n1, |
| const AttributeValue & | v1 | ||
| ) |
| n1 | the name of the attribute to set |
| v1 | the value of the attribute to set |
Set these attributes on each ns3::SimpleNetDevice created by SimpleNetDeviceHelper::Install
Definition at line 82 of file simple-net-device-helper.cc.
References m_deviceFactory, and ns3::ObjectFactory::Set().
Referenced by ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), RadvdTestCase::DoRun(), BulkSendBasicTestCase::DoRun(), DhcpTestCase::DoRun(), TcFlowControlTestCase::DoRun(), and BulkSendSeqTsSizeTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SimpleNetDeviceHelper::SetNetDevicePointToPointMode | ( | bool | pointToPointMode | ) |
SimpleNetDevice is Broadcast capable and ARP needing.
This function limits the number of SimpleNetDevices on one channel to two, disables Broadcast and ARP and enables PointToPoint mode.
| pointToPointMode | True for PointToPoint SimpleNetDevice |
Definition at line 94 of file simple-net-device-helper.cc.
References m_pointToPointMode.
Referenced by Ipv6DadTest::DoRun(), Ipv6ForwardingTest::DoRun(), Ipv6RawSocketImplTest::DoRun(), Ipv4RawSocketImplTest::DoRun(), Ipv4FragmentationTest::DoRun(), UdpSocketImplTest::DoRun(), IcmpTimeExceedTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), Udp6SocketImplTest::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), Ipv4DynamicGlobalRoutingTestCase::DoRun(), LinkTest::DoSetup(), and TwoLinkTest::DoSetup().
Here is the caller graph for this function:| void ns3::SimpleNetDeviceHelper::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 () |
||
| ) |
Each net device must have a queue to pass packets through.
This method allows one to set the type of the queue that is automatically created when the device is created and attached to a node.
| type | the type of queue |
| n1 | the name of the attribute to set on the queue |
| v1 | the value of the attribute to set on the queue |
| n2 | the name of the attribute to set on the queue |
| v2 | the value of the attribute to set on the queue |
| n3 | the name of the attribute to set on the queue |
| v3 | the value of the attribute to set on the queue |
| n4 | the name of the attribute to set on the queue |
| v4 | the value of the attribute to set on the queue |
Set the type of queue to create and associated to each SimpleNetDevice created through SimpleNetDeviceHelper::Install.
Definition at line 52 of file simple-net-device-helper.cc.
References ns3::QueueBase::AppendItemTypeIfNotPresent(), m_queueFactory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by TcFlowControlTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Channel factory.
Definition at line 183 of file simple-net-device-helper.h.
Referenced by Install(), SetChannel(), SetChannelAttribute(), and SimpleNetDeviceHelper().
|
private |
NetDevice factory.
Definition at line 182 of file simple-net-device-helper.h.
Referenced by InstallPriv(), SetDeviceAttribute(), and SimpleNetDeviceHelper().
|
private |
Install PointToPoint SimpleNetDevice or Broadcast ones.
Definition at line 184 of file simple-net-device-helper.h.
Referenced by InstallPriv(), SetNetDevicePointToPointMode(), and SimpleNetDeviceHelper().
|
private |
Queue factory.
Definition at line 181 of file simple-net-device-helper.h.
Referenced by InstallPriv(), SetQueue(), and SimpleNetDeviceHelper().