A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::BriteTopologyHelper Class Reference

#include <brite-topology-helper.h>

+ Collaboration diagram for ns3::BriteTopologyHelper:

Classes

struct  BriteEdgeInfo
 Edge information from BRITE. More...
struct  BriteNodeInfo
 Node information from BRITE. More...

Public Member Functions

 BriteTopologyHelper (std::string confFile, std::string seedFile, std::string newseedFile)
 BriteTopologyHelper (std::string confFile)
 ~BriteTopologyHelper ()
void AssignIpv4Addresses (Ipv4AddressHelper &address)
void AssignIpv6Addresses (Ipv6AddressHelper &address)
void AssignStreams (int64_t streamNumber)
void BuildBriteTopology (InternetStackHelper &stack)
void BuildBriteTopology (InternetStackHelper &stack, const uint32_t systemCount)
Ptr< NodeGetLeafNodeForAs (uint32_t asNum, uint32_t leafNum)
uint32_t GetNAs (void) const
uint32_t GetNEdgesTopology () const
uint32_t GetNLeafNodesForAs (uint32_t asNum)
uint32_t GetNNodesForAs (uint32_t asNum)
uint32_t GetNNodesTopology () const
Ptr< NodeGetNodeForAs (uint32_t asNum, uint32_t nodeNum)
uint32_t GetSystemNumberForAs (uint32_t asNum) const

Private Types

typedef std::vector
< BriteEdgeInfo
BriteEdgeInfoList
typedef std::vector
< BriteNodeInfo
BriteNodeInfoList

Private Member Functions

void BuildBriteEdgeInfoList (void)
void BuildBriteNodeInfoList (void)
void ConstructTopology (void)
void GenerateBriteTopology (void)

Private Attributes

std::vector< NodeContainer * > m_asLeafNodes
BriteEdgeInfoList m_briteEdgeInfoList
BriteNodeInfoList m_briteNodeInfoList
PointToPointHelper m_britePointToPointHelper
std::string m_confFile
std::vector< NetDeviceContainer * > m_netDevices
std::string m_newSeedFile
NodeContainer m_nodes
std::vector< NodeContainer * > m_nodesByAs
uint32_t m_numAs
uint32_t m_numEdges
uint32_t m_numNodes
std::string m_seedFile
std::vector< int > m_systemForAs
brite::Topology * m_topology
Ptr< UniformRandomVariablem_uv

Static Private Attributes

static const int mbpsToBps = 1000000

Detailed Description

Definition at line 52 of file brite-topology-helper.h.

Member Typedef Documentation

Definition at line 285 of file brite-topology-helper.h.

The BRITE code generates multiple nodes and edges. Each node and edge is stored in a BriteNodeInfo or BriteEdgeInfo struct, and each instance is stored in a vector.

Definition at line 284 of file brite-topology-helper.h.

Constructor & Destructor Documentation

ns3::BriteTopologyHelper::BriteTopologyHelper ( std::string  confFile,
std::string  seedFile,
std::string  newseedFile 
)

Definition at line 37 of file brite-topology-helper.cc.

References m_uv, and NS_LOG_FUNCTION.

ns3::BriteTopologyHelper::BriteTopologyHelper ( std::string  confFile)

Definition at line 53 of file brite-topology-helper.cc.

References m_uv, and NS_LOG_FUNCTION.

ns3::BriteTopologyHelper::~BriteTopologyHelper ( )

Member Function Documentation

void ns3::BriteTopologyHelper::AssignIpv4Addresses ( Ipv4AddressHelper address)
Parameters
addressan Ipv4AddressHelper which is used to install Ipv4 addresses on all the node interfaces in the topology

Definition at line 418 of file brite-topology-helper.cc.

References ns3::Ipv4AddressHelper::Assign(), m_netDevices, ns3::Ipv4AddressHelper::NewNetwork(), and NS_LOG_FUNCTION.

Referenced by ns3::BriteTopologyFunctionTestCase::DoRun(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::BriteTopologyHelper::AssignIpv6Addresses ( Ipv6AddressHelper address)
Parameters
networkan IPv6 address representing the network portion of the IPv6 Address
prefixthe prefix length

Definition at line 430 of file brite-topology-helper.cc.

References ns3::Ipv6AddressHelper::Assign(), m_netDevices, ns3::Ipv6AddressHelper::NewNetwork(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::BriteTopologyHelper::AssignStreams ( int64_t  streamNumber)

Definition at line 90 of file brite-topology-helper.cc.

References m_uv, and ns3::RandomVariableStream::SetStream().

Referenced by ns3::BriteTopologyStructureTestCase::DoRun(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::BriteTopologyHelper::BuildBriteTopology ( InternetStackHelper stack)
void ns3::BriteTopologyHelper::BuildBriteTopology ( InternetStackHelper stack,
const uint32_t  systemCount 
)
void ns3::BriteTopologyHelper::ConstructTopology ( void  )
private
void ns3::BriteTopologyHelper::GenerateBriteTopology ( void  )
private

Definition at line 316 of file brite-topology-helper.cc.

References BuildBriteEdgeInfoList(), BuildBriteNodeInfoList(), ns3::UniformRandomVariable::GetInteger(), m_confFile, m_newSeedFile, m_seedFile, m_topology, m_uv, NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_LOGIC.

Referenced by BuildBriteTopology().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Node > ns3::BriteTopologyHelper::GetLeafNodeForAs ( uint32_t  asNum,
uint32_t  leafNum 
)

Definition at line 269 of file brite-topology-helper.cc.

References m_asLeafNodes.

Referenced by main().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetNAs ( void  ) const

Returns the number of AS created in the topology

Returns
the number of AS created in the topology

Definition at line 305 of file brite-topology-helper.cc.

References m_numAs.

Referenced by ns3::BriteTopologyStructureTestCase::DoRun(), and main().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetNEdgesTopology ( ) const

Returns the number of edges created within the topology

Returns
the total number of edges within the brite topology

Definition at line 299 of file brite-topology-helper.cc.

References m_numEdges.

Referenced by ns3::BriteTopologyStructureTestCase::DoRun().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetNLeafNodesForAs ( uint32_t  asNum)

Definition at line 287 of file brite-topology-helper.cc.

References m_asLeafNodes.

Referenced by ns3::BriteTopologyStructureTestCase::DoRun(), and main().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetNNodesForAs ( uint32_t  asNum)

Definition at line 281 of file brite-topology-helper.cc.

References m_nodesByAs.

Referenced by ns3::BriteTopologyFunctionTestCase::DoRun().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetNNodesTopology ( ) const

Returns the number of nodes created within the topology

Returns
the total number of nodes within the brite topology

Definition at line 293 of file brite-topology-helper.cc.

References m_numNodes.

Referenced by ns3::BriteTopologyStructureTestCase::DoRun().

+ Here is the caller graph for this function:

Ptr< Node > ns3::BriteTopologyHelper::GetNodeForAs ( uint32_t  asNum,
uint32_t  nodeNum 
)

Definition at line 275 of file brite-topology-helper.cc.

References m_nodesByAs.

Referenced by ns3::BriteTopologyFunctionTestCase::DoRun().

+ Here is the caller graph for this function:

uint32_t ns3::BriteTopologyHelper::GetSystemNumberForAs ( uint32_t  asNum) const

Returns the system number for the MPI instance that this AS is assigned to. Will always return 0 if MPI not used

Returns
The system number that the specified AS number belongs to

param asNum The AS Number

Definition at line 311 of file brite-topology-helper.cc.

References m_systemForAs.

Referenced by BuildBriteTopology(), and main().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<NodeContainer*> ns3::BriteTopologyHelper::m_asLeafNodes
private
BriteEdgeInfoList ns3::BriteTopologyHelper::m_briteEdgeInfoList
private

Definition at line 288 of file brite-topology-helper.h.

Referenced by BuildBriteEdgeInfoList(), and ConstructTopology().

BriteNodeInfoList ns3::BriteTopologyHelper::m_briteNodeInfoList
private
PointToPointHelper ns3::BriteTopologyHelper::m_britePointToPointHelper
private

Definition at line 291 of file brite-topology-helper.h.

Referenced by ConstructTopology().

std::string ns3::BriteTopologyHelper::m_confFile
private

Definition at line 248 of file brite-topology-helper.h.

Referenced by GenerateBriteTopology().

std::vector<NetDeviceContainer*> ns3::BriteTopologyHelper::m_netDevices
private
std::string ns3::BriteTopologyHelper::m_newSeedFile
private

Definition at line 254 of file brite-topology-helper.h.

Referenced by GenerateBriteTopology().

NodeContainer ns3::BriteTopologyHelper::m_nodes
private

Definition at line 225 of file brite-topology-helper.h.

Referenced by BuildBriteTopology(), and ConstructTopology().

std::vector<NodeContainer*> ns3::BriteTopologyHelper::m_nodesByAs
private
uint32_t ns3::BriteTopologyHelper::m_numAs
private
uint32_t ns3::BriteTopologyHelper::m_numEdges
private

Definition at line 277 of file brite-topology-helper.h.

Referenced by ConstructTopology(), and GetNEdgesTopology().

uint32_t ns3::BriteTopologyHelper::m_numNodes
private

Definition at line 274 of file brite-topology-helper.h.

Referenced by BuildBriteTopology(), and GetNNodesTopology().

std::string ns3::BriteTopologyHelper::m_seedFile
private

Definition at line 251 of file brite-topology-helper.h.

Referenced by GenerateBriteTopology().

std::vector<int> ns3::BriteTopologyHelper::m_systemForAs
private

Definition at line 269 of file brite-topology-helper.h.

Referenced by BuildBriteTopology(), and GetSystemNumberForAs().

brite::Topology* ns3::BriteTopologyHelper::m_topology
private
Ptr<UniformRandomVariable> ns3::BriteTopologyHelper::m_uv
private
const int ns3::BriteTopologyHelper::mbpsToBps = 1000000
staticprivate

Definition at line 184 of file brite-topology-helper.h.

Referenced by ConstructTopology().


The documentation for this class was generated from the following files: