Improved per-packet power profiling: if a packet is retransmitted, the new energy is added to the old energy so that it is possible to measure the full energy for all transmissions of the packet
This commit is contained in:
parent
ca0417a923
commit
0c4c88ae66
1 changed files with 5 additions and 3 deletions
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: compower.c,v 1.3 2009/03/12 21:58:21 adamdunkels Exp $
|
||||
* $Id: compower.c,v 1.4 2010/02/23 18:39:00 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -81,8 +81,10 @@ compower_clear(struct compower_activity *e)
|
|||
void
|
||||
compower_attrconv(struct compower_activity *e)
|
||||
{
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_LISTEN_TIME, e->listen);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_TRANSMIT_TIME, e->transmit);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_LISTEN_TIME,
|
||||
packetbuf_attr(PACKETBUF_ATTR_LISTEN_TIME) + e->listen);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_TRANSMIT_TIME,
|
||||
packetbuf_attr(PACKETBUF_ATTR_TRANSMIT_TIME) + e->transmit);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue