📄 params.h
字号:
/***************************************************************************** * * Copyright (C) 2001 Uppsala University & Ericsson AB. * Copyright (C) 2003 Simon Fraser University and NewMIC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: Erik Nordstr鰉, <erik.nordstrom@it.uu.se> * : Peter Lee <peter.lee@shaw.ca> * * *****************************************************************************/#ifndef PARAMS_H#define PARAMS_H#include "defs.h"#define K 5/* These are according to draft v10: */#ifdef AODVUU_LL_FEEDBACK#define ACTIVE_ROUTE_TIMEOUT 10000#define TTL_START 1#define DELETE_PERIOD ACTIVE_ROUTE_TIMEOUT#else/* HELLO messages are used: */#define ACTIVE_ROUTE_TIMEOUT 3000#define DELETE_PERIOD K * max(ACTIVE_ROUTE_TIMEOUT, ALLOWED_HELLO_LOSS * HELLO_INTERVAL)#define TTL_START 2#endif#define ALLOWED_HELLO_LOSS 2/* If expanding ring search is used, BLACKLIST_TIMEOUT should be?: */#define BLACKLIST_TIMEOUT RREQ_RETRIES * NET_TRAVERSAL_TIME + (TTL_THRESHOLD - TTL_START)/TTL_INCREMENT + 1 + RREQ_RETRIES#define HELLO_INTERVAL 1000#define LOCAL_ADD_TTL 2#define MAX_REPAIR_TTL NET_DIAMETER * 3 / 10#define MY_ROUTE_TIMEOUT 2 * ACTIVE_ROUTE_TIMEOUT#define NET_DIAMETER 10#define NEXT_HOP_WAIT NODE_TRAVERSAL_TIME + 10#define NODE_TRAVERSAL_TIME 40#define NET_TRAVERSAL_TIME 3 * NODE_TRAVERSAL_TIME * NET_DIAMETER / 2#define PATH_TRAVERSAL_TIME 2 * NET_TRAVERSAL_TIME#define RREQ_RETRIES 2#define TTL_INCREMENT 2#define TTL_THRESHOLD 7#define ADDRESS_DISCOVERY_TIME NET_TRAVERSAL_TIME#define AREQ_RETRIES 3#define TEMP_ROUTE_LIFETIME 2*ADDRESS_DISCOVERY_TIME#define AREQ_BLACKLIST_TIMEOUT AREQ_RETRIES*ADDRESS_DISCOVERY_TIME#define ADDRESS_CONFIG_BEGIN_TIME 3*HELLO_INTERVAL#define ADDRESS_CONFIG_TIME 60000#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -