Package: inet.linklayer.ieee802154
Ieee802154NarrowbandMac
compound module(no description)
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Used in compound modules
Name | Type | Description |
---|---|---|
Ieee802154NarrowbandInterface | compound module |
This module implements an IEEE 802.15.4 narrowband network interface. |
Extends
Name | Type | Description |
---|---|---|
Ieee802154Mac | compound module |
Generic CSMA protocol supporting Mac-ACKs as well as constant, linear or exponential backoff times. |
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. |
headerLength | int | 72 b |
length of MAC header |
mtu | int | 127 Byte - 9 Byte | |
bitrate | double | 250000 bps |
bit rate |
ccaDetectionTime | double | 0.000128 s |
Clear Channel Assessment detection time |
rxSetupTime | double | 0s |
Time to setup radio to reception state |
aTurnaroundTime | double | 0.000192 s |
Time to switch radio from Rx to Tx state |
useMACAcks | bool | true |
Send/Expect MAC acks for unicast traffic? |
macMaxFrameRetries | int | 3 |
Maximum number of frame retransmission, only used when usage of MAC acks is enabled. |
macAckWaitDuration | double | 0.00056 s |
Time to wait for an acknowledgement after transmitting a unicast frame. Only used when usage of MAC acks is enabled. Value is calculated from 1+12+10+12 symbols, which is defined for nonbeacon-enabled PAN. In the non-beacon-enabled case, the receiver responds at aTurnaroundTime (i.e. the time for the sender and receiver to both be guaranteed to have switched from Tx to Rx and vice verse). This gives the value 192us + 352us = 544us (there's been some discussion about the "extra" 1 symbol == 16us) [section 7.5.6.4.2 of the specification]. |
ackLength | int | 40 b |
Complete MAC ack message length (in bits) (! headerLength is not added to this), only used when usage of MAC acks is enabled. |
sifs | double | 0.000192 s |
Simple interframe space (12 symbols). Time to wait between receiving a frame and acknowledging it. Should be bigger than the maximum time for switching between Tx and Rx at the receiver. Only used when usage of MAC acks is enabled. |
backoffMethod | string | "exponential" |
Backoff method to use: constant, linear or exponential |
macMaxCSMABackoffs | int | 4 |
maximum number of extra backoffs (excluding the first unconditional one) before frame drop |
aUnitBackoffPeriod | double | 0.00032 s |
base unit for all backoff calculations |
contentionWindow | int | 2 |
# of backoff periods of the initial contention window (for linear and constant backoff method only) |
macMinBE | int | 3 |
minimum backoff exponent (for exponential backoff method only) |
macMaxBE | int | 5 |
maximum backoff exponent (for exponential backoff method only) |
radioModule | string | "^.radio" |
The path to the Radio module //FIXME remove default value |
Properties
Name | Value | Description |
---|---|---|
display | i=block/rxtx | |
class | Ieee802154Mac |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input | ||
upperLayerOut | output | ||
lowerLayerIn | input | ||
lowerLayerOut | output |
Signals
Name | Type | Unit |
---|---|---|
linkBroken | inet::Packet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetDropNotAddressToUs | packet drop: not addressed to us | packetDropReasonIsNotAddressedToUs(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none | |
packetDropQueueOverflow | packet drop: queue overflow | packetDropReasonIsQueueOverflow(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none | |
packetDropBackoffLimitReached | packet drop: backoff limit reached | packetDropReasonIsCongestion(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none | |
packetDropRetryLimitReached | packet drop: retry limit reached | packetDropReasonIsRetryLimitReached(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none | |
linkBroken | link break | linkBroken | count | none | |
packetDropIncorrectlyReceived | packet drop: incorrectly received | packetDropReasonIsIncorrectlyReceived(packetDropped) | count, sum(packetBytes), vector(packetBytes) | none |
Scheduled messages (observed)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 0 | timer-backoff | |||
omnetpp::cMessage | 0 | timer-cca | |||
omnetpp::cMessage | 0 | timer-rxAck | |||
omnetpp::cMessage | 0 | timer-sifs |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
InterfaceTable | inet::InterfaceTable::interfaceChanged | interfaceChanged |
Ieee802154NarrowbandDimensionalRadio | inet::physicallayer::FlatRadioBase::setRadioMode | setRadioMode |
Ieee802154NarrowbandScalarRadio | inet::physicallayer::FlatRadioBase::setRadioMode | setRadioMode |
DropTailQueue | inet::queueing::PacketQueue::pullPacket | pullPacket |
Called methods (observed)
function | info | call from |
---|---|---|
inet::Ieee802154Mac::handleCanPullPacketChanged | handleCanPullPacketChanged | DropTailQueue |
inet::Ieee802154Mac::receiveSignal | transmissionStateChanged | Ieee802154NarrowbandDimensionalRadio, Ieee802154NarrowbandScalarRadio |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
lowerLayerIn | Packet | 0 | Ieee802154NarrowbandDimensionalRadio | ErrorRateInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd | |
lowerLayerIn | Packet | 0 | Ieee802154NarrowbandScalarRadio | ErrorRateInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
lowerLayerOut | Packet | 0 | Ieee802154NarrowbandDimensionalRadio | PacketProtocolTag, DispatchProtocolInd?, InterfaceReq?, MacAddressReq?, MulticastReq?, NetworkProtocolInd?, TransportProtocolInd? | |
lowerLayerOut | Packet | 0 | Ieee802154NarrowbandScalarRadio | PacketProtocolTag, DispatchProtocolInd?, InterfaceReq?, MacAddressReq?, MulticastReq?, NetworkProtocolInd?, TransportProtocolInd? | |
upperLayerOut | Packet | 0 | Ipv4 | DispatchProtocolReq, ErrorRateInd, InterfaceInd, MacAddressInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd |
Pull in messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
upperLayerIn | Packet | 0 | DropTailQueue | DispatchProtocolInd, InterfaceReq, MacAddressReq, MulticastReq, NetworkProtocolInd, PacketProtocolTag, TransportProtocolInd |
Packet operations (observed)
chunkType | packetAction |
---|---|
Ieee802154MacHeader | insertAtFront, peekAtFront, popAtFront |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
ErrorRateInd | findTag |
InterfaceInd | addTagIfAbsent |
MacAddressInd | addTagIfAbsent |
MacAddressReq | getTag |
PacketProtocolTag | addTag, addTagIfAbsent, getTag |
Source code
module Ieee802154NarrowbandMac extends Ieee802154Mac { parameters: useMACAcks = true; // Time needed to switch from sleep to rx. // TODO This is probabily wrong, since it is used to compute // the time for the CCA (and that might follow an RX state) rxSetupTime = 0s; // aMaxPHYPacketSize = 127 Octets (802.15.4-2006, page 45) // aMinMPDUOverhead = 9 Octets (802.15.4-2006, page 159) // aMaxMACPayloadSize = aMaxPHYPacketSize - aMinMPDUOverhead (802.15.4-2006, page 159) mtu = 127 Byte - 9 Byte; // length of MAC header // aMinMPDUOverhead = 9 Octets (802.15.4-2006, page 159) headerLength = default(72 b); // Exponential Backoff backoffMethod = default("exponential"); // Maximum number of frame retransmission // 802.15.4-2006, page 164 macMaxFrameRetries = default(3); // Maximum number of extra backoffs (excluding the first unconditional one) before frame drop // 802.15.4-2006, page 163 macMaxCSMABackoffs = default(4); // Minimum backoff exponent // 802.15.4-2006, page 164 macMinBE = default(3); // Maximum backoff exponent // 802.15.4-2006, page 163 macMaxBE = default(5); }File: src/inet/linklayer/ieee802154/Ieee802154NarrowbandMac.ned