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

📄 lplamsenderp.nc

📁 tinyos-2.x.rar
💻 NC
字号:
generic module LplAMSenderP()
{
  provides interface AMSend;
  uses {
    interface AMSend as SubAMSend;
    interface LowPowerListening as Lpl;
    interface SystemLowPowerListening;
  }
}

implementation
{
  command error_t AMSend.send(am_addr_t addr, message_t* msg, uint8_t len)
  {
    call Lpl.setRemoteWakeupInterval(msg, call SystemLowPowerListening.getDefaultRemoteWakeupInterval());
    return call SubAMSend.send(addr, msg, len);
  }

  event void SubAMSend.sendDone(message_t* msg, error_t error) { signal AMSend.sendDone(msg, error); }
  command error_t AMSend.cancel(message_t* msg) { return call SubAMSend.cancel(msg); }
  command uint8_t AMSend.maxPayloadLength() { return call SubAMSend.maxPayloadLength(); }
  command void* AMSend.getPayload(message_t* msg, uint8_t len) { return call SubAMSend.getPayload(msg, len); }
}

⌨️ 快捷键说明

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