Package: inet.linklayer.ieee80211.mac
Ieee80211Mac
compound moduleImplementation of the 802.11b MAC protocol. This module is intended to be used in combination with the Ieee80211Radio module as the physical layer. (The SnrEval80211 and Decider80211 modules should also work if per-packet bitrate setting gets implemented.)
Encapsulation/decapsulation must be done in the upper layers. (It is typically in the 802.11 management module, see in Ieee80211Nic). The base class for 802.11 frame messages is Ieee80211Frame, but this module expects Ieee80211DataOrMgmtFrame (a subclass) from upper layers (the management module). This module will assign the transmitter address (address 2) and the frame sequence number/fragment number fields in the frames; all other fields must already be filled when this module gets the frame for transmission.
The module has an internal queue, but usually it is to be used with an external passive queue module (its name should be given in the queueModule parameter; specifying "" causes the internal queue to be used). The passive queue module is a simple module whose C++ class implements the IPassiveQueue interface.
Limitations
The following features not supported: 1) power management, 2) polling (PCF). Physical layer algorithms such as frequency hopping and direct sequence spread spectrum are not modelled directly.
Fields related to the above unsupported features are omitted from management frame formats as well (for example, FH/DS/CF parameter sets, beacon/probe timestamp which is related to physical layer synchronization, listen interval which is related to power management, capability information which is related to PCF and other non-modelled features).
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.
Known subclasses
Name | Type | Description |
---|---|---|
Ieee80211CompatibleMac | compound module |
Delegate some upperMac parameters to Ieee80211Mac, to be more compatible with the old MAC. NOTE: NOT ALL PARAMETERS OF THE OLD MAC CAN BE MAPPED. |
Extends
Name | Type | Description |
---|---|---|
MACProtocolBase | compound module |
near copy-paste of inet.linklayer.base.MACProtocolBase to work around "compound-module cannot extend a simple-module" error in OMNeT++ 4.x |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string | ||
mtu | int | 2304B | |
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. |
modeSet | string | "g(mixed)" | |
qosStation | bool | false |
Properties
Name | Value | Description |
---|---|---|
display | i=block/layer | |
class | Ieee80211Mac |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input | ||
upperLayerOut | output | ||
lowerLayerIn | input | ||
lowerLayerOut | output |
Signals
Name | Type | Unit |
---|---|---|
NF_MODESET_CHANGED | inet::physicallayer::Ieee80211ModeSet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
passedUpPk | packets passed to higher layer | packetSentToUpper | count, sum(packetBytes), vector(packetBytes) | none | |
rcvdPkFromHL | packets received from higher layer | packetReceivedFromUpper | count, sum(packetBytes), vector(packetBytes) | none | |
sentDownPk | packets sent to lower layer | packetSentToLower | count, sum(packetBytes), vector(packetBytes) | none | |
rcvdPkFromLL | packets received from lower layer | packetReceivedFromLower | count, sum(packetBytes), vector(packetBytes) | none |
Unassigned submodule parameters
Name | Type | Default value | Description |
---|---|---|---|
dcf.channelAccess.contention.initialChannelBusy | bool | true |
assume that channel was busy before the simulation started |
dcf.channelAccess.contention.backoffOptimization | bool | true |
we can pretend the frame has arrived into the queue a little bit earlier, and may be able to start transmitting immediately |
dcf.rateSelection.multicastFrameBitrate | double | -1bps | |
dcf.rateSelection.responseAckFrameBitrate | double | -1bps | |
dcf.rateSelection.responseCtsFrameBitrate | double | -1bps | |
dcf.rateSelection.dataFrameBitrate | double | -1bps |
fastest |
dcf.rateSelection.mgmtFrameBitrate | double | -1bps |
fastest |
dcf.rateSelection.controlFrameBitrate | double | -1bps | |
dcf.recoveryProcedure.shortRetryLimit | int | 7 | |
dcf.recoveryProcedure.longRetryLimit | int | 4 | |
dcf.originatorProtectionMechanism.rateSelectionModule | string | ||
dcf.originatorAckPolicy.rateSelectionModule | string | ||
dcf.originatorAckPolicy.ackTimeout | double | -1s | |
dcf.recipientAckPolicy.rateSelectionModule | string | ||
dcf.rtsPolicy.rateSelectionModule | string | ||
dcf.rtsPolicy.ctsTimeout | double | -1s | |
dcf.rtsPolicy.rtsThreshold | int | 2346B | |
dcf.ctsPolicy.rxModule | string | ||
dcf.ctsPolicy.rateSelectionModule | string | ||
hcf.edca.edcaf.contention.initialChannelBusy | bool | true |
assume that channel was busy before the simulation started |
hcf.edca.edcaf.contention.backoffOptimization | bool | true |
we can pretend the frame has arrived into the queue a little bit earlier, and may be able to start transmitting immediately |
hcf.rateSelection.multicastFrameBitrate | double | -1bps | |
hcf.rateSelection.responseAckFrameBitrate | double | -1bps | |
hcf.rateSelection.responseBlockAckFrameBitrate | double | -1bps | |
hcf.rateSelection.responseCtsFrameBitrate | double | -1bps | |
hcf.rateSelection.dataFrameBitrate | double | -1bps |
fastest |
hcf.rateSelection.mgmtFrameBitrate | double | -1bps |
fastest |
hcf.rateSelection.controlFrameBitrate | double | -1bps | |
hcf.singleProtectionMechanism.rateSelectionModule | string | ||
hcf.edcaMgmtAndNonQoSRecoveryProcedure.shortRetryLimit | int | 7 | |
hcf.edcaMgmtAndNonQoSRecoveryProcedure.longRetryLimit | int | 4 | |
hcf.edcaDataRecoveryProcedures.shortRetryLimit | int | 7 | |
hcf.edcaDataRecoveryProcedures.longRetryLimit | int | 4 | |
hcf.edcaTxopProcedures.txopLimit | double | -1s | |
hcf.originatorAckPolicy.rateSelectionModule | string | ||
hcf.originatorAckPolicy.blockAckReqTreshold | int | 5 | |
hcf.originatorAckPolicy.maxBlockAckPolicyFrameLength | int | 1000B | |
hcf.originatorAckPolicy.blockAckTimeout | double | -1s | |
hcf.originatorAckPolicy.ackTimeout | double | -1s | |
hcf.recipientAckPolicy.rateSelectionModule | string | ||
hcf.rtsPolicy.rateSelectionModule | string | ||
hcf.rtsPolicy.ctsTimeout | double | -1s | |
hcf.rtsPolicy.rtsThreshold | int | 2346B | |
hcf.ctsPolicy.rxModule | string | ||
hcf.ctsPolicy.rateSelectionModule | string | ||
hcf.originatorBlockAckAgreementPolicy.delayedAckPolicySupported | bool | false | |
hcf.originatorBlockAckAgreementPolicy.aMsduSupported | bool | true | |
hcf.originatorBlockAckAgreementPolicy.maximumAllowedBufferSize | int | 64 | |
hcf.originatorBlockAckAgreementPolicy.blockAckTimeoutValue | double | 0s |
0 means that it depends on the originator |
hcf.recipientBlockAckAgreementPolicy.delayedAckPolicySupported | bool | false | |
hcf.recipientBlockAckAgreementPolicy.aMsduSupported | bool | true | |
hcf.recipientBlockAckAgreementPolicy.maximumAllowedBufferSize | int | 64 | |
hcf.recipientBlockAckAgreementPolicy.blockAckTimeoutValue | double | 0s |
0 means that it depends on the originator |
Source code
// // Implementation of the 802.11b MAC protocol. This module is intended // to be used in combination with the ~Ieee80211Radio module as the physical // layer. (The ~SnrEval80211 and ~Decider80211 modules should also work if // per-packet bitrate setting gets implemented.) // // Encapsulation/decapsulation must be done in the upper layers. (It is // typically in the 802.11 management module, see in ~Ieee80211Nic). // The base class for 802.11 frame messages is ~Ieee80211Frame, but this // module expects ~Ieee80211DataOrMgmtFrame (a subclass) from upper layers // (the management module). This module will assign the transmitter address // (address 2) and the frame sequence number/fragment number fields in the // frames; all other fields must already be filled when this module gets // the frame for transmission. // // The module has an internal queue, but usually it is to be used with an // external passive queue module (its name should be given in the queueModule // parameter; specifying "" causes the internal queue to be used). The passive // queue module is a simple module whose C++ class implements the IPassiveQueue // interface. // // <b>Limitations</b> // // The following features not supported: 1) power management, 2) polling (PCF). // Physical layer algorithms such as frequency hopping and // direct sequence spread spectrum are not modelled directly. // // Fields related to the above unsupported features are omitted from // management frame formats as well (for example, FH/DS/CF parameter sets, // beacon/probe timestamp which is related to physical layer synchronization, // listen interval which is related to power management, capability information // which is related to PCF and other non-modelled features). // module Ieee80211Mac extends MACProtocolBase like IIeee80211Mac { parameters: string address @mutable = 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. string modeSet @enum("a","b","g(erp)","g(mixed)","n","p") = default("g(mixed)"); bool qosStation = default(false); *.rxModule = "^.rx"; *.txModule = "^.tx"; @display("i=block/layer"); @class(Ieee80211Mac); @statistic[passedUpPk](title="packets passed to higher layer"; source=packetSentToUpper; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[sentDownPk](title="packets sent to lower layer"; source=packetSentToLower; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[rcvdPkFromHL](title="packets received from higher layer"; source=packetReceivedFromUpper; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[rcvdPkFromLL](title="packets received from lower layer"; source=packetReceivedFromLower; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @signal[NF_MODESET_CHANGED](type=inet::physicallayer::Ieee80211ModeSet); submodules: dcf: Dcf { parameters: @display("p=100,100"); } hcf: Hcf { parameters: @display("p=200,100"); } rx: <default("Rx")> like IRx { parameters: @display("p=100,200"); } tx: <default("Tx")> like ITx { parameters: @display("p=200,200"); } statistics: <default("BasicStatistics")> like IStatistics { parameters: @display("p=300,100"); } }File: src/inet/linklayer/ieee80211/mac/Ieee80211Mac.ned