Contiki 2.6
|
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. |
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.
void compower_accumulate | ( | struct compower_activity * | a | ) |
Accumulate power contumption for a communication activity.
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.
Definition at line 61 of file compower.c.
void compower_accumulate_attrs | ( | struct compower_activity * | a | ) |
Accumulate power contumption for a communication activity based on energy data in packet attributes.
a | A pointer to an activity structure. |
This function accumulates power consumption information for a communication activity from packet attributes (see packet attributes).
Definition at line 93 of file compower.c.
void compower_attrconv | ( | struct compower_activity * | a | ) |
Convert power contumption information to packet attributes.
a | A pointer to an activity structure. |
This function converts accumulated power consumption information for a communication activity to packet attributes (see packet attributes).
Definition at line 84 of file compower.c.
void compower_clear | ( | struct compower_activity * | a | ) |
Clear power consumption information for a communication activity.
a | A pointer to an activity structure. |
This function clears any power contumption information that has previously been accumulated in an activity structure.
Definition at line 78 of file compower.c.
Referenced by compower_init().
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.
Definition at line 55 of file compower.c.
References compower_clear(), and compower_idle_activity.
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.
Referenced by compower_init().
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.
Referenced by compower_init().