⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dymoservicec.nc

📁 tinyos-2.x.rar
💻 NC
字号:
/*
 * Copyright (c) 2007 Romain Thouvenin <romain.thouvenin@gmail.com>
 * Published under the terms of the GNU General Public License (GPLv2).
 */

#include "StorageVolumes.h"

/**
 * DymoServiceC - Implements the DYMO routing protocol
 *
 * @author Romain Thouvenin
 */

configuration DymoServiceC {
  provides {
    interface SplitControl;
  }
  uses {
    interface Packet;
    interface AMPacket;
    interface AMSend;
    interface Receive;
    interface LinkMonitor;
  }

#ifdef DYMO_MONITORING
  provides {
    interface DymoMonitor;
  }
#endif
}

implementation {
  components DymoTableC, DymoEngineM, DymoPacketM;
  components new ConfigStorageC(VOLUME_DYMODATA);

  SplitControl = DymoEngineM.SplitControl;
  Packet       = DymoPacketM.Packet;
  AMPacket     = DymoEngineM.AMPacket;
  AMSend       = DymoEngineM.AMSend;
  Receive      = DymoEngineM.Receive;
  LinkMonitor  = DymoTableC.LinkMonitor;

  DymoEngineM.DymoPacket   -> DymoPacketM;
  DymoEngineM.RoutingTable -> DymoTableC;
  DymoEngineM.DymoTable    -> DymoTableC;

  DymoEngineM.Mount         -> ConfigStorageC;
  DymoEngineM.ConfigStorage -> ConfigStorageC;

#ifdef DYMO_MONITORING
  components new TimerMilliC();

  DymoMonitor = DymoEngineM.DymoMonitor;
  DymoEngineM.Timer     -> TimerMilliC;
#endif
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -