ParamCommand.cc

Go to the documentation of this file.
00001 /*
00002  * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
00003  * downloading, copying, installing or using the software you agree to
00004  * this license. If you do not agree to this license, do not download,
00005  * install, copy or use the software.
00006  * 
00007  * Intel Open Source License 
00008  * 
00009  * Copyright (c) 2004 Intel Corporation. All rights reserved. 
00010  * 
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions are
00013  * met:
00014  * 
00015  *   Redistributions of source code must retain the above copyright
00016  *   notice, this list of conditions and the following disclaimer.
00017  * 
00018  *   Redistributions in binary form must reproduce the above copyright
00019  *   notice, this list of conditions and the following disclaimer in the
00020  *   documentation and/or other materials provided with the distribution.
00021  * 
00022  *   Neither the name of the Intel Corporation nor the names of its
00023  *   contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *  
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00027  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00028  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00029  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
00030  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00031  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00032  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00033  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00034  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00035  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037  */
00038 
00039 #include "ParamCommand.h"
00040 #include "bundling/BundleDaemon.h"
00041 #include "bundling/BundlePayload.h"
00042 #include "bundling/CustodyTimer.h"
00043 #include "conv_layers/TCPConvergenceLayer.h"
00044 
00045 namespace dtn {
00046 
00047 ParamCommand::ParamCommand() 
00048     : TclCommand("param")
00049 {
00050     bind_i("payload_mem_threshold",
00051            (int*)&BundlePayload::mem_threshold_, 16384,
00052            "The bundle size below which bundles are held in memory. "
00053            "(Default is 16k.)");
00054 
00055     bind_b("payload_test_no_remove",
00056            &BundlePayload::test_no_remove_, false,
00057            "Boolean to control not removing bundles (for testing).");
00058 
00059     bind_i("proactive_frag_threshold",
00060            (int*)&BundleDaemon::params_.proactive_frag_threshold_, -1,
00061            "Proactively fragment bundles to this size. (0 is off.)");
00062 
00063     bind_b("early_deletion",
00064            &BundleDaemon::params_.early_deletion_, true,
00065            "Delete forwarded / delivered bundles before they've expired "
00066            "(default is true)");
00067 
00068     bind_b("accept_custody",
00069            &BundleDaemon::params_.accept_custody_, true,
00070            "Accept custody when requested (default is true)");
00071 
00072     bind_b("reactive_frag_enabled",
00073            &BundleDaemon::params_.reactive_frag_enabled_, true,
00074            "Is reactive fragmentation enabled (default is true)");
00075 
00076     bind_b("retry_reliable_unacked",
00077            &BundleDaemon::params_.retry_reliable_unacked_, true,
00078            "Retry unacked transmissions on reliable CLs (default is true)");
00079 
00080     bind_b("test_permuted_delivery",
00081            &BundleDaemon::params_.test_permuted_delivery_, false,
00082            "Permute the order of bundles before delivering to registrations");
00083 
00084     bind_i("link_min_retry_interval",
00085            &Link::default_params_.min_retry_interval_, 5,
00086            "Default minimum connection retry interval for links");
00087 
00088     bind_i("link_max_retry_interval",
00089            &Link::default_params_.max_retry_interval_, 10 * 60,
00090            "Default maximum connection retry interval for links");
00091 
00092     // defaults for these are set in the CustodyTimerSpec defaults
00093     // static initializer
00094     bind_i("custody_timer_min",
00095            &CustodyTimerSpec::defaults_.min_,
00096            "default value for custody timer min");
00097     
00098     bind_i("custody_timer_lifetime_pct",
00099            &CustodyTimerSpec::defaults_.lifetime_pct_,
00100            "default value for custody timer lifetime percentage");
00101     
00102     bind_i("custody_timer_max",
00103            &CustodyTimerSpec::defaults_.max_,
00104            "default value for custody timer max");
00105 }
00106     
00107 } // namespace dtn

Generated on Fri Dec 22 14:48:00 2006 for DTN Reference Implementation by  doxygen 1.5.1