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

This commit is contained in:
adamdunkels 2009-03-02 22:00:41 +00:00
parent 57b9cab27e
commit 9816f49fe6
2 changed files with 8 additions and 8 deletions

View file

@ -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,

View file

@ -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);
}
/*---------------------------------------------------------------------------*/
/** @} */