TC2

Package: inet.examples.diffserv.onedomain

TC2

compound module

Traffic conditioner used in Experiment 3.1.

classifier : MultiFieldClassifier

This classifier contains a list of filters that identifies the flows and determines their classes.

Source:
classifier: MultiFieldClassifier {
    filters = xml("<filters><filter gate=\"0\"/></filters>");
    @display("p=100,200");
} meter : TokenBucketMeter

Simple token bucket meter.

Source:
meter: TokenBucketMeter {
    @display("p=250,100");
} marker : DscpMarker

Sets the DSCP field (lower six bit of Tos/TrafficClass) of IP datagrams to the value specified by...

Source:
marker: DscpMarker {
    @display("p=400,100");
} join : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
join: PacketMultiplexer {
    @display("p=550,200");
}

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/classifier

Gates

Name Direction Size Description
in input
out output

Unassigned submodule parameters

Name Type Default value Description
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
meter.displayStringTextFormat string ""

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

meter.interfaceTableModule string

The path to the InterfaceTable module

meter.cir string

Committed information rate, either absolute bitrate (e.g. "100kbps") or relative to the link's datarate (e.g. "20%")

meter.cbs int

Committed burst size

meter.colorAwareMode bool false

Enables color-aware mode

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

marker.dscps string

A space-separated list of DSCP values; both names (e.g., AF11, EF) and numbers (0x0A, 0b101110) can be used

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

join.forwardServiceRegistration bool true
join.forwardProtocolRegistration bool true

Source code

//
// Traffic conditioner used in Experiment 3.1.
//
module TC2 like ITrafficConditioner
{
    parameters:
        string interfaceTableModule;
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        @display("i=block/classifier");
    gates:
        input in;
        output out;
    submodules:
        classifier: MultiFieldClassifier {
            filters = xml("<filters><filter gate=\"0\"/></filters>");
            @display("p=100,200");
        }
        meter: TokenBucketMeter {
            @display("p=250,100");
        }
        marker: DscpMarker {
            @display("p=400,100");
        }
        join: PacketMultiplexer {
            @display("p=550,200");
        }
    connections:
        in --> classifier.in;
        classifier.out++ --> meter.in;
        classifier.defaultOut --> join.in++;
        meter.greenOut --> marker.in++;
        meter.redOut --> marker.in++;
        marker.out --> join.in++;
        join.out --> out;
}

File: examples/diffserv/onedomain/TC2.ned