Simple Module SimpleBattery

Package: org.mixim.modules.power.battery
File: modules/power/battery/SimpleBattery.ned

C++ definition

a simple battery module

Note that resolution should be much smaller than the expected time to first node failure.

SimpleBattery

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Extends:

BaseBattery (simple module) (no description)

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

Host802154_2400MHz (compound module)

This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz for wireless communications, that can be used to simulate wireless sensor networks.

Host802154A (compound module)

This host NED module models a host using an IEEE 802.15.4A correlation receiver.

HostBMAC (compound module)

Example host module using a BMAC Network interface card.

HostLMAC (compound module)

Example host module using a LMAC Network interface card.

PhyMacHost (compound module) (no description)

Parameters:

Name Type Default value Description
debug bool
nominal double

nominal battery capacity

capacity double

battery capacity

voltage double

nominal voltage

resolution double

capacity is updated at least every resolution time

publishDelta double

if > 0, capacity is published to the BB each publishTime interval

publishTime double

number of modules that will draw energy from the battery

numDevices int

Properties:

Name Value Description
display i=block/control
class SimpleBattery

Source code:

//
// a simple battery module
//
// Note that resolution should be much smaller than the expected time to
// first node failure.
//
simple SimpleBattery extends BaseBattery
{
    parameters:
        @class(SimpleBattery);
        bool debug;
        // nominal battery capacity
        volatile double nominal @unit(mAh);
        // battery capacity
        double capacity @unit(mAh);
        // nominal voltage 
        volatile double voltage @unit(V);
        // capacity is updated at least every resolution time
        volatile double resolution @unit(s);

        // (0..1): capacity is published to the blackboard each time it is
		// observed to have changed by publishDelta * nominal_capacity
        volatile double publishDelta;

        // if > 0, capacity is published to the BB each publishTime 
		// interval		
        volatile double publishTime @unit(s);

        // number of modules that will draw energy from the 
		// battery
        int numDevices;

}