Package: inet.linklayer.lmac
LMac
compound 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 | |
| ctrlFrameLength | int | headerLength | |
| mtu | int | 0B | |
| 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 | LMac | |
| selfMessageKinds | inet::LMacType |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| upperLayerIn | input | ||
| upperLayerOut | output | ||
| lowerLayerIn | input | ||
| lowerLayerOut | output |
Signals
| Name | Type | Unit |
|---|---|---|
| packetReceivedFromUpper | cPacket | |
| packetReceivedFromLower | cPacket | |
| packetDropped | cPacket | |
| packetSentToLower | cPacket | |
| packetSentToUpper | cPacket |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode |
|---|---|---|---|---|---|
| packetDropNotAddressedToUs | packet drop: not addressed to us | packetDropReasonIsNotAddressedToUs(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none | |
| packetDropIncorrectlyReceived | packet drop: incorrectly received | packetDropReasonIsIncorrectlyReceived(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none |
Source code
// // Implementation of L-MAC (Lightweight Medium Access Protocol for // Wireless Sensor Networks). // // See C++ documentation for details. // module LMac 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 ctrlFrameLength @unit(b) = default(headerLength); int mtu @unit(B) = default(0B); // 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(LMac); @statistic[packetDropIncorrectlyReceived](title="packet drop: incorrectly received"; source=packetDropReasonIsIncorrectlyReceived(packetDropped); record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none); @statistic[packetDropNotAddressedToUs](title="packet drop: not addressed to us"; source=packetDropReasonIsNotAddressedToUs(packetDropped); record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none); @selfMessageKinds(inet::LMacType); }File: src/inet/linklayer/lmac/LMac.ned