Package: inet.linklayer.lmac
LMacLayer
simple moduleImplementation of L-MAC (Lightweight Medium Access Protocol for Wireless Sensor Networks)
See C++ documentation for details
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| MACProtocolBase | simple module |
Module base for different MAC protocols. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| interfaceTableModule | string | ||
| 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. |
| slotDuration | double | 100ms |
how long is a slot? |
| headerLength | int | 10B | |
| mtu | int | 0B | |
| queueLength | int | 10 |
length of MAC header |
| defaultChannel | double | 0 |
default channel |
| bitrate | double | 19200bps |
bit rate |
| reservedMobileSlots | int | 2 | |
| numSlots | int | 64 | |
| radioModule | string | "^.radio" |
The path to the Radio module //FIXME remove default value |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/rxtx | |
| class | LMacLayer |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| upperLayerIn | input | ||
| upperLayerOut | output | ||
| lowerLayerIn | input | ||
| lowerLayerOut | output |
Signals
| Name | Type | Unit |
|---|---|---|
| packetReceivedFromUpper | cPacket | |
| packetReceivedFromLower | cPacket | |
| packetFromLowerDropped | cPacket | |
| packetFromUpperDropped | cPacket | |
| packetSentToLower | cPacket | |
| packetSentToUpper | cPacket |
Source code
// // Implementation of L-MAC (Lightweight Medium Access Protocol for // Wireless Sensor Networks) // // See C++ documentation for details // simple LMacLayer extends MACProtocolBase like IMACProtocol { 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. // how long is a slot? double slotDuration @unit(s) = default(100ms); int headerLength @unit(B) = default(10B); int mtu @unit("B") = default(0B); // length of MAC header int queueLength = default(10); // default channel double defaultChannel = default(0); // bit rate double bitrate @unit(bps) = default(19200bps); // level at which we consider medium busy FIXME not used currently // double busyRSSI; int reservedMobileSlots = default(2); int numSlots = default(64); string radioModule = default("^.radio"); // The path to the Radio module //FIXME remove default value @class(LMacLayer); }File: src/inet/linklayer/lmac/LMacLayer.ned