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. |
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 |
Direct method calls (observed)
call to | function | info |
---|---|---|
ContentBasedClassifier | inet::queueing::ContentBasedClassifier::handleCanPushPacketChanged | handleCanPushPacketChanged |
PacketClassifier | inet::queueing::PacketClassifier::handleCanPushPacketChanged | handleCanPushPacketChanged |
TokenBasedServer | inet::queueing::TokenBasedServer::addTokens | addTokens |
ActivePacketSource | inet::queueing::ActivePacketSource::handleCanPushPacketChanged | handleCanPushPacketChanged |
PacketBasedTokenGenerator | inet::queueing::PacketBasedTokenGenerator::receiveSignal | tokensDepleted |
Called methods (observed)
function | info | call from |
---|---|---|
inet::queueing::PacketBasedTokenGenerator::pushPacket | pushPacket | ContentBasedClassifier, PacketClassifier, ActivePacketSource |
inet::queueing::PacketBasedTokenGenerator::receiveSignal | tokensDepleted | TokenBasedServer, PacketBasedTokenGenerator |
Pushed in messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
in | Packet | 0 | ContentBasedClassifier | DirectionTag, PacketProtocolTag | |
in | Packet | 0 | PacketClassifier | DirectionTag?, DscpInd?, EcnInd?, HopLimitInd?, InterfaceInd?, L3AddressInd?, L4PortInd?, NetworkProtocolInd?, PacketProtocolTag?, TosInd?, TransportProtocolInd? | |
in | Packet | 0 | ActivePacketSource | DirectionTag, PacketProtocolTag | |
in | Packet | 1 | PacketClassifier |
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