ActivePacketSource

Package: inet.queueing.source

ActivePacketSource

simple module

This module is an active packet source which pushes packets into the connected module. It pushes whole packets through the out gate at every production interval. It pushes the first packet after the initial production offset.

If backpressure is present at the end of a production interval, then it waits until the backpressure disappears, and then pushes out a packet. The production interval timer always starts after the module pushes a packet out.

Invariants:

  • two subsequent packets are always pushed out at least productionInterval time apart
  • backpressure prevents packets from being pushed out

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
ActivePacketSourceBase simple module

This is a base module for various active packet source modules.

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 "%a-%c"

see directives in module documentation

packetRepresentation string "byteCount"

determines the chunk of the packet data

packetProtocol string "unknown"
packetLength int
packetData int -1
attachCreationTimeTag bool true
attachIdentityTag bool true
attachDirectionTag bool true
clockModule string ""

relative path of a module that implements IClock; optional

initialProductionOffset double -1s

initial duration before which packets are not produced. When negative, then produce packet in initialize()

productionInterval double

elapsed time between subsequent packets pushed to the connected packet consumer

scheduleForAbsoluteTime bool true

when a clock is used relative means that setting the clock will not affect the simulation time of the event

Properties

Name Value Description
display i=block/source
class ActivePacketSource

Gates

Name Direction Size Description
out output

Signals

Name Type Unit
packetPushed inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetLengths packet lengths packetLength(packetPushed) sum, histogram, vector b none
dataRate data rate throughput(packetPushed) vector bps linear
packets packets packetPushed count pk

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
ClockEvent0ProductionTimer

Direct method calls (observed)

call tofunctioninfo
ResidenceTimeMeasurerinet::ResidenceTimeMeasurer::receiveSignalpacketCreated
EligibilityTimeMeterinet::EligibilityTimeMeter::pushPacketpushPacket
ContentBasedClassifierinet::queueing::ContentBasedClassifier::pushPacketpushPacket
MarkovClassifierinet::queueing::MarkovClassifier::pushPacketpushPacket
PacketClassifierinet::queueing::PacketClassifier::pushPacketpushPacket
PriorityClassifierinet::queueing::PriorityClassifier::pushPacketpushPacket
WrrClassifierinet::queueing::WrrClassifier::pushPacketpushPacket
OrdinalBasedDuplicatorinet::queueing::OrdinalBasedDuplicator::pushPacketpushPacket
PacketClonerinet::queueing::PacketCloner::pushPacketpushPacket
PacketDelayerinet::queueing::PacketDelayer::pushPacketpushPacket
PacketDuplicatorinet::queueing::PacketDuplicator::pushPacketpushPacket
PacketMultiplexerinet::queueing::PacketMultiplexer::pushPacketpushPacket
ContentBasedFilterinet::queueing::ContentBasedFilter::pushPacketpushPacket
OrdinalBasedDropperinet::queueing::OrdinalBasedDropper::pushPacketpushPacket
RedDropperinet::queueing::RedDropper::pushPacketpushPacket
FlowMeasurementStarterinet::queueing::FlowMeasurementStarter::pushPacketpushPacket
PacketGateinet::queueing::PacketGate::pushPacketpushPacket
ContentBasedLabelerinet::queueing::ContentBasedLabeler::pushPacketpushPacket
ContentBasedTaggerinet::queueing::ContentBasedTagger::pushPacketpushPacket
PacketTaggerinet::queueing::PacketTagger::pushPacketpushPacket
ExponentialRateMeterinet::queueing::ExponentialRateMeter::pushPacketpushPacket
DropTailQueueinet::queueing::PacketQueue::pushPacketpushPacket
PacketQueueinet::queueing::PacketQueue::pushPacketpushPacket
PriorityQueueinet::queueing::CompoundPacketQueueBase::pushPacketpushPacket
MarkovSchedulerinet::queueing::MarkovScheduler::pushPacketpushPacket
PassivePacketSinkinet::queueing::PassivePacketSink::pushPacketpushPacket
PacketBasedTokenGeneratorinet::queueing::PacketBasedTokenGenerator::pushPacketpushPacket
inet.tutorials.queueing.ExampleCompoundPriorityQueueinet::queueing::CompoundPacketQueueBase::pushPacketpushPacket
inet.tutorials.queueing.ExampleCompoundPriorityQueueinet::queueing::CompoundPacketQueueBase::receiveSignalpacketCreated

Called methods (observed)

functioninfocall from
inet::queueing::ActivePacketSource::handleCanPushPacketChangedhandleCanPushPacketChangedEligibilityTimeMeter, ContentBasedClassifier, MarkovClassifier, PacketClassifier, PriorityClassifier, WrrClassifier, OrdinalBasedDuplicator, PacketCloner, PacketDelayer, PacketDuplicator, PacketMultiplexer, ContentBasedFilter, OrdinalBasedDropper, RedDropper, PacketGate, ContentBasedLabeler, ContentBasedTagger, PacketTagger, ExponentialRateMeter, DropTailQueue, PacketQueue, MarkovScheduler, PassivePacketSink, PacketBasedTokenGenerator

Outgoing messages (observed)

gatemsgkindctrldestModuletags
outPacket0EthernetSocketIoDirectionTag, PacketProtocolTag
outPacket0TcpClientSocketIoDirectionTag, PacketProtocolTag
outPacket0UdpSocketIoDirectionTag, PacketProtocolTag

Push out messages (observed)

gatemsgkindctrldestModuletags
outPacket0EligibilityTimeMeterDirectionTag, PacketProtocolTag
outPacket0ContentBasedClassifierDirectionTag, PacketProtocolTag
outPacket0MarkovClassifierDirectionTag, PacketProtocolTag
outPacket0PacketClassifierDirectionTag, PacketProtocolTag
outPacket0PriorityClassifierDirectionTag, PacketProtocolTag
outPacket0WrrClassifierDirectionTag, PacketProtocolTag
outPacket0OrdinalBasedDuplicatorDirectionTag, PacketProtocolTag
outPacket0PacketClonerDirectionTag, PacketProtocolTag
outPacket0PacketDelayerDirectionTag, PacketProtocolTag
outPacket0PacketDuplicatorDirectionTag, PacketProtocolTag
outPacket0PacketMultiplexerDirectionTag, PacketProtocolTag
outPacket0ContentBasedFilterDirectionTag, PacketProtocolTag
outPacket0OrdinalBasedDropperDirectionTag, PacketProtocolTag
outPacket0RedDropperDirectionTag, PacketProtocolTag
outPacket0FlowMeasurementStarterDirectionTag, PacketProtocolTag
outPacket0PacketGateDirectionTag, PacketProtocolTag
outPacket0ContentBasedLabelerDirectionTag, PacketProtocolTag
outPacket0ContentBasedTaggerDirectionTag, PacketProtocolTag
outPacket0PacketTaggerDirectionTag, PacketProtocolTag
outPacket0ExponentialRateMeterDirectionTag, PacketProtocolTag
outPacket0DropTailQueueDirectionTag, PacketProtocolTag
outPacket0PacketQueueDirectionTag, PacketProtocolTag
outPacket0MarkovSchedulerDirectionTag, PacketProtocolTag
outPacket0PassivePacketSinkDirectionTag, PacketProtocolTag
outPacket0PacketBasedTokenGeneratorDirectionTag, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
ByteCountChunkPacket
BytesChunkPacket

Shared Tagging operations (observed)

tagTypetagAction
DirectionTagaddTagIfAbsent
PacketProtocolTagaddTag

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTagaddTag
IdentityTagaddTag

Source code

//
// This module is an active packet source which pushes packets into the connected
// module. It pushes whole packets through the out gate at every production
// interval. It pushes the first packet after the initial production offset.
//
// If backpressure is present at the end of a production interval, then it waits
// until the backpressure disappears, and then pushes out a packet. The production
// interval timer always starts after the module pushes a packet out.
//
// Invariants:
//  - two subsequent packets are always pushed out at least productionInterval time apart
//  - backpressure prevents packets from being pushed out
//
simple ActivePacketSource extends ActivePacketSourceBase like IActivePacketSource
{
    parameters:
        string clockModule = default(""); // relative path of a module that implements IClock; optional
        double initialProductionOffset @mutable @unit(s) = default(-1s); // initial duration before which packets are not produced. When negative, then produce packet in initialize()
        volatile double productionInterval @unit(s); // elapsed time between subsequent packets pushed to the connected packet consumer
        bool scheduleForAbsoluteTime = default(true); // when a clock is used relative means that setting the clock will not affect the simulation time of the event
        @class(ActivePacketSource);
    gates:
        output out @labels(push);
}
File: src/inet/queueing/source/ActivePacketSource.ned