ns-3
|
Build a set of PointToPointNetDevice objects. More...
#include <point-to-point-helper.h>
Public Member Functions | |
PointToPointHelper () | |
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()) |
void | SetDeviceAttribute (std::string name, const AttributeValue &value) |
void | SetChannelAttribute (std::string name, const AttributeValue &value) |
NetDeviceContainer | Install (NodeContainer c) |
NetDeviceContainer | Install (Ptr< Node > a, Ptr< Node > b) |
NetDeviceContainer | Install (Ptr< Node > a, std::string bName) |
NetDeviceContainer | Install (std::string aName, Ptr< Node > b) |
NetDeviceContainer | Install (std::string aNode, std::string bNode) |
Build a set of PointToPointNetDevice objects.
Normally we eschew multiple inheritance, however, the classes PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are "mixins".
Create a PointToPointHelper to make life easier when creating point to point networks.
References ns3::ObjectFactory::SetTypeId().
c | a set of nodes |
This method creates a ns3::PointToPointChannel with the attributes configured by PointToPointHelper::SetChannelAttribute, then, for each node in the input container, we create a ns3::PointToPointNetDevice with the requested attributes, a queue for this ns3::NetDevice, and associate the resulting ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel.
References ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and NS_ASSERT.
Referenced by Install(), ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper(), and ns3::PointToPointStarHelper::PointToPointStarHelper().
NetDeviceContainer ns3::PointToPointHelper::Install | ( | Ptr< Node > | a, |
Ptr< Node > | b | ||
) |
a | first node |
b | second node |
Saves you from having to construct a temporary NodeContainer. Also, if MPI is enabled, for distributed simulations, appropriate remote point-to-point channels are created.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::Mac48Address::Allocate(), ns3::PointToPointNetDevice::Attach(), ns3::ObjectFactory::Create(), ns3::Node::GetSystemId(), ns3::MpiInterface::GetSystemId(), ns3::MpiInterface::IsEnabled(), ns3::MakeCallback(), ns3::PointToPointNetDevice::Receive(), ns3::PointToPointNetDevice::SetAddress(), and ns3::PointToPointNetDevice::SetQueue().
NetDeviceContainer ns3::PointToPointHelper::Install | ( | Ptr< Node > | a, |
std::string | bName | ||
) |
a | first node |
bName | name of second node |
Saves you from having to construct a temporary NodeContainer.
References Install().
NetDeviceContainer ns3::PointToPointHelper::Install | ( | std::string | aName, |
Ptr< Node > | b | ||
) |
aName | Name of first node |
b | second node |
Saves you from having to construct a temporary NodeContainer.
References Install().
NetDeviceContainer ns3::PointToPointHelper::Install | ( | std::string | aNode, |
std::string | bNode | ||
) |
aNode | Name of first node |
bNode | Name of second node |
Saves you from having to construct a temporary NodeContainer.
References Install().
void ns3::PointToPointHelper::SetChannelAttribute | ( | std::string | name, |
const AttributeValue & | value | ||
) |
Set an attribute value to be propagated to each Channel created by the helper.
name | the name of the attribute to set |
value | the value of the attribute to set |
Set these attribute on each ns3::PointToPointChannel created by PointToPointHelper::Install
References ns3::ObjectFactory::Set().
void ns3::PointToPointHelper::SetDeviceAttribute | ( | std::string | name, |
const AttributeValue & | value | ||
) |
Set an attribute value to be propagated to each NetDevice created by the helper.
name | the name of the attribute to set |
value | the value of the attribute to set |
Set these attributes on each ns3::PointToPointNetDevice created by PointToPointHelper::Install
References ns3::ObjectFactory::Set().
void ns3::PointToPointHelper::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 point to point 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 PointToPointNetDevice created through PointToPointHelper::Install.
References ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().