我想写一个莫特莫特无线电通信程序,并希望接收者向发件人确认。我知道PacketAcknowledgements是被推荐的,但是有一些问题我不确定这个界面。
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发布于 2016-09-04 17:54:11
requestAck或Send调用send之前,您需要在即将发送的数据包上调用AMSend。一定要检查requestAck返回的错误代码,因为FAIL表示通信层不支持同步确认(这取决于您使用的无线电芯片和驱动程序)。发送数据包后,即内部事件sendDone (或更高版本),调用wasAcked,如果接收方确认数据包,则调用wasAcked返回true。更多信息见:https://github.com/tinyos/tinyos-main/blob/master/tos/interfaces/PacketAcknowledgements.nc
https://stackoverflow.com/questions/39306813
复制相似问题