ShortcutRadio

Package: inet.physicallayer.wireless.shortcut

simple module ShortcutRadio

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.

inet.physicallayer.wireless.shortcut.ShortcutRadioShortcutRadiosimple

Inheritance diagram

Extends

Name

Type

Description

PhysicalLayerBase

simple module

Module base for different physical layers.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

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

class

ShortcutRadio

display

i=block/wrxtx

Gates

Name

Direction

Size

Description

upperLayerIn

input

upperLayerOut

output

radioIn

input

Signals

Name

Type

Unit

Description

packetDropped

cPacket

packetReceivedFromLower

cPacket

packetReceivedFromUpper

cPacket

packetSentToLower

cPacket

packetSentToUpper

cPacket

transmissionStateChanged

long

Type=inet::physicallayer::TransmissionState

Source code

//
// 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