TrafficgenSimple¶
Package: inet.applications.trafficgen
simple module TrafficgenSimple
(no description)
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“{statusStr}” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
id |
int |
||
name |
string |
“trafficgen” |
|
priority |
int |
512 |
|
packetCount |
int |
-1 |
-1 = infinite |
packetSize |
int |
1024B |
|
packetInterval |
double |
0ms |
|
packetBurstSize |
int |
1 |
|
startTime |
double |
1s |
|
stopTime |
double |
-1s |
-1 = infiniter |
reliable |
bool |
true |
|
ordered |
bool |
true |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
TrafficgenSimple |
|
display |
i=block/plug |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
generatorIn |
input |
||
generatorOut |
output |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
sentPkt |
cPacket |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
sentPkt |
packets sent |
sentPkt |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
Source code¶
simple TrafficgenSimple extends SimpleModule like ITrafficgen
{
parameters:
@class(TrafficgenSimple);
int id;
string name = default("trafficgen");
int priority = default(512);
int packetCount = default(-1); // -1 = infinite
volatile int packetSize @unit("B") = default(1024B);
volatile double packetInterval @unit("s") = default(0ms);
volatile int packetBurstSize = default(1);
double startTime @unit("s") = default(1s);
double stopTime @unit("s") = default(-1s); // -1 = infiniter
bool reliable = default(true);
bool ordered = default(true);
displayStringTextFormat = default("{statusStr}");
@display("i=block/plug");
@signal[sentPkt](type=cPacket);
@statistic[sentPkt](title="packets sent"; source=sentPkt; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
gates:
input generatorIn @labels(trafficGen/up);
output generatorOut @labels(trafficGen/down);
}