Disable acknowledgements if 0 retries requested#355
Disable acknowledgements if 0 retries requested#355tim-ist wants to merge 1 commit intotinyos:masterfrom
Conversation
PacketLink.setRetries(msg, 0) should disable ACKs even if they were enabled for this msg before.
|
So how would I send a single packet that I want an acknowledgement for? Request the ack after I have set retries to 0? |
|
Well, there are contradicting descriptions for The TEP says: The interface file: The implementation for CC2420 follows the one in the interface file. So, to send a single acknowledged packet |
|
Well, I don't necessarily see contradictions in the descriptions you listed, perhaps just the wording in the interface is bad/incorrect. A retry is an extra delivery, the would kind of actually mean that setting this to 0 would result in no send being done at all, but then the variable name is still maxRetries, so I would just reword the description. Neither of them however has anything to do with the acknowledgements, but I guess since calling setRetries with a number larger than 0 would enable acknowledgements, then calling with 0 should perhaps revert things back. Though in practice Packet.clear should probably be called instead and then the necessary flags set again, since it is not really possible to revert the flags if several commands were issued on a packet - you don't know if the acknowledgements flag was set because the user set it or because retries were set at some point. |
PacketLink.setRetries(msg, 0) should disable ACKs
even if they were enabled for this msg before.