StreamRelayLayer

Package: inet.protocolelement.redundancy

StreamRelayLayer

compound module

This module combines a stream merger and a stream splitter module into a stream relay layer. For incoming packets the identified streams are merged by the stream merger. For outgoing packets the requested streams are split by the stream splitter.

merger : like IPacketFilter

StreamMerger: This module merges the packets of the same stream by removing duplicates.

IPacketFilter: This module interface is implemented by packet filter modules.

Source:
merger: <default("StreamMerger")> like IPacketFilter if typename != "" {
    @display("p=200,150;i=block/join");
} splitter : like IPacketPusher

StreamSplitter: This module duplicates incoming packets based on the stream they are part of.

IPacketPusher: This module interface is implemented by packet pushers.

Source:
splitter: <default("StreamSplitter")> like IPacketPusher if typename != "" {
    @display("p=500,150;i=block/fork");
}

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.

Parameters

Name Type Default value Description
interfaceTableModule string

Properties

Name Value Description
display i=block/layer

Gates

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

Source code

//
// This module combines a stream merger and a stream splitter module into a
// stream relay layer. For incoming packets the identified streams are merged
// by the stream merger. For outgoing packets the requested streams are split
// by the stream splitter.
//
module StreamRelayLayer like IProtocolLayer
{
    parameters:
        string interfaceTableModule;
        *.interfaceTableModule = default(this.interfaceTableModule);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        merger: <default("StreamMerger")> like IPacketFilter if typename != "" {
            @display("p=200,150;i=block/join");
        }
        splitter: <default("StreamSplitter")> like IPacketPusher if typename != "" {
            @display("p=500,150;i=block/fork");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> splitter.in;
        splitter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> merger.in;
        merger.out --> { @display("m=n"); } --> upperLayerOut;
}
File: src/inet/protocolelement/redundancy/StreamRelayLayer.ned