StateBasedCcEnergyConsumer

Package: inet.physicallayer.wireless.common.energyconsumer

StateBasedCcEnergyConsumer

simple module

C++ definition

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.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
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.

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.

Extends

Name Type Description
SimpleModule simple module

Base module for all INET simple modules.

Parameters

Name Type Default value Description
displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

energySourceModule string
minSupplyVoltage double 0V
maxSupplyVoltage double inf V
offCurrentConsumption double 0mA
sleepCurrentConsumption double 1mA
switchingCurrentConsumption double 1mA
receiverIdleCurrentConsumption double 2mA
receiverBusyCurrentConsumption double 5mA
receiverReceivingCurrentConsumption double 10mA
receiverReceivingPreambleCurrentConsumption double receiverReceivingCurrentConsumption
receiverReceivingHeaderCurrentConsumption double receiverReceivingCurrentConsumption
receiverReceivingDataCurrentConsumption double receiverReceivingCurrentConsumption
transmitterIdleCurrentConsumption double 2mA
transmitterTransmittingCurrentConsumption double 100mA
transmitterTransmittingPreambleCurrentConsumption double transmitterTransmittingCurrentConsumption
transmitterTransmittingHeaderCurrentConsumption double transmitterTransmittingCurrentConsumption
transmitterTransmittingDataCurrentConsumption double transmitterTransmittingCurrentConsumption

Properties

Name Value Description
class StateBasedCcEnergyConsumer
display i=block/cogwheel

Signals

Name Type Unit Description
currentConsumptionChanged double

Statistics

Name Title Source Record Unit Interpolation Mode Description
currentConsumption Current consumption currentConsumptionChanged vector A sample-hold

Source code

//
// 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.
//
simple StateBasedCcEnergyConsumer extends SimpleModule like ICcEnergyConsumer
{
    parameters:
        @class(StateBasedCcEnergyConsumer);
        string energySourceModule;
        double minSupplyVoltage @unit(V) = default(0V);
        double maxSupplyVoltage @unit(V) = default(inf V);
        double offCurrentConsumption @unit(A) = default(0mA);
        double sleepCurrentConsumption @unit(A) = default(1mA);
        double switchingCurrentConsumption @unit(A) = default(1mA);
        double receiverIdleCurrentConsumption @unit(A) = default(2mA);
        double receiverBusyCurrentConsumption @unit(A) = default(5mA);
        double receiverReceivingCurrentConsumption @unit(A) = default(10mA);
        double receiverReceivingPreambleCurrentConsumption @unit(A) = default(receiverReceivingCurrentConsumption);
        double receiverReceivingHeaderCurrentConsumption @unit(A) = default(receiverReceivingCurrentConsumption);
        double receiverReceivingDataCurrentConsumption @unit(A) = default(receiverReceivingCurrentConsumption);
        double transmitterIdleCurrentConsumption @unit(A) = default(2mA);
        double transmitterTransmittingCurrentConsumption @unit(A) = default(100mA);
        double transmitterTransmittingPreambleCurrentConsumption @unit(A) = default(transmitterTransmittingCurrentConsumption);
        double transmitterTransmittingHeaderCurrentConsumption @unit(A) = default(transmitterTransmittingCurrentConsumption);
        double transmitterTransmittingDataCurrentConsumption @unit(A) = default(transmitterTransmittingCurrentConsumption);
        @display("i=block/cogwheel");
        @class(StateBasedCcEnergyConsumer);
        @signal[currentConsumptionChanged](type=double);
        @statistic[currentConsumption](title="Current consumption"; source=currentConsumptionChanged; record=vector; interpolationmode=sample-hold; unit=A);
}

File: src/inet/physicallayer/wireless/common/energyconsumer/StateBasedCcEnergyConsumer.ned