[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154 DebugC.nc, 1.1, 1.2 DebugP.nc, 1.1, 1.2 DispatchUnslottedCsmaP.nc, 1.2, 1.3 IndirectTxP.nc, 1.4, 1.5
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Wed Mar 25 09:47:56 PDT 2009
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19586/tos/lib/mac/tkn154
Modified Files:
DebugC.nc DebugP.nc DispatchUnslottedCsmaP.nc IndirectTxP.nc
Log Message:
Fixed an issue with indirect transmissions in nonbeacon-enabled mode: DispatchUnslottedCsmaP didn't check whether it already had the RadioToken before making a new request
Index: DebugC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/DebugC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DebugC.nc 4 Mar 2009 18:31:22 -0000 1.1
--- DebugC.nc 25 Mar 2009 16:47:49 -0000 1.2
***************
*** 37,42 ****
}
implementation {
! components DebugP, LedsC;
DebugP.Leds -> LedsC;
}
--- 37,48 ----
}
implementation {
! components DebugP, LedsC, MainC;
! DebugP.Boot -> MainC;
DebugP.Leds -> LedsC;
+
+ #if defined(PLATFORM_TELOSB)
+ components UserButtonC;
+ DebugP.ButtonPressed -> UserButtonC;
+ #endif
}
Index: DebugP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/DebugP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DebugP.nc 4 Mar 2009 18:31:22 -0000 1.1
--- DebugP.nc 25 Mar 2009 16:47:49 -0000 1.2
***************
*** 41,47 ****
#include <varargs.h>
#endif
module DebugP {
! uses interface Leds;
}
implementation {
--- 41,56 ----
#include <varargs.h>
#endif
+ #if defined(PLATFORM_TELOSB)
+ #include <UserButton.h>
+ #endif
module DebugP {
! uses {
! interface Boot;
! interface Leds;
! #if defined(PLATFORM_TELOSB)
! interface Notify<button_state_t> as ButtonPressed;
! #endif
! }
}
implementation {
***************
*** 71,74 ****
--- 80,96 ----
norace char m_assertFunction[MAX_LEN_FUNNAME];
+ event void Boot.booted() {
+ #if defined(PLATFORM_TELOSB)
+ call ButtonPressed.enable();
+ #endif
+ }
+
+ #if defined(PLATFORM_TELOSB)
+ event void ButtonPressed.notify( button_state_t val )
+ {
+ dbg_serial_flush();
+ }
+ #endif
+
task void assertFailTask()
{
Index: DispatchUnslottedCsmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/DispatchUnslottedCsmaP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DispatchUnslottedCsmaP.nc 24 Mar 2009 12:56:46 -0000 1.2
--- DispatchUnslottedCsmaP.nc 25 Mar 2009 16:47:49 -0000 1.3
***************
*** 176,179 ****
--- 176,180 ----
status = IEEE154_SUCCESS;
}
+ dbg_serial("DispatchUnslottedCsmaP", "MLME_START.request -> result: %lu\n", (uint32_t) status);
return status;
}
***************
*** 192,196 ****
} else {
setCurrentFrame(frame);
! call RadioToken.request();
return IEEE154_SUCCESS;
}
--- 193,200 ----
} else {
setCurrentFrame(frame);
! if (call RadioToken.isOwner())
! updateState();
! else
! call RadioToken.request();
return IEEE154_SUCCESS;
}
Index: IndirectTxP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/IndirectTxP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** IndirectTxP.nc 4 Mar 2009 18:31:24 -0000 1.4
--- IndirectTxP.nc 25 Mar 2009 16:47:49 -0000 1.5
***************
*** 277,280 ****
--- 277,281 ----
uint8_t i;
// TODO: if CSMA-CA algorithm failed, then frame shall still remain in transaction queue
+ dbg_serial("IndirectTxP", "transmitDone(), status: %lu\n", (uint32_t) status);
for (i=0; i<NUM_MAX_PENDING; i++)
if (m_txFrameTable[i] == txFrame) {
***************
*** 293,297 ****
signal FrameTx.transmitDone[txFrame->client](txFrame, status);
post tryCoordCapTxTask();
- dbg_serial("IndirectTxP", "transmitDone()\n");
}
--- 294,297 ----
More information about the Tinyos-2-commits
mailing list