Just curious if anyone has seen this behavior. I have been using
tosthreads with tinynodes a bit lately and I noticed that when I use
BlockingAMReceiverC, receive returns SUCCESS when a packet is sent to
the mote, but the packet payload seems to be all zeros instead of the
data I'm sending. It may be a problem with my code (which I will
continue to explore), but since tosthreads is relatively new, I
figured it might also be a bug.
If anyone has seen this, or has any ideas, please let me know.
Also, I just noticed the following code in BlockingAMReceiverImplP.nc.
Line 12 (146 in the file) caught my attention. Can you copy a
message_t struct like that? [*(p->msg) = *m]
1: event message_t* Receive.receive[uint8_t am_id](message_t* m,
void* payload, uint8_t len) {
2: syscall_t* s;
3: params_t* p;
4: if(blockForAny == TRUE)
5: s = call SystemCallQueue.find(&am_queue, INVALID_ID);
6: else
7: s = call SystemCallQueue.find(&am_queue, am_id);
8: if(s == NULL) return m;
9: p = s->params;
10: if( (p->error == EBUSY) ) {
11: call Timer.stop[s->thread->id]();
12: *(p->msg) = *m; //Can you copy a struct like this?
13: p->error = SUCCESS;
14: call SystemCall.finish(s);
15: }
16: return m;
17: }
Thanks,
Jacob
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help