delugec.nc
来自「tinyos最新版」· NC 代码 · 共 124 行
NC
124 行
// $Id: DelugeC.nc,v 1.21 2004/08/19 20:52:13 jwhui Exp $/* tab:4 * * * "Copyright (c) 2000-2004 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * *//** * Top level configuration for the Deluge protocol. Links up * components necessary to transfer pages, manage metadata, and access * to stable storage. * * @author Jonathan Hui <jwhui@cs.berkeley.edu> */includes BitVecUtils;includes Deluge;includes DelugeMsgs;includes DelugePageTransfer;includes DelugeStableStore;includes PageEEPROM;#ifndef PLATFORM_PCincludes InternalFlash;#endifconfiguration DelugeC { provides interface StdControl;}implementation { components Main, BitVecUtilsC, DelugeM, DelugeMetadataC as Metadata, DelugePageTransferC as PageTransfer, DelugeStableStoreC as StableStore, NetProgC, RandomLFSR, SharedMsgBufM, TimerC;#ifdef DELUGE_GENERIC_COMM_PROMISCUOUS components GenericCommPromiscuous as Comm;#else components GenericComm as Comm;#endif#ifdef DELUGE_LEDS components LedsC as Leds;#else components NoLeds as Leds;#endif#ifdef DELUGE_DBG components DelugeDbgC;#endif#ifndef PLATFORM_PC components InternalFlashC;#endif#ifdef DELUGE_DBG StdControl = DelugeDbgC; DelugeM.DelugeDbg -> DelugeDbgC; PageTransfer.DelugeDbg -> DelugeDbgC;#endif#ifndef PLATFORM_PC DelugeM.IFlash -> InternalFlashC; #endif StdControl = DelugeM; StdControl = StableStore; StdControl = NetProgC; DelugeM.SubControl -> TimerC; DelugeM.SubControl -> Comm; DelugeM.SubControl -> SharedMsgBufM; DelugeM.Leds -> Leds; DelugeM.BitVecUtils -> BitVecUtilsC; DelugeM.Metadata -> Metadata; DelugeM.MetadataControl -> Metadata.StdControl; DelugeM.NetProg -> NetProgC; DelugeM.PageTransferControl -> PageTransfer.StdControl; DelugeM.PageTransfer -> PageTransfer; DelugeM.Timer -> TimerC.Timer[unique("Timer")]; DelugeM.Random -> RandomLFSR; DelugeM.SendAdvMsg -> Comm.SendMsg[AM_DELUGEADVMSG]; DelugeM.ReceiveAdvMsg -> Comm.ReceiveMsg[AM_DELUGEADVMSG]; DelugeM.SharedMsgBuf -> SharedMsgBufM.SharedMsgBuf[DELUGE_SHARED_MSG_BUF]; PageTransfer.SharedMsgBuf -> SharedMsgBufM.SharedMsgBuf[DELUGE_SHARED_MSG_BUF]; PageTransfer.Leds -> Leds; PageTransfer.SendReqMsg -> Comm.SendMsg[AM_DELUGEREQMSG]; PageTransfer.ReceiveReqMsg -> Comm.ReceiveMsg[AM_DELUGEREQMSG]; PageTransfer.SendDataMsg -> Comm.SendMsg[AM_DELUGEDATAMSG]; PageTransfer.ReceiveDataMsg -> Comm.ReceiveMsg[AM_DELUGEDATAMSG];}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?