Till Maas ha scritto:
> On Thu, Nov 19, 2009 at 11:46:39AM +0100, wafa jaballah wrote:
>
>> I have to send Two types of packets . The send Command runs successfully and
>> the event sendDone was signaled (the two types of packets were sent
>> successfully).
>>
>> But , the problem is that in the receive command, I only receive the type of
>> packets that I have first sent.So, I don't receive the second type of
>> packets.
>> I verified the send command and receive command but I don't know what is the
>> problem.
>>
>> Have someone encounter this error. What could be the problem?
Yep, recently.
My problem was that I was sending two "types" of packets (by which I
mean "with a different am_id_t") and due to a typo I was always sending
them with Type1Sender.send()
If that's your case, check the length of the packets you receive - they
are likely different, you'll see that Receiver1.receive gets packet that
match sizeof(MsgType2).
You can then either check that you're sending with the proper component,
or make the messages the same size and add a "type" field.
>
> You make it a lot easier to help you, if you provide the sourcecode of a
> minimal component that compiles and reproduces the problem. Also you
> should mention how you test your application.
Definitely!
Not only you make life easier for the people who try to help you, you're
also likely to find the solution yourself while writing a minimal
program with the same problem ("doh! how could I not notice *that*?").
>
> Regards
> Till
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help