SensorStateBasedCcEnergyConsumer

Package: inet.physicallayer.wireless.common.energyconsumer

SensorStateBasedCcEnergyConsumer

simple module

C++ definition

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.

Inheritance diagram

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

Extends

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

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 0.001mA
switchingCurrentConsumption double 5mA
receiverIdleCurrentConsumption double 0.002mA
receiverBusyCurrentConsumption double 0.025mA
receiverReceivingCurrentConsumption double 15mA
receiverReceivingPreambleCurrentConsumption double receiverReceivingCurrentConsumption
receiverReceivingHeaderCurrentConsumption double receiverReceivingCurrentConsumption
receiverReceivingDataCurrentConsumption double receiverReceivingCurrentConsumption
transmitterIdleCurrentConsumption double 2mA
transmitterTransmittingCurrentConsumption double 25mA
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

//
// 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.
//
simple SensorStateBasedCcEnergyConsumer extends StateBasedCcEnergyConsumer
{
    parameters:
        offCurrentConsumption @unit(A) = default(0mA);
        sleepCurrentConsumption @unit(A) = default(0.001mA);
        switchingCurrentConsumption @unit(A) = default(5mA);
        receiverIdleCurrentConsumption @unit(A) = default(0.002mA);
        receiverBusyCurrentConsumption @unit(A) = default(0.025mA);
        receiverReceivingCurrentConsumption @unit(A) = default(15mA);
        transmitterIdleCurrentConsumption @unit(A) = default(2mA);
        transmitterTransmittingCurrentConsumption @unit(A) = default(25mA);
}

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