BurstSender¶
Package: simu5g.apps.burst
simple module BurstSender
Models an application that sends bursts of packets to a BurstReceiver application. During each burst, the application sends a configurable number of packets at regular intervals. The time interval between bursts can also be configured.
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
localPort |
int |
-1 |
Local port to bind the sender (-1 means any port) |
destPort |
int |
3000 |
Destination port to which packets will be sent |
destAddress |
string |
Destination address in string format |
|
startTime |
double |
0s |
Starting time of the first burst |
burstSize |
int |
10 |
Number of packets to be sent in each burst |
interBurstTime |
double |
1s |
Time interval between consecutive bursts |
packetSize |
int |
40B |
Size of one packet, in bytes |
intraBurstTime |
double |
0.01s |
Time interval between packets within a burst |
tos |
int |
-1 |
Type of Service/Traffic Class for the sent packets (-1 means no specific TOS/Traffic Class is set) |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/source |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
socketOut |
output |
||
socketIn |
input |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
burstSentPkt |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
burstSentPkt |
Sent packet ID |
burstSentPkt |
vector |
Source code¶
//
// Models an application that sends bursts of packets to a ~BurstReceiver
// application. During each burst, the application sends a configurable number of
// packets at regular intervals. The time interval between bursts can also be configured.
//
simple BurstSender like IApp
{
parameters:
int localPort = default(-1); // Local port to bind the sender (-1 means any port)
int destPort = default(3000); // Destination port to which packets will be sent
string destAddress; // Destination address in string format
double startTime @unit("s") = default(0s); // Starting time of the first burst
int burstSize = default(10); // Number of packets to be sent in each burst
double interBurstTime @unit("s") = default(1s); // Time interval between consecutive bursts
int packetSize @unit(B) = default(40B); // Size of one packet, in bytes
double intraBurstTime @unit("s") = default(0.01s); // Time interval between packets within a burst
int tos = default(-1); // Type of Service/Traffic Class for the sent packets (-1 means no specific TOS/Traffic Class is set)
@signal[burstSentPkt];
@statistic[burstSentPkt](title="Sent packet ID"; unit=""; source="burstSentPkt"; record=vector);
@display("i=block/source");
gates:
output socketOut;
input socketIn;
}