Ieee80211Nic

Package: inet.linklayer.ieee80211

Ieee80211Nic

compound module

This NIC implements an 802.11 network interface card. It can be configured via the mgmtType parameter to act as an AP or a STA, or for ad-hoc mode.

Potential mgmType values: Ieee80211MgmtSTASimplified, Ieee80211MgmtSTA Ieee80211MgmtAP, Ieee80211MgmtAPSimplified, Ieee80211MgmtAdhoc.

A classifier is needed if you want to use QoS.

classifier : like IIeee8021dQoSClassifier

IIeee8021dQoSClassifier: Interface for 802.1d QoS classifiers.

Source:
classifier: <classifierType> like IIeee8021dQoSClassifier if classifierType != "" {
    parameters:
        @display("p=200,100");
} agent : Ieee80211AgentSTA

Used in 802.11 infrastructure mode: in a station (STA), this module controls channel scanning,...

Source:
agent: Ieee80211AgentSTA if _agentNeeded {
    parameters:
        @display("p=200,200");
} mgmt : like IIeee80211Mgmt

IIeee80211Mgmt: This is not a concrete module type, but a prototype for all IEEE 802.11 management module types.

Source:
mgmt: <mgmtType> like IIeee80211Mgmt {
    parameters:
        macModule = "^.mac";
        @display("p=100,100");
} mac : like IIeee80211Mac

IIeee80211Mac: Module interface for all ieee802.11 mac modul

Source:
mac: <macType> like IIeee80211Mac {
    parameters:
        @display("p=100,200");
} radio : like IRadio

IRadio: Prototype for radio modules.

Source:
radio: <radioType> like IRadio {
    parameters:
        @display("p=100,300");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

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

Parameters

Name Type Default value Description
interfaceTableModule string
energySourceModule string ""
classifierType string ""

needed for EDCA, as the classifier assigns User Priority (UP) to packets; UP determines Access Category via TID

mgmtType string "Ieee80211MgmtSTA"

name of the management module type (implements IIeee80211Mgmt)

radioType string "Ieee80211ScalarRadio"
macType string "Ieee80211CompatibleMac"

choose from Ieee80211Mac and Ieee80211CompatibleMac,

See also: IIeee80211Mac

opMode string "g(mixed)"
bitrate double -1bps
_agentNeeded bool (mgmtType == "Ieee80211MgmtSTA")

internal par. do not use, shows if optional agent module is needed

Properties

Name Value Description
nic
display i=block/ifcard

Gates

Name Direction Size Description
upperLayerIn input

to upper layers

upperLayerOut output

from upper layers

radioIn input

to receive radio frames

Unassigned submodule parameters

Name Type Default value Description
agent.interfaceTableModule string

The path to the InterfaceTable module

agent.activeScan bool true

selects between active and passive scanning

agent.channelsToScan string ""

list of channel numbers to scan (space delimited); empty means all channels

agent.probeDelay double 100ms

delay before sending a probe request during active scanning

agent.minChannelTime double 150ms

min interval to spend on a channel during active scanning

agent.maxChannelTime double 300ms

channel time for passive scanning, and max channel time for active scanning

agent.authenticationTimeout double 5s

timeout for the authentication procedure

agent.associationTimeout double 5s

timeout for the association procedure

agent.startingTime double -1s

agent starting time.

agent.default_ssid string "SSID"

default ssid

Source code

//
// This NIC implements an 802.11 network interface card.
// It can be configured via the mgmtType parameter to act
// as an AP or a STA, or for ad-hoc mode.
//
// Potential mgmType values: Ieee80211MgmtSTASimplified, Ieee80211MgmtSTA
// Ieee80211MgmtAP, Ieee80211MgmtAPSimplified, Ieee80211MgmtAdhoc.
//
// A classifier is needed if you want to use QoS.
//
module Ieee80211Nic like IWirelessNic
{
    parameters:
        string interfaceTableModule;
        string energySourceModule = default("");
        string classifierType = default(""); // needed for EDCA, as the classifier assigns User Priority (UP) to packets; UP determines Access Category via TID
        string mgmtType = default("Ieee80211MgmtSTA"); // name of the management module type (implements IIeee80211Mgmt)
        string radioType = default("Ieee80211ScalarRadio");
        string macType = default("Ieee80211CompatibleMac");   // choose from Ieee80211Mac and Ieee80211CompatibleMac, @see IIeee80211Mac
        string opMode @enum("a","b","g(erp)","g(mixed)","n","p") = default("g(mixed)");
        double bitrate @unit("bps") = default(-1bps);
        bool _agentNeeded = (mgmtType == "Ieee80211MgmtSTA");   // internal par. do not use, shows if optional agent module is needed
        **.opMode = this.opMode;
        **.bitrate = this.bitrate;
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        *.energySourceModule = default(absPath(this.energySourceModule));
        @nic;
        @display("i=block/ifcard");
    gates:
        input upperLayerIn; // to upper layers
        output upperLayerOut; // from upper layers
        input radioIn @labels(IRadioFrame); // to receive radio frames
    submodules:
        classifier: <classifierType> like IIeee8021dQoSClassifier if classifierType != "" {
            parameters:
                @display("p=200,100");
        }
        agent: Ieee80211AgentSTA if _agentNeeded {
            parameters:
                @display("p=200,200");
        }
        mgmt: <mgmtType> like IIeee80211Mgmt {
            parameters:
                macModule = "^.mac";
                @display("p=100,100");
        }
        mac: <macType> like IIeee80211Mac {
            parameters:
                @display("p=100,200");
        }
        radio: <radioType> like IRadio {
            parameters:
                @display("p=100,300");
        }
    connections:
        radioIn --> { @display("m=s"); } --> radio.radioIn;
        radio.upperLayerIn <-- mac.lowerLayerOut;
        radio.upperLayerOut --> mac.lowerLayerIn;

        mac.upperLayerOut --> mgmt.macIn;
        mac.upperLayerIn <-- mgmt.macOut;

        mgmt.agentOut --> agent.mgmtIn if _agentNeeded;
        mgmt.agentIn <-- agent.mgmtOut if _agentNeeded;

        mgmt.upperLayerOut --> { @display("m=n"); } --> upperLayerOut;
        mgmt.upperLayerIn <-- { @display("m=n"); } <-- upperLayerIn if classifierType == "";
        mgmt.upperLayerIn <-- { @display("m=n"); } <-- classifier.out if classifierType != "";
        classifier.in <-- { @display("m=n"); } <-- upperLayerIn if classifierType != "";
}

File: src/inet/linklayer/ieee80211/Ieee80211Nic.ned