Package: inet.physicallayer.wireless.shortcut
ShortcutRadio
simple moduleThis module implements a simple shortcut to peer radio protocol that completely bypasses the physical medium. This radio module directly sends packets to the other radio module without any physical layer processing in the radio medium. Packets received from the upper layer protocols may be lost. Physical layer overhead is simply simulated by physical header bits, preamble transmission duration and a propagation delay.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| PhysicalLayerBase | simple module |
Module base for different physical layers. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| interfaceTableModule | string | ||
| bitrate | double | ||
| lengthOverhead | int | 0b |
extra length added to packets |
| durationOverhead | double | 0s |
extra transmission duration added to packets |
| propagationDelay | double | 0s |
propagation time to all destinations |
| packetLoss | double | 0 |
packet loss probability |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/wrxtx | |
| class | ShortcutRadio |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| upperLayerIn | input | ||
| upperLayerOut | output | ||
| radioIn | input |
Signals
| Name | Type | Unit |
|---|---|---|
| transmissionStateChanged | long |
Direct method calls (observed)
| call to | function | info |
|---|---|---|
| AckingMac | inet::AckingMac::receiveSignal | transmissionStateChanged |
| InterfaceTable | inet::InterfaceTable::findInterfaceByNodeInputGateId | findInterfaceByNodeInputGateId |
Incoming messages (observed)
| gate | msg | kind | ctrl | srcModule | tags |
|---|---|---|---|---|---|
| radioIn | Packet | 0 | ShortcutRadio | InterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq? | |
| upperLayerIn | Packet | 0 | AckingMac | InterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq? |
Outgoing messages (observed)
| gate | msg | kind | ctrl | destModule | tags |
|---|---|---|---|---|---|
| upperLayerOut | Packet | 0 | AckingMac | InterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq? |
Packet operations (observed)
| chunkType | packetAction |
|---|---|
| ShortcutPhyHeader | insertAtFront, popAtFront |
Shared Tagging operations (observed)
| tagType | tagAction |
|---|---|
| MacAddressReq | getTag |
| PacketProtocolTag | getTagForUpdate |
Source code
// // This module implements a simple shortcut to peer radio protocol that completely // bypasses the physical medium. This radio module directly sends packets to the // other radio module without any physical layer processing in the radio medium. // Packets received from the upper layer protocols may be lost. Physical layer // overhead is simply simulated by physical header bits, preamble transmission // duration and a propagation delay. // simple ShortcutRadio extends PhysicalLayerBase like IRadio { parameters: string interfaceTableModule; double bitrate @unit(bps); volatile int lengthOverhead @unit(b) = default(0b); // extra length added to packets volatile double durationOverhead @unit(s) = default(0s); // extra transmission duration added to packets volatile double propagationDelay @unit(s) = default(0s); // propagation time to all destinations volatile double packetLoss = default(0); // packet loss probability @class(ShortcutRadio); @signal[transmissionStateChanged](type=long); // type=inet::physicallayer::TransmissionState }File: src/inet/physicallayer/wireless/shortcut/ShortcutRadio.ned