Package: inet.queueing.tokengenerator
SignalBasedTokenGenerator
simple moduleGenerates 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 |
Generates 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 to the corresponding server module. The packet data, packet length, and timing distributions can be configured in the corresponding packet provider. |
Used in
| Name | Type | Description |
|---|---|---|
| SignalBasedTokenGeneratorTutorialStep | network | (no description) |
Extends
| Name | Type | Description |
|---|---|---|
| TokenGeneratorBase | simple module |
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, supports displaying pars, watches, and module-specific information |
| storageModule | string |
Module path of the token storage where the tokens are generated via C++ method call |
|
| subscriptionModule | string | "^" | |
| signals | string | ||
| intSignalValue | int | -1 | |
| doubleSignalValue | double | nan | |
| numTokens | double | 1 |
Number of tokens generated repeatedly |
Properties
| Name | Value | Description |
|---|---|---|
| class | SignalBasedTokenGenerator | |
| display | i=block/control |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| tokensCreated | double |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| tokensCreated | tokens created | count(tokensCreated) | count | tk |
the statistical value is the number of times tokens were created |
|
| numTokensCreated | number of created tokens | tokensCreated | sum, vector | tk | none |
the statistical value is the number of created tokens |
Source code
// // Generates tokens for a ~TokenBasedServer based on received signals. // simple SignalBasedTokenGenerator extends TokenGeneratorBase like ITokenGenerator { parameters: string subscriptionModule = default("^"); string signals; int intSignalValue = default(-1); double doubleSignalValue = default(nan); volatile double numTokens = default(1); // Number of tokens generated repeatedly @class(SignalBasedTokenGenerator); @display("i=block/control"); }File: src/inet/queueing/tokengenerator/SignalBasedTokenGenerator.ned