Hi everyone, I'm implementing a TDMA protocol, in which each slot lasts 10 ms. At the beginning of each slot, a node sends a packet (using AMSenderC$AMSend$send) if it captures the channel through some contention resolution algorithm. For the protocol to function, each slot duration has to be as close to 10 ms as possible. I tried the following two methods:
1. setup a periodic Timer with period 10 ms. But Timer interface works in synchronous context and the interval between two consecutive firing can be much larger than 10 ms as also mentioned in this thread<http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-May/024953.html> . 2. setup an Alarm to fire every 10 ms. The timing is precise. However, Alarm$fired event is asynchronous and AMSenderC$AMSend$send is synchronous and thus cannot be called directly from Alarm$fired. If a task is post in in Alarm$fired to call AMSenderC$AMSend$send indirectly, it suffers from the same issue as Timer interface does. FTSP is also used in the protocol, which transmits via AMSenderC$AMSend$send. That's why packet transmission is through AMSenderC$AMSend$send in my TDMA protocol, to be compatible with FTSP. If you have any suggestion, please do not hesitate to share. Your help would be sincerely appreciated. -- Cheers -Xiaohui Liu
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
