Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

TrafficGen Class Reference

A module to generate a certain rate of traffic. More...

#include <TrafficGen.h>

Inherits BaseApplLayer.

Collaboration diagram for TrafficGen:
Collaboration graph
[legend]

List of all members.

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.
BaseWorldUtilityworld
 Pointer to world utility module.

Detailed Description

A module to generate a certain rate of traffic.

Definition at line 27 of file TrafficGen.h.


Member Enumeration Documentation

The message kinds used by this layer.

Enumerator:
SEND_PACKET_TIMER 

Schedules sending of a new message.

TRAFFIC_GEN_PACKET 

The kind for a packet send by this layer.

LAST_TRAFFIC_GEN_MESSAGE_KIND 

Sub classing layers shoudl begin their own kinds at this value.

Definition at line 32 of file TrafficGen.h.

                              {
    SEND_PACKET_TIMER = LAST_BASE_APPL_MESSAGE_KIND,
    TRAFFIC_GEN_PACKET,
    LAST_TRAFFIC_GEN_MESSAGE_KIND
  };


The documentation for this class was generated from the following files: