Hi,
Who is using this Receive interface?
The Receive interface should be called above layer2 (AMStandard).
If you are talking about using a simple send/receive application,
what you need is ReceiveMsg/SendMsg interface.
If you really want to use Receive interface, you have to signal
Receive.receive somewhere.
For example,
event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr msg) {
signal Receive.receive(msg, msg->data, msg->length);
return msg;
}
Regards,
Krisakorn
On 11/17/05, Alex Mason <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to perform some action on the receive event. Nothing was
> working, so I tried writing a small program that just sends a message every
> second. So I thought, I'll light the green LED to signify when a message
> has been received. So, the relevant code for this that I have:
>
>
> USES: interface Receive;
>
>
> event TOS_MsgPtr Receive.receive(TOS_MsgPtr msg, void* payload, uint16_t
> payloadLen) {
> TOS_MsgPtr pMsg;
>
> // msg should have been received - toggle LED
> call Leds.greenToggle();
>
> return pMsg;
> }
>
> To me that looks simple and should work, but hopefully someone can enlighten
> me!
>
> TIA,
>
> ----------
> Alex Mason
> Postgraduate Research
> RFID & Wireless Sensor Networks
> Liverpool John Moores University
>
> Email: [EMAIL PROTECTED]
> Phone: +447886389484
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help