StreamCoderLayer

Package: inet.protocolelement.redundancy

StreamCoderLayer

compound module

This module combines a stream decoder and a stream encoder into a layer. For incoming packets the stream decoder determines the stream of the packet. For outgoing packets the stream encoder determines the VLAN id, etc. of the packet.

decoder : like IPacketFlow

StreamDecoder: This module decodes the stream of a packet by matching various tags on the packet against the...

IPacketFlow: This module interface is implemented by packet flows.

Source:
decoder: <default("StreamDecoder")> like IPacketFlow if typename != "" {
    @display("p=200,150;i=block/blackboard");
} encoder : like IPacketFlow

StreamEncoder: This module encodes the stream name of a packet into several request tags attached to the packet.

IPacketFlow: This module interface is implemented by packet flows.

Source:
encoder: <default("StreamEncoder")> like IPacketFlow if typename != "" {
    @display("p=500,150;i=block/blackboard");
}

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 decoder and a stream encoder into a layer. For
// incoming packets the stream decoder determines the stream of the packet. For
// outgoing packets the stream encoder determines the VLAN id, etc. of the packet.
//
module StreamCoderLayer like IProtocolLayer
{
    parameters:
        string interfaceTableModule;
        *.interfaceTableModule = default(this.interfaceTableModule);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        decoder: <default("StreamDecoder")> like IPacketFlow if typename != "" {
            @display("p=200,150;i=block/blackboard");
        }
        encoder: <default("StreamEncoder")> like IPacketFlow if typename != "" {
            @display("p=500,150;i=block/blackboard");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> encoder.in;
        encoder.out --> { @display("m=s"); } --> lowerLayerOut;

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