Package: inet.queueing.source
ActivePacketSource
simple moduleThis 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)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
ClockEvent | 0 | ProductionTimer |
Direct method calls (observed)
call to | function | info |
---|---|---|
ResidenceTimeMeasurer | inet::ResidenceTimeMeasurer::receiveSignal | packetCreated |
EligibilityTimeMeter | inet::EligibilityTimeMeter::pushPacket | pushPacket |
ContentBasedClassifier | inet::queueing::ContentBasedClassifier::pushPacket | pushPacket |
MarkovClassifier | inet::queueing::MarkovClassifier::pushPacket | pushPacket |
PacketClassifier | inet::queueing::PacketClassifier::pushPacket | pushPacket |
PriorityClassifier | inet::queueing::PriorityClassifier::pushPacket | pushPacket |
WrrClassifier | inet::queueing::WrrClassifier::pushPacket | pushPacket |
OrdinalBasedDuplicator | inet::queueing::OrdinalBasedDuplicator::pushPacket | pushPacket |
PacketCloner | inet::queueing::PacketCloner::pushPacket | pushPacket |
PacketDelayer | inet::queueing::PacketDelayer::pushPacket | pushPacket |
PacketDuplicator | inet::queueing::PacketDuplicator::pushPacket | pushPacket |
PacketMultiplexer | inet::queueing::PacketMultiplexer::pushPacket | pushPacket |
ContentBasedFilter | inet::queueing::ContentBasedFilter::pushPacket | pushPacket |
OrdinalBasedDropper | inet::queueing::OrdinalBasedDropper::pushPacket | pushPacket |
RedDropper | inet::queueing::RedDropper::pushPacket | pushPacket |
FlowMeasurementStarter | inet::queueing::FlowMeasurementStarter::pushPacket | pushPacket |
PacketGate | inet::queueing::PacketGate::pushPacket | pushPacket |
ContentBasedLabeler | inet::queueing::ContentBasedLabeler::pushPacket | pushPacket |
ContentBasedTagger | inet::queueing::ContentBasedTagger::pushPacket | pushPacket |
PacketTagger | inet::queueing::PacketTagger::pushPacket | pushPacket |
ExponentialRateMeter | inet::queueing::ExponentialRateMeter::pushPacket | pushPacket |
DropTailQueue | inet::queueing::PacketQueue::pushPacket | pushPacket |
PacketQueue | inet::queueing::PacketQueue::pushPacket | pushPacket |
PriorityQueue | inet::queueing::CompoundPacketQueueBase::pushPacket | pushPacket |
MarkovScheduler | inet::queueing::MarkovScheduler::pushPacket | pushPacket |
PassivePacketSink | inet::queueing::PassivePacketSink::pushPacket | pushPacket |
PacketBasedTokenGenerator | inet::queueing::PacketBasedTokenGenerator::pushPacket | pushPacket |
inet.tutorials.queueing.ExampleCompoundPriorityQueue | inet::queueing::CompoundPacketQueueBase::pushPacket | pushPacket |
inet.tutorials.queueing.ExampleCompoundPriorityQueue | inet::queueing::CompoundPacketQueueBase::receiveSignal | packetCreated |
Called methods (observed)
function | info | call from |
---|---|---|
inet::queueing::ActivePacketSource::handleCanPushPacketChanged | handleCanPushPacketChanged | EligibilityTimeMeter, 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)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
out | Packet | 0 | EthernetSocketIo | DirectionTag, PacketProtocolTag | |
out | Packet | 0 | TcpClientSocketIo | DirectionTag, PacketProtocolTag | |
out | Packet | 0 | UdpSocketIo | DirectionTag, PacketProtocolTag |
Push out messages (observed)
Packet operations (observed)
chunkType | packetAction |
---|---|
ByteCountChunk | Packet |
BytesChunk | Packet |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DirectionTag | addTagIfAbsent |
PacketProtocolTag | addTag |
Region Tagging operations (observed)
tagType | tagAction |
---|---|
CreationTimeTag | addTag |
IdentityTag | addTag |
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