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.

cutthroughBarrier : like IPacketDelayer

IPacketDelayer: This module interface is implemented by packet delayers.

Source:
cutthroughBarrier: <default("")> like IPacketDelayer {
    @display("p=100,150");
} fork : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
fork: MessageDispatcher {
    forwardServiceRegistration = false;
    @display("p=100,300;i=-;b=10,10,oval,grey,,1");
} delayer : like IPacketDelayer

IPacketDelayer: This module interface is implemented by packet delayers.

Source:
delayer: <default("")> like IPacketDelayer {
    @display("p=300,300");
} reverser : like IPacketFlow

PacketDirectionReverser: This module is part of the layer 2 architecture.

IPacketFlow: This module interface is implemented by packet flows.

Source:
reverser: <default("PacketDirectionReverser")> like IPacketFlow {
    @display("p=500,300");
} join : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
join: PacketMultiplexer {
    forwardProtocolRegistration = false;
    @display("p=700,300");
}

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
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:
        cutthroughBarrier: <default("")> like IPacketDelayer {
            @display("p=100,150");
        }
        fork: MessageDispatcher {
            forwardServiceRegistration = false;
            @display("p=100,300;i=-;b=10,10,oval,grey,,1");
        }
        delayer: <default("")> like IPacketDelayer {
            @display("p=300,300");
        }
        reverser: <default("PacketDirectionReverser")> like IPacketFlow {
            @display("p=500,300");
        }
        join: PacketMultiplexer {
            forwardProtocolRegistration = false;
            @display("p=700,300");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> join.in++;
        join.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> fork.in++;
        fork.out++ --> cutthroughBarrier.in;
        cutthroughBarrier.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