Hi!
On Mon, 9 Nov 2009, Ricardo . wrote:
> Hello everyone ,
>
> I'm having some difficulty in debug my application. My question is if the
> component ActiveMessageC can be used with the component
> SerialActiveMessageC, without interfere with each other?
>
> In my application when the event AMSend.sendDone (message_to * BufPtr,
> error_t error) is signal I try to print the value of the sent message, and I
> get a constant value that does not match the value sent.
>
> This is the piece of code used to obtain the value sent:
>
>
> AMSend.sendDone event void (* message_to BufPtr, error_t error) {
> radio_count_msg_t * rcm = NULL;
>
> if (& packet == BufPtr) {
> rcm = (radio_count_msg_t *) call Packet.getPayload (BufPtr, NULL);
> counter_val = rcm -> counter;
> locked = FALSE;
> post sendSerialMessage ();
> }
> }
>
Could you please also show us the sendSerialMessage task?
> In this example, counter_val is the value that will be sent by
> SerialAMSend.send (AM_BROADCAST_ADDR, & packet_one, sizeof
> (test_serial_msg_t)).
>
> Can I use both without running the risk of coming into conflict?
Yes, you should be able to use simultaneously but you need to be careful
that the message_t you pass to .send is locked until the .sendDone
is signaled.
--
Razvan ME
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help