RequestResponseTutorialStep

Package: inet.tutorials.queueing

RequestResponseTutorialStep

network

(no description)

ActivePacketSource PassivePacketSink RequestConsumer ResponseProducer

Usage diagram

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

Properties

Name Value Description
isNetwork
display bgb=400,300

Unassigned submodule parameters

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

determines the text that is written on top of the submodule

requestProducer.packetNameFormat string "%a-%c"

see directives in module documentation

requestProducer.packetRepresentation string "byteCount"

determines the chunk of the packet data

requestProducer.packetLength int
requestProducer.packetData int -1
requestProducer.attachCreationTimeTag bool true
requestProducer.attachIdentityTag bool true
requestProducer.attachDirectionTag bool true
requestProducer.clockModule string ""

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

requestProducer.initialProductionOffset double 0s
requestProducer.productionInterval double

elapsed time between subsequent packets pushed to the connected packet consumer

requestProducer.scheduleForAbsoluteTime bool true

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

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

determines the text that is written on top of the submodule

responseConsumer.clockModule string ""

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

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

responseConsumer.scheduleForAbsoluteTime bool true

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

responseProducer.provider.displayStringTextFormat string "created %p pk (%l)"

determines the text that is written on top of the submodule

responseProducer.provider.packetNameFormat string "%a-%c"

see directives in module documentation

responseProducer.provider.packetRepresentation string "byteCount"

determines the chunk of the packet data

responseProducer.provider.packetLength int
responseProducer.provider.packetData int -1
responseProducer.provider.attachCreationTimeTag bool true
responseProducer.provider.attachIdentityTag bool true
responseProducer.provider.attachDirectionTag bool true
responseProducer.provider.clockModule string ""

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

responseProducer.provider.providingInterval double 0s

elapsed time between subsequent packets allowed to be pulled by the connected packet collector, 0 means any number of packets can be pulled at the same simulation time

responseProducer.provider.scheduleForAbsoluteTime bool true

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

responseProducer.server.displayStringTextFormat string "contains %n tk\nserved %p pk (%l)"

determines the text that is written on top of the submodule

responseProducer.server.initialNumTokens double 0

initial number of tokens

responseProducer.server.maxNumTokens double nan

maximum number of tokens

responseProducer.server.tokenConsumptionPerPacket double 1

how many tokens are consumed per processed packet

responseProducer.server.tokenConsumptionPerBit double 0

how many tokens are consumed per processed bit

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

determines the text that is written on top of the submodule

responseProducer.multiplexer.forwardServiceRegistration bool true
responseProducer.multiplexer.forwardProtocolRegistration bool true
responseProducer.tokenGenerator.displayStringTextFormat string "generated %t tk\nto %s"

determines the text that is written on top of the submodule

responseProducer.tokenGenerator.storageModule string "^." + parent.requestConsumerModule + ".server"

module path of the token storage where the tokens are generated via C++ method call

responseProducer.tokenGenerator.subscriptionModule string "^"
responseProducer.tokenGenerator.signals string "tokensDepleted"
responseProducer.tokenGenerator.numTokens double 1

number of tokens generated repeatedly

Source code

network RequestResponseTutorialStep
{
    @display("bgb=400,300");
    submodules:
        requestProducer: ActivePacketSource {
            @display("p=100,100");
        }
        responseConsumer: PassivePacketSink {
            @display("p=300,100");
        }
        requestConsumer: RequestConsumer {
            @display("p=100,200");
            responseProducerModule = "^.responseProducer";
        }
        responseProducer: ResponseProducer {
            @display("p=300,200");
            tokenGenerator.storageModule = "^.^.requestConsumer.server";
        }
    connections allowunconnected:
        requestProducer.out --> requestConsumer.in;
        responseProducer.out --> responseConsumer.in;
}

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


File: tutorials/queueing/QueueingTutorial.ned