[Tinyos-help] TOS_Msg size
Bhavish Aggarwal
bhavishaggarwal at gmail.com
Sun Oct 14 14:26:53 PDT 2007
Hi,
I've been trying to send a TOS_Msg struct over wires between 2 tmote
sky nodes. One thing I am not sure about is what is the size of
TOS_Msg packet that will be transmitted? I will be extremely thankful
for any help on this issue.
To transmit, I am doing the following:
typedef struct{
uint8_t val;
}datanew;
TOS_MsgPtr msg;
body = (datanew*) msg->data;
body->val = 1;
packet = (uint8_t*) msg;
length = sizeof(msg);
while(length > 0){
call UartControl.tx(packet[sendCount]);
while (! call UartControl.isTxEmpty() ) ;
length--;
sendCount++;
}
More information about the Tinyos-help
mailing list