Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

diff_rate.cc File Reference

#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <float.h>
#include <tcl.h>
#include <stdlib.h>
#include "diff_header.h"
#include "agent.h"
#include "tclcl.h"
#include "ip.h"
#include "config.h"
#include "packet.h"
#include "trace.h"
#include "random.h"
#include "classifier.h"
#include "node.h"
#include "diffusion.h"
#include "iflist.h"
#include "hash_table.h"
#include "arp.h"
#include "mac.h"
#include "ll.h"
#include "dsr/path.h"
#include "god.h"
#include "routing_table.h"
#include "diff_rate.h"

Include dependency graph for diff_rate.cc:

Include dependency graph

Go to the source code of this file.

Compounds

class  DiffusionRateClass

Functions

sub_t ParseSubType (const char *str)
org_t ParseOrgType (const char *str)
pos_t ParsePosType (const char *str)
pos_ndt ParsePosNodeType (const char *str)
neg_wint ParseNegWinType (const char *str)
neg_tht ParseNegThrType (const char *str)
neg_mxt ParseNegMaxType (const char *str)

Variables

char * MsgStr []
DiffusionRateClass class_diffusion_rate


Function Documentation

neg_mxt ParseNegMaxType const char *  str  ) 
 

Definition at line 1140 of file diff_rate.cc.

References NEG_FIXED_MAX, neg_mxt, and NEG_SCALE_MAX.

Referenced by DiffusionRate::command().

01141 {
01142   if (strcasecmp(str, "FIXED") == 0) {
01143     return NEG_FIXED_MAX;
01144   }
01145 
01146   if (strcasecmp(str, "SCALE") == 0) {
01147     return NEG_SCALE_MAX;
01148   }
01149 
01150   fprintf(stderr,"ParseNegMaxType Error -- Only FIXED or SCALE\n");
01151   exit(-1);
01152 }

neg_tht ParseNegThrType const char *  str  ) 
 

Definition at line 1125 of file diff_rate.cc.

References NEG_ABSOLUTE, NEG_RELATIVE, and neg_tht.

Referenced by DiffusionRate::command().

01126 {
01127   if (strcasecmp(str, "ABSOLUTE") == 0) {
01128     return NEG_ABSOLUTE;
01129   }
01130 
01131   if (strcasecmp(str, "RELATIVE") == 0) {
01132     return NEG_RELATIVE;
01133   }
01134 
01135   fprintf(stderr,"ParseNegThrType Error -- Only ABSOLUTE or RELATIVE\n");
01136   exit(-1);
01137 }

neg_wint ParseNegWinType const char *  str  ) 
 

Definition at line 1110 of file diff_rate.cc.

References NEG_COUNTER, NEG_TIMER, and neg_wint.

Referenced by DiffusionRate::command().

01111 {
01112   if (strcasecmp(str, "COUNTER") == 0) {
01113     return NEG_COUNTER;
01114   }
01115 
01116   if (strcasecmp(str, "TIMER") == 0) {
01117     return NEG_TIMER;
01118   }
01119 
01120   fprintf(stderr,"ParseNegWinType Error -- Only COUNTER or TIMER\n");
01121   exit(-1);
01122 }

org_t ParseOrgType const char *  str  ) 
 

Definition at line 1061 of file diff_rate.cc.

References BCAST_ORG, org_t, and UNICAST_ORG.

Referenced by DiffusionRate::command().

01062 {
01063   if (strcasecmp(str, "BROADCAST") == 0) {
01064     return BCAST_ORG;
01065   }
01066 
01067   if (strcasecmp(str, "UNICAST") == 0) {
01068     return UNICAST_ORG;
01069   }
01070 
01071   fprintf(stderr,"ParseOrgType Error -- Only BROADCAST or UNICAST\n");
01072   exit(-1);
01073 }

pos_ndt ParsePosNodeType const char *  str  ) 
 

Definition at line 1095 of file diff_rate.cc.

References END_POS, INTM_POS, and pos_ndt.

Referenced by DiffusionRate::command().

01096 {
01097   if (strcasecmp(str, "END") == 0) {
01098     return END_POS;
01099   }
01100 
01101   if (strcasecmp(str, "INTM") == 0) {
01102     return INTM_POS;
01103   }
01104 
01105   fprintf(stderr,"ParsePosNodeType Error -- Only END or INTM\n");
01106   exit(-1);
01107 }

pos_t ParsePosType const char *  str  ) 
 

Definition at line 1076 of file diff_rate.cc.

References POS_ALL, POS_HASH, POS_LAST, and pos_t.

Referenced by DiffusionRate::command().

01077 {
01078   if (strcasecmp(str, "HASH") == 0) {
01079     return POS_HASH;
01080   }
01081 
01082   if (strcasecmp(str, "LAST") == 0) {
01083     return POS_LAST;
01084   }
01085 
01086   if (strcasecmp(str, "ALL") == 0) {
01087     return POS_ALL;
01088   }
01089 
01090   fprintf(stderr,"ParsePosType Error -- Only HASH, LAST, or ALL\n");
01091   exit(-1);
01092 }

sub_t ParseSubType const char *  str  ) 
 

Definition at line 1045 of file diff_rate.cc.

References BCAST_SUB, sub_t, and UNICAST_SUB.

Referenced by DiffusionRate::command().

01046 {
01047   if (strcasecmp(str, "BROADCAST") == 0) {
01048     return BCAST_SUB;
01049   }
01050 
01051   if (strcasecmp(str, "UNICAST") == 0) {
01052     return UNICAST_SUB;
01053   }
01054 
01055   fprintf(stderr,"ParseSubType Error -- Only BROADCAST or UNICAST\n");
01056   exit(-1);
01057 }


Variable Documentation

DiffusionRateClass class_diffusion_rate [static]
 

char* MsgStr[]
 

Definition at line 62 of file diff_rate.cc.

Referenced by DiffusionRate::BcastNeg(), DiffusionRate::FwdOriginal(), DiffusionRate::FwdSubsample(), DiffusionRate::InterestHandle(), DiffusionRate::PosReinf(), DiffusionRate::ProcessPosReinf(), DiffusionRate::recv(), DiffusionProb::recv(), and DiffusionRate::UcastNeg().


Generated on Tue Apr 20 12:19:17 2004 for NS2.26SourcesOriginal by doxygen 1.3.3