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

diff_rate.h File Reference

#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <float.h>
#include <stdlib.h>
#include <tcl.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 "iflist.h"
#include "hash_table.h"
#include "arp.h"
#include "mac.h"
#include "ll.h"
#include "dsr/path.h"

Include dependency graph for diff_rate.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

class  DiffusionRate
class  GradientTimer
class  NegativeReinforceTimer

Defines

#define INTEREST_PERIODIC   5
#define INTEREST_TIMEOUT   15
#define NEG_CHECK   2.0
#define MAX_NEG_COUNTER   20
#define PER_IIF   5
#define NEG_MIN_RATIO   0.1
#define MAX_DUP_DATA   0

Typedefs

typedef enum subsample_tx_type__ sub_t
typedef enum original_tx_type__ org_t
typedef enum pos_reinf_type__ pos_t
typedef enum pos_reinf_node_type__ pos_ndt
typedef enum neg_window_type__ neg_wint
typedef enum neg_threshold_type__ neg_tht
typedef enum neg_max_counter_type__ neg_mxt

Enumerations

enum  subsample_tx_type__ { BCAST_SUB, UNICAST_SUB }
enum  original_tx_type__ { BCAST_ORG, UNICAST_ORG }
enum  pos_reinf_type__ { POS_HASH, POS_LAST, POS_ALL }
enum  pos_reinf_node_type__ { END_POS, INTM_POS }
enum  neg_window_type__ { NEG_COUNTER, NEG_TIMER }
enum  neg_threshold_type__ { NEG_ABSOLUTE, NEG_RELATIVE }
enum  neg_max_counter_type__ { NEG_FIXED_MAX, NEG_SCALE_MAX }

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)


Define Documentation

#define INTEREST_PERIODIC   5
 

Definition at line 113 of file diff_rate.h.

Referenced by SinkAgent::bcast_interest(), Diff_Routing_Entry::Diff_Routing_Entry(), DiffusionRate::InterestHandle(), and Diff_Routing_Entry::reset().

#define INTEREST_TIMEOUT   15
 

Definition at line 114 of file diff_rate.h.

Referenced by DiffusionRate::GradientTimeOut(), DiffusionRate::InterestHandle(), DiffusionRate::ProcessPosReinf(), and DiffusionRate::Start().

#define MAX_DUP_DATA   0
 

Definition at line 121 of file diff_rate.h.

Referenced by DiffusionRate::GenNeg().

#define MAX_NEG_COUNTER   20
 

Definition at line 117 of file diff_rate.h.

Referenced by DiffusionRate::CheckNegCounter().

#define NEG_CHECK   2.0
 

Definition at line 116 of file diff_rate.h.

Referenced by DiffusionRate::NegReinfTimeOut(), and DiffusionRate::Start().

#define NEG_MIN_RATIO   0.1
 

Definition at line 120 of file diff_rate.h.

Referenced by DiffusionRate::GenNeg().

#define PER_IIF   5
 

Definition at line 118 of file diff_rate.h.

Referenced by DiffusionRate::CheckNegCounter().


Typedef Documentation

typedef enum neg_max_counter_type__ neg_mxt
 

Referenced by ParseNegMaxType().

typedef enum neg_threshold_type__ neg_tht
 

Referenced by ParseNegThrType().

typedef enum neg_window_type__ neg_wint
 

Referenced by ParseNegWinType().

typedef enum original_tx_type__ org_t
 

Referenced by ParseOrgType().

typedef enum pos_reinf_node_type__ pos_ndt
 

Referenced by ParsePosNodeType().

typedef enum pos_reinf_type__ pos_t
 

Referenced by ParsePosType().

typedef enum subsample_tx_type__ sub_t
 

Referenced by ParseSubType().


Enumeration Type Documentation

enum neg_max_counter_type__
 

Enumeration values:
NEG_FIXED_MAX 
NEG_SCALE_MAX 

Definition at line 107 of file diff_rate.h.

00107                                     {
00108   NEG_FIXED_MAX,
00109   NEG_SCALE_MAX
00110 } neg_mxt;

enum neg_threshold_type__
 

Enumeration values:
NEG_ABSOLUTE 
NEG_RELATIVE 

Definition at line 98 of file diff_rate.h.

00098                                   {
00099   NEG_ABSOLUTE,
00100   NEG_RELATIVE
00101 } neg_tht;

enum neg_window_type__
 

Enumeration values:
NEG_COUNTER 
NEG_TIMER 

Definition at line 89 of file diff_rate.h.

00089                                {
00090   NEG_COUNTER,
00091   NEG_TIMER
00092 } neg_wint;

enum original_tx_type__
 

Enumeration values:
BCAST_ORG 
UNICAST_ORG 

Definition at line 70 of file diff_rate.h.

00070                                 {
00071   BCAST_ORG,
00072   UNICAST_ORG
00073 } org_t;

enum pos_reinf_node_type__
 

Enumeration values:
END_POS 
INTM_POS 

Definition at line 83 of file diff_rate.h.

00083                                    {
00084   END_POS,
00085   INTM_POS
00086 } pos_ndt;

enum pos_reinf_type__
 

Enumeration values:
POS_HASH 
POS_LAST 
POS_ALL 

Definition at line 76 of file diff_rate.h.

00076                               {
00077   POS_HASH,
00078   POS_LAST,
00079   POS_ALL
00080 } pos_t;

enum subsample_tx_type__
 

Enumeration values:
BCAST_SUB 
UNICAST_SUB 

Definition at line 64 of file diff_rate.h.

00064                                  {
00065   BCAST_SUB,
00066   UNICAST_SUB
00067 } sub_t;


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 }


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