hello, i have a strange problem and it's the first time i see it!!! here is my
application code which is supposed to receive data from the network and send it
back to the usb port, but there is a problem with the startDone event which i
can't understand.
#include "TestSerial.h"
module TestSerialC { uses { interface SplitControl as Control; interface
Leds; interface Boot; interface Receive; interface AMSend;
interface Packet; }}implementation {
message_t packet;
bool locked = FALSE; event void Boot.booted() {call Leds.led1Toggle();
call Control.start(); }
event message_t* Receive.receive(message_t* bufPtr, void* payload, uint8_t
len) {
call Leds.led2Toggle();locked = TRUE; return bufPtr; }
event void AMSend.sendDone(message_t* bufPtr, error_t error) { if (&packet
== bufPtr) { locked = FALSE; } }
event void Control.startDone(error_t err) {if (err == SUCCESS) { call
Leds.led0Toggle(); } else { call Control.start();call
Leds.led0Off(); } } event void Control.stopDone(error_t err) {}}
#include "TestSerial.h"
configuration TestSerialAppC {}implementation { components TestSerialC as App,
LedsC, MainC; components SerialActiveMessageC as AM; components new
AMReceiverC(AM_TEST_SERIAL_MSG);components ActiveMessageC; App.Boot ->
MainC.Boot; App.Control -> ActiveMessageC; App.Receive ->
AMReceiverC; App.AMSend -> AM.AMSend[AM_TEST_SERIAL_MSG]; App.Leds ->
LedsC; App.Packet -> AM;}
please if any one had faced this problem helps me.thanks a lot.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help