Hi there

At present, I am making test of Serial stack using Tossim. When I look into
the code of SerialDispatcherP.nc, I found the code as follows:

  message_t messages[2];     // buffer allocation
  message_t* ONE messagePtrs[2] = { &messages[0], &messages[1]};


In the event endPacket, if the condition is fulfilled, then it will call
receiveBufferSwap(), the current buffer points to next available buffer.

Since the handling of previous byte stream is postponed to the task
receiveTask(), before this task is scheduled, it is possible to get new byte
stream come in,  I think the purpose of double buffering and making buffers
swap is to let the serial stack not miss these incoming bytes. Am I right??
Thanks a lot for clarifying!

Regards

Peng
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to