首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TinyOs包确认

TinyOs包确认
EN

Stack Overflow用户
提问于 2016-09-03 12:21:18
回答 1查看 336关注 0票数 0

我想写一个莫特莫特无线电通信程序,并希望接收者向发件人确认。我知道PacketAcknowledgements是被推荐的,但是有一些问题我不确定这个界面。

代码语言:javascript
复制
1. If I use it in the sender mote,should i also uses interface Receive in the module of the sender mote
2. Should I write extra code in the receiver mote? Should I use interface PacketAcknowledgements too?
3. command error_t requestAck(message_t *msg) and command bool wasAcked(message_t *msg) should be used when and where
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-04 17:54:11

  1. 不是的。
  2. 不是的。
  3. 在从接口requestAckSend调用send之前,您需要在即将发送的数据包上调用AMSend。一定要检查requestAck返回的错误代码,因为FAIL表示通信层不支持同步确认(这取决于您使用的无线电芯片和驱动程序)。发送数据包后,即内部事件sendDone (或更高版本),调用wasAcked,如果接收方确认数据包,则调用wasAcked返回true。

更多信息见:https://github.com/tinyos/tinyos-main/blob/master/tos/interfaces/PacketAcknowledgements.nc

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39306813

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档