DirectionReverserLayer

Package: inet.linklayer.ethernet.common

DirectionReverserLayer

compound module

This module provides a layer that combines the decision for local delivery with the service of reversing the direction of an incoming packet to outgoing for packet forwarding.

MessageDispatcher IPacketDelayer PacketDirectionReverser PacketMultiplexer

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Properties

Name Value Description
display i=block/layer

Gates

Name Direction Size Description
upperLayerIn input
upperLayerOut output
lowerLayerIn input
lowerLayerOut output

Unassigned submodule parameters

Name Type Default value Description
fork.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

fork.forwardProtocolRegistration bool true
reverser.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

join.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

join.forwardServiceRegistration bool true

Source code

//
// This module provides a layer that combines the decision for local delivery
// with the service of reversing the direction of an incoming packet to outgoing
// for packet forwarding.
//
module DirectionReverserLayer like IProtocolLayer
{
    parameters:
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        fork: MessageDispatcher {
            forwardServiceRegistration = false;
            @display("p=100,100;i=-;b=10,10,oval,grey,,1");
        }
        delayer: <default("")> like IPacketDelayer {
            @display("p=300,100");
        }
        reverser: PacketDirectionReverser {
            @display("p=500,100");
        }
        join: PacketMultiplexer {
            forwardProtocolRegistration = false;
            @display("p=700,100");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> join.in++;
        join.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> fork.in++;
        fork.out++ --> { @display("m=n"); } --> upperLayerOut;

        fork.out++ --> delayer.in;
        delayer.out --> reverser.in;
        reverser.out --> join.in++;
}
File: src/inet/linklayer/ethernet/common/DirectionReverserLayer.ned