Public Member Functions | Public Attributes

nodeInfoAS Struct Reference

Structure that contains all information about an AS-level node. More...

#include <RUNetworkConfigurator.h>

List of all members.

Public Member Functions

 nodeInfoAS (cTopology::Node *node, IPAddress a, IPAddress m)

Public Attributes

int id
int asType
cTopology::Node * node
cModule * module
NODE_MAP nodeMap
NODE_INFO_RL_VEC coreNode
IPAddress addr
IPAddress netmask
IPAddress subnetmask
EDGE_ROUTER_VEC edgeRouter

Detailed Description

Structure that contains all information about an AS-level node.

During initialization all necessary information is extraced of the given node: Router type and ID.

Definition at line 191 of file RUNetworkConfigurator.h.


Constructor & Destructor Documentation

nodeInfoAS::nodeInfoAS ( cTopology::Node *  node,
IPAddress  a,
IPAddress  m 
) [inline]

Definition at line 204 of file RUNetworkConfigurator.h.

                                                              {
        this->node = node;
        this->module = node->getModule();
        addr = a;
        netmask = m;
        int index = 0;
        string fullPath = node->getModule()->getFullPath();

        // check if stubstring "sas" (StubAS) or "tas" (TransitAS)
        // is contained in fullPath
        if ( (index = fullPath.find(".sas")) != -1 )
            asType = STUB_AS;
        else if ( (index = fullPath.find(".tas")) != -1 )
            asType = TRANSIT_AS;
        else if ( (index = fullPath.find("ReaSEUnderlayNetwork")) != -1 )
            asType = UNSPECIFIED;
        else
        {
            cerr << "found module that doesn't belong to TAS or SAS: "<< fullPath<<endl;
            opp_error("found module that doesn't belong to TAS or SAS");
        }

        // set index to char position after substring "sas/tas"
        if (asType == STUB_AS || asType == TRANSIT_AS)
        {
            index += 3;
            string currentId;
            while (isdigit(fullPath[index]) && (index < (int) fullPath.length()))
                currentId += fullPath[index++];
            id = atoi(currentId.data());
        }
    }


Member Data Documentation

IPAddress nodeInfoAS::addr

Definition at line 194 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

Definition at line 193 of file RUNetworkConfigurator.h.

Definition at line 196 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

Definition at line 200 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

cTopology::Node* nodeInfoAS::node

Definition at line 195 of file RUNetworkConfigurator.h.


The documentation for this struct was generated from the following file: