Alex Bikfalvi
SimStream Documentation
TopoBrite.h
00001 #pragma once 00002 00003 #include "Topo.h" 00004 #include "TopoBriteNode.h" 00005 #include "TopoBriteEdge.h" 00006 #include "TopoBriteRoute.h" 00007 00008 #define TOPO_BRITE_MODEL_WAXMAN 1 00009 00010 class CTopoBrite : public CTopo 00011 { 00012 private: 00013 __uint32 model; 00014 char modelName[32]; 00015 00016 __uint32 hs; 00017 __uint32 ls; 00018 00019 // Model parameters (Waxman) 00020 double alpha; 00021 double beta; 00022 __uint32 nodePlacement; 00023 __uint32 growthType; 00024 __uint32 bwDist; 00025 __uint32 nodeLinks; 00026 __bitrate bwMin; 00027 __bitrate bwMax; 00028 00029 __uint32 numNodes; 00030 __uint32 numEdges; 00031 00032 // Nodes 00033 CTopoBriteNode** nodes; 00034 00035 // Edges 00036 CTopoBriteEdge** edges; 00037 00038 // Route 00039 CTopoBriteRoute* route; 00040 00041 public: 00042 CTopoBrite(const char* fileName); 00043 ~CTopoBrite(); 00044 00045 inline __uint32 Nodes() { return this->numNodes; } 00046 inline CTopoNode* Node(__uint32 index) { assert(this->nodes); return this->nodes[index]; } 00047 00048 inline __uint32 Edges() { return this->numEdges; } 00049 inline CTopoEdge* Edge(__uint32 index) { assert(this->edges); return this->edges[index]; } 00050 00051 inline CTopoRoute* Route() { return this->route; } 00052 00053 inline __byte Model() { return this->model; } 00054 inline char* ModelName() { return this->modelName; } 00055 00056 inline __uint32 Hs() { return this->hs; } 00057 inline __uint32 Ls() { return this->ls; } 00058 inline double Alpha() { return this->alpha; } 00059 inline double Beta() { return this->beta; } 00060 inline __uint32 NodePlacement() { return this->nodePlacement; } 00061 inline __uint32 GrowthType() { return this->growthType; } 00062 inline __uint32 BwDist() { return this->bwDist; } 00063 inline __uint32 NodeLinks() { return this->nodeLinks; } 00064 00065 protected: 00066 void Read(const char* fileName); 00067 void GenerateRoutes(); 00068 };
Last updated: February 8, 2011