Compound Module Nic80211MultiChannel

Package: org.mixim.modules.nic
File: modules/nic/Nic80211MultiChannel.ned

This NIC implements an 802.11 network interface card with multi channel support and power consumption. Note: This NIC does not model interference between adjacent channels!

See also: Mac80211MultiChannel, Decider80211MultiChannel

Author: Karl Wessel

Mac80211MultiChannel PhyLayerBattery

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.

Parameters:

Name Type Default value Description
connectionManagerName string ""

name of the ConnectionManager module

sleepCurrent double
rxCurrent double
decodingCurrentDelta double
txCurrent double
setupRxCurrent double
setupTxCurrent double
rxTxCurrent double
txRxCurrent double
onCurrent double 0

Properties:

Name Value Description
display i=block/ifcard

Gates:

Name Direction Size Description
upperGateIn input

to upper layers

upperGateOut output

from upper layers

upperControlOut output

control information

upperControlIn input

control information

radioIn input

radioIn gate for sendDirect

Unassigned submodule parameters:

Name Type Default value Description
mac.notAffectedByHostState bool false
mac.coreDebug bool

debug switch

mac.headerLength double 272bit

length of the MAC packet header (in bits)

mac.debug bool false

enable debugging for this module

mac.queueLength int 20
mac.rtsCtsThreshold int -1

Number of bits in a packet before RTS/CTS is used. Is currently not used.

mac.bitrate double 2E+6bps
mac.autoBitrate bool false

auto bit rate selection support: specify borders at which to change modulation.

mac.snr2Mbit double 1.46dB

threshold to use 2Mbit (in dB)

mac.snr5Mbit double 2.6dB

threshold to use 5.5Mbit (in dB)

mac.snr11Mbit double 5.68dB

threshold to use 11Mbit (in dB)

mac.neighborhoodCacheSize int 30

keep information on neighborhood

mac.neighborhoodCacheMaxAge double 100s

consider information in cache outdate if older than (in seconds)

mac.txPower double 110.11mW

the power to transmit packets with [mW]

phy.coreDebug bool

debug switch for core framework

phy.recordStats bool false

enable/disable tracking of statistics (eg. cOutvectors)

phy.usePropagationDelay bool

Should transmission delay be simulated?

phy.thermalNoise double

the strength of the thermal noise [dBm]

phy.useThermalNoise bool

should thermal noise be considered?

phy.analogueModels xml

Specification of the analogue models to use and their parameters

phy.decider xml xmldoc("Nic80211MultiChannel_Decider.xml")

Specification of the decider to use and its parameters

phy.sensitivity double -119.5dBm

The sensitivity of the physical layer [dBm]

phy.maxTXPower double

The maximum transimission power of the physical layer [mW]

phy.initialRadioState int 0

state the radio is initially in

phy.radioMinAtt double 1.0

radios gain factor (attenuation) while receiving

phy.radioMaxAtt double 0.0

radios gain factor (attenuation) while not receiving

phy.nbRadioChannels int 15

Number of available radio channels. Defaults to single channel radio.

phy.initialRadioChannel int 1

Initial radio channel.

phy.numActivities int 5

the number of different power consuming activities the phy layer has change this parameter if your decider or physical layer uses more than the default 5 activities (sleep, rx, tx, switching, decoding)

Source code:

//
// This NIC implements an 802.11 network interface card with multi channel 
// support and power consumption.
// Note: This NIC does not model interference between adjacent channels!
//
// @see Mac80211MultiChannel, Decider80211MultiChannel
// @author Karl Wessel
//
module Nic80211MultiChannel like INic
{
    parameters:
        //name of the ConnectionManager module
        string connectionManagerName = default("");
        @display("i=block/ifcard");
        double sleepCurrent @unit(mA);
        double rxCurrent @unit(mA);
        double decodingCurrentDelta @unit(mA);
        double txCurrent @unit(mA);
        double setupRxCurrent @unit(mA);
        double setupTxCurrent @unit(mA);
        double rxTxCurrent @unit(mA);
        double txRxCurrent @unit(mA);
        double onCurrent @unit(mA) = default(0);

    gates:
        input upperGateIn; // to upper layers
        output upperGateOut; // from upper layers
        output upperControlOut; // control information 
        input upperControlIn; // control information 
        input radioIn; // radioIn gate for sendDirect

    submodules:
        mac: Mac80211MultiChannel {
            queueLength = default(20);
            bitrate = default(2E+6bps);
            autoBitrate = default(false);
            // values if no fading is modelled, gives at most 1% packet error rate
            snr2Mbit = default(1.46dB);
            snr5Mbit = default(2.6dB);
            snr11Mbit = default(5.68dB);
            neighborhoodCacheSize = default(30);
            neighborhoodCacheMaxAge = default(100s);
            txPower = default(110.11mW);

            @display("p=96,87;i=block/layer");
        }

        phy: PhyLayerBattery {
            headerLength = 192bit;
            sensitivity = default(-119.5dBm);
            decider = default(xmldoc("Nic80211MultiChannel_Decider.xml"));
            nbRadioChannels = default(15);
            initialRadioChannel = default(1);

            //Mac80211 does not support switching times
            timeRXToTX = 0s;
            timeRXToSleep = 0s;
            timeTXToRX = 0s;
            timeTXToSleep = 0s;
            timeSleepToRX = 0s;
            timeSleepToTX = 0s;
            @display("p=96,158;i=block/process;is=n");
        }

    connections:
        mac.upperGateOut --> { @display("ls=black;m=m,25,50,25,0"); } --> upperGateOut;
        mac.upperGateIn <-- { @display("ls=black;m=m,15,50,15,0"); } <-- upperGateIn;
        mac.upperControlOut --> { @display("ls=red;m=m,75,50,75,0"); } --> upperControlOut;
        mac.upperControlIn <-- { @display("ls=red;m=m,85,0,85,0"); } <-- upperControlIn;

        phy.upperGateOut --> { @display("ls=black;m=m,25,50,25,0"); } --> mac.lowerGateIn;
        phy.upperGateIn <-- { @display("ls=black;m=m,15,50,15,0"); } <-- mac.lowerGateOut;
        phy.upperControlOut --> { @display("ls=red;m=m,75,50,75,0"); } --> mac.lowerControlIn;
        phy.upperControlIn <-- { @display("ls=red;m=m,85,0,85,0"); } <-- mac.lowerControlOut;

        radioIn --> phy.radioIn;
}