StreamIdentifierLayer

Package: inet.protocolelement.redundancy

compound module StreamIdentifierLayer

Wraps a stream identifier into a protocol layer so that it can be used in a layered compound module.

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

StreamPolicyLayer

compound module

(no description)

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

identifier.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

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

identifier.hasSequenceNumbering

bool

true

identifier.mapping

object

[]

Array of objects, where each object specifies a stream name and a packetFilter, for example [{stream: “s0”, packetFilter: “*”}, …]

Source code

//
// Wraps a stream identifier into a protocol layer so that it can
// be used in a layered compound module.
//
module StreamIdentifierLayer like IProtocolLayer
{
    parameters:
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        identifier: <default("StreamIdentifier")> like IPacketFlow if typename != "" {
            parameters:
                @display("p=200,150;i=block/blackboard");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> identifier.in;
        identifier.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> upperLayerOut;
}

File: src/inet/protocolelement/redundancy/StreamIdentifierLayer.ned