Package: inet.linklayer.ieee80211
Ieee80211Interface
compound moduleThis NIC implements an 802.11 network interface card. It can be configured via the mgmt.typename 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.
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.
Extends
Name | Type | Description |
---|---|---|
InterfaceEntry | compound module | (no description) |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
displayStringTextFormat | string | "%a (%i)\n%m" | |
interfaceTableModule | string | ||
energySourceModule | string | "" | |
opMode | string | "g(mixed)" | |
address | string | "auto" |
MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0. |
bitrate | double | -1bps |
Properties
Name | Value | Description |
---|---|---|
class | ::inet::InterfaceEntry | |
display | i=block/ifcard |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input |
to upper layers |
|
upperLayerOut | output |
from upper layers |
|
radioIn | input |
to receive signals |
Unassigned submodule parameters
Name | Type | Default value | Description |
---|---|---|---|
mgmt.macModule | string |
The path to the MAC module |
Source code
// // This NIC implements an 802.11 network interface card. // It can be configured via the mgmt.typename 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 Ieee80211Interface extends InterfaceEntry like IWirelessInterface { parameters: @class(::inet::InterfaceEntry); string interfaceTableModule; string energySourceModule = default(""); string opMode @enum("a","b","g(erp)","g(mixed)","n(mixed-2.4Ghz)","p","ac") = default("g(mixed)"); string address = default("auto"); // MAC address as hex string (12 hex digits), or // "auto". "auto" values will be replaced by // a generated MAC address in init stage 0. double bitrate @unit(bps) = default(-1bps); **.opMode = opMode; **.bitrate = bitrate; mac.modeSet = default(opMode); mac.*.rateSelection.dataFrameBitrate = default(bitrate); *.macModule = default(absPath(".mac")); *.mibModule = default(absPath(".mib")); *.interfaceTableModule = default(absPath(interfaceTableModule)); *.energySourceModule = default(absPath(energySourceModule)); @display("i=block/ifcard"); gates: input upperLayerIn; // to upper layers output upperLayerOut; // from upper layers input radioIn @labels(ISignal); // to receive signals submodules: mib: Ieee80211Mib { parameters: @display("p=100,100;is=s"); } llc: <default(opMode == "p" ? "Ieee80211LlcEpd" : "Ieee80211LlcLpd")> like IIeee80211Llc { parameters: @display("p=250,200"); } classifier: <default("")> like IIeee8021dQosClassifier if typename != "" { parameters: @display("p=400,100"); } agent: <default("Ieee80211AgentSta")> like IIeee80211Agent if typename != "" { parameters: @display("p=550,350"); } mgmt: <default("Ieee80211MgmtSta")> like IIeee80211Mgmt { parameters: @display("p=400,350"); } mac: <default("Ieee80211Mac")> like IIeee80211Mac { parameters: @display("p=250,350"); } radio: <default("Ieee80211ScalarRadio")> like IRadio { parameters: @display("p=250,500"); } connections: radioIn --> { @display("m=s"); } --> radio.radioIn; radio.upperLayerIn <-- mac.lowerLayerOut; radio.upperLayerOut --> mac.lowerLayerIn; mac.mgmtOut --> mgmt.macIn; mac.mgmtIn <-- mgmt.macOut; mgmt.agentOut --> agent.mgmtIn if exists(agent); mgmt.agentIn <-- agent.mgmtOut if exists(agent); llc.upperLayerOut --> { @display("m=n"); } --> upperLayerOut; llc.upperLayerIn <-- { @display("m=n"); } <-- upperLayerIn if !exists(classifier); llc.upperLayerIn <-- { @display("m=n"); } <-- classifier.out if exists(classifier); llc.lowerLayerOut --> mac.upperLayerIn; llc.lowerLayerIn <-- mac.upperLayerOut; classifier.in <-- { @display("m=n"); } <-- upperLayerIn if exists(classifier); }File: src/inet/linklayer/ieee80211/Ieee80211Interface.ned