Fixed debug output
This commit is contained in:
parent
558ebf3c5d
commit
4bd8cd32ac
4 changed files with 10 additions and 11 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: abc.c,v 1.6 2007/03/19 22:10:16 adamdunkels Exp $
|
||||
* $Id: abc.c,v 1.7 2007/03/20 12:28:13 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ abc_send(struct abc_conn *c)
|
|||
if(rimebuf_hdrextend(sizeof(struct abc_hdr))) {
|
||||
struct abc_hdr *hdr = rimebuf_hdrptr();
|
||||
|
||||
DEBUGF(1, "%d: abc: abc_send on channel %d\n", node_id, c->channel);
|
||||
DEBUGF(1, "%d: abc: abc_send on channel %d\n", rimeaddr_node_addr.u16, c->channel);
|
||||
|
||||
hdr->channel = c->channel;
|
||||
rimebuf_compact();
|
||||
|
@ -95,7 +95,7 @@ abc_input_packet(void)
|
|||
|
||||
hdr = rimebuf_dataptr();
|
||||
|
||||
DEBUGF(1, "%d: abc: abc_input_packet on channel %d\n", node_id, hdr->channel);
|
||||
DEBUGF(1, "%d: abc: abc_input_packet on channel %d\n", rimeaddr_node_addr.u16, hdr->channel);
|
||||
|
||||
if(rimebuf_hdrreduce(sizeof(struct abc_hdr))) {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ibc.c,v 1.5 2007/03/19 22:10:16 adamdunkels Exp $
|
||||
* $Id: ibc.c,v 1.6 2007/03/20 12:28:13 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ recv_from_abc(struct abc_conn *bc)
|
|||
rimeaddr_copy(&sender, &hdr->sender);
|
||||
|
||||
rimebuf_hdrreduce(sizeof(struct ibc_hdr));
|
||||
DEBUGF(1, "%d: ibc: recv_from_bc\n", node_id);
|
||||
DEBUGF(1, "%d: ibc: recv_from_bc\n", rimeaddr_node_addr.u16);
|
||||
c->u->recv(c, &sender);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -80,7 +80,7 @@ ibc_close(struct ibc_conn *c)
|
|||
int
|
||||
ibc_send(struct ibc_conn *c)
|
||||
{
|
||||
DEBUGF(1, "%d: ibc_send\n", node_id);
|
||||
DEBUGF(1, "%d: ibc_send\n", rimeaddr_node_addr.u16);
|
||||
if(rimebuf_hdrextend(sizeof(struct ibc_hdr))) {
|
||||
struct ibc_hdr *hdr = rimebuf_hdrptr();
|
||||
rimeaddr_copy(&hdr->sender, &rimeaddr_node_addr);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rime-debug.h,v 1.3 2007/03/15 19:43:07 adamdunkels Exp $
|
||||
* $Id: rime-debug.h,v 1.4 2007/03/20 12:28:13 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,6 @@
|
|||
#define __RIME_DEBUG_H__
|
||||
|
||||
#define DEBUG_LEVEL 0
|
||||
|
||||
#if DEBUG_LEVEL > 0
|
||||
#include <stdio.h>
|
||||
#define DEBUGF(level, ...) if(DEBUG_LEVEL <= level) {printf("%.*s %lu ", 6 - level, " ", clock_time() / CLOCK_SECOND); printf(__VA_ARGS__);}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uc.c,v 1.5 2007/03/19 22:10:17 adamdunkels Exp $
|
||||
* $Id: uc.c,v 1.6 2007/03/20 12:28:13 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ recv_from_ibc(struct ibc_conn *ibc, rimeaddr_t *from)
|
|||
struct uc_conn *c = (struct uc_conn *)ibc;
|
||||
struct uc_hdr *hdr = rimebuf_dataptr();
|
||||
DEBUGF(2, "%d: uc: recv_from_ibc, receiver %d %p hdr %p\n",
|
||||
node_id, hdr->receiver, c, hdr);
|
||||
rimeaddr_node_addr.u16, hdr->receiver.u16, c, hdr);
|
||||
if(rimeaddr_cmp(&hdr->receiver, &rimeaddr_node_addr)) {
|
||||
rimebuf_hdrreduce(sizeof(struct uc_hdr));
|
||||
c->u->recv(c, from);
|
||||
|
@ -79,7 +79,7 @@ uc_close(struct uc_conn *c)
|
|||
int
|
||||
uc_send(struct uc_conn *c, rimeaddr_t *receiver)
|
||||
{
|
||||
DEBUGF(2, "%d: uc_send to %d\n", node_id, receiver_id);
|
||||
DEBUGF(2, "%d: uc_send to %d\n", rimeaddr_node_addr.u16, receiver->u16);
|
||||
if(rimebuf_hdrextend(sizeof(struct uc_hdr))) {
|
||||
struct uc_hdr *hdr = rimebuf_hdrptr();
|
||||
rimeaddr_copy(&hdr->receiver, receiver);
|
||||
|
|
Loading…
Reference in a new issue