On Thu, Jun 5, 2008 at 3:04 PM, 贾鹏 <[EMAIL PROTECTED]> wrote: > Hi there, > I' m scrutinizing the CTPForwardingEngine now, I'm little confused by the > function forward(); I realize the QEntryPool is necessary, for it will put > a new recieved packet into the queue. But I cannot understand the function > of MessagePool. Everytime it grab a space from this pool and return a > pointer newMsg, but it assign it equals to 0 and let the SubReceive.receive > return this value. why we need to do this, and assign this newMsg's pointing > space equal to 0, does the SubReceive.receive needs such a return value? I > cannot see its point.
QEntryPool is a pool of fe_queue_entry, not the packets. MessagePool is a pool of message_t. fe_queue_entry has information about the client and retries but the packet is buffered using entries from MessagePool. We could not use a single pool because we need to enqueue the packets but we need additional information as well such as how many retransmits have been attempted. - om_p _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help