Compound Module Host80211

Package: org.mixim.modules.node
File: modules/node/Host80211.ned

Example host module using an 802.11 Network interface card.

BaseUtility BaseArp IBaseMobility IBaseApplLayer IBaseNetwLayer Nic80211

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.

Networks:

Mac80211 (network)

This example shows how to use MiXiMs 802.11 protocol implementation.

Parameters:

Name Type Default value Description
applType string

type of the application layer

netwType string

type of the network layer

mobType string

type of the mobility module

Properties:

Name Value Description
display bgb=40,,white;i=device/laptop;b=40,40,rect

Gates:

Name Direction Size Description
radioIn input

gate for sendDirect

Unassigned submodule parameters:

Name Type Default value Description
utility.coreDebug bool

debug switch for the base framework

arp.coreDebug bool

debug switch for the core framework

mobility.x double

x coordinate of the nodes' position (-1 = random)

mobility.y double

y coordinate of the nodes' position (-1 = random)

mobility.z double

z coordinate of the nodes' position (-1 = random)

appl.headerLength int

length of the application message header (in bits)

net.stats bool

stats switch

net.headerLength double

length of the network packet header (in bits)

nic.mac.notAffectedByHostState bool false
nic.mac.coreDebug bool

debug switch

nic.mac.headerLength double 272bit

length of the MAC packet header (in bits)

nic.mac.debug bool false

enable debugging for this module

nic.mac.queueLength int 20
nic.mac.rtsCtsThreshold int -1

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

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

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

nic.mac.snr2Mbit double 1.46dB

threshold to use 2Mbit (in dB)

nic.mac.snr5Mbit double 2.6dB

threshold to use 5.5Mbit (in dB)

nic.mac.snr11Mbit double 5.68dB

threshold to use 11Mbit (in dB)

nic.mac.neighborhoodCacheSize int 30

keep information on neighborhood

nic.mac.neighborhoodCacheMaxAge double 100s

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

nic.mac.txPower double 110.11mW

the power to transmit packets with [mW]

nic.phy.coreDebug bool

debug switch for core framework

nic.phy.recordStats bool false

enable/disable tracking of statistics (eg. cOutvectors)

nic.phy.usePropagationDelay bool

Should transmission delay be simulated?

nic.phy.thermalNoise double

the strength of the thermal noise [dBm]

nic.phy.useThermalNoise bool

should thermal noise be considered?

nic.phy.analogueModels xml

Specification of the analogue models to use and their parameters

nic.phy.decider xml xmldoc("Nic80211_Decider.xml")

Specification of the decider to use and its parameters

nic.phy.sensitivity double -119.5dBm

The sensitivity of the physical layer [dBm]

nic.phy.maxTXPower double

The maximum transimission power of the physical layer [mW]

nic.phy.initialRadioState int 0

state the radio is initially in

nic.phy.radioMinAtt double 1.0

radios gain factor (attenuation) while receiving

nic.phy.radioMaxAtt double 0.0

radios gain factor (attenuation) while not receiving

nic.phy.nbRadioChannels int 15

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

nic.phy.initialRadioChannel int 1

Initial radio channel.

Source code:

//
// Example host module using an 802.11 Network interface card.
//
module Host80211
{
    parameters:
        string applType; //type of the application layer
        string netwType; //type of the network layer
        string mobType; //type of the mobility module
        @display("bgb=40,,white;i=device/laptop;b=40,40,rect");
    gates:
        input radioIn; // gate for sendDirect
    submodules:
        utility: BaseUtility {
            parameters:
                @display("p=130,38;b=24,24,rect,black;i=block/blackboard");
        }
        arp: BaseArp {
            parameters:
                @display("p=130,108;b=24,24,rect,blue;i=block/process");
        }
        mobility: <mobType> like IBaseMobility {
            parameters:
                @display("p=130,172;i=block/cogwheel");
        }
        appl: <applType> like IBaseApplLayer {
            parameters:
                @display("p=60,50;i=app");
        }
        net: <netwType> like IBaseNetwLayer {
            parameters:
                @display("p=60,108;i=block/layer");
        }
        nic: Nic80211 {
            parameters:
                @display("p=60,166;i=block/ifcard");
        }
    connections:
        nic.upperGateOut --> net.lowerGateIn;
        nic.upperGateIn <-- net.lowerGateOut;
        nic.upperControlOut --> { @display("ls=red;m=m,70,0,70,0"); } --> net.lowerControlIn;
        nic.upperControlIn <-- { @display("ls=red;m=m,70,0,70,0"); } <-- net.lowerControlOut;

        net.upperGateOut --> appl.lowerGateIn;
        net.upperGateIn <-- appl.lowerGateOut;
        net.upperControlOut --> { @display("ls=red;m=m,70,0,70,0"); } --> appl.lowerControlIn;
        net.upperControlIn <-- { @display("ls=red;m=m,70,0,70,0"); } <-- appl.lowerControlOut;

        radioIn --> nic.radioIn;

}