• Main Page
  • Classes
  • Files
  • File List

/Users/yzchen/ns/ns-allinone-2.33/ns-2.33/diffusion3/lib/main/config.hh

00001 // 
00002 // config.hh     : Common defines + other config parameters
00003 // authors       : Chalermek Intanagonwiwat and Fabio Silva
00004 //
00005 // Copyright (C) 2000-2003 by the University of Southern California
00006 // $Id: config.hh,v 1.8 2005/09/13 04:53:49 tomh Exp $
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License,
00010 // version 2, as published by the Free Software Foundation.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License along
00018 // with this program; if not, write to the Free Software Foundation, Inc.,
00019 // 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00020 // 
00021 // Linking this file statically or dynamically with other modules is making
00022 // a combined work based on this file.  Thus, the terms and conditions of
00023 // the GNU General Public License cover the whole combination.
00024 //
00025 // In addition, as a special exception, the copyright holders of this file
00026 // give you permission to combine this file with free software programs or
00027 // libraries that are released under the GNU LGPL and with code included in
00028 // the standard release of ns-2 under the Apache 2.0 license or under
00029 // otherwise-compatible licenses with advertising requirements (or modified
00030 // versions of such code, with unchanged license).  You may copy and
00031 // distribute such a system following the terms of the GNU GPL for this
00032 // file and the licenses of the other code concerned, provided that you
00033 // include the source code of that other code when and as the GNU GPL
00034 // requires distribution of source code.
00035 //
00036 // Note that people who make modified versions of this file are not
00037 // obligated to grant this special exception for their modified versions;
00038 // it is their choice whether to do so.  The GNU General Public License
00039 // gives permission to release a modified version without this exception;
00040 // this exception also makes it possible to release a modified version
00041 // which carries forward this exception.
00042 //
00043 
00044 #ifdef HAVE_CONFIG_H
00045 #include "config.h"
00046 #endif // HAVE_CONFIG_H
00047 
00048 // Software information
00049 #define PROGRAM "Diffusion 3.2.0"
00050 #define RELEASE "Gear + Push Release"
00051 #define DEFAULT_CONFIG_FILE "config.txt"
00052 
00053 // Configurable parameters start here
00054 
00055 // Change the following parameters to set how often interest messages
00056 // are sent.
00057 // To calculate the lambda, you should divide 1 by the
00058 // number of milliseconds you want to have (on average) between
00059 // interest messages. For example, 1 / 30000 (30 seconds) results in a
00060 // lambda of 0.0000333333333.
00061 #define INTEREST_LAMBDA   0.00003333333333333333 // 30 seconds bw interests
00062 #define INTEREST_DELAY    30000                  // (msec) bw sends
00063 #define ROUND_EXPIRATION  50000                  // (msec)
00064 
00065 // This parameter specifies how often an exploratory message is allowed
00066 // to go to the network. It's used to establish a reinforced path as well
00067 // as discover new paths.
00068 #define EXPLORATORY_DATA_DELAY    60      // seconds between sends
00069 #define PUSH_EXPLORATORY_DELAY    60      // seconds between sends
00070 
00071 // This parameter specifies how much time to wait before sending
00072 // a positive reinforcement message in response to an exploratory
00073 // data message.
00074 #define POS_REINFORCEMENT_SEND_DELAY  600 // (msec) bw receive and send
00075 #define POS_REINFORCEMENT_JITTER      200 // (msec) jitter
00076 
00077 #ifdef WIRED
00078 // These settings are for high-bandwidth point-to-point
00079 // communication. In this case, we assume 10Mbit/s, a 1000-byte packet
00080 // is sent in .8 msec.
00081 
00082 // Use multiple sends when forwarding data
00083 #undef USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00084 
00085 // Change the following parameters to set how long to wait between
00086 // receiving an interest message from a neighbor and forwarding it.
00087 #define INTEREST_FORWARD_DELAY    100        // (msec) bw receive and forward
00088 #define INTEREST_FORWARD_JITTER    50        // (msec) jitter
00089 
00090 // Change the following parameters to set how long to wait between
00091 // receiving an exploratory data message from a neighbor and forwarding it.
00092 #define DATA_FORWARD_DELAY         50        // (msec) bw receive and forward
00093 #define DATA_FORWARD_JITTER        25        // (msec) jitter
00094 
00095 #define PUSH_DATA_FORWARD_DELAY    50        // (msec) bw receive and forward
00096 #define PUSH_DATA_FORWARD_JITTER   25        // (msec) jitter
00097 #endif // WIRED
00098 
00099 #ifdef USE_WINSNG2
00100 // These settings are for the sensoria radios (20 kbits/s). Sending a
00101 // 500-byte message takes 200 msec. Radios are TDMA for unicast and
00102 // broadcast, therefore there should be no contention.
00103 
00104 // Use multiple sends when forwarding data
00105 #undef USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00106 
00107 // Change the following parameters to set how long to wait between
00108 // receiving an interest message from a neighbor and forwarding it.
00109 #define INTEREST_FORWARD_DELAY   1000        // (msec) bw receive and forward
00110 #define INTEREST_FORWARD_JITTER   750        // (msec) jitter
00111 
00112 // Change the following parameters to set how long to wait between
00113 // receiving an exploratory data message from a neighbor and forwarding it.
00114 #define DATA_FORWARD_DELAY        150        // (msec) bw receive and forward
00115 #define DATA_FORWARD_JITTER       100        // (msec) jitter
00116 
00117 #define PUSH_DATA_FORWARD_DELAY   150        // (msec) bw receive and forward
00118 #define PUSH_DATA_FORWARD_JITTER  100        // (msec) jitter
00119 #endif // USE_WINSNG2
00120 
00121 #ifdef USE_MOTE_NIC
00122 // These settings are for the mote nic radios (10 kbits/s) and use
00123 // S-MAC at 10% duty cycle. Sending a 500-byte packet takes about 400
00124 // msec.
00125 
00126 // Use single send when forwarding data
00127 #define USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00128 
00129 // Change the following parameters to set how long to wait between
00130 // receiving an interest message from a neighbor and forwarding it.
00131 #define INTEREST_FORWARD_DELAY   1200        // (msec) bw receive and forward
00132 #define INTEREST_FORWARD_JITTER   600        // (msec) jitter
00133 
00134 // Change the following parameters to set how long to wait between
00135 // receiving an exploratory data message from a neighbor and forwarding it.
00136 #define DATA_FORWARD_DELAY        800        // (msec) bw receive and forward
00137 #define DATA_FORWARD_JITTER       400        // (msec) jitter
00138 
00139 #define PUSH_DATA_FORWARD_DELAY   800        // (msec) bw receive and forward
00140 #define PUSH_DATA_FORWARD_JITTER  400        // (msec) jitter
00141 #endif // USE_MOTE_NIC
00142 
00143 #ifdef USE_RPC
00144 // These settings are for the Radiometrix RPC radios (13 kbits/s) with
00145 // no CSMA, therefore we need to be more conservative. Sending a
00146 // 500-byte packet takes about 400 msec.
00147 
00148 //  Use single send when forwarding data
00149 #define USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00150 
00151 // Change the following parameters to set how long to wait between
00152 // receiving an interest message from a neighbor and forwarding it.
00153 #define INTEREST_FORWARD_DELAY   2000        // (msec) bw receive and forward
00154 #define INTEREST_FORWARD_JITTER  1500        // (msec) jitter
00155 
00156 // Change the following parameters to set how long to wait between
00157 // receiving an exploratory data message from a neighbor and forwarding it.
00158 #define DATA_FORWARD_DELAY       1200        // (msec) bw receive and forward
00159 #define DATA_FORWARD_JITTER       600        // (msec) jitter
00160 
00161 #define PUSH_DATA_FORWARD_DELAY  1200        // (msec) bw receive and forward
00162 #define PUSH_DATA_FORWARD_JITTER  600        // (msec) jitter
00163 #endif // USE_RPC
00164 
00165 #ifdef USE_SMAC
00166 // These settings are for the mote nic radios (10 kbits/s) and use
00167 // S-MAC at 10% duty cycle. Sending a 500-byte packet takes about 400
00168 // msec.
00169 
00170 // Use single send when forwarding data
00171 #define USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00172 
00173 // Change the following parameters to set how long to wait between
00174 // receiving an interest message from a neighbor and forwarding it.
00175 #define INTEREST_FORWARD_DELAY   1200        // (msec) bw receive and forward
00176 #define INTEREST_FORWARD_JITTER   600        // (msec) jitter
00177 
00178 // Change the following parameters to set how long to wait between
00179 // receiving an exploratory data message from a neighbor and forwarding it.
00180 #define DATA_FORWARD_DELAY        800        // (msec) bw receive and forward
00181 #define DATA_FORWARD_JITTER       400        // (msec) jitter
00182 
00183 #define PUSH_DATA_FORWARD_DELAY   800        // (msec) bw receive and forward
00184 #define PUSH_DATA_FORWARD_JITTER  400        // (msec) jitter
00185 #endif // USE_SMAC
00186 
00187 #ifdef USE_EMSTAR
00188 // These settings are for the mote nic radios (10 kbits/s) and use
00189 // EMSTAR. This is a generic (conservative) setting for all
00190 // emstar-class devices. This should be updated in the near future to
00191 // allow device-specific configuration.
00192 
00193 // Use single send when forwarding data
00194 #define USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00195 
00196 // Change the following parameters to set how long to wait between
00197 // receiving an interest message from a neighbor and forwarding it.
00198 #define INTEREST_FORWARD_DELAY   1200        // (msec) bw receive and forward
00199 #define INTEREST_FORWARD_JITTER   600        // (msec) jitter
00200 
00201 // Change the following parameters to set how long to wait between
00202 // receiving an exploratory data message from a neighbor and forwarding it.
00203 #define DATA_FORWARD_DELAY        800        // (msec) bw receive and forward
00204 #define DATA_FORWARD_JITTER       400        // (msec) jitter
00205 
00206 #define PUSH_DATA_FORWARD_DELAY   800        // (msec) bw receive and forward
00207 #define PUSH_DATA_FORWARD_JITTER  400        // (msec) jitter
00208 #endif // USE_EMSTAR
00209 
00210 #ifdef NS_DIFFUSION
00211 // These settings are for high-bandwidth point-to-point
00212 // communication. In this case, we assume 10Mbit/s, a 1000-byte packet
00213 // is sent in .8 msec.
00214 
00215 // Use multiple sends when forwarding data
00216 #undef USE_BROADCAST_TO_MULTIPLE_RECIPIENTS
00217 
00218 // Change the following parameters to set how long to wait between
00219 // receiving an interest message from a neighbor and forwarding it.
00220 #define INTEREST_FORWARD_DELAY    100        // (msec) bw receive and forward
00221 #define INTEREST_FORWARD_JITTER    50        // (msec) jitter
00222 
00223 // Change the following parameters to set how long to wait between
00224 // receiving an exploratory data message from a neighbor and forwarding it.
00225 #define DATA_FORWARD_DELAY         50        // (msec) bw receive and forward
00226 #define DATA_FORWARD_JITTER        25        // (msec) jitter
00227 
00228 #define PUSH_DATA_FORWARD_DELAY    50        // (msec) bw receive and forward
00229 #define PUSH_DATA_FORWARD_JITTER   25        // (msec) jitter
00230 #endif // NS_DIFFUSION
00231 
00232 #ifndef INTEREST_FORWARD_DELAY
00233 #error "No Radio Parameters Selected in ./configure !"
00234 #endif // !INTEREST_FORWARD_DELAY
00235 
00236 // The following timeouts are used for determining when gradients,
00237 // subscriptions, filters and neighbors should expire. These are
00238 // mostly a function of other parameters and should not be changed.
00239 #define SUBSCRIPTION_TIMEOUT    (INTEREST_DELAY/1000 * 4)         // sec
00240 #define GRADIENT_TIMEOUT        (INTEREST_DELAY/1000 * 5)         // sec
00241 #define FILTER_TIMEOUT          (FILTER_KEEPALIVE_DELAY/1000 * 2) // sec
00242 #define NEIGHBORS_TIMEOUT       (INTEREST_DELAY/1000 * 4)         // sec
00243 
00244 // The following parameters are not dependent of radio properties
00245 // and just specify how often diffusion/other modules check for events.
00246 #define GRADIENT_DELAY          10000        // (msec) bw checks
00247 #define REINFORCEMENT_DELAY     10000        // (msec) bw checks
00248 #define SUBSCRIPTION_DELAY      10000        // (msec) bw checks
00249 #define NEIGHBORS_DELAY         10000        // (msec) bw checks
00250 #define FILTER_DELAY            60000        // (msec) bw checks
00251 #define FILTER_KEEPALIVE_DELAY  20000        // (msec) bw sends
00252 
00253 // Number of packets to keep in the hash table
00254 #define HASH_TABLE_MAX_SIZE           1000
00255 #define HASH_TABLE_REMOVE_AT_ONCE       20
00256 #define HASH_TABLE_DATA_MAX_SIZE       100
00257 #define HASH_TABLE_DATA_REMOVE_AT_ONCE  10

Generated on Tue Aug 10 2010 16:16:06 for ns-2.33 by  doxygen 1.7.1