Hi, All.

I believe the program for reciprocating the packet in TinyOS.
But it was confirmed transmission of the first packet received, but do 
not seem to be at the receiving end.
I will put the program down.Why not be received?

a(Send first):
----------------------------------------------------------------
                         .
             .
                         .

        command result_t StdControl.start(){
                 call Timer.start(TIMER_ONE_SHOT,1000);
                 return SUCCESS; 
         }
         command result_t StdControl.stop(){
                 call Timer.stop();
                return SUCCESS; 
         }
        event result_t Timer.fired(){
                call SendMsg.send(TOS_BCAST_ADDR, sizeof(IntMsg),m2))
                call Leds.yellow();
                return SUCCESS;
         }
        event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m){
                call Leds.greenToggle();
                call SendMsg.send(TOS_BCAST_ADDR, sizeof(IntMsg),m);
                return m;
         }
        event result_t SendMsg.sendDone(TOS_MsgPtr msg, bool success){
                 call Leds.redToggle();
                 return success;
         }
------------------------------------------------------------------

b
------------------------------------------------------------------
                          .
                          .
                          .

        event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m){
                call Leds.greenToggle();
                call SendMsg.send(TOS_BCAST_ADDR, sizeof(IntMsg),m);
                return m;
        }
        event result_t SendMsg.sendDone(TOS_MsgPtr msg, bool success){
                call Leds.redToggle();
                return success;
        }
---------------------------------------------------------------------

typedef struct IntMsg {
  uint16_t val;
  uint16_t src;
} IntMsg;

-----------------------------------------------------------------


Thanks in advance

Masayasu Fukase





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

Reply via email to