[Tinyos-2-commits] CVS: tinyos-2.x/apps/RadioSenseToLeds Makefile, 1.1.2.4, 1.1.2.5 README.txt, 1.1.2.1, 1.1.2.2 RadioSenseToLeds.h, 1.1.2.3, 1.1.2.4 RadioSenseToLedsAppC.nc, 1.1.2.9, 1.1.2.10 RadioSenseToLedsC.nc, 1.1.2.6, 1.1.2.7

Kevin Klues klueska at users.sourceforge.net
Mon Oct 30 09:05:46 PST 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10378/RadioSenseToLeds

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	Makefile README.txt RadioSenseToLeds.h RadioSenseToLedsAppC.nc 
	RadioSenseToLedsC.nc 
Log Message:
Updates of TestAM, RadioCountToLeds, RadioSenseToLeds, and TestArbiter files to contain README files and adhere to TEP3



Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/Makefile,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** Makefile	29 Jan 2006 20:30:58 -0000	1.1.2.4
--- Makefile	30 Oct 2006 17:05:43 -0000	1.1.2.5
***************
*** 3,7 ****
  
  RadioSenseMsg.py: RadioSenseToLeds.h
! 	mig python -target=$(PLATFORM) $(CFLAGS) -python-classname=RadioSenseMsg RadioSenseToLeds.h RadioSenseMsg -o $@
  
  RadioSenseMsg.class: RadioSenseMsg.java
--- 3,7 ----
  
  RadioSenseMsg.py: RadioSenseToLeds.h
! 	mig python -target=$(PLATFORM) $(CFLAGS) -python-classname=RadioSenseMsg RadioSenseToLeds.h radio_sense_msg -o $@
  
  RadioSenseMsg.class: RadioSenseMsg.java
***************
*** 9,13 ****
  
  RadioSenseMsg.java: RadioSenseToLeds.h
! 	mig java -target=$(PLATFORM) $(CFLAGS) -java-classname=RadioSenseMsg RadioSenseToLeds.h RadioSenseMsg -o $@
  
  
--- 9,13 ----
  
  RadioSenseMsg.java: RadioSenseToLeds.h
! 	mig java -target=$(PLATFORM) $(CFLAGS) -java-classname=RadioSenseMsg RadioSenseToLeds.h radio_sense_msg -o $@
  
  

Index: README.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/README.txt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** README.txt	29 Jan 2006 20:30:58 -0000	1.1.2.1
--- README.txt	30 Oct 2006 17:05:44 -0000	1.1.2.2
***************
*** 5,12 ****
  
  RadioSenseToLeds samples a platform's default sensor at 4Hz and broadcasts
! this value in an AM packet.
! A RadioSenseToLeds node that hears a counter displays the bottom three bits
! on its LEDs. This application is a useful test to show that basic AM 
! communication, timers, and the default sensor work.
  
  Tools:
--- 5,12 ----
  
  RadioSenseToLeds samples a platform's default sensor at 4Hz and broadcasts
! this value in an AM packet. A RadioSenseToLeds node that hears a broadcast 
! displays the bottom three bits of the value it has received. This application 
! is a useful test to show that basic AM communication, timers, and the default 
! sensor work.
  
  Tools:

Index: RadioSenseToLeds.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/RadioSenseToLeds.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** RadioSenseToLeds.h	3 Feb 2006 22:53:52 -0000	1.1.2.3
--- RadioSenseToLeds.h	30 Oct 2006 17:05:44 -0000	1.1.2.4
***************
*** 2,12 ****
  #define RADIO_SENSE_TO_LEDS_H
  
! typedef nx_struct RadioSenseMsg {
    nx_uint16_t error;
    nx_uint16_t data;
! } RadioSenseMsg;
  
  enum {
!   AM_RADIOSENSEMSG = 7,
  };
  
--- 2,12 ----
  #define RADIO_SENSE_TO_LEDS_H
  
! typedef nx_struct radio_sense_msg {
    nx_uint16_t error;
    nx_uint16_t data;
! } radio_sense_msg_t;
  
  enum {
!   AM_RADIO_SENSE_MSG = 7,
  };
  

Index: RadioSenseToLedsAppC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/RadioSenseToLedsAppC.nc,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -d -r1.1.2.9 -r1.1.2.10
*** RadioSenseToLedsAppC.nc	16 Feb 2006 16:48:07 -0000	1.1.2.9
--- RadioSenseToLedsAppC.nc	30 Oct 2006 17:05:44 -0000	1.1.2.10
***************
*** 29,50 ****
   * 94704.  Attention:  Intel License Inquiry.
   */
  
  /**
!  *
   * @author Philip Levis
   * @date   June 6 2005
   */
  
- #include "RadioSenseToLeds.h"
- 
  configuration RadioSenseToLedsAppC {}
  implementation {
    components MainC, RadioSenseToLedsC as App, LedsC, new DemoSensorC();
    components ActiveMessageC;
!   components new AMSenderC(AM_RADIOSENSEMSG);
!   components new AMReceiverC(AM_RADIOSENSEMSG);
    components new TimerMilliC();
- 
-   
    
    App.Boot -> MainC.Boot;
--- 29,53 ----
   * 94704.  Attention:  Intel License Inquiry.
   */
+  
+ #include "RadioSenseToLeds.h"
  
  /**
!  * Configuration for the RadioSenseToLeds application.  RadioSenseToLeds samples 
!  * a platform's default sensor at 4Hz and broadcasts this value in an AM packet. 
!  * A RadioSenseToLeds node that hears a broadcast displays the bottom three bits 
!  * of the value it has received. This application is a useful test to show that 
!  * basic AM communication, timers, and the default sensor work.
!  * 
   * @author Philip Levis
   * @date   June 6 2005
   */
  
  configuration RadioSenseToLedsAppC {}
  implementation {
    components MainC, RadioSenseToLedsC as App, LedsC, new DemoSensorC();
    components ActiveMessageC;
!   components new AMSenderC(AM_RADIO_SENSE_MSG);
!   components new AMReceiverC(AM_RADIO_SENSE_MSG);
    components new TimerMilliC();
    
    App.Boot -> MainC.Boot;

Index: RadioSenseToLedsC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/RadioSenseToLedsC.nc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** RadioSenseToLedsC.nc	28 Jan 2006 00:26:24 -0000	1.1.2.6
--- RadioSenseToLedsC.nc	30 Oct 2006 17:05:44 -0000	1.1.2.7
***************
*** 29,48 ****
   * 94704.  Attention:  Intel License Inquiry.
   */
! 
! /**
!  *  Implementation of the OSKI RadioSenseToLeds application. This
!  *  application periodically broadcasts a reading from its platform's
!  *  demo sensor, and displays broadcasts it hears on its LEDs. It displays
!  *  the two most signficant bits of the value on LEDs 1 and 2; if there is
!  *  an error, it lights LED 0.
!  *
!  *  @author Philip Levis
!  *  @date   June 12 2005
!  *
!  **/
! 
  #include "Timer.h"
  #include "RadioSenseToLeds.h"
  
  module RadioSenseToLedsC {
    uses {
--- 29,47 ----
   * 94704.  Attention:  Intel License Inquiry.
   */
!  
  #include "Timer.h"
  #include "RadioSenseToLeds.h"
  
+ /**
+  * Implementation of the RadioSenseToLeds application.  RadioSenseToLeds samples 
+  * a platform's default sensor at 4Hz and broadcasts this value in an AM packet. 
+  * A RadioSenseToLeds node that hears a broadcast displays the bottom three bits 
+  * of the value it has received. This application is a useful test to show that 
+  * basic AM communication, timers, and the default sensor work.
+  * 
+  * @author Philip Levis
+  * @date   June 6 2005
+  */
+ 
  module RadioSenseToLedsC {
    uses {
***************
*** 68,72 ****
    event void RadioControl.startDone(error_t err) {
      if (err == SUCCESS) {
!       call MilliTimer.startPeriodic(1000);
      }
    }
--- 67,71 ----
    event void RadioControl.startDone(error_t err) {
      if (err == SUCCESS) {
!       call MilliTimer.startPeriodic(250);
      }
    }
***************
*** 82,94 ****
      }
      else {
!       RadioSenseMsg* rsm;
  
!       rsm = (RadioSenseMsg*)call Packet.getPayload(&packet, NULL);
!       if (call Packet.maxPayloadLength() < sizeof(RadioSenseMsg)) {
  	return;
        }
        rsm->error = result;
        rsm->data = data;
!       if (call AMSend.send(AM_BROADCAST_ADDR, &packet, sizeof(RadioSenseMsg)) == SUCCESS) {
  	locked = TRUE;
        }
--- 81,93 ----
      }
      else {
!       radio_sense_msg_t* rsm;
  
!       rsm = (radio_sense_msg_t*)call Packet.getPayload(&packet, NULL);
!       if (call Packet.maxPayloadLength() < sizeof(radio_sense_msg_t)) {
  	return;
        }
        rsm->error = result;
        rsm->data = data;
!       if (call AMSend.send(AM_BROADCAST_ADDR, &packet, sizeof(radio_sense_msg_t)) == SUCCESS) {
  	locked = TRUE;
        }
***************
*** 99,105 ****
  				   void* payload, uint8_t len) {
      call Leds.led1Toggle();
!     if (len != sizeof(RadioSenseMsg)) {return bufPtr;}
      else {
!       RadioSenseMsg* rsm = (RadioSenseMsg*)payload;
        uint16_t val = rsm->data;
        call Leds.led0Toggle();
--- 98,104 ----
  				   void* payload, uint8_t len) {
      call Leds.led1Toggle();
!     if (len != sizeof(radio_sense_msg_t)) {return bufPtr;}
      else {
!       radio_sense_msg_t* rsm = (radio_sense_msg_t*)payload;
        uint16_t val = rsm->data;
        call Leds.led0Toggle();



More information about the Tinyos-2-commits mailing list