[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/mac/tkn154 TKN154_MAC.h, 1.5, 1.6
Jan-Hinrich Hauer
janhauer at users.sourceforge.net
Wed Mar 25 02:27:28 PDT 2009
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/telosb/mac/tkn154 platform_message.h, 1.2, 1.3
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19131/tos/lib/mac/tkn154
Modified Files:
TKN154_MAC.h
Log Message:
updated the ASSERT(X) statement for cases when debugging is disabled (the previous variant generated a warning on micaz)
Index: TKN154_MAC.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/mac/tkn154/TKN154_MAC.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TKN154_MAC.h 24 Mar 2009 12:56:47 -0000 1.5
--- TKN154_MAC.h 25 Mar 2009 09:27:26 -0000 1.6
***************
*** 292,296 ****
* ATTENTION! Debugging over serial is a lot of overhead. To
* keep it simple, here are the rules you have to follow when
! * using the dbg_serial() command:
*
* - dbg_serial() is used like dbg(), i.e. you pass it at least
--- 292,296 ----
* ATTENTION! Debugging over serial is a lot of overhead. To
* keep it simple, here are the rules you have to follow when
! * using the dbg_serial() macro:
*
* - dbg_serial() is used like dbg(), i.e. you pass it at least
***************
*** 303,318 ****
* called; try to call it when the system is idle or at least
* when no time-critical operations are pending
! * - on the PC use the printf java client to display the text
! * (see tinyos-2.x/apps/tests/TestPrintf/README.txt)
*
* The ASSERT(X) macro is used to test for errors. If X evaluates
* to zero, then 3 leds start blinking simulataneously (about 2Hz)
! * and the node *continuously* outputs over serial the filename+line
* where the (first) ASSERT has failed. This means, even if your
* TelosB was not attached to your PC while the ASSERT failed you
! * can still pull the information out later.
*
! * All dbg_serial() and ASSERT() statements are removed, if
! * TKN154_DEBUG is not defined (which is the default).
**/
--- 303,320 ----
* called; try to call it when the system is idle or at least
* when no time-critical operations are pending
! * - on the PC use the printf java client to display the debug
! * output (see tinyos-2.x/apps/tests/TestPrintf/README.txt)
*
* The ASSERT(X) macro is used to test for errors. If X evaluates
* to zero, then 3 leds start blinking simulataneously (about 2Hz)
! * and the node *continuously* outputs over serial the filename/line
* where the (first) ASSERT has failed. This means, even if your
* TelosB was not attached to your PC while the ASSERT failed you
! * can typically still pull the information out later.
*
! * If TKN154_DEBUG is not defined (which is the default), then
! * dbg_serial() maps to dbg(), i.e. is completely removed unless
! * the platform is TOSSIM, and in the ASSERT(X) statement X is
! * evaluated/executed, but the result is ignored.
**/
***************
*** 325,329 ****
#define dbg_serial_flush() tkn154_dbg_serial_flush()
#else
! #define ASSERT(X) if ((X)==0){}
#define dbg_serial(m, ...) dbg(m, __VA_ARGS__)
#define dbg_serial_flush()
--- 327,332 ----
#define dbg_serial_flush() tkn154_dbg_serial_flush()
#else
! // Note: in an ASSERT(X) the X must always be evaluated/executed!
! #define ASSERT(X) while(!(X)){ break;}
#define dbg_serial(m, ...) dbg(m, __VA_ARGS__)
#define dbg_serial_flush()
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/telosb/mac/tkn154 platform_message.h, 1.2, 1.3
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list