Package: inet.networklayer.diffserv
SingleRateThreeColorMeter
simple moduleImplements a Single Rate Three Color Meter (RFC 2697).
IP packets are classified according to three parameters, Committed Information Rate (cir), Committed Burst Size (cbs), and Excess Burst Size (ebs), to be either green, yellow, or red.
The green traffic is guaranteed to be under (in bits)
cir * (t1 - t0) + 8 * cbsand the green+yellow traffic is guaranteed to be under
cir * (t1 - t0) + 8 * (cbs + ebs)in every [t0,t1] interval.
When operating in color-aware mode, the meter does not recolor a packet that was colored by a previous marker to a lesser conforming color.
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 |
|---|---|---|
| DiffservTrafficConditioner | compound module |
TODO documentation |
| TrafficConditioner | compound module |
TODO documentation |
Extends
| Name | Type | Description |
|---|---|---|
| SimpleModule | simple module |
Base module for all INET simple modules. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| interfaceTableModule | string |
The path to the InterfaceTable module |
|
| cir | string |
Committed information rate, either absolute bitrate (e.g. "100kbps") or relative to the link's datarate (e.g. "20%") |
|
| cbs | int |
Committed burst size |
|
| ebs | int |
Excess burst size |
|
| colorAwareMode | bool | false |
Enables color-aware mode |
Properties
| Name | Value | Description |
|---|---|---|
| class | SingleRateThreeColorMeter | |
| display | i=block/timer |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| in | input | ||
| greenOut | output | ||
| yellowOut | output | ||
| redOut | output |
Source code
// // Implements a Single Rate Three Color Meter (RFC 2697). // // IP packets are classified according to three parameters, // Committed Information Rate (cir), Committed Burst Size (cbs), // and Excess Burst Size (ebs), to be either green, yellow, or red. // // The green traffic is guaranteed to be under (in bits) // <pre> // cir * (t1 - t0) + 8 * cbs // </pre> // and the green+yellow traffic is guaranteed to be under // <pre> // cir * (t1 - t0) + 8 * (cbs + ebs) // </pre> // in every [t0,t1] interval. // // When operating in color-aware mode, the meter does not recolor // a packet that was colored by a previous marker to a lesser conforming color. // simple SingleRateThreeColorMeter extends SimpleModule { parameters: @class(SingleRateThreeColorMeter); @display("i=block/timer"); string interfaceTableModule; // The path to the InterfaceTable module string cir; // Committed information rate, either absolute bitrate (e.g. "100kbps") or relative to the link's datarate (e.g. "20%") int cbs @unit(B); // Committed burst size int ebs @unit(B); // Excess burst size bool colorAwareMode = default(false); // Enables color-aware mode gates: input in; output greenOut; output yellowOut; output redOut; }File: src/inet/networklayer/diffserv/SingleRateThreeColorMeter.ned