asimstd.cc File Reference

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <assert.h>
#include <iostream.h>
#include "asim.h"
#include <vector>

Include dependency graph for asimstd.cc:

Go to the source code of this file.

Namespaces

namespace  std

Data Structures

class  asim
struct  c
struct  n

Defines

#define _RED_ROUTER_MAIN_
#define sp   " "

Typedefs

typedef c flow_stats
typedef n link_stats

Functions

int main (int argc, char **argv)


Define Documentation

#define _RED_ROUTER_MAIN_
 

Definition at line 10 of file asimstd.cc.

#define sp   " "
 

Definition at line 13 of file asimstd.cc.


Typedef Documentation

typedef struct c flow_stats
 

typedef struct n link_stats
 


Function Documentation

int main int  argc,
char **  argv
 

Definition at line 709 of file asimstd.cc.

References asim::CalcLinkStats(), asim::CalcPerFlowStats(), asim::GetInputs(), and asim::newupdate().

00709                                 {
00710 
00711     int niter = 0;
00712 
00713     // error if usage is wrong 
00714            
00715     if (argc != 2) {
00716         fprintf(stderr,"Usage: %s  <InputFile>\n", argv[0]);
00717         exit(-1); 
00718     }
00719     
00720 
00721     asim sim;
00722     sim.GetInputs(argv[1]);
00723     //sim.PrintResults();
00724     //cout << "Read the input .... \n";
00725 
00726     for(int i=0; i<3; i++){
00727         sim.CalcLinkStats(1);
00728         //cout << "Calculated link delays ... \n";
00729         sim.CalcPerFlowStats();
00730         //cout << "Calculated per flow delays ... \n";
00731         //cout << " ------------------------------\n";
00732         sim.newupdate(niter);
00733         //sim.PrintResults();
00734         //cout << " ------------------------------\n"; 
00735     }
00736     sim.PrintResults();
00737 }

Here is the call graph for this function:


Generated on Tue Mar 6 16:48:56 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6