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

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

?? sim_routing.cc

?? SensorSimII is the framework of a simulator that I have been working on to study how future sensor n
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************* * @<title> Wireless Sensor Network Simulation </title>@ * * @<!-- Copyright 2003 Gilbert (Gang) Chen, Boleslaw K. Szymanski and * Rensselaer Polytechnic Institute. All worldwide rights reserved.  A * license to use, copy, modify and distribute this software for * non-commercial research purposes only is hereby granted, provided * that this copyright notice and accompanying disclaimer is not * modified or removed from the software. * * DISCLAIMER: The software is distributed "AS IS" without any express * or implied warranty, including but not limited to, any implied * warranties of merchantability or fitness for a particular purpose * or any warranty of non-infringement of any current or pending * patent rights. The authors of the software make no representations * about the suitability of this software for any particular * purpose. The entire risk as to the quality and performance of the * software is with the user. Should the software prove defective, the * user assumes the cost of all necessary servicing, repair or * correction. In particular, neither Rensselaer Polytechnic * Institute, nor the authors of the software are liable for any * indirect, special, consequential, or incidental damages related to * the software, to the maximum extent the law permits. -->@  * * @<h1> Wireless Sensor Network Simulation </h1>@ * * Building a wireless sensor network simulation in SENSE consists of * the following steps: * @<UL>@ * @<LI>@ Designing a sensor node component * @<LI>@ Constructing a sensor network derived from @CostSimEng@ * @<LI>@ Configuring the system and running the simulation * @</UL>@ *  * Here, we assume that all components needed by a sensor node component * are available from the component repository. If this is not the case, the user * must develop new components, as described by other @<a href=tutorial.html>tutorials</a>@. We should * also mention that the first step of designing a sensor node component * is not always necessary, if a standard sensor node is to be used. * * This first line of this source file demands that @HeapQueue@ must be * used as the priority queue for event management.  For wireless network * simulation, because of the inherent drawback of @CalendarQueue@, and also * because of the particular channel component being used, @HeapQueue@ * is often faster.  *******************************************************************/#define queue_t HeapQueue/******************************************************************* * This header file is absolutely required *******************************************************************/#include "../../common/sense.h"/******************************************************************* * The following header files are necessary only if the corresponding * components are needed by the sensor node component *******************************************************************/#include "../../app/cbr.h"#include "../../mob/immobile.h"#include "../../net/flooding.h"#include "../../net/aodvi.h"#include "../../net/dsri.h"#include "../../mac/null_mac.h"#include "../../mac/mac_80211.h"#include "../../phy/transceiver.h"#include "../../phy/simple_channel.h"#include "../../energy/battery.h"#include "../../energy/power.h"#include "../../util/fifo_ack.h"/******************************************************************* * #cxxdef is similar to #define, except it is only recognized by the * CompC++ compiler.  The following two lines state that the flooding * component will be used for the network layer. These two macros * can also be overridden by command line macros definitions (whose * format is '-D<macro>=<something>'. *******************************************************************/#cxxdef net_component Flooding#cxxdef net_struct Flooding_Struct/******************************************************************* * For layer XXX, XXX_Struct is the accompanying class that defines * data structures and types used in that layer.  The reason we need a separate * class for this purpose is that each XXX is a component, and that due to * the particular way in which the CompC++ compiler was implemented * data structures and types defined inside any component is not accessible from * outside.  Therefore, for each layer XXX, we must define all those * data structures and types in XXX_Struct, and then derive component XXX  * from XXX_Struct. * * The following three lines state: * @<UL>@ * @<LI>@ The type of packets in the application layer is @CBR_Struct::packet_t@ * @<LI>@ The network layer passes application layer packets by reference (which may * be faster than by pointer, for @CBR_Struct::packet_t@ is small, so  *  @app_packet_t@ becomes the template parameter of @net_struct@; the type of packets * in the network layer is then @net_packet_t@. * @<LI>@ Now that @net_packet_t@ is more than a dozen bytes long, so it is better * to pass it by pointer, so @net_packet_t*@ instead of @net_packet_t@ becomes the * template parameter of the @MAC80211_Struct@; the type of packets in the mac layer * is then @mac_packet_t@.  Physical layers also use @mac_packet_t@, so there is no * need to define more packet types. * @</UL>@ ********************************************************************/typedef CBR_Struct::packet_t app_packet_t;typedef net_struct<app_packet_t>::packet_t net_packet_t;typedef MAC80211_Struct<net_packet_t*>::packet_t mac_packet_t;/******************************************************************* * Now we can begin to define the sensor node component. First we * instantiate every subcomponent used by the node component. We need to * determine the template parameter type for each subcomponent, usually starting from  * the application layer. Normally the application layer component does not have any * template parameter.  * * This picture shows the internal structure of a sensor node. * * @<center><img src=sim_flooding_node.gif></center>@ *******************************************************************/component SensorNode : public TypeII{public:    CBR app;    net_component <app_packet_t> net;    MAC80211 <net_packet_t*> mac;    // A transceiver that can transmit and receive at the same time (of course    // a collision would occur in such cases)    DuplexTransceiver < mac_packet_t > phy;    // Linear battery    SimpleBattery battery;    // PowerManagers manage the battery    PowerManager pm;    // sensor nodes are immobile    Immobile mob;    // the queue used between network and mac    FIFOACK3<net_packet_t*,ether_addr_t,unsigned int> queue;        double MaxX, MaxY;  // coordinate boundaries    ether_addr_t MyEtherAddr; // the ethernet address of this node    int ID; // the identifier    virtual ~SensorNode();    void Start();    void Stop();    void Setup();/******************************************************************* * The following lines define one inport and two outports to be connected * to the channel components. *******************************************************************/	outport void to_channel_packet(mac_packet_t* packet, double power, int id);	inport void from_channel (mac_packet_t* packet, double power);	outport void to_channel_pos(coordinate_t& pos, int id);};SensorNode::~SensorNode(){}void SensorNode::Start(){}void SensorNode::Stop(){}/******************************************************************* * This function must be called before running the simulation. *******************************************************************/void SensorNode::Setup(){/******************************************************************* * At the beginning the amount of energy in each battery is 1,000,000 Joules. *******************************************************************/    battery.InitialEnergy=1e6;    /******************************************************************* * Each subcomponent must als know the ethernet address of the  * sensor node it resides. * Remember the application layer is a CBR component, which would stop * at FinishTime to give the whole network an opportunity to clean up * any packets in transit. * Assiging @false@ to @app.DumpPackets@ means that if @<a href=manual.html#COST_DEBUG>COST_DEBUG</a>@ * is defined, @app@ still won't print out anything. *******************************************************************/        app.MyEtherAddr=MyEtherAddr;    app.FinishTime=StopTime()*0.9;    app.DumpPackets=false;    /******************************************************************* * Set the coordinate of the sensor node.  Must also give @ID@ to @mob@ * since @ID@ was used to identify the index of the sensor node when * the position info is sent to the channel component. *******************************************************************/    mob.InitX=Random(MaxX);    mob.InitY=Random(MaxY);    mob.ID=ID;/******************************************************************* * When a net component is about to retransmit a packet that it received, * it cannot do so because otherwise all nodes that received the packet * may attempt to retransmit the packet immediately, inevitably resulting * in a collision.  @ForwardDelay@ gives the maximum delay time a  * needed-to-be-retransmit packet may incur.  The actual delay is randomly * chosen between [0,@ForwardDelay@]. *******************************************************************/    net.MyEtherAddr=MyEtherAddr;    net.ForwardDelay=0.1;    net.DumpPackets=true;    /******************************************************************* * If @Promiscuity@ is ture, then the mac component will forward every packet * even if it not destined to this sensor node, to the network layer. * And we want to debug the mac layer, so we set @mac.DumpPackets@ to true. *******************************************************************/     mac.MyEtherAddr=MyEtherAddr;    mac.Promiscuity=true;    mac.DumpPackets=true;   /******************************************************************* *  The PowerManager takes care of power consumption at different states. *  The following lines state the power consumption is 1.6W at transmission *  state, 1.2 at receive state, and 1.115 at idle state. *******************************************************************/   	pm.TXPower=1.6;   	pm.RXPower=1.2;   	pm.IdlePower=1.15;/******************************************************************* *  @phy.TxPower@ is the transmission power of the antenna. *  @phy.RXThresh@ is the lower bound on the receive power of any packet *  that can be successfuly received. *  @phy.CSThresh@ is the lower bound on tye receive power of any packet *  that can be detected. *  @phy@ also needs to know the id because it needs to communicate with *  the channel component. *******************************************************************/    phy.TXPower=0.0280;    phy.TXGain=1.0;    phy.RXGain=1.0;     phy.Frequency=9.14e8;    phy.RXThresh=3.652e-10;    phy.CSThresh=1.559e-11;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品不卡在线视频| 在线观看视频一区二区欧美日韩| 欧美巨大另类极品videosbest | av不卡在线播放| 国产精品久久国产精麻豆99网站| 成人综合婷婷国产精品久久| 中文字幕精品三区| 日本韩国精品在线| 日韩电影免费一区| 久久影院视频免费| www.欧美色图| 亚欧色一区w666天堂| 欧美成人aa大片| 播五月开心婷婷综合| 一区二区三区中文字幕电影 | 亚洲va韩国va欧美va| 欧美疯狂性受xxxxx喷水图片| 丝袜诱惑制服诱惑色一区在线观看 | 日韩精品欧美精品| 久久久影院官网| 91在线无精精品入口| 性做久久久久久久久| 精品美女被调教视频大全网站| 国产麻豆一精品一av一免费 | 色狠狠av一区二区三区| 亚洲成人免费在线观看| 精品国精品国产尤物美女| 成人免费精品视频| 亚洲mv在线观看| 国产亚洲va综合人人澡精品| 久久先锋影音av| 91在线视频免费观看| 日本v片在线高清不卡在线观看| 久久精品男人天堂av| www.av精品| 精品一区二区在线观看| 亚洲免费毛片网站| 久久中文娱乐网| 欧美日韩中文字幕精品| 国产91高潮流白浆在线麻豆| 亚洲欧美另类久久久精品2019| 欧美一区二区三区日韩| 99久久99久久精品国产片果冻 | 蜜臀av性久久久久蜜臀aⅴ四虎| 中文字幕+乱码+中文字幕一区| 欧美三级乱人伦电影| 国产精品资源在线看| 亚洲第一福利视频在线| 综合欧美亚洲日本| 久久综合国产精品| 91麻豆精品久久久久蜜臀| 一本大道av伊人久久综合| 韩国一区二区视频| 日韩av电影免费观看高清完整版在线观看| 国产女人18水真多18精品一级做| 欧美欧美午夜aⅴ在线观看| 91在线视频观看| 国产夫妻精品视频| 九九**精品视频免费播放| 午夜日韩在线观看| 亚洲人成网站影音先锋播放| 国产午夜精品一区二区三区四区| 69久久99精品久久久久婷婷| 91福利在线观看| 91麻豆swag| 97国产精品videossex| 成人av电影在线| 国产风韵犹存在线视精品| 国产一区三区三区| 久久国产视频网| 蜜臀精品久久久久久蜜臀| 日精品一区二区| 日韩影院精彩在线| 日韩专区欧美专区| 日韩在线播放一区二区| 亚洲成年人网站在线观看| 一区二区成人在线| 亚洲国产成人精品视频| 亚洲午夜视频在线观看| 亚洲福利一区二区三区| 成人国产一区二区三区精品| 国内外成人在线| 国产在线精品一区二区不卡了| 精品一区二区三区免费观看 | 国产福利精品导航| 国产精品夜夜嗨| 国产v综合v亚洲欧| 波多野结衣在线aⅴ中文字幕不卡| 国产ts人妖一区二区| 99久久er热在这里只有精品66| 91麻豆免费观看| 一本到不卡精品视频在线观看| 91成人免费网站| 欧美日韩国产综合一区二区三区| 717成人午夜免费福利电影| 日韩一级完整毛片| 久久影院午夜论| 综合中文字幕亚洲| 亚洲h精品动漫在线观看| 免费欧美在线视频| 国产成人午夜精品5599| 波多野结衣一区二区三区| 欧美在线视频全部完| 91精品国产福利| 亚洲国产激情av| 亚洲综合av网| 久久精品国产99国产精品| 粉嫩蜜臀av国产精品网站| 色狠狠桃花综合| 欧美成人女星排名| 亚洲色图清纯唯美| 蜜臀av一区二区在线免费观看| 国产精品一级在线| 在线观看免费视频综合| 日韩欧美一级片| 国产精品美女久久久久av爽李琼| 夜夜嗨av一区二区三区中文字幕 | 色一区在线观看| 91精品国产综合久久福利| 国产人成一区二区三区影院| 亚洲最大的成人av| 国产在线国偷精品产拍免费yy| 99re8在线精品视频免费播放| 欧美一区二区在线看| 中文字幕一区二区三区不卡 | 韩国女主播成人在线| 91亚洲精品乱码久久久久久蜜桃| 欧美顶级少妇做爰| 亚洲色图制服丝袜| 韩国成人福利片在线播放| 欧美日韩一区二区三区高清 | 欧美一区二区精品在线| 国产精品久久久久一区| 另类调教123区| 欧洲亚洲精品在线| 国产精品免费看片| 精品一区二区三区久久| 色综合久久久久综合99| 久久精品一区八戒影视| 奇米精品一区二区三区四区| 一本一道久久a久久精品综合蜜臀| 亚洲精品一线二线三线无人区| 亚洲黄色小视频| 成人avav影音| 国产日产欧美精品一区二区三区| 日韩精品国产精品| 欧美性极品少妇| 亚洲视频在线一区| 成人少妇影院yyyy| 久久亚洲综合av| 久久99国产精品麻豆| 91麻豆精品国产91久久久更新时间| 亚洲欧洲av在线| 不卡在线观看av| 亚洲国产成人在线| 国产精品主播直播| 精品毛片乱码1区2区3区| 蜜臀av亚洲一区中文字幕| 亚洲国产高清在线| 成人小视频免费在线观看| 久久综合九色综合欧美98| 久久99久久精品欧美| 日韩三级免费观看| 麻豆一区二区三区| 91精品国产aⅴ一区二区| 午夜精品久久久久久久蜜桃app| 色综合久久六月婷婷中文字幕| ●精品国产综合乱码久久久久| 国产91精品露脸国语对白| 国产精品网站在线观看| 懂色av一区二区三区免费观看 | 欧美精品日日鲁夜夜添| 午夜婷婷国产麻豆精品| 欧美日韩亚洲综合在线| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲一区在线看| 欧美日韩国产一二三| 日韩激情一区二区| 精品处破学生在线二十三| 九色综合狠狠综合久久| 久久精品人人做人人爽人人| 国产.精品.日韩.另类.中文.在线.播放| 国产亚洲欧美一区在线观看| 国产高清精品久久久久| 国产精品亲子乱子伦xxxx裸| 波多野结衣一区二区三区| 亚洲美女免费在线| 7777女厕盗摄久久久| 久草在线在线精品观看| 欧美激情自拍偷拍| 色综合激情五月| 日韩成人av影视| 久久精品视频在线免费观看| eeuss鲁一区二区三区| 亚洲综合激情网| 欧美岛国在线观看| 成人免费看黄yyy456| 亚洲第一激情av| 久久精品视频网| 久久久国际精品|