ContentBasedClassifierTutorialStep

Package: inet.tutorials.queueing

ContentBasedClassifierTutorialStep

network

(no description)

producer : ActivePacketSource

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

Source:
producer: ActivePacketSource {
    @display("p=100,100");
} classifier : ContentBasedClassifier

Connects one packet producer to multiple packet consumers.

Source:
classifier: ContentBasedClassifier {
    @display("p=300,100");
} consumer1 : PassivePacketSink

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

Source:
consumer1: PassivePacketSink {
    @display("p=500,100");
} consumer2 : PassivePacketSink

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

Source:
consumer2: PassivePacketSink {
    @display("p=500,200");
}

Usage diagram

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

Properties

Name Value Description
isNetwork
display bgb=600,300

Unassigned submodule parameters

Name Type Default value Description
producer.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

producer.packetNameFormat string "%a-%c"

See directives in module documentation

producer.packetRepresentation string "byteCount"

Determines the chunk of the packet data

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

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

producer.initialProductionOffset double -1s

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

producer.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

producer.scheduleForAbsoluteTime bool true

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

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

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

consumer1.clockModule string ""

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

consumer1.initialConsumptionOffset double 0s

Initial duration before which packets are not consumed

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

consumer1.scheduleForAbsoluteTime bool true

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

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

consumer2.clockModule string ""

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

consumer2.initialConsumptionOffset double 0s

Initial duration before which packets are not consumed

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

consumer2.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 ContentBasedClassifierTutorialStep
{
    @display("bgb=600,300");
    submodules:
        producer: ActivePacketSource {
            @display("p=100,100");
        }
        classifier: ContentBasedClassifier {
            @display("p=300,100");
        }
        consumer1: PassivePacketSink {
            @display("p=500,100");
        }
        consumer2: PassivePacketSink {
            @display("p=500,200");
        }
    connections allowunconnected:
        producer.out --> classifier.in;
        classifier.out++ --> consumer1.in;
        classifier.out++ --> consumer2.in;
}

//-------------------------------------------------


File: tutorials/queueing/QueueingTutorial.ned