ActivePacketSource

Package: inet.queueing.source

ActivePacketSource

simple module

This module is an active packet source which pushes packets into the connected packet consumer.

ActivePacketSource

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
BurstyPacketProducer compound module

This module mixes two different packet sources to generate bursty traffic.

Extends

Name Type Description
PacketSourceBase simple module

This is a base module for various packet source modules. Packets are created randomly with regard to packet length and packet data. The representation of packet data can also be configured.

Parameters

Name Type Default value Description
displayStringTextFormat string "created %p pk (%l)"

determines the text that is written on top of the submodule

packetNameFormat string "%n-%c"

%n module name, %c packet number, %l packet length, %d packet data, %t simulation time, %e event number

packetRepresentation string "byteCount"

determines the chunk of the packet data

packetLength int
packetData int -1
productionInterval double

elapsed time between subsequent packets pushed to the connected packet consumer

Properties

Name Value Description
class ActivePacketSource
display i=block/source

Gates

Name Direction Size Description
out output

Signals

Name Type Unit
packetCreated inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetCreated packets created count, sum(packetBytes), vector(packetBytes) none

Source code

//
// This module is an active packet source which pushes packets into the connected
// packet consumer.
//
simple ActivePacketSource extends PacketSourceBase like IActivePacketSource
{
    parameters:
        volatile double productionInterval @unit(s); // elapsed time between subsequent packets pushed to the connected packet consumer
        @class(ActivePacketSource);
        @display("i=block/source");
        @signal[packetCreated](type=inet::Packet);
        @statistic[packetCreated](title="packets created"; record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none);
    gates:
        output out @labels(push);
}
File: src/inet/queueing/source/ActivePacketSource.ned