ActivePacketSink

Package: inet.queueing.sink

ActivePacketSink

simple module

This module is an active packet sink which pulls packets from the connected module. It pulls whole packets through the in gate at every collection interval. It pulls the first packet after the initial collection offset.

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

All pulled packets are counted and deleted.

Invariants:

  • two subsequent packets are always pulled in at least collectionInterval time apart
  • backpressure prevents packets from being pulled in

Inheritance diagram

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

Extends

Name Type Description
ActivePacketSinkBase simple module

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

Parameters

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

determines the text that is written on top of the submodule

clockModule string ""

relative path of a module that implements IClock; optional

initialCollectionOffset double -1s

initial duration before which packets are not collected, negative value means: try the first collection in initialize()

collectionInterval double

elapsed time between subsequent packets pulled from the connected packet provider

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/sink
class ActivePacketSink

Gates

Name Direction Size Description
in input

Signals

Name Type Unit
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetDelayVariation packet delay variation stddev(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) vector, histogram s
packetDelayDifferenceToMean packet delay difference to mean differenceToMean(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) vector, histogram s none
meanBitLifeTimePerPacket mean bit life time per packet weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled))) vector, histogram s none
packetLengths packet lengths packetLength(packetPulled) sum, histogram, vector b none
dataRate data rate throughput(packetPulled) vector bps linear
packetJitter packet jitter jitter(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) vector, histogram s none
bitLifeTime bit life time weightTimes(lengthWeightedValuePerRegion(lifeTimePerRegion(packetPulled))) histogram? s none
packets packets packetPulled count pk

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
ClockEvent0CollectionTimer

Direct method calls (observed)

call tofunctioninfo
PacketDemultiplexerinet::queueing::PacketDemultiplexer::pullPacketpullPacket
ContentBasedFilterinet::queueing::ContentBasedFilter::canPullSomePacketcanPullSomePacket
ContentBasedFilterinet::queueing::ContentBasedFilter::pullPacketpullPacket
PacketGateinet::queueing::PacketGate::pullPacketpullPacket
DropTailQueueinet::queueing::PacketQueue::pullPacketpullPacket
PacketQueueinet::queueing::PacketQueue::pullPacketpullPacket
PriorityQueueinet::queueing::CompoundPacketQueueBase::pullPacketpullPacket
ContentBasedSchedulerinet::queueing::ContentBasedScheduler::pullPacketpullPacket
MarkovSchedulerinet::queueing::MarkovScheduler::pullPacketpullPacket
PacketSchedulerinet::queueing::PacketScheduler::pullPacketpullPacket
PrioritySchedulerinet::queueing::PriorityScheduler::pullPacketpullPacket
WrrSchedulerinet::queueing::WrrScheduler::pullPacketpullPacket
PassivePacketSourceinet::queueing::PassivePacketSource::canPullPacketcanPullPacket
PassivePacketSourceinet::queueing::PassivePacketSource::pullPacketpullPacket
inet.tutorials.queueing.ExampleCompoundPriorityQueueinet::queueing::CompoundPacketQueueBase::pullPacketpullPacket

Called methods (observed)

functioninfocall from
inet::queueing::ActivePacketSink::handleCanPullPacketChangedhandleCanPullPacketChangedPacketDemultiplexer, ContentBasedFilter, PacketGate, DropTailQueue, PacketQueue, ContentBasedScheduler, MarkovScheduler, PacketScheduler, PriorityScheduler, WrrScheduler, PassivePacketSource

Pull in messages (observed)

gatemsgkindctrlsrcModuletags
inPacket0PacketDemultiplexerDirectionTag, PacketProtocolTag
inPacket0ContentBasedFilterDirectionTag, PacketProtocolTag
inPacket0PacketGateDirectionTag, PacketProtocolTag
inPacket0DropTailQueueDirectionTag, PacketProtocolTag
inPacket0PacketQueueDirectionTag, PacketProtocolTag
inPacket0ContentBasedSchedulerDirectionTag, PacketProtocolTag
inPacket0MarkovSchedulerDirectionTag, PacketProtocolTag
inPacket0PacketSchedulerDirectionTag, PacketProtocolTag
inPacket0PrioritySchedulerDirectionTag, PacketProtocolTag
inPacket0WrrSchedulerDirectionTag, PacketProtocolTag
inPacket0PassivePacketSourceDirectionTag, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
peekData

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTaggetAllTags

Source code

//
// This module is an active packet sink which pulls packets from the connected
// module. It pulls whole packets through the in gate at every collection interval.
// It pulls the first packet after the initial collection offset.
//
// If backpressure is present at the end of a collection interval, then it waits
// until the backpressure disappears, and then pulls in a packet. The collection
// interval timer always starts after the module pulls a packet in.
//
// All pulled packets are counted and deleted.
//
// Invariants:
//  - two subsequent packets are always pulled in at least collectionInterval time apart
//  - backpressure prevents packets from being pulled in
//
simple ActivePacketSink extends ActivePacketSinkBase like IActivePacketSink
{
    parameters:
        string clockModule = default(""); // relative path of a module that implements IClock; optional
        double initialCollectionOffset @unit(s) = default(-1s); // initial duration before which packets are not collected, negative value means: try the first collection in initialize()
        volatile double collectionInterval @unit(s); // elapsed time between subsequent packets pulled from the connected packet provider
        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(ActivePacketSink);
    gates:
        input in @labels(pull);
}

File: src/inet/queueing/sink/ActivePacketSink.ned