PeekingUnderTheHoodShowcase

Package: inet.showcases.tsn.streamfiltering.underthehood

PeekingUnderTheHoodShowcase

network

(no description)

sources[numSources] : ActivePacketSource

An active packet source which pushes packets into the connected module.

Source:
sources[numSources]: ActivePacketSource {
    @display("p=100,100,column,150");
} multiplexer : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
multiplexer: PacketMultiplexer {
    @display("p=300,100");
} identifier : StreamIdentifier

Identifies the stream of a packet using packet filter expressions.

Source:
identifier: StreamIdentifier {
    @display("p=500,100");
} filter : like IPacketFilter

SimpleIeee8021qFilter: Implements a simplified version of the IEEE 802.1Q per-stream filtering and policing.

IPacketFilter: Interface for packet filter modules.

Source:
filter: <default("SimpleIeee8021qFilter")> like IPacketFilter {
    @display("p=700,100");
} sink : PassivePacketSink

A passive packet sink which is pushed with packets by the connected packet producer.

Source:
sink: PassivePacketSink {
    @display("p=900,100");
}

Usage diagram

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

Parameters

Name Type Default value Description
numSources int

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

Name Type Default value Description
sources.displayStringTextFormat string "created %p pk (%l)"

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

sources.packetNameFormat string "%a-%c"

See directives in module documentation

sources.packetRepresentation string "byteCount"

Determines the chunk of the packet data

sources.packetProtocol string "unknown"
sources.packetLength int
sources.packetData int -1
sources.attachCreationTimeTag bool true
sources.attachIdentityTag bool true
sources.attachDirectionTag bool true
sources.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sources.initialProductionOffset double -1s

Initial duration before which packets are not produced. When negative, then produce packet in initialize()

sources.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

sources.scheduleForAbsoluteTime bool true

When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event

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

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

multiplexer.forwardServiceRegistration bool true
multiplexer.forwardProtocolRegistration bool true
identifier.displayStringTextFormat string "processed %p pk (%l)"

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: "*"}, ...]

sink.displayStringTextFormat string "received %p pk (%l)"

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

sink.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sink.initialConsumptionOffset double 0s

Initial duration before which packets are not consumed

sink.consumptionInterval double 0s

Elapsed time between subsequent packets allowed to be pushed by the connected packet producer, 0 means any number of packets can be pushed at the same simulation time

sink.scheduleForAbsoluteTime bool true

When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event

Source code

network PeekingUnderTheHoodShowcase
{
    parameters:
        int numSources;
    submodules:
        sources[numSources]: ActivePacketSource {
            @display("p=100,100,column,150");
        }
        multiplexer: PacketMultiplexer {
            @display("p=300,100");
        }
        identifier: StreamIdentifier {
            @display("p=500,100");
        }
        filter: <default("SimpleIeee8021qFilter")> like IPacketFilter {
            @display("p=700,100");
        }
        sink: PassivePacketSink {
            @display("p=900,100");
        }
    connections:
        for i=0..numSources-1 {
            sources[i].out --> multiplexer.in++;
        }
        multiplexer.out --> identifier.in;
        identifier.out --> filter.in;
        filter.out --> sink.in;
}
File: showcases/tsn/streamfiltering/underthehood/PeekingUnderTheHoodShowcase.ned