PeekingUnderTheHoodShowcase

Package: inet.showcases.tsn.trafficshaping.underthehood

PeekingUnderTheHoodShowcase

network

(no description)

source[numSources] : ActivePacketSource

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

Source:
source[numSources]: ActivePacketSource {
    @display("p=100,100,col,150");
} meter[numSources] : EligibilityTimeMeter

A packet meter which measures the packet flow that is passing through and optionally attaches an...

Source:
meter[numSources]: EligibilityTimeMeter {
    @display("p=300,100,col,150");
} multiplexer : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
multiplexer: PacketMultiplexer {
    @display("p=500,100");
} filter : EligibilityTimeFilter

A packet filter that operates based on the ~EligibilityTimeTag attached to the packet that is...

Source:
filter: EligibilityTimeFilter {
    @display("p=700,100");
} queue : EligibilityTimeQueue

A packet queue that keeps the packets in ascending order based on the eligibility time in the...

Source:
queue: EligibilityTimeQueue {
    @display("p=900,100");
} gate : EligibilityTimeGate

A packet gate that operates based on the ~EligibilityTimeTag attached to the next packet waiting to...

Source:
gate: EligibilityTimeGate {
    @display("p=1100,100");
} server : PacketServer

Repeatedly pulls packets from the connected packet provider and after a processing delay, it pushes...

Source:
server: PacketServer {
    @display("p=1300,100");
} classifier : ContentBasedClassifier

Connects one packet producer to multiple packet consumers.

Source:
classifier: ContentBasedClassifier {
    @display("p=1500,100");
} sink[numSources] : PassivePacketSink

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

Source:
sink[numSources]: PassivePacketSink {
    @display("p=1700,100,col,150");
}

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
source.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

source.packetNameFormat string "%a-%c"

See directives in module documentation

source.packetRepresentation string "byteCount"

Determines the chunk of the packet data

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

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

source.initialProductionOffset double -1s

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

source.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

source.scheduleForAbsoluteTime bool true

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

meter.displayStringTextFormat string "contains {numTokens} tk\nbucket empty at {bucketEmptyTime}\nmetered %p pk (%l)"

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

meter.clockModule string ""

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

meter.packetOverheadLength int 0b

Extra packet length taken into account, can be used to represent overhead added by lower layers

meter.committedInformationRate double

Committed information rate of the packet flow

meter.committedBurstSize int

Committed burst size of the packet flow

meter.maxResidenceTime double -1s

Maximum packet residence time measured from the packet arrival time to the meter module to the transmission eligibility time, not used by default

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
filter.displayStringTextFormat string "dropped %d/%p pk (%k/%l)"

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

filter.backpressure bool false
filter.clockModule string ""

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

filter.maxResidenceTime double -1s

Optional max residence time limit, not used by default

queue.displayStringTextFormat string "contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d"

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

queue.packetCapacity int -1

Maximum number of packets in the queue, no limit by default

queue.dataCapacity int -1b

Maximum total length of packets in the queue, no limit by default

queue.dropperClass string ""

Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class

queue.comparatorClass string "inet::PacketEligibilityTimeComparator"

Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class

queue.bufferModule string ""

Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default

gate.displayStringTextFormat string "eligible in {remainingEligibilityTime}\npassed %p pk (%l)"

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

gate.bitrate double nan bps
gate.extraLength int 0b
gate.extraDuration double 0s
gate.clockModule string ""

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

server.displayStringTextFormat string "served %p pk (%l)\n%s"

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

server.clockModule string ""

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

server.serveSchedulingPriority int -1

Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event

server.processingTime double

Determines additional processing time per packet

server.processingBitrate double inf bps

Determines additional processing time per bit

classifier.displayStringTextFormat string "classified %p pk (%l)"

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

classifier.reverseOrder bool false
classifier.defaultGateIndex int 0

Default gate index if no matching labels are found

classifier.packetFilters object

Array of packet filter expressions

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:
        source[numSources]: ActivePacketSource {
            @display("p=100,100,col,150");
        }
        meter[numSources]: EligibilityTimeMeter {
            @display("p=300,100,col,150");
        }
        multiplexer: PacketMultiplexer {
            @display("p=500,100");
        }
        filter: EligibilityTimeFilter {
            @display("p=700,100");
        }
        queue: EligibilityTimeQueue {
            @display("p=900,100");
        }
        gate: EligibilityTimeGate {
            @display("p=1100,100");
        }
        server: PacketServer {
            @display("p=1300,100");
        }
        classifier: ContentBasedClassifier {
            @display("p=1500,100");
        }
        sink[numSources]: PassivePacketSink {
            @display("p=1700,100,col,150");
        }
    connections:
        for i=0..numSources-1 {
            source[i].out --> meter[i].in;
            meter[i].out --> multiplexer.in++;
        }
        multiplexer.out --> filter.in;
        filter.out --> queue.in;
        queue.out --> gate.in;
        gate.out --> server.in;
        server.out --> classifier.in;
        for i=0..numSources-1 {
            classifier.out++ --> sink[i].in;
        }
}
File: showcases/tsn/trafficshaping/underthehood/PeekingUnderTheHoodShowcase.ned