Index: apps/Oscilloscope/OscilloscopeM.nc =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Oscilloscope/OscilloscopeM.nc,v retrieving revision 1.3 diff -u -r1.3 OscilloscopeM.nc --- apps/Oscilloscope/OscilloscopeM.nc 7 Oct 2003 21:44:58 -0000 1.3 +++ apps/Oscilloscope/OscilloscopeM.nc 24 Nov 2004 01:53:35 -0000 @@ -113,9 +113,9 @@ } task void dataTask() { - struct OscopeMsg *pack; + nw_struct OscopeMsg *pack; atomic { - pack = (struct OscopeMsg *)msg[currentMsg].data; + pack = (nw_struct OscopeMsg *)msg[currentMsg].data; packetReadingNumber = 0; pack->lastSampleNumber = readingNumber; } @@ -127,7 +127,7 @@ * failure immediately if the packet could not be queued for * transmission. */ - if (call DataMsg.send(TOS_UART_ADDR, sizeof(struct OscopeMsg), + if (call DataMsg.send(TOS_UART_ADDR, sizeof(nw_struct OscopeMsg), &msg[currentMsg])) { atomic { @@ -144,9 +144,9 @@ * @return Always returns SUCCESS. */ async event result_t ADC.dataReady(uint16_t data) { - struct OscopeMsg *pack; + nw_struct OscopeMsg *pack; atomic { - pack = (struct OscopeMsg *)msg[currentMsg].data; + pack = (nw_struct OscopeMsg *)msg[currentMsg].data; pack->data[packetReadingNumber++] = data; readingNumber++; dbg(DBG_USR1, "data_event\n"); Index: apps/Oscilloscope/OscopeMsg.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Oscilloscope/OscopeMsg.h,v retrieving revision 1.2 diff -u -r1.2 OscopeMsg.h --- apps/Oscilloscope/OscopeMsg.h 7 Oct 2003 21:44:58 -0000 1.2 +++ apps/Oscilloscope/OscopeMsg.h 24 Nov 2004 01:53:35 -0000 @@ -44,15 +44,15 @@ BUFFER_SIZE = 10 }; -struct OscopeMsg +nw_struct OscopeMsg { - uint16_t sourceMoteID; - uint16_t lastSampleNumber; - uint16_t channel; - uint16_t data[BUFFER_SIZE]; + nw_uint16_t sourceMoteID; + nw_uint16_t lastSampleNumber; + nw_uint8_t channel; + nw_uint16_t data[BUFFER_SIZE]; }; -struct OscopeResetMsg +nw_struct OscopeResetMsg { /* Empty payload! */ }; Index: apps/OscilloscopeRF/OscilloscopeM.nc =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/OscilloscopeRF/OscilloscopeM.nc,v retrieving revision 1.3 diff -u -r1.3 OscilloscopeM.nc --- apps/OscilloscopeRF/OscilloscopeM.nc 7 Oct 2003 21:44:58 -0000 1.3 +++ apps/OscilloscopeRF/OscilloscopeM.nc 24 Nov 2004 01:53:35 -0000 @@ -113,9 +113,9 @@ } task void dataTask() { - struct OscopeMsg *pack; + nw_struct OscopeMsg *pack; atomic { - pack = (struct OscopeMsg *)msg[currentMsg].data; + pack = (nw_struct OscopeMsg *)msg[currentMsg].data; packetReadingNumber = 0; pack->lastSampleNumber = readingNumber; } @@ -127,7 +127,7 @@ * failure immediately if the packet could not be queued for * transmission. */ - if (call DataMsg.send(TOS_BCAST_ADDR, sizeof(struct OscopeMsg), + if (call DataMsg.send(TOS_BCAST_ADDR, sizeof(nw_struct OscopeMsg), &msg[currentMsg])) { atomic { @@ -144,9 +144,9 @@ * @return Always returns SUCCESS. */ async event result_t ADC.dataReady(uint16_t data) { - struct OscopeMsg *pack; + nw_struct OscopeMsg *pack; atomic { - pack = (struct OscopeMsg *)msg[currentMsg].data; + pack = (nw_struct OscopeMsg *)msg[currentMsg].data; pack->data[packetReadingNumber++] = data; readingNumber++; dbg(DBG_USR1, "data_event\n"); Index: apps/Surge/Makefile =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Surge/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- apps/Surge/Makefile 7 Oct 2003 21:45:11 -0000 1.6 +++ apps/Surge/Makefile 24 Nov 2004 01:53:35 -0000 @@ -2,6 +2,6 @@ #SENSORBOARD=basicsb SENSORBOARD=micasb -PFLAGS= -I%T/lib/Route -I%T/lib/Queue -I%T/lib/Broadcast +PFLAGS= -I%T/lib/MintRoute -I%T/lib/Queue -I%T/lib/Broadcast include ../Makerules Index: apps/Surge/Surge.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Surge/Surge.h,v retrieving revision 1.8 diff -u -r1.8 Surge.h --- apps/Surge/Surge.h 7 Oct 2003 21:45:11 -0000 1.8 +++ apps/Surge/Surge.h 24 Nov 2004 01:53:35 -0000 @@ -48,11 +48,11 @@ }; -typedef struct SurgeMsg { - uint8_t type; - uint16_t reading; - uint16_t parentaddr; -} __attribute__ ((packed)) SurgeMsg; +typedef nw_struct SurgeMsg { + nw_uint8_t type; + nw_uint16_t reading; + nw_uint16_t parentaddr; +} SurgeMsg; enum { AM_SURGEMSG = 17 Index: apps/Surge/Surge.nc =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Surge/Surge.nc,v retrieving revision 1.7 diff -u -r1.7 Surge.nc --- apps/Surge/Surge.nc 7 Oct 2003 21:45:11 -0000 1.7 +++ apps/Surge/Surge.nc 24 Nov 2004 01:53:35 -0000 @@ -39,8 +39,8 @@ configuration Surge { } implementation { - components Main, SurgeM, TimerC, LedsC, NoLeds, Photo, RandomLFSR, - GenericCommPromiscuous as Comm, Bcast, MultiHopRouter as multihopM, QueuedSend, Sounder; + components Main, SurgeM, TimerC, LedsC, NoLeds, DemoSensorC as Photo, RandomLFSR, + GenericCommPromiscuous as Comm, Bcast, WMEWMAMultiHopRouter as multihopM, QueuedSend; Main.StdControl -> SurgeM.StdControl; Main.StdControl -> Photo; @@ -54,7 +54,6 @@ SurgeM.ADC -> Photo; SurgeM.Timer -> TimerC.Timer[unique("Timer")]; SurgeM.Leds -> LedsC; // NoLeds; - SurgeM.Sounder -> Sounder; SurgeM.Bcast -> Bcast.Receive[AM_SURGECMDMSG]; Bcast.ReceiveMsg[AM_SURGECMDMSG] -> Comm.ReceiveMsg[AM_SURGECMDMSG]; Index: apps/Surge/SurgeM.nc =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/apps/Surge/SurgeM.nc,v retrieving revision 1.8 diff -u -r1.8 SurgeM.nc --- apps/Surge/SurgeM.nc 7 Oct 2003 21:45:11 -0000 1.8 +++ apps/Surge/SurgeM.nc 24 Nov 2004 01:53:35 -0000 @@ -44,7 +44,6 @@ interface ADC; interface Timer; interface Leds; - interface StdControl as Sounder; interface Send; interface Receive as Bcast; interface RouteControl; @@ -86,7 +85,7 @@ uint16_t Len; dbg(DBG_USR1, "SurgeM: Sending sensor reading\n"); - if (pReading = (SurgeMsg *)call Send.getBuffer(&gMsgBuffer,&Len)) { + if ((pReading = (SurgeMsg *)call Send.getBuffer(&gMsgBuffer,&Len))) { pReading->type = SURGE_TYPE_SENSORREADING; pReading->parentaddr = call RouteControl.getParent(); pReading->reading = gSensorData; @@ -117,17 +116,14 @@ event result_t Timer.fired() { dbg(DBG_USR1, "SurgeM: Timer fired\n"); + call Leds.redToggle(); timer_ticks++; if (timer_ticks % TIMER_GETADC_COUNT == 0) { call ADC.getData(); } - // If we're the focused node, chirp - if (focused && timer_ticks % TIMER_CHIRP_COUNT == 0) { - call Sounder.start(); - } - // If we're the focused node, chirp - if (focused && timer_ticks % TIMER_CHIRP_COUNT == 1) { - call Sounder.stop(); + // If we're the focused node, blink + if (focused) { + call Leds.yellowToggle(); } return SUCCESS; } @@ -148,7 +144,7 @@ event result_t Send.sendDone(TOS_MsgPtr pMsg, result_t success) { dbg(DBG_USR2, "SurgeM: output complete 0x%x\n", success); - //call Leds.greenToggle(); + call Leds.greenToggle(); atomic gfSendBusy = FALSE; return SUCCESS; } @@ -194,7 +190,6 @@ if (pCmdMsg->args.focusaddr == TOS_LOCAL_ADDRESS) { // OK, we're focusing on me focused = TRUE; - call Sounder.init(); call Timer.stop(); call Timer.start(TIMER_REPEAT, FOCUS_TIMER_RATE); } else { @@ -207,7 +202,7 @@ // Return to normal after focus command dbg(DBG_USR2, "SurgeM: unfocus\n"); focused = FALSE; - call Sounder.stop(); + call Leds.yellowOff(); call Timer.stop(); call Timer.start(TIMER_REPEAT, timer_rate); } Index: tos/lib/Broadcast/Bcast.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/Broadcast/Bcast.h,v retrieving revision 1.3 diff -u -r1.3 Bcast.h --- tos/lib/Broadcast/Bcast.h 7 Oct 2003 21:46:17 -0000 1.3 +++ tos/lib/Broadcast/Bcast.h 24 Nov 2004 01:53:36 -0000 @@ -46,9 +46,9 @@ #include "AM.h" -typedef struct _BcastMsg { - int16_t seqno; - uint8_t data[(TOSH_DATA_LENGTH-2)]; -} __attribute__ ((packed)) TOS_BcastMsg; +typedef nw_struct _BcastMsg { + nw_int16_t seqno; + nw_uint8_t data[(TOSH_DATA_LENGTH-2)]; +} TOS_BcastMsg; #endif /* _TOS_BCAST_H */ Index: tos/lib/Counters/IntMsg.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/Counters/IntMsg.h,v retrieving revision 1.3 diff -u -r1.3 IntMsg.h --- tos/lib/Counters/IntMsg.h 30 May 2004 00:32:15 -0000 1.3 +++ tos/lib/Counters/IntMsg.h 24 Nov 2004 01:53:36 -0000 @@ -43,9 +43,9 @@ * @author Philip Levis */ -typedef struct IntMsg { - uint16_t val; - uint16_t src; +typedef nw_struct IntMsg { + nw_uint8_t src; + nw_uint16_t val; } IntMsg; enum { Index: tos/lib/MintRoute/MultiHop.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/MintRoute/MultiHop.h,v retrieving revision 1.2 diff -u -r1.2 MultiHop.h --- tos/lib/MintRoute/MultiHop.h 30 Nov 2003 00:03:23 -0000 1.2 +++ tos/lib/MintRoute/MultiHop.h 24 Nov 2004 01:53:36 -0000 @@ -57,18 +57,18 @@ uint8_t timeouts; // since last recv } TOS_MHopNeighbor; -typedef struct MultihopMsg { - uint16_t sourceaddr; - uint16_t originaddr; - int16_t seqno; - uint8_t hopcount; - uint8_t data[(TOSH_DATA_LENGTH - 7)]; -} __attribute__ ((packed)) TOS_MHopMsg; +typedef nw_struct MultihopMsg { + nw_uint16_t sourceaddr; + nw_uint16_t originaddr; + nw_int16_t seqno; + nw_uint8_t hopcount; + nw_uint8_t data[(TOSH_DATA_LENGTH - 7)]; +} TOS_MHopMsg; -typedef struct DBGEstEntry { - uint16_t id; - uint8_t hopcount; - uint8_t sendEst; +typedef nw_struct DBGEstEntry { + nw_uint16_t id; + nw_uint8_t hopcount; + nw_uint8_t sendEst; } __attribute__ ((packed)) DBGEstEntry; Index: tos/lib/MintRoute/MultiHopEngineM.nc =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/MintRoute/MultiHopEngineM.nc,v retrieving revision 1.1 diff -u -r1.1 MultiHopEngineM.nc --- tos/lib/MintRoute/MultiHopEngineM.nc 20 Nov 2003 08:16:06 -0000 1.1 +++ tos/lib/MintRoute/MultiHopEngineM.nc 24 Nov 2004 01:53:36 -0000 @@ -41,7 +41,7 @@ includes MultiHop; #ifndef MHOP_QUEUE_SIZE -#define MHOP_QUEUE_SIZE 16 +#define MHOP_QUEUE_SIZE 4 #endif module MultiHopEngineM {