Hi Guys, I have a question regarding the low power listening function.
I know for the receiver, we could use setLocalSleepInterval() to invoke the periodic sleeping. And for the sender, in order to send the packet to this receiver, setRxSleepInterval should be used to set the receiver's sleep interval value into the packet meta data field. *However, my question is what is the detail of this proceedure? I don't quite understand the reason why this packet can be received by the receiver with the same sleep interval value, as we set the receiver's interval to the packet's meta data field.* In tinyos2.x DefaultLplP.nc, I found when to initialize the sending, the following function will be called: void initializeSend() { if(call LowPowerListening.getRxSleepInterval(currentSendMsg) > ONE_MESSAGE) { if(call AMPacket.destination(currentSendMsg) == AM_BROADCAST_ADDR) { call PacketAcknowledgements.noAck(currentSendMsg); } else { // Send it repetitively within our transmit window call PacketAcknowledgements.requestAck(currentSendMsg); } call SendDoneTimer.startOneShot( call LowPowerListening.getRxSleepInterval(currentSendMsg) + 20); } post send(); } *What is the use of this SendDoneTimer?* seems to me that it schdules next fire time at the interval +20 ms. And when the timer fires, it will do the following: /** * When this timer is running, that means we're sending repeating messages * to a node that is receive check duty cycling. */ event void SendDoneTimer.fired() { if(call SendState.getState() == S_LPL_SENDING) { // The next time SubSend.sendDone is signaled, send is complete. call SendState.forceState(S_LPL_CLEAN_UP); } } *What does the above function mean? * ** *Another question is in the initializeSend function, when the destination address is not broadcast, it will request ack. Does this mean that the software ack is automatically turned on? When a receiver receives packet, it will send out ack automatically? Is it necessary?* ** Thanks for your kind help, David Wang * *
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help