Compound Module Nic80211

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

This NIC implements an 802.11 network interface card.

See also: Mac80211, Decider80211

Author: Marc Loebbers, Karl Wessel (port for MiXiM)

Mac80211 PhyLayer

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.

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.

Host80211 (compound module)

Example host module using an 802.11 Network interface card.

Parameters:

Name Type Default value Description
connectionManagerName string ""

name of the ConnectionManager module

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("Nic80211_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.

Source code:

//
// This NIC implements an 802.11 network interface card.
//
// @see Mac80211, Decider80211
// @author Marc Loebbers, Karl Wessel (port for MiXiM)
//
module Nic80211 like INic
{
    parameters:
        string connectionManagerName = default("");   //name of the ConnectionManager module
        @display("i=block/ifcard");

    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: Mac80211 {
            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: PhyLayer {
            headerLength = 192bit;
            sensitivity = default(-119.5dBm);
            decider = default(xmldoc("Nic80211_Decider.xml"));
            initialRadioChannel = default(1);
            nbRadioChannels = default(15); //1 to 14, 0 is invalid

            //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;
}