A module to generate a certain rate of traffic. More...
#include <TrafficGen.h>
Inherits BaseApplLayer.
Public Types | |
enum | TrafficGenMessageKinds { SEND_PACKET_TIMER = LAST_BASE_APPL_MESSAGE_KIND, TRAFFIC_GEN_PACKET, LAST_TRAFFIC_GEN_MESSAGE_KIND } |
The message kinds used by this layer. More... | |
Public Member Functions | |
virtual void | initialize (int stage) |
Omnet++ Initialisation. | |
virtual void | finish () |
Called at the end of the simulation to record statistics. | |
Protected Member Functions | |
virtual void | handleSelfMsg (cMessage *msg) |
Handle self messages such as timer... | |
virtual void | handleLowerMsg (cMessage *msg) |
Handle messages from lower layer. | |
virtual void | sendBroadcast () |
Send a broadcast message to lower layer. | |
Protected Attributes | |
simtime_t | packetTime |
The time it takes to transmit a packet. Bit length divided by bitrate. | |
double | pppt |
Packets per packet time. More or less the load this layer should generate. | |
int | burstSize |
The number of packets to send at once. | |
int | remainingBurst |
The remainign apckets to send for the current burst. | |
int | catPacket |
SHortcut to blackboards Packet category. | |
long | nbPacketDropped |
Tracks the number of packets dropped so far. | |
cMessage * | delayTimer |
Timer message to schedule next packet send. | |
BaseWorldUtility * | world |
Pointer to world utility module. |
A module to generate a certain rate of traffic.
Definition at line 27 of file TrafficGen.h.
The message kinds used by this layer.
Definition at line 32 of file TrafficGen.h.
{ SEND_PACKET_TIMER = LAST_BASE_APPL_MESSAGE_KIND, TRAFFIC_GEN_PACKET, LAST_TRAFFIC_GEN_MESSAGE_KIND };