Communication power accounting
[Contiki system]

The compower module accumulates power consumption information and attributes it to communication activities. More...

Data Structures

struct  compower_activity
 An activity record that contains power consumption information for a specific communication activity. More...

Files

file  compower.c
 

Communication power accounting module.


file  compower.h
 

Header file for the communication power accounting module.


Functions

void compower_init (void)
 Initialize the communication power accounting module.
void compower_accumulate (struct compower_activity *a)
 Accumulate power contumption for a communication activity.
void compower_clear (struct compower_activity *a)
 Clear power consumption information for a communication activity.
void compower_attrconv (struct compower_activity *a)
 Convert power contumption information to packet attributes.
void compower_accumulate_attrs (struct compower_activity *a)
 Accumulate power contumption for a communication activity based on energy data in packet attributes.

Variables

struct compower_activity compower_idle_activity
 The default idle communication activity.
struct compower_activity compower_idle_activity
 The default idle communication activity.

Detailed Description

The compower module accumulates power consumption information and attributes it to communication activities.

Examples of communication activities are packet transmission, packet reception, and idle listening.


Function Documentation

void compower_accumulate ( struct compower_activity a  ) 

Accumulate power contumption for a communication activity.

Parameters:
a A pointer to an activity structure.

This function accumulates power consumption information for a communication activity. The function typically is called by a power-saving MAC protocol when the radio is switched off, or when a packet is received or transmitted.

void compower_accumulate_attrs ( struct compower_activity a  ) 

Accumulate power contumption for a communication activity based on energy data in packet attributes.

Parameters:
a A pointer to an activity structure.

This function accumulates power consumption information for a communication activity from packet attributes (see packet attributes).

void compower_attrconv ( struct compower_activity a  ) 

Convert power contumption information to packet attributes.

Parameters:
a A pointer to an activity structure.

This function converts accumulated power consumption information for a communication activity to packet attributes (see packet attributes).

void compower_clear ( struct compower_activity a  ) 

Clear power consumption information for a communication activity.

Parameters:
a A pointer to an activity structure.

This function clears any power contumption information that has previously been accumulated in an activity structure.

void compower_init ( void   ) 

Initialize the communication power accounting module.

This function initializes the communication power accounting module. The function is called by the system during boot-up.


Variable Documentation

The default idle communication activity.

This is the idle communication activity, to which all energy that is not possible to attribute to individual packets, is attributed. Examples include idle listening for incoming packets and MAC-level beacon transmissions.

Definition at line 51 of file compower.c.

The default idle communication activity.

This is the idle communication activity, to which all energy that is not possible to attribute to individual packets, is attributed. Examples include idle listening for incoming packets and MAC-level beacon transmissions.

Definition at line 51 of file compower.c.


Generated on Mon Apr 11 14:23:53 2011 for Contiki 2.5 by  doxygen 1.6.1