[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
CollectionDebugMsg.h, 1.1.2.1, 1.1.2.2 UARTDebugSenderP.nc,
1.1.2.1, 1.1.2.2
Rodrigo Fonseca
rfonseca76 at users.sourceforge.net
Wed Jun 14 14:13:35 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
CollectionDebug.nc, NONE, 1.1.2.1 UARTDebugSenderP.nc, NONE,
1.1.2.1 TreeCollectionC.nc, 1.1.2.14,
1.1.2.15 TreeRoutingEngineP.nc, 1.1.2.9, 1.1.2.10
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep103.txt, 1.1.2.10,
1.1.2.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20164
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
CollectionDebugMsg.h UARTDebugSenderP.nc
Log Message:
Added other logging methods to UARTDebuggSenderP. Small changes in CollectionMessage.h"
Index: CollectionDebugMsg.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/CollectionDebugMsg.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** CollectionDebugMsg.h 14 Jun 2006 18:57:44 -0000 1.1.2.1
--- CollectionDebugMsg.h 14 Jun 2006 21:13:33 -0000 1.1.2.2
***************
*** 23,27 ****
NET_C_TREE_ROUTE_INFO = 0x32, //:periodic:parent_id, hopcount, metric
! NET_C_DBG_1 = 0x40, //:any :uint16_t a, b, c
NET_C_DBG_2 = 0x41, //:any :uint16_t a, b, c
NET_C_DBG_3 = 0x42, //:any :uint16_t a, b, c
--- 23,27 ----
NET_C_TREE_ROUTE_INFO = 0x32, //:periodic:parent_id, hopcount, metric
! NET_C_DBG_1 = 0x40, //:any :uint16_t a
NET_C_DBG_2 = 0x41, //:any :uint16_t a, b, c
NET_C_DBG_3 = 0x42, //:any :uint16_t a, b, c
***************
*** 35,45 ****
nx_uint16_t msg_uid;
nx_am_addr_t origin;
! nx_am_addr_t last_hop;
! } msg_send;
! nx_struct {
! nx_uint16_t msg_uid;
! nx_am_addr_t origin;
! nx_am_addr_t last_hop;
! } msg_rcv;
nx_struct {
nx_am_addr_t parent;
--- 35,40 ----
nx_uint16_t msg_uid;
nx_am_addr_t origin;
! nx_am_addr_t other_node;
! } msg;
nx_struct {
nx_am_addr_t parent;
Index: UARTDebugSenderP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/UARTDebugSenderP.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** UARTDebugSenderP.nc 14 Jun 2006 20:53:16 -0000 1.1.2.1
--- UARTDebugSenderP.nc 14 Jun 2006 21:13:33 -0000 1.1.2.2
***************
*** 25,28 ****
--- 25,29 ----
if (busy)
return FAIL;
+ memset(dbg_msg, 0, len);
dbg_msg->type = type;
if (call UARTSend.send(AM_BROADCAST_ADDR, &uartPacket, len) != SUCCESS) {
***************
*** 32,45 ****
--- 33,92 ----
return SUCCESS;
}
+ /* Used for FE_SENT_MSG, FE_RCV_MSG, FE_FWD_MSG, FE_DST_MSG */
command error_t CollectionDebug.logEventMsg(uint8_t type, uint16_t msg_id, am_addr_t origin, am_addr_t node) {
+ if (busy)
+ return FAIL;
+ memset(dbg_msg, 0, len);
+ dbg_msg->type = type;
+ dbg_msg->data.msg.msg_uid = msg_id;
+ dbg_msg->data.msg.origin = origin;
+ dbg_msg->data.msg.other_node = node;
+ if (call UARTSend.send(AM_BROADCAST_ADDR, &uartPacket, len) != SUCCESS) {
+ return FAIL;
+ }
+ busy = TRUE;
return SUCCESS;
}
+ /* Used for TREE_NEW_PARENT, TREE_ROUTE_INFO */
command error_t CollectionDebug.logEventRoute(uint8_t type, am_addr_t parent, uint8_t hopcount, uint16_t metric) {
+ if (busy)
+ return FAIL;
+ memset(dbg_msg, 0, len);
+ dbg_msg->type = type;
+ dbg_msg->data.route_info.parent = parent;
+ dbg_msg->data.route_info.hopcount = hopcount;
+ dbg_msg->data.route_info.metric = metric;
+ if (call UARTSend.send(AM_BROADCAST_ADDR, &uartPacket, len) != SUCCESS) {
+ return FAIL;
+ }
+ busy = TRUE;
return SUCCESS;
}
+ /* Used for DBG_1 */
command error_t CollectionDebug.logEventSimple(uint8_t type, uint16_t arg) {
+ if (busy)
+ return FAIL;
+ memset(dbg_msg, 0, len);
+ dbg_msg->type = type;
+ dbg_msg->data.arg = arg;
+ if (call UARTSend.send(AM_BROADCAST_ADDR, &uartPacket, len) != SUCCESS) {
+ return FAIL;
+ }
+ busy = TRUE;
return SUCCESS;
}
+ /* Used for DBG_2, DBG_3 */
command error_t CollectionDebug.logEventDbg(uint8_t type, uint16_t arg1, uint16_t arg2, uint16_t arg3) {
+ if (busy)
+ return FAIL;
+ memset(dbg_msg, 0, len);
+ dbg_msg->type = type;
+ dbg_msg->data.dbg.a = arg1;
+ dbg_msg->data.dbg.b = arg2;
+ dbg_msg->data.dbg.c = arg3;
+ if (call UARTSend.send(AM_BROADCAST_ADDR, &uartPacket, len) != SUCCESS) {
+ return FAIL;
+ }
+ busy = TRUE;
return SUCCESS;
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
CollectionDebug.nc, NONE, 1.1.2.1 UARTDebugSenderP.nc, NONE,
1.1.2.1 TreeCollectionC.nc, 1.1.2.14,
1.1.2.15 TreeRoutingEngineP.nc, 1.1.2.9, 1.1.2.10
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep103.txt, 1.1.2.10,
1.1.2.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list