From 9816f49fe6ec9295db6ee3a36837ff0fb167c432 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Mon, 2 Mar 2009 22:00:41 +0000 Subject: [PATCH] Changed listen and transmit energy attributes so that they are named _TIME rather than _ENERGY, to indicate that they contain the time during which the radio was switched on and not the energy --- core/net/rime/rimebuf.h | 6 +++--- core/sys/compower.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/net/rime/rimebuf.h b/core/net/rime/rimebuf.h index 5d37bc4ec..9fb45dea6 100644 --- a/core/net/rime/rimebuf.h +++ b/core/net/rime/rimebuf.h @@ -40,7 +40,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimebuf.h,v 1.17 2009/02/10 23:51:12 adamdunkels Exp $ + * $Id: rimebuf.h,v 1.18 2009/03/02 22:00:41 adamdunkels Exp $ */ /** @@ -332,8 +332,8 @@ enum { RIMEBUF_ATTR_RSSI, RIMEBUF_ATTR_TIMESTAMP, - RIMEBUF_ATTR_LISTEN_ENERGY, - RIMEBUF_ATTR_TRANSMIT_ENERGY, + RIMEBUF_ATTR_LISTEN_TIME, + RIMEBUF_ATTR_TRANSMIT_TIME, RIMEBUF_ATTR_NETWORK_ID, diff --git a/core/sys/compower.c b/core/sys/compower.c index 5fb02dea8..0d203a46f 100644 --- a/core/sys/compower.c +++ b/core/sys/compower.c @@ -33,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: compower.c,v 1.1 2009/03/01 20:32:03 adamdunkels Exp $ + * $Id: compower.c,v 1.2 2009/03/02 22:00:41 adamdunkels Exp $ */ /** @@ -81,15 +81,15 @@ compower_clear(struct compower_activity *e) void compower_attrconv(struct compower_activity *e) { - rimebuf_set_attr(RIMEBUF_ATTR_LISTEN_ENERGY, e->listen); - rimebuf_set_attr(RIMEBUF_ATTR_TRANSMIT_ENERGY, e->transmit); + rimebuf_set_attr(RIMEBUF_ATTR_LISTEN_TIME, e->listen); + rimebuf_set_attr(RIMEBUF_ATTR_TRANSMIT_TIME, e->transmit); } /*---------------------------------------------------------------------------*/ void compower_accumulate_attrs(struct compower_activity *e) { - e->listen += rimebuf_attr(RIMEBUF_ATTR_LISTEN_ENERGY); - e->transmit += rimebuf_attr(RIMEBUF_ATTR_TRANSMIT_ENERGY); + e->listen += rimebuf_attr(RIMEBUF_ATTR_LISTEN_TIME); + e->transmit += rimebuf_attr(RIMEBUF_ATTR_TRANSMIT_TIME); } /*---------------------------------------------------------------------------*/ /** @} */