StreamSplitter¶
Package: inet.protocolelement.redundancy
simple module StreamSplitter
Duplicates incoming packets based on the stream they are part of.
The stream is determined by the StreamReq tag that is attached to the packet.
The number of outgoing packets is determined by the mapping parameter. Each
outgoing packet will have an attached StreamReq with the tag name taken from
the mapping parameter.
See also: StreamMerger
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
Combines a stream merger and a stream splitter module into a stream relay layer. For incoming packets, the identified streams are merged by the stream merger. For outgoing packets, the requested streams are split by the stream splitter. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for various packet pusher modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
mapping |
object |
{} |
Map from input stream names to array of output stream names, empty string means no stream |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
StreamSplitter |
|
display |
i=block/fork |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Source code¶
//
// Duplicates incoming packets based on the stream they are part of.
// The stream is determined by the `StreamReq` tag that is attached to the packet.
// The number of outgoing packets is determined by the mapping parameter. Each
// outgoing packet will have an attached `StreamReq` with the tag name taken from
// the mapping parameter.
//
// @see ~StreamMerger
//
simple StreamSplitter extends PacketPusherBase like IPacketPusher
{
parameters:
object mapping @mutable = default({}); // Map from input stream names to array of output stream names, empty string means no stream
@class(StreamSplitter);
@display("i=block/fork");
}
File: src/inet/protocolelement/redundancy/StreamSplitter.ned