Package: inet.queueing.tokengenerator
PacketBasedTokenGenerator
simple moduleThis module generates tokens into the configured ~TokenBasedServer for each consumed packet.
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 |
|---|---|---|
| TelnetServerConnection | compound module |
This module contains a configurable pre-composed telnet traffic source and traffic sink as part of a telnet server application. |
| TelnetServerTraffic | compound module | (no description) |
Used in
| Name | Type | Description |
|---|---|---|
| PacketBasedTokenGeneratorTutorialStep | network | (no description) |
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 | "processed %p pk (%l)\ngenerated %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 |
|
| numTokensPerPacket | double | 1 |
number of tokens per consumed packet |
| numTokensPerBit | double | 0 |
number of tokens per consumed bit |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/control | |
| class | PacketBasedTokenGenerator |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| in | input |
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 |
Source code
// // This module generates tokens into the configured ~TokenBasedServer for each // consumed packet. // simple PacketBasedTokenGenerator extends TokenGeneratorBase like IPassivePacketSink { parameters: volatile double numTokensPerPacket = default(1); // number of tokens per consumed packet volatile double numTokensPerBit = default(0); // number of tokens per consumed bit displayStringTextFormat = default("processed %p pk (%l)\ngenerated %t tk\nto %s"); // %p number of packet, %l total length @class(PacketBasedTokenGenerator); gates: input in; }File: src/inet/queueing/tokengenerator/PacketBasedTokenGenerator.ned