亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? node.h

?? MAODV代碼和安裝程序 hen nan找啊
?? H
字號:
/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*-  * * Copyright (c) 1997-2000 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the Computer Systems *	Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used *    to endorse or promote products derived from this software without *    specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Header: /nfs/jade/vint/CVSROOT/ns-2/common/node.h,v 1.33 2002/05/30 17:44:03 haldar Exp $ *//* * XXX GUIDELINE TO ADDING FUNCTIONALITY TO THE BASE NODE * * One should not add something specific to one particular routing module  * into the base node, which is shared by all modules in ns. Otherwise you  * bloat other people's simulations. *//* * CMU-Monarch project's Mobility extensions ported by Padma Haldar,  * 10/98. */ #ifndef __ns_node_h__#define __ns_node_h__#include "connector.h"#include "object.h"#include "lib/bsd-list.h"#include "phy.h"#include "net-interface.h"#include "energy-model.h"#include "location.h"#include "rtmodule.h"//******added for prediction#include <math.h>#define ps 3.652struct SignalPower{        int nodeID;        double predictTime;        double receivingTime[4];        double receivingPower[4];        //member functions        inline int getNodeid() {return nodeID;}        inline double getPredict() {return predictTime;}        //initial instance variables        void initial(){                nodeID=0;                predictTime=2000.0;                for(int i=0;i<4;i++){                        receivingTime[i]=0.0;                        receivingPower[i]=-1.0;                }        }        //algorithm: compute the predict time based on three pairs of known parameters        double computePredict(double p1,double p2,double p3,double t2,double t3) {                double beta,a,b,c,result,temp1,temp2;                temp1=sqrt(p1*p2)*t2+sqrt(p2*p3)*t3-sqrt(p1*p3)*t3-sqrt(p2*p3)*t2;                temp2=(t2*t3*t3-t3*t2*t2)*sqrt(p2*p3);  beta=temp1/temp2;                if(beta>0){                        a=t2*sqrt(p2*ps)*beta;                        b=sqrt(ps)*(sqrt(p1)-sqrt(p2)-t2*t2*sqrt(p2)*beta);                        c=t2*sqrt(p2*ps)-sqrt(p1)*t2*sqrt(p2);                        result=(sqrt(b*b-4*a*c)-b)/(2*a);                }                else{                        result=-1.0;                }                return result;        }        // add the time and power parameters        void addParameter(double aPower, double aTime)        {                double t1,t2,t3,p1,p2,p3,temp;                //check all the array to decide where to put the new packet                if(aPower>=receivingPower[0]){                        receivingPower[0]=aPower;                        receivingTime[0]=aTime;                        //set to the initial state                        receivingPower[1]=-1.0;                        receivingTime[1]=1.0;                        receivingPower[2]=-1.0;                        receivingTime[2]=1.0;                        predictTime=2000.0;                }                else{                        if(aPower>=receivingPower[1]){                           //if the second packet WAS empty, add                                if(receivingPower[1]<0){                                        receivingPower[1]=aPower;                                        receivingTime[1]=aTime;                                        receivingPower[2]=-1.0;                                        receivingTime[2]=1.0;                                        t1=receivingTime[0];                                        t2=receivingTime[1];                                        p1=receivingPower[0];                                        p2=receivingPower[1];                                //using two packets predicts link status is dangerous, we have to use three packets                                        //predictTime=(t2-t1)*(p1-ps)/(p1-p2)+t1;                                }                                else{                                //already has a packet, it means two nodes BEGIN moving closer //The packet in the first element may come from different direction, remove it                                        receivingPower[0]=aPower;                                        receivingTime[0]=aTime;                                        //set to the initial state                                        receivingPower[1]=-1.0;                                        receivingTime[1]=1.0;                                        receivingPower[2]=-1.0;                                        receivingTime[2]=1.0;                                }                                //still set prediction time to 1000 sec                                predictTime=2000.0;                        }                        else{                        //      receivingPower[2]=aPower;                        //      receivingTime[2]=aTime;                                if(receivingPower[2]>0){                                        receivingPower[0]=receivingPower[1];                                        receivingPower[1]=receivingPower[2];                                }                                receivingPower[2]=aPower;                                if(receivingTime[2]>1.0){                                        receivingTime[0]=receivingTime[1];                                        receivingTime[1]=receivingTime[2];                                }                                receivingTime[2]=aTime;                                t1=receivingTime[0];                                t2=receivingTime[1];                                t3=receivingTime[2];                                p1=receivingPower[0];                                p2=receivingPower[1];                                p3=receivingPower[2];                                temp=computePredict(p1,p2,p3,t2-t1,t3-t1);                                if(temp>0){                                        predictTime=t1+temp;                                }                        }                }        }};//******endclass NixNode;class LinkHead;LIST_HEAD(linklist_head, LinkHead); // declare list head structure /* * The interface between a network stack and the higher layers. * This is analogous to the OTcl Link class's "head_" object. * XXX This object should provide a uniform API across multiple link objects; * right now it is a placeholder.  See satlink.h for now.  It is declared in * node.h for now since all nodes have a linked list of LinkHeads. */#include "parentnode.h"class Node;class NetworkInterface;class RoutingModule;class LinkHead : public Connector {public:	LinkHead(); 	// API goes here	Node* node() { return node_; }	int type() { return type_; }	int32_t label();	// Future API items could go here 	// list of all networkinterfaces on a node	inline void insertlink(struct linklist_head *head) {                LIST_INSERT_HEAD(head, this, link_entry_);        }        LinkHead* nextlinkhead(void) const { return link_entry_.le_next; }protected:	virtual int command(int argc, const char*const* argv);	NetworkInterface* net_if_; // Each link has a Network Interface	Node* node_; // Pointer to node object	int type_; // Type of link	// Each node has a linked list of link heads	LIST_ENTRY(LinkHead) link_entry_;};LIST_HEAD(node_head, Node); // declare list head structure //declare the neighbor list structure//added for pushback, but should be useful otherwise also.//there was something here which was moved to energy model. //since that work is in flux, i am not meddling with it.struct neighbor_list_node {	int nodeid;	neighbor_list_node* next;};// Size of the buffer for dumping nam traces.const int NODE_NAMLOG_BUFSZ = 256;//routing module node used for creating rtg module liststruct rtm_node {	RoutingModule* rtm;	rtm_node* next;};class Node : public ParentNode {public:	Node(void);	~Node();	inline int address() { return address_;}	inline int nodeid() { return nodeid_;}	inline bool exist_namchan() const { return (namChan_ != 0); }	virtual int command(int argc, const char*const* argv);	virtual void namlog(const char *fmt, ...);	NsObject* intf_to_target(int32_t); 	static struct node_head nodehead_;  // static head of list of nodes	inline void insert(struct node_head* head) {		LIST_INSERT_HEAD(head, this, entry);	}	inline Node* nextnode() { return entry.le_next; }	// The remaining objects handle a (static) linked list of nodes	// Used by Tom's satallite code and the wireless code	inline const struct if_head& ifhead() const { return ifhead_; }	inline const struct linklist_head& linklisthead() const { 		return linklisthead_; 	}		//neighbor list maintenance	neighbor_list_node* neighbor_list_;	void addNeighbor(Node *node);		static Node* get_node_by_address(nsaddr_t);		//routines for supporting routing	void route_notify (RoutingModule *rtm);	void unreg_route_notify(RoutingModule *rtm);	void add_route (char *dst, NsObject *target);	void delete_route (char *dst, NsObject *nullagent);	void set_table_size(int nn);	void set_table_size(int level, int csize);protected:	LIST_ENTRY(Node) entry;  // declare list entry structure	int address_;	int nodeid_; 		 // for nam use	// Nam tracing facility        Tcl_Channel namChan_;	// Single thread ns, so we can use one global storage for all 	// node objects	static char nwrk_[NODE_NAMLOG_BUFSZ];		void namdump();	struct if_head ifhead_; // list of phys for this node	struct linklist_head linklisthead_; // list of link heads on node	// pointer to head of rtmodule chain	RoutingModule* rtnotif_;#ifdef HAVE_STL	NixNode* nixnode_;   // used for nix routing (on-demand source routing for simulator performance)#endif /* STL */public:	// XXX Energy related stuff. Should be moved later to a wireless 	// routing plugin module instead of sitting here.	inline EnergyModel* energy_model() { return energy_model_; }	inline Location* location() { return location_; }protected:	EnergyModel* energy_model_;	// XXX Currently this is a placeholder only. It is supposed to 	// hold the position-related stuff in MobileNode. Yet another 	// 'Under Construction' sign :(	Location* location_;        //******added for prediction        int index_;        struct SignalPower neighborSignal[50];public:        //add a node into the list        void addNode(int anID,double aTime,double aPower);        //check if the node is in the neighborSignal array        bool isRecorde(int anID);        //get a node power time info by with specified ID        SignalPower* getNodeValue(int anID);        //add signal power value to the specified node in the list        void addValue(int anID,double aTime,double aPower);        //remove a node from the list        bool removeNode(int anID);        //get the predict time        double getTime(int anID);        //get the number of neighbors        inline int neighborNo(){return index_;}        int getIndex(int anID);        //******end};#endif /* __ns_node_h__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
七七婷婷婷婷精品国产| 午夜免费欧美电影| 日韩三级高清在线| 91精品国产综合久久婷婷香蕉| 日韩一区二区视频在线观看| 色爱区综合激月婷婷| 91女神在线视频| 91丨porny丨中文| 欧美色中文字幕| 91精品国产欧美一区二区18| 91精品国产欧美一区二区18| 精品免费视频一区二区| 久久亚洲欧美国产精品乐播| 中文字幕第一区综合| 亚洲欧美在线视频| 天天综合日日夜夜精品| 久久69国产一区二区蜜臀| 国产一区二区h| 91色.com| 91精品国产乱码| 久久综合九色综合97_久久久| 国产日韩欧美精品电影三级在线| 亚洲三级在线看| 日本不卡一二三区黄网| 国产一区在线视频| 在线免费不卡视频| 欧美本精品男人aⅴ天堂| 欧美国产日韩精品免费观看| 一区二区三区波多野结衣在线观看| 亚洲一区二区3| 国产成人午夜高潮毛片| 欧美亚洲综合在线| 国产女同性恋一区二区| 午夜久久久影院| 风间由美中文字幕在线看视频国产欧美| 91视频xxxx| 精品国产乱码久久久久久夜甘婷婷| 国产精品成人免费在线| 青青草国产精品亚洲专区无| 波波电影院一区二区三区| 欧美精品乱码久久久久久按摩| 久久亚洲精华国产精华液 | 亚洲精品中文在线影院| 五月婷婷激情综合| 国产很黄免费观看久久| 欧美一区二区视频在线观看2020| 中文字幕在线不卡视频| 久久国产精品99精品国产| 日本久久精品电影| 欧美国产综合一区二区| 精品一区二区三区久久久| 一本大道久久a久久精品综合| 久久久久国产精品人| 日韩电影网1区2区| 欧美色男人天堂| 亚洲欧美一区二区三区极速播放 | 麻豆成人在线观看| 欧美人妇做爰xxxⅹ性高电影| 国产精品家庭影院| 国产自产2019最新不卡| 91精品婷婷国产综合久久竹菊| 亚洲欧美乱综合| 99国产精品久| 中文字幕中文在线不卡住| 九九九久久久精品| 91精品国产麻豆国产自产在线| 亚洲成人av免费| 欧美日韩不卡在线| 天堂va蜜桃一区二区三区 | 欧美大片一区二区三区| 日韩黄色小视频| 欧美色倩网站大全免费| 亚洲国产一区在线观看| 在线观看国产一区二区| 亚洲一卡二卡三卡四卡无卡久久 | 中文字幕在线观看不卡| 国产99久久久国产精品潘金| 欧美极品少妇xxxxⅹ高跟鞋| 成人一区二区视频| 欧美国产精品专区| www.日韩av| 一区二区三区在线观看欧美| 在线观看中文字幕不卡| 五月激情综合网| 精品日产卡一卡二卡麻豆| 国产99一区视频免费| 亚洲日本韩国一区| 欧美日韩精品一区二区三区| 人人精品人人爱| 久久日一线二线三线suv| 国产福利一区二区三区| 亚洲激情欧美激情| 777午夜精品免费视频| 韩国av一区二区三区四区| 国产精品乱码妇女bbbb| 色综合一个色综合亚洲| 日韩成人午夜电影| 久久五月婷婷丁香社区| 99视频精品全部免费在线| 亚洲午夜精品久久久久久久久| 91麻豆精品91久久久久久清纯| 国产美女精品在线| 亚洲午夜一二三区视频| 精品国产精品网麻豆系列| 91丨porny丨国产入口| 日韩精品乱码免费| 国产精品国产三级国产普通话99| 欧美午夜影院一区| 国产一区91精品张津瑜| 一区二区三区欧美日| 精品国产不卡一区二区三区| 91小视频免费观看| 国内久久婷婷综合| 亚洲第一主播视频| 国产精品国产三级国产aⅴ中文 | 色激情天天射综合网| 蜜桃视频在线一区| 亚洲毛片av在线| 国产日产欧美一区二区视频| 欧美日韩国产高清一区二区 | 天天影视网天天综合色在线播放| 国产偷国产偷亚洲高清人白洁| 欧美午夜视频网站| 99综合电影在线视频| 久久精品国产99| 日韩精品亚洲专区| 一区二区三区免费网站| 国产欧美综合色| 欧美va日韩va| 91精品国产综合久久久久久漫画 | 激情偷乱视频一区二区三区| 亚洲不卡av一区二区三区| 中文字幕日韩av资源站| 久久精品人人爽人人爽| 欧美一二三四在线| 欧美一区二区三区视频在线 | 久久先锋影音av鲁色资源网| 欧美日韩成人综合天天影院| 在线一区二区三区| 色综合色狠狠综合色| 91在线免费播放| 不卡视频在线观看| 波多野结衣亚洲| 成人亚洲精品久久久久软件| 国产91精品露脸国语对白| 国产成人亚洲综合a∨婷婷图片| 老鸭窝一区二区久久精品| 免费人成网站在线观看欧美高清| 午夜久久久久久久久| 五月综合激情日本mⅴ| 日韩精品一级中文字幕精品视频免费观看| 一区二区三区在线观看国产| 亚洲线精品一区二区三区八戒| 亚洲精品日韩专区silk| 亚洲综合在线观看视频| 亚洲午夜视频在线观看| 亚洲成人av福利| 麻豆国产欧美日韩综合精品二区| 久久国产乱子精品免费女| 黄页视频在线91| 成人激情av网| 在线观看不卡视频| 欧美一区二区三区四区在线观看| 7777精品伊人久久久大香线蕉| 7878成人国产在线观看| 欧美成人午夜电影| 国产精品你懂的| 亚洲一区二区中文在线| 麻豆精品新av中文字幕| 国产美女精品在线| 色婷婷激情综合| 日韩一级欧美一级| 国产精品国产三级国产aⅴ入口| 亚洲同性同志一二三专区| 亚瑟在线精品视频| 国产在线一区二区综合免费视频| 成人激情小说网站| 欧美日韩一二三| 国产亚洲欧洲一区高清在线观看| 国产精品人妖ts系列视频 | 日韩欧美综合一区| 亚洲国产成人自拍| 亚洲成a人片在线不卡一二三区 | 久久国产精品免费| 成人99免费视频| 日韩免费视频线观看| 亚洲欧洲日韩综合一区二区| 日本一不卡视频| av电影天堂一区二区在线| 欧美日韩激情一区二区| 国产日韩欧美不卡在线| 亚洲成人精品影院| av一区二区不卡| 日韩一级黄色片| 亚洲国产aⅴ天堂久久| 成人网男人的天堂| 亚洲精品在线网站| 丝袜国产日韩另类美女| caoporn国产精品| 久久色在线观看|