Package: inet.queueing.sink
ActivePacketSink
simple moduleThis 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)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
ClockEvent | 0 | CollectionTimer |
Direct method calls (observed)
call to | function | info |
---|---|---|
PacketDemultiplexer | inet::queueing::PacketDemultiplexer::pullPacket | pullPacket |
ContentBasedFilter | inet::queueing::ContentBasedFilter::canPullSomePacket | canPullSomePacket |
ContentBasedFilter | inet::queueing::ContentBasedFilter::pullPacket | pullPacket |
PacketGate | inet::queueing::PacketGate::pullPacket | pullPacket |
DropTailQueue | inet::queueing::PacketQueue::pullPacket | pullPacket |
PacketQueue | inet::queueing::PacketQueue::pullPacket | pullPacket |
PriorityQueue | inet::queueing::CompoundPacketQueueBase::pullPacket | pullPacket |
ContentBasedScheduler | inet::queueing::ContentBasedScheduler::pullPacket | pullPacket |
MarkovScheduler | inet::queueing::MarkovScheduler::pullPacket | pullPacket |
PacketScheduler | inet::queueing::PacketScheduler::pullPacket | pullPacket |
PriorityScheduler | inet::queueing::PriorityScheduler::pullPacket | pullPacket |
WrrScheduler | inet::queueing::WrrScheduler::pullPacket | pullPacket |
PassivePacketSource | inet::queueing::PassivePacketSource::canPullPacket | canPullPacket |
PassivePacketSource | inet::queueing::PassivePacketSource::pullPacket | pullPacket |
inet.tutorials.queueing.ExampleCompoundPriorityQueue | inet::queueing::CompoundPacketQueueBase::pullPacket | pullPacket |
Called methods (observed)
function | info | call from |
---|---|---|
inet::queueing::ActivePacketSink::handleCanPullPacketChanged | handleCanPullPacketChanged | PacketDemultiplexer, ContentBasedFilter, PacketGate, DropTailQueue, PacketQueue, ContentBasedScheduler, MarkovScheduler, PacketScheduler, PriorityScheduler, WrrScheduler, PassivePacketSource |
Pull in messages (observed)
Packet operations (observed)
chunkType | packetAction |
---|---|
peekData |
Region Tagging operations (observed)
tagType | tagAction |
---|---|
CreationTimeTag | getAllTags |
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