ICcEnergyConsumer

Package: inet.power.contract

module interface ICcEnergyConsumer

This interface extends the corresponding energy model interface. It requires implementations to describe energy consumption and energy generation with current [A], and storage capacity with charge [C] and output voltage [V]. The Cc is an abbreviation that is used for charge and current-based interfaces.

See also: ICcEnergySource, ICcEnergyGenerator, ICcEnergySink, ICcEnergyStorage, ICcEnergyManagement

Inheritance diagram

Implemented by

Name

Type

Description

SensorStateBasedCcEnergyConsumer

simple module

This current consumption module extends StateBasedCcEnergyConsumer and provides default values suitable for use in low-power wireless sensor nodes. Values are roughly based on the datasheet for the CC2500 RF transceiver. Used for accurate battery life simulation in wireless sensor networks.

StateBasedCcEnergyConsumer

simple module

Provides a radio energy consumer model. The current consumption is determined by the radio mode, the transmitter state, and the receiver state using constant parameters.

Ieee80211StateBasedCcEnergyConsumer

simple module

Provides a radio power consumer model for IEEE 802.11 radios. Default values are roughly based on CC3220 transceiver. The power consumption is determined by the radio mode, the transmitter state, and the receiver state using constant parameters.

CcEnergyConsumerBase

simple module

This is an abstract base module for current-based energy consumer models. It defines shared signals and statistics.

Extends

Name

Type

Description

IEnergyConsumer

module interface

The energy consumer models describe the energy consumption process of devices over time. For example, a radio consumes energy when it transmits or receives signals, or a CPU consumes energy when the network layer processes packets, or a display consumes energy when it’s turned on, etc.

Properties

Name

Value

Description

display

i=block/plug

Signals

Name

Type

Unit

Description

currentConsumptionChanged

double

Source code

//
// This interface extends the corresponding energy model interface. It requires
// implementations to describe energy consumption and energy generation with
// current [A], and storage capacity with charge [C] and output voltage [V].
// The Cc is an abbreviation that is used for charge and current-based interfaces.
//
// @see ~ICcEnergySource, ~ICcEnergyGenerator, ~ICcEnergySink, ~ICcEnergyStorage, ~ICcEnergyManagement
//
moduleinterface ICcEnergyConsumer extends IEnergyConsumer
{
    parameters:
        @display("i=block/plug");
        @signal[currentConsumptionChanged](type=double);
}

File: src/inet/power/contract/ICcEnergyConsumer.ned