[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/lqi LQIMultiHopRouter.nc, 1.1, 1.2 MultiHop.h, 1.1, 1.2 MultiHopEngineM.nc, 1.1, 1.2 MultiHopLQI.nc, 1.1, 1.2

Phil Levis scipio at users.sourceforge.net
Thu Feb 15 10:53:28 PST 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16230

Modified Files:
	LQIMultiHopRouter.nc MultiHop.h MultiHopEngineM.nc 
	MultiHopLQI.nc 
Log Message:
Needed to initialize engine. Fixed bug in packet length calculation that
was preventing transmissions.


Index: LQIMultiHopRouter.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/LQIMultiHopRouter.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LQIMultiHopRouter.nc	15 Feb 2007 01:27:26 -0000	1.1
--- LQIMultiHopRouter.nc	15 Feb 2007 18:53:26 -0000	1.2
***************
*** 59,63 ****
      new AMReceiverC(AM_DATAMSG) as DataReceiver,
      new TimerMilliC(), 
!     NoLedsC as LedsC,
      RandomC,
      ActiveMessageC,
--- 59,63 ----
      new AMReceiverC(AM_DATAMSG) as DataReceiver,
      new TimerMilliC(), 
!     NoLedsC, LedsC,
      RandomC,
      ActiveMessageC,
***************
*** 65,68 ****
--- 65,69 ----
  
    MainC.SoftwareInit -> MultiHopEngineM;
+   MainC.SoftwareInit -> MultiHopLQI;
    
    components CC2420ActiveMessageC as CC2420;
***************
*** 96,98 ****
--- 97,100 ----
    MultiHopLQI.AMPacket -> ActiveMessageC;
    MultiHopLQI.Packet -> ActiveMessageC;
+   MultiHopLQI.Leds -> NoLedsC;
  }

Index: MultiHop.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/MultiHop.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MultiHop.h	15 Feb 2007 01:27:26 -0000	1.1
--- MultiHop.h	15 Feb 2007 18:53:26 -0000	1.2
***************
*** 84,88 ****
    nx_uint16_t cost;
    nx_uint16_t hopcount;
-   nx_uint32_t timestamp;
  } beacon_msg_t;
  
--- 84,87 ----

Index: MultiHopEngineM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/MultiHopEngineM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MultiHopEngineM.nc	15 Feb 2007 01:27:26 -0000	1.1
--- MultiHopEngineM.nc	15 Feb 2007 18:53:26 -0000	1.2
***************
*** 120,127 ****
    command error_t Send.send(message_t* pMsg, uint8_t len) {
      len += sizeof(lqi_header_t);
!     if (len > call Packet.maxPayloadLength()) {
        return ESIZE;
      }
      if (call RootControl.isRoot()) {
        return FAIL;
      }
--- 120,129 ----
    command error_t Send.send(message_t* pMsg, uint8_t len) {
      len += sizeof(lqi_header_t);
!     if (len > call SubPacket.maxPayloadLength()) {
!       call Leds.led0On();
        return ESIZE;
      }
      if (call RootControl.isRoot()) {
+       call Leds.led1On();
        return FAIL;
      }
***************
*** 129,132 ****
--- 131,135 ----
      
      if (call RouteSelect.selectRoute(pMsg, 0) != SUCCESS) {
+       call Leds.led2On();
        return FAIL;
      }
***************
*** 169,173 ****
      message_t* newMsg = msg;
      int8_t buf = get_buff();
! 
      if (call RootControl.isRoot()) {
        return signal Receive.receive(msg, call Packet.getPayload(msg, NULL), call Packet.payloadLength(msg));
--- 172,177 ----
      message_t* newMsg = msg;
      int8_t buf = get_buff();
!     call Leds.led2Toggle();
!     
      if (call RootControl.isRoot()) {
        return signal Receive.receive(msg, call Packet.getPayload(msg, NULL), call Packet.payloadLength(msg));

Index: MultiHopLQI.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/MultiHopLQI.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MultiHopLQI.nc	15 Feb 2007 01:27:26 -0000	1.1
--- MultiHopLQI.nc	15 Feb 2007 18:53:26 -0000	1.2
***************
*** 56,59 ****
--- 56,60 ----
      interface LqiRouteStats;
      interface CC2420Packet;
+     interface Leds;
    }
  }
***************
*** 191,194 ****
--- 192,196 ----
  
    command error_t RootControl.setRoot() {
+     call Leds.led2On();
      isRoot = TRUE;
      return SUCCESS;



More information about the Tinyos-2-commits mailing list