-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackgroundFlow.ned
More file actions
38 lines (33 loc) · 1.77 KB
/
BackgroundFlow.ned
File metadata and controls
38 lines (33 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package gpu_share.gpu.modules;
//
// Background Flow module for generating network traffic
// Emits DataPkt bursts to create serialization delays and contention
// Simulates TCP-like or telnet/ssh-like background flows
//
simple BackgroundFlow
{
parameters:
int vlanId = default(10); // VLAN identifier
int flowId = default(1); // Unique flow identifier
int srcAddr = default(1); // Source address
int destAddr = default(2); // Destination address (-1 for broadcast)
// Traffic generation parameters
double burstInterval @unit(s) = default(1s); // Time between bursts
int burstSize = default(10); // Packets per burst
int packetSize = default(1500); // Packet size in bytes (MTU-like)
double packetInterval @unit(s) = default(10ms); // Inter-packet gap within burst
double startTime @unit(s) = default(uniform(0s, 1s)); // Random start time
int maxBursts = default(0); // Max bursts to send (0=unlimited)
bool debug = default(false); // Debug logging
// Statistics
@signal[packetsSent](type=long);
@signal[bytesSent](type=long);
@signal[burstsCompleted](type=long);
@statistic[pktsSent](title="Packets sent"; source=packetsSent; record=count,vector);
@statistic[dataVolume](title="Bytes sent"; source=bytesSent; record=sum,vector);
@statistic[burstCount](title="Bursts completed"; source=burstsCompleted; record=count,vector);
// Display
@display("i=block/arrival");
gates:
inout port; // Connection to VLAN bus
}