On Thu, Nov 6, 2008 at 4:46 AM, Daniel Patrick <[EMAIL PROTECTED]> wrote:
> My application follow the same interface and components in the
> MultihopOscilloscope.
> Yesterday the sendDone() was signaled after I change my structure
> message to the same in the MultihopOscilloscope.
>
> typedef nx_struct mystruct {
>  nx_uint16_t version; /* Version of the interval. */
>  nx_uint16_t interval; /* Samping period. */
>  nx_uint16_t id; /* Mote id of sending mote. */
>  nx_uint16_t count; /* The readings are samples count * NREADINGS onwards */
>  nx_uint16_t readings[NREADINGS];
> } mystruct_t;
>
> My real struct is:
>
> typedef nx_struct mystruct {
>  nx_uint8_t id;
>  nx_uint8_t data[DATA_LEN];
>  nx_uint16_t counter;
> } mystruct_t;
>
> Is this any relationship? Because when I send a message I take the
> message sizeof() as follow:
>
>  mystruct_t payloadmsg;
>  setPayload(&payloadmsg);
>  ......
>  mystruct_t *o = (mystruct_t *)call Send.getPayload(&datamsg,
> sizeof(mystruct_t));
>  memcpy(o, &payloadmsg, sizeof(payloadmsg));
>  if (call Send.send(&datamsg, sizeof(payloadmsg)) == SUCCESS)
>          sendbusy = TRUE;
>  else
>          report_problem();
>

What is the size of your structure?

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

Reply via email to