Package: inet.linklayer.base
MacProtocolBase
simple moduleModule base for different MAC protocols.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Known subclasses
| Name | Type | Description |
|---|---|---|
| AckingMac | compound module |
Implements a trivial MAC protocol for use in ~AckingWirelessInterface. |
| BMac | compound module |
Implementation of B-MAC (also called Berkeley MAC, Low Power Listening, or LPL). See C++ documentation for details. |
| CsmaCaMac | compound module |
Implements an imaginary CSMA/CA-based MAC protocol with optional acknowledgements and a retry mechanism. With the appropriate settings, it can approximate basic 802.11b ad-hoc mode operation. |
| EthernetCsmaMac | simple module |
Implements the Ethernet CSMA/CD MAC protocol. It supports building both Ethernet CSMA/CD and Ethernet PLCA network interfaces. |
| Ieee80211Mac | compound module |
Implementation of the 802.11 MAC protocol. This module is intended to be used in combination with the ~Ieee80211Radio module as the physical layer. |
| Ieee802154Mac | compound module |
Generic CSMA protocol supporting Mac-ACKs as well as constant, linear or exponential backoff times. |
| LMac | compound module |
Implementation of L-MAC (Lightweight Medium Access Protocol for Wireless Sensor Networks). |
| ShortcutMac | simple module |
Implements a simple shortcut to peer MAC protocol that completely bypasses the physical layer. Packets received from the upper layer protocols are never lost. The MAC protocol directly sends packets to the destination MAC protocol without any physical layer processing. Physical layer overhead is simply simulated by overhead bits, overhead transmission duration and a propagation delay. |
| XMac | compound module |
Implementation of X-MAC. See C++ documentation for details. |
Extends
| Name | Type | Description |
|---|---|---|
| LayeredProtocolBase | simple module |
Module base for different layered protocols. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| interfaceTableModule | string |
Properties
| Name | Value | Description |
|---|---|---|
| class | LayeredProtocolBase | |
| display | i=block/rxtx |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| upperLayerIn | input | ||
| upperLayerOut | output | ||
| lowerLayerIn | input | ||
| lowerLayerOut | output |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| packetReceivedFromUpper | cPacket | ||
| packetReceivedFromLower | cPacket | ||
| packetDropped | cPacket | ||
| packetSentToLower | cPacket | ||
| packetSentToUpper | cPacket |
Source code
// // Module base for different MAC protocols. // simple MacProtocolBase extends LayeredProtocolBase { parameters: string interfaceTableModule; @display("i=block/rxtx"); gates: input upperLayerIn @labels(INetworkHeader/down); output upperLayerOut @labels(INetworkHeader/up); input lowerLayerIn @labels(ILinkLayerFrame/up); output lowerLayerOut @labels(ILinkLayerFrame/down); }File: src/inet/linklayer/base/MacProtocolBase.ned