ShortcutRadio

Package: inet.physicallayer.wireless.shortcut

ShortcutRadio

simple module

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.

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 tofunctioninfo
AckingMacinet::AckingMac::receiveSignaltransmissionStateChanged
InterfaceTableinet::InterfaceTable::findInterfaceByNodeInputGateIdfindInterfaceByNodeInputGateId

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
radioInPacket0ShortcutRadioInterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq?
upperLayerInPacket0AckingMacInterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq?

Outgoing messages (observed)

gatemsgkindctrldestModuletags
upperLayerOutPacket0AckingMacInterfaceReq, MacAddressInd, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?, NetworkProtocolInd?, SocketReq?

Packet operations (observed)

chunkTypepacketAction
ShortcutPhyHeaderinsertAtFront, popAtFront

Shared Tagging operations (observed)

tagTypetagAction
MacAddressReqgetTag
PacketProtocolTaggetTagForUpdate

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