SignalBasedTokenGenerator

Package: inet.queueing.tokengenerator

SignalBasedTokenGenerator

simple module

This module generates tokens for a TokenBasedServer based on received signals.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
ResponseProducer compound module

This module is capable of generating several different streams of packets, one after the other. For each traffic category, the packets are produced by a separate token based server. The traffic stream can be started by adding tokens the corresponding server module. The packet data, packet length, and timing distributions can be configured in the corresponding packet provider.

Extends

Name Type Description
TokenGeneratorBase simple module

This is a base module for various token generator modules.

Parameters

Name Type Default value Description
displayStringTextFormat string "generated %t tk\nto %s"

determines the text that is written on top of the submodule

storageModule string

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

subscriptionModule string "^"
signals string
numTokens double 1

number of tokens generated repeatedly

Properties

Name Value Description
display i=block/control
class SignalBasedTokenGenerator

Signals

Name Type Unit
tokensCreated double

Statistics

Name Title Source Record Unit Interpolation Mode
tokensCreated tokens created count(tokensCreated) count tk
numTokensCreated number of created tokens tokensCreated sum, vector tk none

Direct method calls (observed)

call tofunctioninfo
TokenBasedServerinet::queueing::TokenBasedServer::addTokensaddTokens

Called methods (observed)

functioninfocall from
inet::queueing::SignalBasedTokenGenerator::receiveSignalpacketDroppedPassivePacketSink
inet::queueing::SignalBasedTokenGenerator::receiveSignaltokensDepletedTokenBasedServer

Source code

//
// This module generates tokens for a ~TokenBasedServer based on received signals.
//
simple SignalBasedTokenGenerator extends TokenGeneratorBase
{
    parameters:
        string subscriptionModule = default("^");
        string signals;
        volatile double numTokens = default(1); // number of tokens generated repeatedly
        @class(SignalBasedTokenGenerator);
        @display("i=block/control");
}
File: src/inet/queueing/tokengenerator/SignalBasedTokenGenerator.ned