Package: inet.networklayer.internetcloud
MatrixCloudDelayer
simple moduleDelay module for ~InternetCloud. This is essentially equivalent to a full graph with edges being differently configured DatarateChannel's. It delays and/or drops incoming packets based on rules specified in an xml configuration.
Rules are matched by incoming and outgoing neighbor node names, and specify delay, datarate or drop decision (all optional). Delay may be different for each packet, but the order of packets is preserved.
Using the interface IDs, the module will look up the names of the connected nodes and use those names for matching against the rule database.
A possible xml configuration:
<internetCloud symmetric="false">
<parameters>
<traffic src="src_host*" dest="dest_host*" delay="0.012s+exponential(0.2s)" datarate="uniform(100kbps,1Mbps)" drop="uniform(0,1) < 0.005" symmetric="true"/>
<traffic src="hosta" dest="hostb" delay="0.012s+exponential(0.2s)" datarate="uniform(500kbps,1Mbps)" drop="uniform(0,1) < 0.005"/>
<traffic src="hostb" dest="hosta" delay="0.010s+exponential(0.2s)" datarate="uniform(100kbps,500kbps)" drop="uniform(0,1) < 0.003"/>
<traffic src="*" dest="*" delay="0.02s+exponential(0.5s)" datarate="uniform(100kbps,200kbps)" drop="uniform(0,1) < 0.03" />
</parameters>
</internetCloud>
- The "delay", "datarate" and "drop" attributes of <traffic> are NED expressions that are evaluated for each packet. ("drop" must evaluate to boolean.)
- The "symmetric" attribute of <traffic> specifies whether the rule applies to both src->dest and dest->src packets.
- The "symmetric" attribute of <internetCloud> specifies the default value for the <traffic> entries.
<b>See also:</b> InternetCloud
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
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 |
|
| networkProtocolModule | string | ||
| config | xml |
Properties
| Name | Value | Description |
|---|---|---|
| class | MatrixCloudDelayer |
Source code
// // Delay module for ~InternetCloud. This is essentially equivalent to a full graph // with edges being differently configured `DatarateChannel`'s. It delays and/or drops // incoming packets based on rules specified in an xml configuration. // // Rules are matched by incoming and outgoing neighbor node names, and specify // delay, datarate or drop decision (all optional). Delay may be different for each // packet, but the order of packets is preserved. // // Using the interface IDs, the module will look up the names of the connected nodes // and use those names for matching against the rule database. // // A possible xml configuration: // <pre> // <internetCloud symmetric="false"> // <parameters> // <traffic src="src_host*" dest="dest_host*" delay="0.012s+exponential(0.2s)" datarate="uniform(100kbps,1Mbps)" drop="uniform(0,1) < 0.005" symmetric="true"/> // <traffic src="hosta" dest="hostb" delay="0.012s+exponential(0.2s)" datarate="uniform(500kbps,1Mbps)" drop="uniform(0,1) < 0.005"/> // <traffic src="hostb" dest="hosta" delay="0.010s+exponential(0.2s)" datarate="uniform(100kbps,500kbps)" drop="uniform(0,1) < 0.003"/> // <traffic src="*" dest="*" delay="0.02s+exponential(0.5s)" datarate="uniform(100kbps,200kbps)" drop="uniform(0,1) < 0.03" /> // </parameters> // </internetCloud> // </pre> // // - The "delay", "datarate" and "drop" attributes of <traffic> are NED expressions that // are evaluated for each packet. ("drop" must evaluate to boolean.) // - The "symmetric" attribute of <traffic> specifies whether the rule applies to // both src->dest and dest->src packets. // - The "symmetric" attribute of <internetCloud> specifies the default value for // the <traffic> entries. // // @see `InternetCloud` // simple MatrixCloudDelayer extends SimpleModule like ICloudDelayer { parameters: @class(MatrixCloudDelayer); string interfaceTableModule; // The path to the InterfaceTable module string networkProtocolModule; xml config; }File: src/inet/networklayer/internetcloud/MatrixCloudDelayer.ned