Hi people!

I'm in a project to implement a network with some mica2 motes (one of them
as a base station).I need to send a constant from base to sensors, but I
can't take the data from the message I receive. I pick and modify the
default lesson3 code that comes on PN2 and I add the following code:

event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr msg){
//atomic constant= msg->XDataMsg;
return msg;
}
I have tried the commented text but doesn't work. The struct of the message
received is:

typedef struct XDataMsg{
  uint8_t  board_id;
  uint8_t  packet_id;
  uint8_t  node_id;
  uint8_t  rsvd;
  uint16_t vref;
  uint16_t constant;
}__attribute__ ((packed)) XDataMsg;

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

Reply via email to