Package: inet.queueing.sink
ActivePacketSink
simple moduleAn 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.
Used in
| Name | Type | Description |
|---|---|---|
| BufferTutorialStep | network | (no description) |
| ComparatorTutorialStep | network | (no description) |
| CompoundPacketQueueTutorialStep | network | (no description) |
| ContentBasedSchedulerTutorialStep | network | (no description) |
| DemultiplexerTutorialStep | network | (no description) |
| DropTailQueueTutorialStep | network | (no description) |
| Filter2TutorialStep | network | (no description) |
| Gate2TutorialStep | network | (no description) |
| GenericSchedulerTutorialStep | network | (no description) |
| MarkovSchedulerTutorialStep | network | (no description) |
| PacketQueueTutorialStep | network | (no description) |
| PriorityBufferTutorialStep | network | (no description) |
| PriorityClassifierTutorialStep | network | (no description) |
| PriorityQueueTutorialStep | network | (no description) |
| PrioritySchedulerTutorialStep | network | (no description) |
| ProviderCollectorTutorialStep | network | (no description) |
| QueueBasedTokenGeneratorTutorialStep | network | (no description) |
| QueueFillerTutorialStep | network | (no description) |
| RedDropperTutorialStep | network | (no description) |
| WrrSchedulerTutorialStep | network | (no description) |
Extends
| Name | Type | Description |
|---|---|---|
| ActivePacketSinkBase | simple module |
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, supports displaying pars, watches, and module-specific information |
| clockModule | string | "" |
Relative path of a module that implements IClock(1,2); 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 |
|---|---|---|
| class | ActivePacketSink | |
| display | i=block/sink |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| in | input |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| packetPulled | inet::Packet |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| packetLifeTime | packet life time | packetLifeTime(packetPulled) | vector, histogram | s | none |
the statistical value is the time difference of the current simulation time and the creation time of the whole packet data, nan if not all bits have the same value |
| packetDelayVariation | packet delay variation | stddev(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) | vector, histogram | s |
the statistical value is the variation of the mean bit elapsed time per packet |
|
| packetDelayDifferenceToMean | packet delay difference to mean | differenceToMean(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) | vector, histogram | s | none |
the statistical value is the difference of the current and the mean bit elapsed time per packet |
| meanBitLifeTimePerPacket | mean bit life time per packet | weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled))) | vector, histogram | s | none |
the statistical value is the time difference of the current simulation time and the creation time of any bit in the region |
| packetLengths | packet lengths | packetLength(packetPulled) | sum, histogram, vector | b | none |
the statistical value is the length of the packet |
| dataRate | data rate | throughput(packetPulled) | vector | bps | linear |
the statistical value is the data rate of the packets |
| packetJitter | packet jitter | jitter(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPulled)))) | vector, histogram | s | none |
the statistical value is the difference of subsequent values of the mean bit elapsed time per packet |
| bitLifeTime | bit life time | weightTimes(lengthWeightedValuePerRegion(lifeTimePerRegion(packetPulled))) | histogram? | s | none |
the statistical value is the time difference of the current simulation time and the creation time of the bit |
| packets | packets | packetPulled | count | pk |
the statistical value is the packet |
Source code
// // 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