A Pool won't work for me for I need more differentiated access to the buffered entries than a Pool can provide. The actual Issue that I'm having with those message_t objects I read from my buffer component is that for example after sending them to a node with address 1 I get signaled that I got no Ack for the sent packet from node 0 allthough it was send to node 1. Does that sound somehow familiar to someone?
Am 12.04.2010 um 15:13 schrieb Arik Sapojnik: > Hi, > > How about using a Pool like this: > interface Pool<message_t> > > And wire it like this: > components new PoolC(message_t, POOL_SIZE); > App.Pool -> PoolC; > > Arik > > On Mon, Apr 12, 2010 at 15:08, David Piotrowski <[email protected]> wrote: > Hi, > > I'm trying to implement a buffer for message_t structures and am having some > trouble with it. > Basicly what I want to do is create a component with an array of message_t > structures. A command like "storeMessage(message_t* msg)" would memcpy the > contents of the message pointed at by the msg-pointer to one of the message_t > structures in the array. But after reading the buffered message_t structures > out of the buffer again and sending them I get strange results. Now I wonder > whether this can be done the way I expected or whether I would have to try an > entirely different approach. Also I am not sure if message_t structures can > be handled this way or if I have to use some special interfaces/components > for handling these structures. > > Btw, using code a la > bufferedMessageT = *msg; > instead of memcpy() leads to the same results. > > Thx, David > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > > -- > Best Regards, > Arik Sapojnik
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
