Package: inet.queueing.classifier
SingleRateThreeColorClassifier
simple moduleThis packet classifier module classifies packets using two token buckets. Each packet is classified depending on which token bucket is the first one that contains the required number of tokens for the packet.
The first token bucket is filled with tokens using the committed information rate. The maximum number of tokens is determined by the committed burst size. Excess tokens from the first token bucket overflow into the second token bucket.
By default, packets consume 1 token per byte.
See also: SingleRateTwoColorMeter, SingleRateThreeColorMeter(1,2), DualRateThreeColorMeter
See also: SingleRateTwoColorClassifier, DualRateThreeColorClassifier
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
Name | Type | Description |
---|---|---|
MultiTokenBucketClassifier | simple module |
This module classifies packets into the first bucket that contains the required number of tokens. The packet is forwarded on the output gate that corresponds to the selected bucket. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
displayStringTextFormat | string | "contains %n tk\nmetered %p pk (%l)" |
determines the text that is written on top of the submodule |
reverseOrder | bool | false | |
buckets | object | [{initialNumTokens: dropUnit(committedBurstSize) / bitsPerToken, maxNumTokens: dropUnit(committedBurstSize) / bitsPerToken, tokenProductionRate: dropUnit(committedInformationRate) / bitsPerToken}, {initialNumTokens: dropUnit(excessBurstSize) / bitsPerToken, maxNumTokens: dropUnit(excessBurstSize) / bitsPerToken, tokenProductionRate: 0}] |
array of objects specifying the token buckets example: [{initialNumTokens: 100, maxNumTokens: 1000, tokenProductionRate: 10, excessTokenModule: ".other"}] |
tokenConsumptionPerPacket | double | 0 |
how many tokens are consumed per packet |
tokenConsumptionPerBit | double | 1 / bitsPerToken |
how many tokens are consumed per bit |
committedInformationRate | double |
committed information rate |
|
committedBurstSize | int |
committed burst size |
|
excessBurstSize | int |
excess burst size |
|
bitsPerToken | int | 8 |
how many bits are represented by 1 token |
Properties
Name | Value | Description |
---|---|---|
display | i=block/classifier | |
class | MultiTokenBucketClassifier |
Gates
Name | Direction | Size | Description |
---|---|---|---|
in | input | ||
out [ ] | output |
Signals
Name | Type | Unit |
---|---|---|
tokensChanged | double |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
numTokens | number of tokens | tokensChanged | vector | tk | linear |
Source code
// // This packet classifier module classifies packets using two token buckets. // Each packet is classified depending on which token bucket is the first one // that contains the required number of tokens for the packet. // // The first token bucket is filled with tokens using the committed information // rate. The maximum number of tokens is determined by the committed burst size. // Excess tokens from the first token bucket overflow into the second token bucket. // // By default, packets consume 1 token per byte. // // @see ~SingleRateTwoColorMeter, ~SingleRateThreeColorMeter, ~DualRateThreeColorMeter // @see ~SingleRateTwoColorClassifier, ~DualRateThreeColorClassifier // simple SingleRateThreeColorClassifier extends MultiTokenBucketClassifier { parameters: double committedInformationRate @unit(bps); // committed information rate int committedBurstSize @unit(b); // committed burst size int excessBurstSize @unit(b); // excess burst size int bitsPerToken = default(8); // how many bits are represented by 1 token buckets = [{initialNumTokens: dropUnit(committedBurstSize) / bitsPerToken, maxNumTokens: dropUnit(committedBurstSize) / bitsPerToken, tokenProductionRate: dropUnit(committedInformationRate) / bitsPerToken}, {initialNumTokens: dropUnit(excessBurstSize) / bitsPerToken, maxNumTokens: dropUnit(excessBurstSize) / bitsPerToken, tokenProductionRate: 0}]; tokenConsumptionPerBit = 1 / bitsPerToken; }File: src/inet/queueing/classifier/SingleRateThreeColorClassifier.ned